private void GetDialogResult(frmStockLookUp dialogForm) { _rowID = dialogForm.RowId; txtLookupName.Text = dialogForm.NamaStock; _lastStockName = txtLookupName.Text; txtLookupCode.Text = dialogForm.BarangId; _satuan = dialogForm.Satuan; _isiKoli = dialogForm.nIsiKoli; if (this.SelectData != null) { this.SelectData(this, new EventArgs()); } }
private void ShowDialogForm(string searchArg, DataTable dt) { frmStockLookUp ifrmDialog = new frmStockLookUp(searchArg, dt); ifrmDialog.ShowDialog(); if (ifrmDialog.DialogResult == DialogResult.OK) { GetDialogResult(ifrmDialog); } else { txtLookupName.Focus(); } }
/* Call normal dialog form */ private void ShowDialogForm() { frmStockLookUp ifrmDialog = new frmStockLookUp(); ifrmDialog.ShowDialog(); if (ifrmDialog.DialogResult == DialogResult.OK) { GetDialogResult(ifrmDialog); } else { txtLookupName.Focus(); } }