public static bool Doi_mat_khau(string TaiKhoan, string Mat_Khau, string Mat_khau_moi) { using (var QLTTN = new QLTTNDataContext()) { var Querry = from p in QLTTN.NGUOIDUNGs where p.TaiKhoan == TaiKhoan select p; if (Querry.First().MatKhau == BUS_Tai_Khoan.GetHashString(Mat_Khau)) { DAO_Tai_Khoan.Doi_Mat_Khau(TaiKhoan, BUS_Tai_Khoan.GetHashString(Mat_khau_moi)); return(true); } return(false); } }
public static void Them_nguoi_dung(NGUOIDUNG nguoi_dung, string _loi_ = null) { using (var QLTTN = new QLTTNDataContext()) { var Querry = from ng_dung in QLTTN.NGUOIDUNGs where ng_dung.TaiKhoan == nguoi_dung.TaiKhoan select ng_dung; if (Querry.Count() > 0) { MessageBox.Show("Tài Khoản Đã Tồn Tại", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Error); } else if (Querry.Count() == 0 && _loi_ == null) { nguoi_dung.MatKhau = GetHashString(nguoi_dung.MatKhau); DAO_Tai_Khoan.Them_Nguoi_Dung(nguoi_dung); MessageBox.Show("Đăng Ký thành công ^_^", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
public static string ID_Khoi(string TenKhoi) { return(DAO_Tai_Khoan.ID_Khoi(TenKhoi)); }
public static string ID_Lop(string Ten_lop) { return(DAO_Tai_Khoan.ID_Lop(Ten_lop)); }
public static string Quyen(string TaiKhoan) { return(DAO_Tai_Khoan.Quyen(TaiKhoan)); }
public static Tai_khoan layThongTinTaiKhoan(string taiKhoan) { return(DAO_Tai_Khoan.layThongTinTaiKhoan(taiKhoan)); }
public static string ID_Quyen(string Ten_Quyen) { return(DAO_Tai_Khoan.ID_Quyen(Ten_Quyen)); }