private void BuildForm() { if (fcash_in_hand == null) { fcash_in_hand = new FCash_in_hand(); } fcash_in_hand.FCash_in_hand_NeedToRefresh += VCash_in_hand_NeedToRefresh; Parent.Controls.Add(fcash_in_hand); fcash_in_hand.Dock = DockStyle.Fill; fcash_in_hand.Show(); fcash_in_hand.BringToFront(); }
void txt_cash_in_hand_NewEntryNeeded(object sender, string pValue) { if (fscash_in_hand == null) { fscash_in_hand = new FCash_in_hand(); } Parent.Controls.Add(fscash_in_hand); fscash_in_hand.Dock = DockStyle.Fill; fscash_in_hand.Show(); fscash_in_hand.BringToFront(); fscash_in_hand.Focus(); fscash_in_hand.SetAction(BtnEvent.New, null); fscash_in_hand.SetFocus(); }
void Listgrid_RowAction(object sender, EventArgs e) { if (listgrid.SelectedRow == null) { return; } if (fcash_in_hand == null) { fcash_in_hand = new FCash_in_hand(); } BuildForm(); string pkValue = GetSelectedPkValue(); if (pkValue != null) { fcash_in_hand.SetAction(BtnEvent.Open, pkValue); } }