private void btnSearchAcc_Click(object sender, EventArgs e) { try { frmAllAccount f = new frmAllAccount(); f.op = "Rael_And_Right_Acc"; f.Fill_Real_And_Right_Account(); f.ShowDialog(); txtCode.Text = f.Acc_Code; } catch { } }
private void txtCode_KeyDown(object sender, KeyEventArgs e) { if (e.KeyValue == 13) { if (txtName.Text != "") { txtDate.Focus(); } else { frmAllAccount f = new frmAllAccount(); f.op = "Rael_And_Right_Acc"; f.Fill_Real_And_Right_Account(); f.txtSearch.Text = txtCode.Text; f.ShowDialog(); txtCode.Text = f.Acc_Code; } } }