private void BuildForm() { if (finvoice == null) { finvoice = new FPurchase(); } finvoice.FPurchase_NeedToRefresh += VPurchase_NeedToRefresh; Parent.Controls.Add(finvoice); finvoice.Dock = DockStyle.Fill; finvoice.Show(); finvoice.BringToFront(); }
void Listgrid_RowAction(object sender, EventArgs e) { if (listgrid.SelectedRow == null) { return; } if (finvoice == null) { finvoice = new FPurchase(); } BuildForm(); string pkValue = GetSelectedPkValue(); if (pkValue != null) { finvoice.SetAction(BtnEvent.Open, pkValue); } }