protected void UserLogin(object sender, EventArgs e) { UserLoginInfo usr = DALlibrary.CheckLogin(Email.Value, ComputeSha256Hash(Password.Value)); string ReturnUrl = Convert.ToString(Request.QueryString["url"]); if (usr.UserEmail == Resources.GlobalResources.IsLogged) { Session[Constants.UserSession] = usr.RoleName; if (ReturnUrl == null) { Response.Redirect("Booklibrary.aspx"); } Response.Redirect(ReturnUrl); } else { ClientScript.RegisterStartupScript(Page.GetType(), "validation", "<script language='javascript'>alert('არასწორი მეილი ან პაროლი')</script>"); } }
public static Users GetUserDetails(int id) { return(DALlibrary.GetUserDetailsByUserId(id)); }
public static List <Role> GetRoles() { return(DALlibrary.GetRoles()); }
public static List <Users> GetUsers() { var Model = DALlibrary.GetUsers(); return(Model); }
public static void Update(int id, string name, string surname, string email) { DALlibrary.UpdateUser(id, name, surname, email); }