Exemplo n.º 1
0
 private void buttonCreate_Click(object sender, EventArgs e)
 {
     if (stateTaoMoi == false)
     {
         MatHang matHang = new MatHang("Tạo mới", load);
         matHang.Show();
         stateTaoMoi         = true;
         matHang.FormClosed += matHang_FormClosed1;
     }
 }
Exemplo n.º 2
0
 private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (stateCapNhat == false)
     {
         string  mh      = (string)dataGridView1.Rows[e.RowIndex].Cells[0].Value;
         string  th      = (string)dataGridView1.Rows[e.RowIndex].Cells[1].Value;
         int     gb      = (int)dataGridView1.Rows[e.RowIndex].Cells[2].Value;
         int     gv      = (int)dataGridView1.Rows[e.RowIndex].Cells[3].Value;
         int     sl      = (int)dataGridView1.Rows[e.RowIndex].Cells[4].Value;
         string  ncc     = (string)dataGridView1.Rows[e.RowIndex].Cells[5].Value;
         MatHang matHang = new MatHang("Cập nhật", mh, th, gb, gv, sl, ncc, load);
         matHang.Show();
         stateCapNhat        = true;
         matHang.FormClosed += matHang_FormClosed2;
     }
 }