예제 #1
0
 private void btnCapNhatNV_Click(object sender, EventArgs e)
 {
     try
     {
         TaiKhoan x = new TaiKhoan();
         x.CapNhat(txtTaiKhoanNV.Text, txtMatKhauNV.Text, txtQuyenNV.Text, txttenNguoiDungNV.Text, null, ref err);
         LoadData();
         MessageBox.Show("Cập Nhật Thành Công");
     }
     catch (SqlException)
     {
         MessageBox.Show("Lỗi Rồi!!!");
     }
 }
예제 #2
0
 private void btnCapNhat_Click(object sender, EventArgs e)
 {
     try
     {
         if (txtMatKhau.Text == "" || txtTaiKhoan.Text == "" || cboLoaiTK.Text == "")
         {
             MessageBox.Show("Vui lòng điền đầy đủ thông tin");
         }
         else
         {
             tk.CapNhat(txtTaiKhoan.Text, txtMatKhau.Text, cboLoaiTK.Text);
             MessageBox.Show("Cập nhật tài khoản thành công");
             hienthi();
             txtMatKhau.Clear();
             txtTaiKhoan.Clear();
             cboLoaiTK.Text = "";
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }