示例#1
0
 private String[] GetListOfQuestions()
 {
     using (GetPasswordQuestions gpq = new GetPasswordQuestions())
     {
         if (!gpq.HasErrors)
         {
             if (gpq.QuestionsTable.TableName != "Empty")
             {
                 List <String> Qs = new List <string>();
                 foreach (DataRow dr in gpq.QuestionsTable.Rows)
                 {
                     Qs.Add(dr[0].ToString());
                 }
                 ThisSession.CurrentAvailableSecurityQuestions = Qs.ToArray <String>();
                 return(Qs.ToArray <String>());
             }
             else
             {
                 ThisSession.CurrentAvailableSecurityQuestions = new[] { "none" };
                 return(new String[] { "none" });
             }
         }
         else
         {
             return(null);
         }
     }
 }
示例#2
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");
            }
        }
示例#3
0
 private void SetupPasswordQuestions()
 {
     using (GetPasswordQuestions gpq = new GetPasswordQuestions())
     {
         if (!gpq.HasErrors)
         {
             DropDownList Qs = (DropDownList)cuwReview.CreateUserStep.ContentTemplateContainer.FindControl("ddlQuestion");
             Qs.DataSource = gpq.QuestionsTable;
             Qs.DataBind();
         }
     }
 }
示例#4
0
 private void SetupPasswordQuestions()
 {
     using (GetPasswordQuestions gpq = new GetPasswordQuestions())
     {
         if (!gpq.HasErrors &&
             gpq.Tables.Count > 0 &&
             gpq.Tables[0].Rows.Count > 0)
         {
             using (DropDownList Qs = (cuwReview.CreateUserStep.ContentTemplateContainer.FindControl("ddlQuestion") as DropDownList))
             {
                 Qs.DataSource = gpq.QuestionsTable;
                 Qs.DataBind();
             }
         }
     }
 }
示例#5
0
        /// <summary>
        /// Puts the relevant data into session from a DataSet object rather than storing the whole object in session
        /// </summary>
        /// <param name="info">The GetPasswordQuestions Object filled with data</param>
        /// <returns>True if successfull, False if there are errors or no data</returns>
        public static Boolean PutInSession(this GetPasswordQuestions info)
        {
            if (info.HasErrors)
            {
                return(false);
            }
            if (info.Tables.Count == 0)
            {
                return(false);
            }
            if (info.Tables[0].Rows.Count == 0)
            {
                return(false);
            }

            ThisSession.CurrentAvailableSecurityQuestions =
                (from i in info.Tables[0].AsEnumerable()
                 select i[0].ToString()).ToArray <String>();

            return(true);
        }
示例#6
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");
            }
        }
示例#7
0
 private void SetupPasswordQuestions()
 {
     using (GetPasswordQuestions gpq = new GetPasswordQuestions())
     {
         if (!gpq.HasErrors)
         {
             DropDownList Qs = (DropDownList)cuwReview.CreateUserStep.ContentTemplateContainer.FindControl("ddlQuestion");
             Qs.DataSource = gpq.QuestionsTable;
             Qs.DataBind();
         }
     }
 }
示例#8
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");
            }
        }
示例#9
0
 private void SetupPasswordQuestions()
 {
     using (GetPasswordQuestions gpq = new GetPasswordQuestions())
     {
         if (!gpq.HasErrors &&
             gpq.Tables.Count > 0 &&
             gpq.Tables[0].Rows.Count > 0)
         {
             using (DropDownList Qs = (cuwReview.CreateUserStep.ContentTemplateContainer.FindControl("ddlQuestion") as DropDownList))
             {
                 Qs.DataSource = gpq.QuestionsTable;
                 Qs.DataBind();
             }
         }
     }
 }
示例#10
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");
            }
        }
示例#11
0
 private String[] GetListOfQuestions()
 {
     using (GetPasswordQuestions gpq = new GetPasswordQuestions())
     {
         if (!gpq.HasErrors)
         {
             if (gpq.QuestionsTable.TableName != "Empty")
             {
                 List<String> Qs = new List<string>();
                 foreach (DataRow dr in gpq.QuestionsTable.Rows)
                     Qs.Add(dr[0].ToString());
                 ThisSession.CurrentAvailableSecurityQuestions = Qs.ToArray<String>();
                 return Qs.ToArray<String>();
             }
             else
             {
                 ThisSession.CurrentAvailableSecurityQuestions = new[] { "none" };
                 return new String[] { "none" };
             }
         }
         else { return null; }
     }
 }