Beispiel #1
0
        private void EditMaterialBtn_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var dr = WBDetReInGridView.GetRow(WBDetReInGridView.FocusedRowHandle) as GetWaybillDetIn_Result;

            if (dr != null)
            {
                if (dr.PosType == 0)
                {
                    using (var df = new frmWBReturnDetIn(_db, dr.PosId, wb, (int?)WHComboBox.EditValue, OutDateEdit.DateTime))
                    {
                        if (df.ShowDialog() == DialogResult.OK)
                        {
                            RefreshDet();
                        }
                    }
                }


                if (dr.PosType == 3)
                {
                    using (var df = new frmWayBillTMCDet(_db, dr.PosId, wb))
                    {
                        if (df.ShowDialog() == DialogResult.OK)
                        {
                            RefreshDet();
                        }
                    }
                }
            }
        }
Beispiel #2
0
        private void DelMaterialBtn_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var dr = WBDetReInGridView.GetRow(WBDetReInGridView.FocusedRowHandle) as GetWaybillDetIn_Result;

            if (dr != null)
            {
                if (dr.PosType == 0)
                {
                    _db.DeleteWhere <WaybillDet>(w => w.PosId == dr.PosId);
                }

                if (dr.PosType == 3)
                {
                    _db.DeleteWhere <WayBillTmc>(w => w.PosId == dr.PosId);
                }

                RefreshDet();
            }
        }