public bool IsRegister(string login, string pass) { bool ok = false; UserDO uDO = new UserDO(); UniversalEntity ue = new UniversalEntity(); ue = uDO.RetrieveUserAccess(login, pass); if (ue.Count > 0) { ok = true; } return(ok); }
public User GetCurrentUser() { User u = new User(); UniversalEntity ue = new UniversalEntity(); UserDO UDO = new UserDO(); if (HttpContext.Current.Request.Cookies["name"] != null && HttpContext.Current.Request.Cookies["pass"] != null) { ue = UDO.RetrieveUserAccess(HttpContext.Current.Request.Cookies["name"].Value, Utilities.MD5Hash(HttpContext.Current.Request.Cookies["pass"].Value)); if (ue.Count > 0) { u = (User)ue[0]; } } return(u); }
public bool IsLogin() { if (HttpContext.Current.Request.Cookies["name"] != null && HttpContext.Current.Request.Cookies["pass"] != null) { User u = new User(); UniversalEntity ue = new UniversalEntity(); UserDO UDO = new UserDO(); ue = UDO.RetrieveUserAccess(HttpContext.Current.Request.Cookies["name"].Value, Utilities.MD5Hash(HttpContext.Current.Request.Cookies["pass"].Value)); if (ue.Count > 0) { return(true); } else { return(false); } } else { return(false); } }