private void addToolStripMenuItem_Click(object sender, EventArgs e)
 {
     //Add
     Frm_ChargebackBanknet_Activity a = new Frm_ChargebackBanknet_Activity();
     a.mode = "0";//Add
     a.type = "5";
     a.ShowDialog();
     LoadData();
 }
 private void dataGridView1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (dataGridView1.Rows.Count == 0)
     {
         MessageBox.Show("Please choose 1 row for editing");
         return;
     }
     Frm_ChargebackBanknet_Activity a = new Frm_ChargebackBanknet_Activity();
     a.mode = "1";//Update
     if (rbTypeIssuer1.Checked)
         a.type = "1";
     else if (rbTypeIssuer2.Checked)
         a.type = "2";
     else if (rbTypeAcquier1.Checked)
         a.type = "3";
     else if (rbTypeAcquier2.Checked)
         a.type = "4";
     else if (rbTypeManual.Checked)
     {
         a.type_string = dataGridView1["TYPE", dataGridView1.CurrentCell.RowIndex].Value.ToString();
         a.type = "5";
     }
     a.card_number = dataGridView1[0, dataGridView1.CurrentCell.RowIndex].Value.ToString();//card
     a.processing_code = dataGridView1[1, dataGridView1.CurrentCell.RowIndex].Value.ToString();//processing_code;
     a.amount = dataGridView1[2, dataGridView1.CurrentCell.RowIndex].Value.ToString();//transaction_amount;
     a.trace = dataGridView1[3, dataGridView1.CurrentCell.RowIndex].Value.ToString();//trace_audit_number;
     a.date = dataGridView1[4, dataGridView1.CurrentCell.RowIndex].Value.ToString();//transaction_local_date;
     a.acquier_institution = dataGridView1[5, dataGridView1.CurrentCell.RowIndex].Value.ToString();//acquirer_institution_code;
     a.card_acceptor_id = dataGridView1[6, dataGridView1.CurrentCell.RowIndex].Value.ToString();//card_acceptor_term_id;
     a.message_type = dataGridView1[7, dataGridView1.CurrentCell.RowIndex].Value.ToString();//message_type;
     a.authorization = dataGridView1[8, dataGridView1.CurrentCell.RowIndex].Value.ToString();//authorization_code
     a.rc = dataGridView1["RC_RECEIVE", dataGridView1.CurrentCell.RowIndex].Value.ToString();
     a.chargeback = "" + dataGridView1["CHARGEBACK_FLAG", dataGridView1.CurrentCell.RowIndex].Value.ToString();
     a.note = dataGridView1["NOTE", dataGridView1.CurrentCell.RowIndex].Value.ToString();
     if (rbTypeManual.Checked == true)
     {
         a.card_acceptor_term = dataGridView1["PRIVATE_DATA_C_40", dataGridView1.CurrentCell.RowIndex].Value.ToString();
     }
     else
         a.card_acceptor_term = dataGridView1["MCC", dataGridView1.CurrentCell.RowIndex].Value.ToString();
     a.ShowDialog();
     LoadData();
 }