private void GetDialogResult(frmArmadaKirimLookup dialogForm) { this._KodeArmada = dialogForm._KodeArmada; this._Kendaraan = dialogForm._Kendaraan; this._NomorPolisi = dialogForm._NomorPolisi; this._TripMeterKM = dialogForm._TripMeterKM; this._KMPerLiter = dialogForm._KMPerLiter; commonTextBox1.Text = dialogForm._Kendaraan; if (this.SelectData != null) { this.SelectData(this, new EventArgs()); } }
private void ShowDialogForm() { try { DataTable dt = new DataTable(); using (Database db = new Database()) { db.Commands.Add(db.CreateCommand("usp_Lookup_ArmadaKirim")); db.Commands[0].Parameters.Add(new Parameter("@str", SqlDbType.VarChar, commonTextBox1.Text)); dt = db.Commands[0].ExecuteDataTable(); } frmArmadaKirimLookup ifrmDialog = new frmArmadaKirimLookup(dt); ifrmDialog.ShowDialog(); if (ifrmDialog.DialogResult == DialogResult.OK) { GetDialogResult(ifrmDialog); } } catch (Exception ex) { Error.LogError(ex); } }