protected override void EditRecord() { if (GMode == ASPConstant.ModeBrowse && dataGridView.SelectedRows.Count > 0) { base.EditRecord(); DataGridViewRow row = dataGridView.SelectedRows[0]; if (!GDBMKaryawan.SelectById(int.Parse(row.Cells["IdMKaryawan"].Value.ToString()), ref GMKaryawan)) { GMKaryawan = GDBMKaryawan.Clear(); } ShowData(); } EditNmMKaryawan.Focus(); }
protected override void Initialize() { GTitleForm = "Master Group"; GMManager = GDBMKaryawan.Clear(); GMAnggota = GDBMKaryawan.Clear(); GMGroup = GDBMGroup.Clear(); tabControl1.TabIndex = 1; ShowData(); GenerateComboColumn(); GetTable(); SetMode(ASPConstant.ModeBrowse); dataGridViewInput.Focus(); base.Initialize(); }