コード例 #1
0
 private void btnSua_Click(object sender, EventArgs e)
 {
     if (txtMaNCC.Text == "") 
     {
         MessageBox.Show("Bạn chưa chọn bản ghi nào", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     if (txtTenNCC.Text.Trim().Length == 0)
     {
         MessageBox.Show("Bạn chưa nhập tên nhà cung cấp", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     if (string.IsNullOrEmpty(txtDiaChi.Text) || string.IsNullOrEmpty(txtDienThoai.Text))
     {
         MessageBox.Show("vui lòng nhập đầy đủ các trường còn lại");
     }
     BLL.updateNCC(txtMaNCC.Text, txtTenNCC.Text, txtDiaChi.Text, txtDienThoai.Text);
     frmDMNhaCC_Load(sender, e);
     ResetValue();
     btnBoQua.Enabled = false;
 }