private void barButtonItem3_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (MessageBox.Show("Ви дійсно бажаєте видалити запис !", "Видалення запису", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes) { var dr = TechProcGridView.GetRow(TechProcGridView.FocusedRowHandle) as v_TechProcDet; DB.SkladBase().DeleteWhere <TechProcDet>(w => w.DetId == dr.DetId).SaveChanges(); RefreshTechProcDet(dr.WbillId); } }
private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var dr = TechProcGridView.GetRow(TechProcGridView.FocusedRowHandle) as v_TechProcDet; if (dr != null) { using (var f = new frmTechProcDet(dr.WbillId, dr.DetId)) { var row = WbGridView.GetFocusedRow() as WBListMake_Result; f.OkButton.Enabled = (row.Checked != 1); if (f.ShowDialog() == DialogResult.OK) { RefreshTechProcDet(dr.WbillId); } } } }