示例#1
0
        public static User CheckUser(string UserName, string Password)
        {
            var        passMD5   = Password.GetMD5();
            VinaEntity db        = new VinaEntity();
            var        UserLogOn = db.Users.SingleOrDefault(m => m.UserName == UserName && m.Password == passMD5);

            return(UserLogOn);
        }
示例#2
0
        public static User UserLogOn()
        {
            VinaEntity db = new VinaEntity();

            return(db.Users.FirstOrDefault(m => m.UserName == System.Web.HttpContext.Current.User.Identity.Name));
        }