private void BuildForm() { if (fvouchertype == null) { fvouchertype = new FVouchertype(); } fvouchertype.FVouchertype_NeedToRefresh += VVouchertype_NeedToRefresh; Parent.Controls.Add(fvouchertype); fvouchertype.Dock = DockStyle.Fill; fvouchertype.Show(); fvouchertype.BringToFront(); }
void txt_vouchertype_NewEntryNeeded(object sender, string pValue) { if (fsvouchertype == null) { fsvouchertype = new FVouchertype(); } Parent.Controls.Add(fsvouchertype); fsvouchertype.Dock = DockStyle.Fill; fsvouchertype.Show(); fsvouchertype.BringToFront(); fsvouchertype.Focus(); fsvouchertype.SetAction(BtnEvent.New, null); fsvouchertype.SetFocus(); }
void Listgrid_RowAction(object sender, EventArgs e) { if (listgrid.SelectedRow == null) { return; } if (fvouchertype == null) { fvouchertype = new FVouchertype(); } BuildForm(); string pkValue = GetSelectedPkValue(); if (pkValue != null) { fvouchertype.SetAction(BtnEvent.Open, pkValue); } }