protected void btn_Submit_Click(object sender, EventArgs e) { if (Page.IsValid) { Security.Users.UserMgr myUserMgr = new Security.Users.UserMgr(); //myUserMgr.Remove_UserCookie(this.Page); myUserMgr.Add_UserCookie(this.Page, tbx_Email.Text, tbx_Password.Text, chkbox_RememberMe.Checked); if (Security.Users.UserStatus.Validate_UserGroup(this.Page, Security.Users.UserGroup.Administrator)) { switch (droplist_Module.SelectedValue) { case "e2CMS": Response.Redirect("~/App_AdminCP/SiteAdmin/Default.aspx"); break; case "e2Shop": Response.Redirect("~/App_AdminCP/ShopAdmin/Default.aspx"); break; } } else { lbl_ErrorText.Text = "The user does not have permission"; } } }
protected void btn_Submit_Click(object sender, EventArgs e) { if (Page.IsValid) { Security.Users.UserMgr myUserMgr = new Security.Users.UserMgr(); myUserMgr.Add_UserCookie(this.Page, tbx_Email.Text, tbx_Password.Text, chkbox_RememberMe.Checked); Response.Redirect(_loginurl); } }