private void BtnSearchTransactionType_Click(object sender, EventArgs e) { FrmTransactionType SearchTransactionType = new FrmTransactionType(true); var TransTypeRes = SearchTransactionType.ShowDialog(); string TransTypeVal = ""; if (TransTypeRes == DialogResult.OK) { TransTypeVal = SearchTransactionType.ReturnValue1; } CmbType.Text = TransTypeVal; CmbType.Select(CmbType.Text.Length, 0); }
private void transactionTypesToolStripMenuItem_Click(object sender, EventArgs e) { FrmTransactionType TransactionType = new FrmTransactionType(false); TransactionType.BackColor = Color.SlateBlue; var TransTypeRes = TransactionType.ShowDialog(); string TransTypeVal; if (TransTypeRes == DialogResult.OK) { TransTypeVal = TransactionType.ReturnValue1; } }