public FrmConsumables(MasterConsumable consum, Form mdiparent) { this._consum = consum; this._mdiparent = mdiparent; InitializeComponent(); lqtToolStrip1.SaveAndCloseClick += new EventHandler(lqtToolStrip1_SaveAndCloseClick); lqtToolStrip1.SaveAndNewClick += new EventHandler(lqtToolStrip1_SaveAndNewClick); this.EnableSaveButton += new EventHandler(FrmConsumables_EnableSaveButton); this.DisableSaveButton += new EventHandler(FrmConsumables_DisableSaveButton); OnDataUsageEdit += new EventHandler(_taPane_OnDataUsageEdit); lsvProductUsageT.AddNoneEditableColumn(0); lsvProductUsageT.AddNoneEditableColumn(1); lsvProductUsageP.AddNoneEditableColumn(0); lsvProductUsageP.AddNoneEditableColumn(1); lsvProductUsageI.AddNoneEditableColumn(0); lsvProductUsageI.AddNoneEditableColumn(1); lsvProductUsageT.SubitemTextChanged += new EventHandler<SubitemTextEventArgs>(lsvProductUsage_SelectedIndexChanged); lsvProductUsageP.SubitemTextChanged += new EventHandler<SubitemTextEventArgs>(lsvProductUsageP_SelectedIndexChanged); lsvProductUsageI.SubitemTextChanged += new EventHandler<SubitemTextEventArgs>(lsvProductUsageI_SelectedIndexChanged); PopTestingAreas(); PopTest(); PopInstrument(); PopPeriod(); PopProduct(); LoadTestCtr(); }
public void RebindTest(MasterConsumable consum) { this._consum = consum; BindConsumable(); }
void lqtToolStrip1_SaveAndNewClick(object sender, EventArgs e) { try { LQTUserMessage msg = SaveOrUpdateObject(); ((LqtMainWindowForm)_mdiparent).ShowStatusBarInfo(msg.Message, true); TestingArea ta = _consum.TestingArea; Test t = _consum.Test; _consum = new MasterConsumable(); _consum.TestingArea = ta; _consum.Test = t; // LoadTestCtr(); SetControlState(); comTest.Enabled = true; comTestarea.Enabled = true; _isedited = false; } catch (Exception ex) { new FrmShowError(CustomExceptionHandler.ShowExceptionText(ex)).ShowDialog(); } }