Exemple #1
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            editcategory edit = new editcategory(this);

            edit.hienthi(dgvCategory.Rows[d].Cells[0].Value.ToString(), dgvCategory.Rows[d].Cells[1].Value.ToString(), dgvCategory.Rows[d].Cells[3].Value.ToString());
            edit.ShowDialog();
        }
Exemple #2
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     try
     {
         editcategory edit = new editcategory(this);
         try
         {
             edit.hienthi(dgvCategory.Rows[d].Cells[0].Value.ToString(), dgvCategory.Rows[d].Cells[1].Value.ToString(), dgvCategory.Rows[d].Cells[2].Value.ToString());
             edit.ShowDialog();
         } catch (Exception x)
         {
             MessageBox.Show("Phải chọn một dòng dữ liệu", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     catch (NullReferenceException x)
     {
         MessageBox.Show(x.Message);
     }
 }