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