Beispiel #1
0
        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);
            }
        }
Beispiel #2
0
 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);
         }
     }
 }
Beispiel #3
0
 public static string ID_Khoi(string TenKhoi)
 {
     return(DAO_Tai_Khoan.ID_Khoi(TenKhoi));
 }
Beispiel #4
0
 public static string ID_Lop(string Ten_lop)
 {
     return(DAO_Tai_Khoan.ID_Lop(Ten_lop));
 }
Beispiel #5
0
 public static string Quyen(string TaiKhoan)
 {
     return(DAO_Tai_Khoan.Quyen(TaiKhoan));
 }
Beispiel #6
0
 public static Tai_khoan layThongTinTaiKhoan(string taiKhoan)
 {
     return(DAO_Tai_Khoan.layThongTinTaiKhoan(taiKhoan));
 }
Beispiel #7
0
 public static string ID_Quyen(string Ten_Quyen)
 {
     return(DAO_Tai_Khoan.ID_Quyen(Ten_Quyen));
 }