Beispiel #1
0
        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);
            }
        }
Beispiel #2
0
        private void TechProcGridView_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
        {
            using (var db = new BaseEntities())
            {
                if (e.Column.FieldName == "Notes")
                {
                    var row = TechProcGridView.GetFocusedRow() as v_TechProcDet;
                    var wbd = db.TechProcDet.FirstOrDefault(w => w.DetId == row.DetId);
                    wbd.Notes = Convert.ToString(e.Value);
                }

                db.SaveChanges();
            }
        }
Beispiel #3
0
        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);
                    }
                }
            }
        }