示例#1
0
        protected void ContinueAsEmployee(object sender, EventArgs e)
        {
            if (gvUsers.SelectedIndex > -1)
            {
                LoadUserEmployerSessionInfo();

                using (GetPasswordQuestions gpq = new GetPasswordQuestions())
                {
                    if (!gpq.PutInSession())
                    {
                        ThisSession.CurrentAvailableSecurityQuestions = new[] { "none" };
                    }
                }

                using (InsertUserLoginHistory iulh = new InsertUserLoginHistory())
                {
                    iulh.UserName     = Membership.GetUserNameByEmail(ThisSession.PatientEmail);
                    iulh.CallCenterID = Membership.GetUser().ProviderUserKey.ToString();
                    iulh.Domain       = Request.Url.Host;
                    iulh.PostData();
                    if (!iulh.HasErrors && iulh.RowsBack != 1)
                    {
                        //In the event this fails or either 0 or more than one row is effected
                        //NOTIFY LAURA :)
                    }
                    ThisSession.UserLogginID = Membership.GetUser().ProviderUserKey.ToString();
                    ThisSession.LoggedIn     = true;
                }
                Response.Redirect("~/SearchInfo/Search.aspx#tabcare");
            }
        }
示例#2
0
        protected void MainLogin_LoggedIn(object sender, EventArgs e)
        {
            String  mlUN         = MainLogin.UserName.Trim();
            Boolean IsCustomer   = Roles.IsUserInRole(mlUN, "Customer"),
                    IsCallCenter = Roles.IsUserInRole(mlUN, "CallCenter"),
                    IsAdmin      = Roles.IsUserInRole(mlUN, "Admin"),
                    IsManagement = Roles.IsUserInRole(mlUN, "Management"),
                    IsDebugUser  = Roles.IsUserInRole(mlUN, "DebugUser");

            bool iqComplete; string lastIQUrl;

            if (IsCustomer)
            {
                using (TextBox userName = (MainLogin.FindControl("UserName") as TextBox))
                {
                    String sUN = Encoder.HtmlEncode(userName.Text.Trim());

                    ThisSession.UserLogginID = Membership.GetUser(sUN).ProviderUserKey.ToString();
                    ThisSession.LoggedIn     = true;

                    LoadUserSessionInfo();
                    //LoadUserEmployerSessionInfo();
                    iqComplete = LoadUserEmployerSessionInfo(out lastIQUrl);
                    LoadEmployerContent();

                    using (GetPasswordQuestions gpq = new GetPasswordQuestions())
                    {
                        if (!gpq.PutInSession())
                        {
                            ThisSession.CurrentAvailableSecurityQuestions = new[] { "none" };
                        }
                        ThisSession.CurrentSecurityQuestion = Membership.GetUser(sUN).PasswordQuestion;
                    }
                    using (InsertUserLoginHistory iulh = new InsertUserLoginHistory())
                    {
                        iulh.UserName = Membership.GetUserNameByEmail(ThisSession.PatientEmail);
                        iulh.Domain   = Request.Url.Host;
                        if (IsDebugUser)
                        {
                            iulh.CallCenterID = Guid.Empty.ToString();
                        }
                        iulh.PostData();
                    }
                    if (ThisSession.SavingsChoiceEnabled)
                    {
                        if (!iqComplete)
                        {
                            if (lastIQUrl == null || lastIQUrl == "null" || lastIQUrl.Trim() == "" || lastIQUrl == "error")
                            {
                                Response.Redirect("~/SavingsChoice/SavingsChoiceWelcome.aspx");
                            }
                            else
                            {
                                Response.Redirect("~/SavingsChoice/" + lastIQUrl);
                            }
                        }
                    }
                }
                if (Request.QueryString.AllKeys.Contains("dest"))
                {
                    HttpContext.Current.Session["requestedTab"] = Encoder.HtmlEncode(Request.QueryString["dest"]);
                }
            }
            else if (IsCallCenter)
            {
                Response.Redirect(ResolveUrl("~/CallCenter/Default.aspx"));
            }
            else if (IsAdmin && !IsManagement)
            {
                using (InsertUserLoginHistory iulh = new InsertUserLoginHistory())
                {
                    iulh.UserName = Membership.GetUserNameByEmail(ThisSession.PatientEmail);
                    iulh.Domain   = Request.Url.Host;
                    iulh.PostData();
                    if (!iulh.HasErrors && iulh.RowsBack != 1)
                    {
                    }
                }
                Response.Redirect("~/Admin/Default.aspx");
            }
            else if (IsManagement && !IsAdmin)
            {
                Response.Redirect("~/ContentManagement/Default.aspx");
            }
            else if (IsManagement && IsAdmin)
            {
                Response.Redirect("~/AdminPortal/Default.aspx");
            }
        }
