public void ThemTK(string MNV, string TDN, string MK, string TT) { QLKhachSanEntities chung = new QLKhachSanEntities(); TAIKHOAN td = new TAIKHOAN(); td.MANV = MNV; td.TENDN = TDN; td.MATKHAU = MK; td.TRANGTHAI = TT; chung.TAIKHOAN.Add(td); chung.SaveChanges(); }
public bool themTaiKhoan(TAIKHOAN taiKhoan) { try { ketNoi.TAIKHOANs.InsertOnSubmit(taiKhoan); ketNoi.SubmitChanges(); return(true); } catch (Exception) { return(false); } }
public bool KhoaTaiKhoan(string pMaNV) { try { TAIKHOAN tAIKHOAN = linq.TAIKHOANs.Where(t => t.MANV == pMaNV).FirstOrDefault(); tAIKHOAN.HOATDONG = false; linq.SubmitChanges(); return(true); } catch { return(false); } }
public bool capTaiKhoan(TAIKHOAN taiKhoan) { try { var ketQua = from taiKhoanTam in ketNoi.TAIKHOANs where taiKhoanTam.TENTAIKHOAN == taiKhoan.TENTAIKHOAN select taiKhoanTam; foreach (var tam in ketQua) { tam.MATKHAU = taiKhoan.MATKHAU; } ketNoi.SubmitChanges(); return(true); } catch (Exception) { return(false); } }
partial void DeleteTAIKHOAN(TAIKHOAN instance);
partial void UpdateTAIKHOAN(TAIKHOAN instance);
partial void InsertTAIKHOAN(TAIKHOAN instance);