private void BuildForm() { if (fproduct == null) { fproduct = new FProduct(); } fproduct.FProduct_NeedToRefresh += VProduct_NeedToRefresh; Parent.Controls.Add(fproduct); fproduct.Dock = DockStyle.Fill; fproduct.Show(); fproduct.BringToFront(); }
void txt_product_NewEntryNeeded(object sender, string pValue) { if (fsproduct == null) { fsproduct = new FProduct(); } Parent.Controls.Add(fsproduct); fsproduct.Dock = DockStyle.Fill; fsproduct.Show(); fsproduct.BringToFront(); fsproduct.Focus(); fsproduct.SetAction(BtnEvent.New, null); fsproduct.SetFocus(); }
void Listgrid_RowAction(object sender, EventArgs e) { if (listgrid.SelectedRow == null) { return; } if (fproduct == null) { fproduct = new FProduct(); } BuildForm(); string pkValue = GetSelectedPkValue(); if (pkValue != null) { fproduct.SetAction(BtnEvent.Open, pkValue); } }