示例#3
0
        protected void MainLogin_LoggedIn(object sender, EventArgs e)
        {
            String mlUN = MainLogin.UserName.Trim();
            Boolean IsCustomer = Roles.IsUserInRole(mlUN, "Customer"),
                IsCallCenter = Roles.IsUserInRole(mlUN, "CallCenter"),
                IsAdmin = Roles.IsUserInRole(mlUN, "Admin"),
                IsManagement = Roles.IsUserInRole(mlUN, "Management"),
                IsDebugUser = Roles.IsUserInRole(mlUN, "DebugUser");

            bool iqComplete; string lastIQUrl;

            if (IsCustomer)
            {
                using (TextBox userName = (MainLogin.FindControl("UserName") as TextBox))
                {
                    String sUN = Encoder.HtmlEncode(userName.Text.Trim());

                    ThisSession.UserLogginID = Membership.GetUser(sUN).ProviderUserKey.ToString();
                    ThisSession.LoggedIn = true;

                    LoadUserSessionInfo();
                    //LoadUserEmployerSessionInfo();
                    iqComplete = LoadUserEmployerSessionInfo(out lastIQUrl);
                    LoadEmployerContent();

                    using (GetPasswordQuestions gpq = new GetPasswordQuestions())
                    {
                        if (!gpq.PutInSession())
                        {
                            ThisSession.CurrentAvailableSecurityQuestions = new[] { "none" };
                        }
                        ThisSession.CurrentSecurityQuestion = Membership.GetUser(sUN).PasswordQuestion;
                    }
                    using (InsertUserLoginHistory iulh = new InsertUserLoginHistory())
                    {
                        iulh.UserName = Membership.GetUserNameByEmail(ThisSession.PatientEmail);
                        iulh.Domain = Request.Url.Host;
                        if (IsDebugUser) { iulh.CallCenterID = Guid.Empty.ToString(); }
                        iulh.PostData();
                    }
                    if (ThisSession.SavingsChoiceEnabled)
                    {
                        if (!iqComplete)
                            if (lastIQUrl == null || lastIQUrl == "null" || lastIQUrl.Trim() == "" || lastIQUrl == "error")
                                Response.Redirect("~/SavingsChoice/SavingsChoiceWelcome.aspx");
                            else
                                Response.Redirect("~/SavingsChoice/" + lastIQUrl);
                    }
                }
                if (Request.QueryString.AllKeys.Contains("dest"))
                    HttpContext.Current.Session["requestedTab"] = Encoder.HtmlEncode( Request.QueryString["dest"] );
            }
            else if (IsCallCenter)
            {
                Response.Redirect(ResolveUrl("~/CallCenter/Default.aspx"));
            }
            else if (IsAdmin && !IsManagement)
            {
                using (InsertUserLoginHistory iulh = new InsertUserLoginHistory())
                {
                    iulh.UserName = Membership.GetUserNameByEmail(ThisSession.PatientEmail);
                    iulh.Domain = Request.Url.Host;
                    iulh.PostData();
                    if (!iulh.HasErrors && iulh.RowsBack != 1)
                    { }
                }
                Response.Redirect("~/Admin/Default.aspx");
            }
            else if (IsManagement && !IsAdmin)
            {
                Response.Redirect("~/ContentManagement/Default.aspx");
            }
            else if (IsManagement && IsAdmin)
            {
                Response.Redirect("~/AdminPortal/Default.aspx");
            }
        }
示例#4
0
        protected void ContinueAsEmployee(object sender, EventArgs e)
        {
            if (gvUsers.SelectedIndex > -1)
            {
                LoadUserEmployerSessionInfo();

                using (GetPasswordQuestions gpq = new GetPasswordQuestions())
                {
                    if (!gpq.PutInSession())
                    {
                        ThisSession.CurrentAvailableSecurityQuestions = new[] { "none" };
                    }
                }

                using (InsertUserLoginHistory iulh = new InsertUserLoginHistory())
                {
                    iulh.UserName = Membership.GetUserNameByEmail(ThisSession.PatientEmail);
                    iulh.CallCenterID = Membership.GetUser().ProviderUserKey.ToString();
                    iulh.Domain = Request.Url.Host;
                    iulh.PostData();
                    if (!iulh.HasErrors && iulh.RowsBack != 1)
                    {
                        //In the event this fails or either 0 or more than one row is effected
                        //NOTIFY LAURA :)
                    }
                    ThisSession.UserLogginID = Membership.GetUser().ProviderUserKey.ToString();
                    ThisSession.LoggedIn = true;
                }
                Response.Redirect("~/SearchInfo/Search.aspx#tabcare");
            }
        }