Example #1
0
        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>");
            }
        }
Example #2
0
 public static Users GetUserDetails(int id)
 {
     return(DALlibrary.GetUserDetailsByUserId(id));
 }
Example #3
0
 public static List <Role> GetRoles()
 {
     return(DALlibrary.GetRoles());
 }
Example #4
0
        public static List <Users> GetUsers()
        {
            var Model = DALlibrary.GetUsers();

            return(Model);
        }
Example #5
0
 public static void Update(int id, string name, string surname, string email)
 {
     DALlibrary.UpdateUser(id, name, surname, email);
 }