private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { frmDonVi dv = new frmDonVi(); dv.ShowDialog(); loaddatadonvi(); }
public frmImportDonVi(frmDonVi _frm) { InitializeComponent(); gridView1.Invalidate(); gridView1.IndicatorWidth = 40; ReadXml_User(); gridView1.Invalidate(); gridView1.IndicatorWidth = 40; dtable.Columns.Add("Unit_ID", typeof(string)); dtable.Columns.Add("Unit_Name", typeof(string)); dtable.Columns.Add("Description", typeof(string)); frmdonvi = _frm; }
private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { frmDonVi f = new frmDonVi(); if (ExistForm(f)) { return; } f.MdiParent = this; f.Show(); } catch { } }
private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { int row_index = gridView1.FocusedRowHandle; string col_field_name = "DonViID"; object value = gridView1.GetRowCellValue(row_index, col_field_name); if (value != null) { frmDonVi dm = new frmDonVi(); dm.ID = (int)value; dm.ShowDialog(); } else { XtraMessageBox.Show("Bạn chưa chọn đối tượng để chỉnh sửa ", "cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Warning); } loaddatadonvi(); }