private void btAuthorize_Click(object sender, EventArgs e) { try { if (cardnbr != "") { //Frm_Authorization.cardnbr = tb_cardnumber.Text.Replace(" ", ""); if (Frm_main.admin_flag) Frm_Authorization.cardnbr = cardnbr; else Frm_Authorization.cardnbr = cardnbr.Substring(0, 4) + "xxxxxxxx" + cardnbr.Substring(12); Frm_Authorization.cardnbr_full = cardnbr; Frm_Authorization.accnbr = accountnbr; Frm_Authorization.statuscard = tbcard_status.Text; //Frm_Authorization1 auth = new Frm_Authorization1(tb_cardnumber.Text.Replace(" ", "")); Frm_Authorization auth = new Frm_Authorization(); auth.ShowDialog(); } else MessageBox.Show("Card number is null"); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void dgv_trans_CellDoubleClick ( object sender, DataGridViewCellEventArgs e ) { try { Frm_Authorization frm = new Frm_Authorization ( ); Frm_Authorization.cardnbr = dgv_trans["card_number", dgv_trans.CurrentCell.RowIndex].Value.ToString ( ).Trim ( ); Frm_Authorization.cardnbr_full = dgv_trans["card_number", dgv_trans.CurrentCell.RowIndex].Value.ToString ( ).Trim ( ); frm.rdStatusAll.Checked = true; frm.ShowDialog ( ); // loadData(); } catch (Exception ex) { MessageBox.Show ( "Err dgv_trans_CellDoubleClick: \n" + ex.ToString ( ) ); } }