private void BuildForm() { if (fsalestype == null) { fsalestype = new FSalestype(); } fsalestype.FSalestype_NeedToRefresh += VSalestype_NeedToRefresh; Parent.Controls.Add(fsalestype); fsalestype.Dock = DockStyle.Fill; fsalestype.Show(); fsalestype.BringToFront(); }
void txt_salestype_NewEntryNeeded(object sender, string pValue) { if (fssalestype == null) { fssalestype = new FSalestype(); } Parent.Controls.Add(fssalestype); fssalestype.Dock = DockStyle.Fill; fssalestype.Show(); fssalestype.BringToFront(); fssalestype.Focus(); fssalestype.SetAction(BtnEvent.New, null); fssalestype.SetFocus(); }
void Listgrid_RowAction(object sender, EventArgs e) { if (listgrid.SelectedRow == null) { return; } if (fsalestype == null) { fsalestype = new FSalestype(); } BuildForm(); string pkValue = GetSelectedPkValue(); if (pkValue != null) { fsalestype.SetAction(BtnEvent.Open, pkValue); } }