示例#1
0
 /*เรียก form ย่อย เพิ่มข้อมูลบัญชีธนาคาร เพื่อแก้ไขข้อมูล*/
 private void แกไขขอมลบญชToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (dataGridView1.SelectedRows.Count > 0 && status == 2)
     {
         Bank.AddAccount b = new AddAccount(dataGridView1.CurrentRow.Cells[2].Value.ToString()
             , dataGridView1.CurrentRow.Cells[0].Value.ToString()
             , dataGridView1.CurrentRow.Cells[1].Value.ToString()
             , dataGridView1.CurrentRow.Cells[3].Value.ToString()
             , dataGridView1.CurrentRow.Cells[4].Value.ToString()
             , dataGridView1.CurrentRow.Cells[5].Value.ToString()
             , dataGridView1.CurrentRow.Cells[6].Value.ToString()
             , dataGridView1.CurrentRow.Cells[7].Value.ToString());
         b.ShowDialog();
         if (b.DialogResult == DialogResult.OK)
         {
             ShowDgvAccount();
         }
     }
     else
     {
         MessageBox.Show("กรุณาเลือกรายการที่ต้องการแก้ไข");
     }
 }
示例#2
0
 /*เรียก form ย่อย เพิ่มข้อมูลบัญชีธนาคาร*/
 private void เพมขอมลบญชToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Bank.AddAccount Bank = new AddAccount();
     Bank.ShowDialog();
     if (Bank.DialogResult == DialogResult.OK)
     {
         ShowDgvAccount();
     }
 }