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