private void addToolStripMenuItem_Click(object sender, EventArgs e) { Frm_Import_Fee_Merchant_Manual a = new Frm_Import_Fee_Merchant_Manual(); a.type = "0"; a.ShowDialog(); LoadData(); }
private void editToolStripMenuItem_Click(object sender, EventArgs e) { if (dataGridView1.Rows.Count == 0) { MessageBox.Show("Please choose 1 row for editing"); return; } if (dataGridView1.Rows.Count > 0) { Frm_Import_Fee_Merchant_Manual a = new Frm_Import_Fee_Merchant_Manual(); a.type = "1"; a.batch_id = dataGridView1[0, dataGridView1.CurrentCell.RowIndex].Value.ToString(); a.MID = dataGridView1[1, dataGridView1.CurrentCell.RowIndex].Value.ToString(); a.tran_amount = dataGridView1[7, dataGridView1.CurrentCell.RowIndex].Value.ToString(); // a.makh = dataGridView1[1, dataGridView1.CurrentCell.RowIndex].Value.ToString(); a.ShowDialog(); LoadData(); } else return; }
private void dataGridView2_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (dataGridView2.Rows.Count == 0) { MessageBox.Show("Please choose 1 row for editing"); return; } if (dataGridView2.Rows.Count > 0) { Frm_Import_Fee_Merchant_Manual a = new Frm_Import_Fee_Merchant_Manual(); a.type = "1"; a.batch_id = dataGridView2[0, dataGridView2.CurrentCell.RowIndex].Value.ToString(); a.MID = dataGridView2[1, dataGridView2.CurrentCell.RowIndex].Value.ToString(); a.tran_amount = dataGridView2[7, dataGridView2.CurrentCell.RowIndex].Value.ToString(); a.card_number = dataGridView2["card_number", dataGridView2.CurrentCell.RowIndex].Value.ToString(); a.trace = dataGridView2[5, dataGridView2.CurrentCell.RowIndex].Value.ToString(); // a.makh = dataGridView1[1, dataGridView1.CurrentCell.RowIndex].Value.ToString(); a.ShowDialog(); LoadData(); } else return; }