Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //== KLIK CELL PADA DBGRID =================================================
- procedure TForm1.DBGrid1CellClick(Column: TColumn);
- begin
- Button2.Enabled := True;
- CheckBox1.Checked := FALSE;
- if ZTable1.FieldByName('NIK').AsString = '' then
- begin
- ShowMessage('Kosong!');
- Edit1.Clear;
- Edit2.Clear;
- Edit3.Clear;
- Exit;
- end;
- Edit1.Text := ZTable1.FieldByName('NIK').AsString;
- Edit2.Text := ZTable1.FieldByName('nama_karyawan').AsString;
- if ZTable1.FieldByName('jenis_kelamin').AsString = 'Laki-laki' then
- begin
- RadioButton1.Checked := TRUE;
- RadioButton2.Checked := FALSE;
- end else
- begin
- RadioButton1.Checked := FALSE;
- RadioButton2.Checked := TRUE;
- end;
- Edit3.Text := ZTable1.FieldByName('tempat_lahir').AsString;
- DateTimePicker1.DateTime := ZTable1.FieldByName('tanggal_lahir').AsDateTime;
- if ZTable1.FieldByName('jabatan').AsString = 'Manager' then
- begin
- ComboBox1.ItemIndex := 0;
- end else if ZTable1.FieldByName('jabatan').AsString = 'Supervisor' then
- begin
- ComboBox1.ItemIndex := 1;
- end else if ZTable1.FieldByName('jabatan').AsString = 'Staff' then
- begin
- ComboBox1.ItemIndex := 2;
- end else
- begin
- ComboBox1.ItemIndex := 3;
- end;
- end;
- //==========================================================================
Advertisement
Add Comment
Please, Sign In to add comment