private void barLargeButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (gridView1.FocusedRowHandle >= 0) { string id = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, gridView1.Columns[1]).ToString(); //MessageBox.Show(id); CUSTOMER objcustomer = new CUSTOMER(); objcustomer = new CUSTOMERController().LayTTCUSTOMER(id); frmCapNhatKhachHang frm = new frmCapNhatKhachHang(); frm.Load_Data(objcustomer); frm.ShowDialog(); } }
private void gridControl1_DoubleClick(object sender, EventArgs e) { if (gridView1.Columns[0].View.FocusedRowHandle >= 0) { string id = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, gridView1.Columns[1]).ToString(); //MessageBox.Show(id); CUSTOMER objcustomer = new CUSTOMER(); objcustomer = new CUSTOMERController().LayTTCUSTOMER(id); frmCapNhatKhachHang frm = new frmCapNhatKhachHang(); frm.Load_Data(objcustomer); frm.ShowDialog(); } }