private void btn_frm_DAN_TOC_Click(object sender, EventArgs e) { frm_DAN_TOC_EDIT frm_DT = new frm_DAN_TOC_EDIT(null, true); frm_DT.ShowDialog(); Init_Reference_Data(); }
void edit_record(object sender, EventArgs e) { DataRowView current_row = (DataRowView)gv_DATA.GetFocusedRow(); if (current_row == null) { return; } string row_code = current_row.Row.ItemArray[0].ToString(); frm_DAN_TOC_EDIT frm_edit = new frm_DAN_TOC_EDIT(row_code); if (frm_edit.ShowDialog() == DialogResult.OK) { dg_DATA.DataSource = DAO_DIC_ETHNIC.Get_Data(); int rowHandle = gv_DATA.LocateByValue(column_code, row_code); if (rowHandle != DevExpress.XtraGrid.GridControl.InvalidRowHandle) { gv_DATA.FocusedRowHandle = rowHandle; } } }
void insert_record(object sender, EventArgs e) { frm_DAN_TOC_EDIT frm_edit = new frm_DAN_TOC_EDIT(this, true); frm_edit.ShowDialog(); }