Пример #1
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            if (IsValidate())
            {
                ManageUserSVC.ManageUserClient       Client = new ManageUserSVC.ManageUserClient();
                ManageUserSVC.ManageUserCustomerData User   = new ManageUserSVC.ManageUserCustomerData();

                DataSet dsCus = ViewState["CustomerData"] as DataSet;
                if (dsCus != null && dsCus.Tables[0].Rows.Count > 0)
                {
                    User.CompanyName    = dsCus.Tables[0].Rows[0]["Company_Name"].ToString();
                    User.PersonalID     = dsCus.Tables[0].Rows[0]["PersonalID"].ToString();
                    User.FirstName      = dsCus.Tables[0].Rows[0]["FirstName"].ToString();
                    User.LastName       = dsCus.Tables[0].Rows[0]["LastName"].ToString();
                    User.ApplicationNo  = dsCus.Tables[0].Rows[0]["ApplicationNo"].ToString();
                    User.CompanyAffilID = Guid.Parse(dsCus.Tables[0].Rows[0]["CompAffilationID"].ToString());
                    User.Country        = dsCus.Tables[0].Rows[0]["Country"].ToString();
                    User.EmailID        = dsCus.Tables[0].Rows[0]["EmailID"].ToString();
                    User.IsActive       = Convert.ToBoolean(dsCus.Tables[0].Rows[0]["IsActive"].ToString());
                    User.IsActivePolicy = Convert.ToBoolean(dsCus.Tables[0].Rows[0]["IsActivePolicy"].ToString());
                    User.SecurityCode   = dsCus.Tables[0].Rows[0]["SecurityCode"].ToString();
                    User.YourID         = dsCus.Tables[0].Rows[0]["YID"].ToString();
                    User.ZipCode        = dsCus.Tables[0].Rows[0]["ZipCode"].ToString();
                    User.SignUpDate     = Convert.ToDateTime(dsCus.Tables[0].Rows[0]["SignUp_Date"].ToString());
                    User.Payment        = decimal.Parse(dsCus.Tables[0].Rows[0]["Payment"].ToString());
                    User.IsSecCodeSent  = Convert.ToBoolean(dsCus.Tables[0].Rows[0]["IsSecCodeSent"].ToString());
                    User.VerifyEmail    = Convert.ToBoolean(dsCus.Tables[0].Rows[0]["VerifyEmail"].ToString());
                }

                User.CustID      = Guid.Parse(Session["CustomerID"].ToString());
                User.Address     = txtAddress.Text;
                User.City        = txtCity.Text;
                User.LastUpdated = DateTime.Now;
                User.PhoneNo     = txtPhone.Text;
                User.ZipCode     = txtZipCode.Text;
                User.State       = drpStates.SelectedItem.Text;
                Client.InsertUser(User);
                lblError.Visible   = true;
                lblError.ForeColor = System.Drawing.Color.Green;
                lblError.Text      = "Your profile has been successfully changed";
            }
        }
Пример #2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (Valid())
            {
                if (Session["UserID"] != null)
                {
                    ManageUserSVC.ManageUserClient       Client = new ManageUserSVC.ManageUserClient();
                    ManageUserSVC.ManageUserCustomerData User   = new ManageUserSVC.ManageUserCustomerData();

                    User.CustID         = Guid.Parse(Session["UserID"].ToString());
                    User.Address        = txtAddress.Text;
                    User.ApplicationNo  = txtApplicationNo.Text;
                    User.City           = txtCity.Text;
                    User.CompanyAffilID = Guid.Parse(drpCompnyAffil.SelectedItem.Value);
                    User.CompanyName    = txtCompany.Text;
                    User.Country        = txtCountry.Text;
                    User.EmailID        = txtEmailID.Text;
                    User.FirstName      = txtFirstName.Text;
                    User.IsActive       = chkIsActive.Checked;
                    User.IsActivePolicy = chkIsActivePolicy.Checked;
                    User.LastName       = txtLastName.Text;
                    User.LastUpdated    = DateTime.Now;
                    User.PhoneNo        = txtphoneNo.Text;
                    User.SecurityCode   = txtSecCode.Text;
                    User.State          = drpStates.SelectedItem.Text;
                    User.YourID         = txtCustomerID.Text;
                    User.ZipCode        = txtZipCode.Text;
                    User.SignUpDate     = Convert.ToDateTime(txtSignup.Text);
                    User.Payment        = decimal.Parse(txtPayment.Text);
                    User.IsSecCodeSent  = chkIscedeSent.Checked;
                    User.VerifyEmail    = chkVerify.Checked;
                    User.PersonalID     = txtpersonalid.Text;
                    User.InsuraceType   = "";
                    Client.InsertUser(User);
                    Response.Redirect("AdminCustomerList.aspx");
                }
            }
        }
Пример #3
0
        protected void btnChangePass_Click(object sender, EventArgs e)
        {
            if (IsValidateChangePass())
            {
                ManageUserSVC.ManageUserClient       Client = new ManageUserSVC.ManageUserClient();
                ManageUserSVC.ManageUserCustomerData User   = new ManageUserSVC.ManageUserCustomerData();

                DataSet dsCus = ViewState["CustomerData"] as DataSet;

                if (dsCus.Tables[0].Rows[0]["SecurityCode"].ToString().Trim().Equals(txtCurrentPass.Text.Trim()))
                {
                    if (dsCus != null && dsCus.Tables[0].Rows.Count > 0)
                    {
                        User.ApplicationNo  = dsCus.Tables[0].Rows[0]["ApplicationNo"].ToString();
                        User.CompanyAffilID = Guid.Parse(dsCus.Tables[0].Rows[0]["CompAffilationID"].ToString());
                        User.Country        = dsCus.Tables[0].Rows[0]["Country"].ToString();
                        User.EmailID        = dsCus.Tables[0].Rows[0]["EmailID"].ToString();
                        User.IsActive       = Convert.ToBoolean(dsCus.Tables[0].Rows[0]["IsActive"].ToString());
                        User.IsActivePolicy = Convert.ToBoolean(dsCus.Tables[0].Rows[0]["IsActivePolicy"].ToString());

                        User.YourID        = dsCus.Tables[0].Rows[0]["YID"].ToString();
                        User.ZipCode       = dsCus.Tables[0].Rows[0]["ZipCode"].ToString();
                        User.SignUpDate    = Convert.ToDateTime(dsCus.Tables[0].Rows[0]["SignUp_Date"].ToString());
                        User.Payment       = decimal.Parse(dsCus.Tables[0].Rows[0]["Payment"].ToString());
                        User.IsSecCodeSent = Convert.ToBoolean(dsCus.Tables[0].Rows[0]["IsSecCodeSent"].ToString());
                        User.VerifyEmail   = Convert.ToBoolean(dsCus.Tables[0].Rows[0]["VerifyEmail"].ToString());

                        User.Address     = dsCus.Tables[0].Rows[0]["Address"].ToString();
                        User.City        = dsCus.Tables[0].Rows[0]["City"].ToString();
                        User.CompanyName = dsCus.Tables[0].Rows[0]["Company_Name"].ToString();
                        User.EmailID     = dsCus.Tables[0].Rows[0]["EmailID"].ToString();
                        User.FirstName   = dsCus.Tables[0].Rows[0]["FirstName"].ToString();
                        User.LastName    = dsCus.Tables[0].Rows[0]["LastName"].ToString();

                        User.PhoneNo    = dsCus.Tables[0].Rows[0]["PhoneNo"].ToString();
                        User.ZipCode    = dsCus.Tables[0].Rows[0]["ZipCode"].ToString();
                        User.State      = dsCus.Tables[0].Rows[0]["State"].ToString();
                        User.PersonalID = dsCus.Tables[0].Rows[0]["PersonalID"].ToString();
                    }

                    User.CustID       = Guid.Parse(Session["CustomerID"].ToString());
                    User.SecurityCode = txtConfirmPass.Text;
                    User.LastUpdated  = DateTime.Now;

                    Client.InsertUser(User);


                    string url  = System.Configuration.ConfigurationManager.AppSettings["HostingPrefix"];
                    string Name = dsCus.Tables[0].Rows[0]["FirstName"].ToString() + " " + dsCus.Tables[0].Rows[0]["LastName"].ToString();

                    //Sending verify email...
                    StringBuilder strVerifyBody = new StringBuilder();
                    string        headurl       = url + "images/image.png";
                    //header
                    strVerifyBody.Append("<p>&nbsp;</p>");
                    strVerifyBody.Append("<div style=" + c + "margin-left: auto;height:500px;margin-right: auto;position: absolute;text-align: center;top: 0;width: 100%;z-index: 999;" + c + ">");
                    strVerifyBody.Append("<div style=" + c + "background: url('" + headurl + "') repeat-x scroll 0 0 transparent;height: 75px; width:798px;  position: relative;top: 0;z-index: 999;" + c + ">" + "<br/>");

                    //body
                    strVerifyBody.Append("<p>&nbsp;</p><table style='font-family: Tahoma;' border='0' cellpadding='0' cellspacing='0' width='600'><tbody><tr><td><table style='font-family: Tahoma;' border='0' cellpadding='0' cellspacing='0' width='600'>");
                    strVerifyBody.Append("<tbody><tr style='font-family: Tahoma; font-size: 15px; color: rgb(33, 33, 33); text-align: left; ' valign='top'><td style='padding:35px 20px;font-family: Tahoma;'>");
                    strVerifyBody.Append("<br/>" + Name + "," + "<br /><br/>");
                    strVerifyBody.Append("Your Password is changed.<br /><br/>");
                    strVerifyBody.Append("Here is your Sign In information for your records:<br /><br/>");
                    strVerifyBody.Append("Email: " + dsCus.Tables[0].Rows[0]["EmailID"].ToString() + "<br />");
                    strVerifyBody.Append("Secure Password: "******"<br /><br/>");
                    strVerifyBody.Append("To start using dscoverage.com please click <a href='" + url + "Login.aspx' target='_blank'>here</a> <br/><br/>");
                    strVerifyBody.Append("If you are having trouble with the above link please copy and paste the following link into your browser:<br/><br/>");
                    strVerifyBody.Append("<span style='color:rgb(99,135,175)'>" + url + "Login.aspx </span><br/><br/>");
                    strVerifyBody.Append("Sincerely,<br/>");
                    strVerifyBody.Append("dscoverage.com<br/>");
                    strVerifyBody.Append("</tr></tbody></table><p>&nbsp;</p>");

                    //footer
                    string footurl = url + "images/footer-b.jpg";
                    strVerifyBody.Append("<div style=" + c + "background: url('" + url + "images/footer-b.jpg') no-repeat scroll 0 0 transparent;color: #939393;font-size: 10px;height: 60px;line-height: 44px;overflow: hidden;padding: 0 20px;width: 760px;margin-top: 5px;" + c + ">" + "<p style='float: left;color: white;'>Copyright © " + DateTime.Now.Year.ToString() + " <a href='https://dscoverage.com' target='_blank' style='color:white;font-weight: bolder;'>dscoverage.com</a>, Inc. All Rights Reserved.</p></div>");
                    string Subject = ConfigurationManager.AppSettings["PasswordChangeSubject"].ToString();
                    bool   Sent1   = CommonFunction.SendEmail(dsCus.Tables[0].Rows[0]["EmailID"].ToString(), strVerifyBody.ToString(), Subject);

                    lblChangePassError.Visible   = true;
                    lblChangePassError.ForeColor = System.Drawing.Color.Green;
                    lblChangePassError.Text      = "Your password has been successfully changed.";

                    txtCurrentPass.Attributes.Add("value", "");
                    txtNewPass.Attributes.Add("value", "");
                    txtConfirmPass.Attributes.Add("value", "");
                    txtCurrentPass.Text = "";
                    txtNewPass.Text     = "";
                    txtConfirmPass.Text = "";
                    BindInfo(Session["CustomerID"].ToString());
                }
                else
                {
                    lblChangePassError.Visible   = true;
                    lblChangePassError.ForeColor = System.Drawing.Color.Red;
                    lblChangePassError.Text      = "Invalid current Password. Please enter valid current password.";
                }
            }
        }
Пример #4
0
        protected void btn2Next_Click(object sender, EventArgs e)
        {
            customerEnrollment.LabelError.Visible = false;
            ManageUserSVC.ManageUserClient       client    = new ManageUserSVC.ManageUserClient();
            ManageUserSVC.ManageUserCustomerData UserData  = new ManageUserSVC.ManageUserCustomerData();
            ManageUserSVC.ManageUserCoverageData CoverData = new ManageUserSVC.ManageUserCoverageData();
            customerEnrollment.LabelError.Text = "";
            //lblSuccess.Text = "";
            if (customerEnrollment.IsValidate())
            {
                if (customerEnrollment.Agree.Checked)
                {
                    if (ViewState["RenewCustomer"] == null)
                    {
                        string Chk = client.CheckEmailID(customerEnrollment.EmailID.Text);
                        if (Chk.Equals("EXIST"))
                        {
                            customerEnrollment.LavelGoToLogin.Visible = true;
                            customerEnrollment.linkLogin.Visible      = true;
                            customerEnrollment.LavelGoToLogin.Text    = "This Email Id is Already Exists, Please click on link for login";
                        }
                        else
                        {
                            UserData.PersonalID   = customerEnrollment.UserID.Text;
                            UserData.CustID       = Guid.NewGuid();
                            ViewState["custID"]   = UserData.CustID;
                            Session["CustomerID"] = UserData.CustID;

                            UserData.FirstName   = customerEnrollment.FirstName.Text;
                            UserData.CompanyName = customerEnrollment.CompanyName.Text;
                            UserData.Address     = customerEnrollment.Address.Text;
                            UserData.EmailID     = customerEnrollment.EmailID.Text;
                            ViewState["EmailID"] = UserData.EmailID;
                            UserData.PhoneNo     = customerEnrollment.PhoneNo.Text;
                            UserData.City        = customerEnrollment.City.Text;
                            if (!customerEnrollment.States.SelectedItem.Text.Equals("--Select--"))
                            {
                                UserData.State = customerEnrollment.States.SelectedItem.Text;
                            }

                            UserData.ZipCode = customerEnrollment.ZipCode.Text;
                            UserData.Country = "CA";
                            if (!customerEnrollment.CompnyAffilation.SelectedItem.Text.Equals("--Select--"))
                            {
                                UserData.CompanyAffilID = Guid.Parse(customerEnrollment.CompnyAffilation.SelectedItem.Value);
                            }
                            UserData.SignUpDate  = DateTime.Now;
                            UserData.LastUpdated = DateTime.Now;
                            UserData.LastName    = customerEnrollment.LastName.Text;

                            UserData.IsActivePolicy = false;
                            UserData.IsActive       = true;
                            UserData.IsPropertyBuy  = false;
                            UserData.InsuraceType   = "";
                            UserData.Payment        = 0;
                            UserData.YourID         = GetID(customerEnrollment.LastName.Text, customerEnrollment.PhoneNo.Text);
                            UserData.ApplicationNo  = DateTime.Now.Ticks.ToString("x").ToUpper();
                            UserData.SecurityCode   = Guid.NewGuid().ToString().GetHashCode().ToString("x");
                            Session["Paswrd"]       = UserData.SecurityCode;
                            UserData.VerifyEmail    = false;
                            Session["CustomerInfo"] = UserData.FirstName + " " + UserData.LastName;
                            UserData.IsSecCodeSent  = false;

                            string url = System.Configuration.ConfigurationManager.AppSettings["HostingPrefix"];


                            //Sending verify email...
                            //string VerifyString = url + "Validate.aspx?id=" + Guid.NewGuid().ToString();
                            StringBuilder strVerifyBody = new StringBuilder();
                            string        headurl       = url + "images/image.png";
                            //header
                            strVerifyBody.Append("<p>&nbsp;</p>");
                            strVerifyBody.Append("<div style=" + c + "margin-left: auto;height:500px;margin-right: auto;position: absolute;text-align: center;top: 0;width: 100%;z-index: 999;" + c + ">");
                            strVerifyBody.Append("<div style=" + c + "background: url('" + headurl + "') repeat-x scroll 0 0 transparent;height: 75px; width:798px;  position: relative;top: 0;z-index: 999;" + c + ">" + "<br/>");

                            //body
                            strVerifyBody.Append("<p>&nbsp;</p><table style='font-family: Tahoma;' border='0' cellpadding='0' cellspacing='0' width='600'><tbody><tr><td><table style='font-family: Tahoma;' border='0' cellpadding='0' cellspacing='0' width='600'>");
                            strVerifyBody.Append("<tbody><tr style='font-family: Tahoma; font-size: 15px; color: rgb(33, 33, 33); text-align: left; ' valign='top'><td style='padding:35px 20px;font-family: Tahoma;'>");

                            strVerifyBody.Append("<br/>" + UserData.FirstName + " " + UserData.LastName + "," + "<br/><br/>");
                            strVerifyBody.Append("Welcome to dscoverage.ca</b><br/><br/>");
                            strVerifyBody.Append("Please verify your email address by clicking <a href='" + url + "Validate.aspx?" + Crypto.ArgumentEncrypt("veryid") + "=" + Crypto.Encrypt(UserData.CustID.ToString(), true) + "' target='dscoveragemain'> here</a><br/><br/>");
                            strVerifyBody.Append("Sincerely,<br/>");
                            strVerifyBody.Append("dscoverage.ca<br/>");
                            strVerifyBody.Append("</tr></tbody></table>");
                            //footer
                            string footurl = url + "images/footer-b.jpg";
                            strVerifyBody.Append("<div style=" + c + "background: url('" + url + "images/footer-b.jpg') no-repeat scroll 0 0 transparent;color: #939393;font-size: 10px;height: 60px;line-height: 44px;overflow: hidden;padding: 0 20px;width: 760px;margin-top: 5px;" + c + ">" + "<p style='float: left;color: white;'>Copyright © " + DateTime.Now.Year.ToString() + " <a href='https://dscoverage.ca' target='_blank' style='color:white;font-weight: bolder;'>dscoverage.ca</a>, Inc. All Rights Reserved.</p></div>");
                            string Subject = ConfigurationManager.AppSettings["VerifyEmailSubject"].ToString();
                            bool   Sent1   = CommonFunction.SendEmail(customerEnrollment.EmailID.Text.Trim(), strVerifyBody.ToString(), Subject);

                            if (Sent1)
                            {
                                client.InsertUser(UserData);
                                Response.Redirect("Validate.aspx?" + Crypto.ArgumentEncrypt("ressult") + "=" + Crypto.Encrypt("sucess", true));
                            }
                            else
                            {
                                Response.Redirect("Validate.aspx?" + Crypto.ArgumentEncrypt("ressult") + "=" + Crypto.Encrypt("fail", true));
                            }
                            //pnl2Custmrinfo.Visible = false;
                        }
                    }
                    if (ViewState["RenewCustomer"] != null)
                    {
                        DataSet Data = ViewState["RenewCustomer"] as DataSet;
                        if (Data != null && Data.Tables[0].Rows.Count > 0)
                        {
                            UserData.CustID       = Guid.Parse(Data.Tables[0].Rows[0]["Cust_ID"].ToString());
                            Session["CustomerID"] = UserData.CustID;

                            UserData.PersonalID  = customerEnrollment.UserID.Text;
                            UserData.FirstName   = customerEnrollment.FirstName.Text;
                            UserData.CompanyName = customerEnrollment.CompanyName.Text;
                            UserData.Address     = customerEnrollment.Address.Text;
                            UserData.EmailID     = customerEnrollment.EmailID.Text;
                            UserData.PhoneNo     = customerEnrollment.PhoneNo.Text;
                            UserData.City        = customerEnrollment.City.Text;
                            if (!customerEnrollment.States.SelectedItem.Text.Equals("--Select--"))
                            {
                                UserData.State = customerEnrollment.States.SelectedItem.Text;
                            }

                            UserData.ZipCode = customerEnrollment.ZipCode.Text;
                            UserData.Country = "CA";
                            if (!customerEnrollment.CompnyAffilation.SelectedItem.Text.Equals("--Select--"))
                            {
                                UserData.CompanyAffilID = Guid.Parse(customerEnrollment.CompnyAffilation.SelectedItem.Value);
                            }
                            UserData.SignUpDate  = DateTime.Now;
                            UserData.LastUpdated = DateTime.Now;
                            UserData.LastName    = customerEnrollment.LastName.Text;

                            UserData.IsActivePolicy = false;
                            UserData.IsActive       = true;
                            UserData.IsPropertyBuy  = false;
                            UserData.InsuraceType   = "";
                            UserData.Payment        = 0;
                            Session["CustomerInfo"] = UserData.FirstName + " " + UserData.LastName;


                            //Added By MKP
                            UserData.YourID = Data.Tables[0].Rows[0]["YID"] != null?Convert.ToString(Data.Tables[0].Rows[0]["YID"]) : GetID(customerEnrollment.LastName.Text, customerEnrollment.PhoneNo.Text);

                            UserData.ApplicationNo = Data.Tables[0].Rows[0]["ApplicationNo"] != null?Convert.ToString(Data.Tables[0].Rows[0]["ApplicationNo"]) : DateTime.Now.Ticks.ToString("x").ToUpper();

                            UserData.SecurityCode = Data.Tables[0].Rows[0]["SecurityCode"] != null?Convert.ToString(Data.Tables[0].Rows[0]["SecurityCode"]) : Guid.NewGuid().ToString().GetHashCode().ToString("x");

                            UserData.VerifyEmail   = true;
                            UserData.IsSecCodeSent = Data.Tables[0].Rows[0]["IsSecCodeSent"] != null?Convert.ToBoolean(Data.Tables[0].Rows[0]["IsSecCodeSent"]) : false;

                            UserData.VerifyEmail = Data.Tables[0].Rows[0]["VerifyEmail"] != null?Convert.ToBoolean(Data.Tables[0].Rows[0]["VerifyEmail"]) : false;

                            //Code Commented By MKP
                            //UserData.IsSecCodeSent = false;
                            //UserData.YourID = GetID(customerEnrollment.LastName.Text, customerEnrollment.PhoneNo.Text);
                            //UserData.ApplicationNo = DateTime.Now.Ticks.ToString("x").ToUpper();
                            //UserData.SecurityCode = Guid.NewGuid().ToString().GetHashCode().ToString("x");
                            //Session["Paswrd"] = UserData.SecurityCode;
                            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                            //Code Commented By MKP

                            //string url = System.Configuration.ConfigurationManager.AppSettings["HostingPrefix"];
                            //StringBuilder strVerifyBody = new StringBuilder();

                            ////header
                            //strVerifyBody.Append("<p>&nbsp;</p>");
                            //strVerifyBody.Append("<div style=" + c + "margin-left: auto;height:500px;margin-right: auto;position: absolute;text-align: center;top: 0;width: 100%;z-index: 999;" + c + ">");
                            //strVerifyBody.Append("<div style=" + c + "background: url('" + url + "images/image.png') repeat-x scroll 0 0 transparent;height: 75px; width:798px;  position: relative;top: 0;z-index: 999;" + c + ">" + "<br/>");
                            //// strVerifyBody.Append("<span style=" + c + "margin-left:661px; background color:white;" + c + ">" + "Welcome" + " " + UserData.FirstName + UserData.LastName + " </span>");

                            ////body
                            //strVerifyBody.Append("<html><body><p>&nbsp;</p><table style='font-family: Tahoma;' border='0' cellpadding='0' cellspacing='0' width='600'><tbody><tr><td><table style='font-family: Tahoma;' border='0' cellpadding='0' cellspacing='0' width='600'>");
                            //strVerifyBody.Append("<tbody><tr style='font-family: Tahoma; font-size: 15px; color: rgb(33, 33, 33); text-align: left; ' valign='top'><td style='padding:35px 20px;font-family: Tahoma;'>");
                            //strVerifyBody.Append("<br/>" + UserData.FirstName + " " + UserData.LastName + "," + "<br/><br/>");
                            //strVerifyBody.Append("Welcome to dscoverage.ca</b><br/><br/>");
                            //strVerifyBody.Append("Please verify your email address by clicking <a href='" + url + "Insurance/Validate.aspx?" + Crypto.ArgumentEncrypt("veryid") + "=" + Crypto.Encrypt(UserData.CustID.ToString(), true) + "' target='dscoveragemain'> here</a><br/><br/>");
                            //strVerifyBody.Append("Sincerely,<br/>");
                            //strVerifyBody.Append("dscoverage.ca<br/>");
                            //strVerifyBody.Append("</tr></tbody></table>");
                            ////footer

                            //strVerifyBody.Append("<div style=" + c + "background: url('" + url + "images/footer-b.jpg') no-repeat scroll 0 0 transparent;color: #939393;font-size: 10px;height: 60px;line-height: 44px;overflow: hidden;padding: 0 20px;width: 760px;margin-top: 5px;" + c + ">" + "<p style='float: left;color: white;'>Copyright © " + DateTime.Now.Year.ToString() + " <a href='https://dscoverage.ca' target='dscoveragemain' style='color:white;font-weight: bolder;'>dscoverage.ca</a>, Inc. All Rights Reserved.</p></div>");
                            //string Subject = ConfigurationManager.AppSettings["VerifyEmailSubject"].ToString();
                            //bool Sent1 = CommonFunction.SendEmail(customerEnrollment.EmailID.Text.Trim(), strVerifyBody.ToString(), Subject);
                            //client.Update_VerificationStatus(UserData.CustID, false, false);
                            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


                            client.InsertUser(UserData);
                            //pnl2Custmrinfo.Visible = false;
                            //pnl3Coverage.Visible = true;
                            multiViewRegistration.ActiveViewIndex = 2;
                            if (!VerifyEmail(Guid.Parse(UserData.CustID.ToString())))
                            {
                                coverageInformation.LabelEmailValidate.Visible = true;
                            }
                            //Response.Redirect("Validate.aspx?" + Crypto.ArgumentEncrypt("renewaccnt") + "=" + Crypto.Encrypt("success", true));
                        }
                    }
                    this.Page.Form.DefaultButton = btn3Next.UniqueID;
                }
                else
                {
                    customerEnrollment.LavelAgreeError.Visible = true;
                    customerEnrollment.LavelAgreeError.Text    = "Please Read Terms And Conditions.";
                }
            }
        }
Пример #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString[Crypto.ArgumentEncrypt("ressult")] != null)
            {
                string res = Crypto.Decrypt(Request.QueryString[Crypto.ArgumentEncrypt("ressult")].ToString(), true);
                if (res.Equals("sucess"))
                {
                    lblSuccess.Text = "Thank you for registering. A confirmation email has been sent to your registered email address. Please follow the instructions in the email to complete the registration process.";
                    Session.Clear();
                }
                else
                {
                    lblSuccess.Text = "Some error Occured while sending confirmation email to your registered email address. Please check your email address and try again.";
                    Session.Clear();
                }
            }
            if (Request.QueryString[Crypto.ArgumentEncrypt("repaswrd")] != null)
            {
                lblSuccess.Text = "Your current password has been sent to your registered Email Address. Please check Your Email.";
            }
            if (Request.QueryString[Crypto.ArgumentEncrypt("renewaccnt")] != null)
            {
                lblSuccess.Text = "Your Account is renewed successfully.";
            }

            if (Request.QueryString[Crypto.ArgumentEncrypt("change")] != null && Request.QueryString[Crypto.ArgumentEncrypt("your")] != null)
            {
                string NewEmailID = Crypto.Decrypt(Request.QueryString[Crypto.ArgumentEncrypt("your")].ToString(), true);
                Guid   Userid     = Guid.Parse(Crypto.Decrypt(Request.QueryString[Crypto.ArgumentEncrypt("veryid")].ToString(), true));
                ManageUserSVC.ManageUserClient Client = new ManageUserSVC.ManageUserClient();
                string url = System.Configuration.ConfigurationManager.AppSettings["HostingPrefix"];
                ManageUserSVC.ManageUserCustomerData User = new ManageUserSVC.ManageUserCustomerData();

                DataSet dsCus = Client.GetCustomerInfo(Userid);
                if (dsCus != null && dsCus.Tables[0].Rows.Count > 0)
                {
                    User.ApplicationNo  = dsCus.Tables[0].Rows[0]["ApplicationNo"].ToString();
                    User.CompanyAffilID = Guid.Parse(dsCus.Tables[0].Rows[0]["CompAffilationID"].ToString());
                    User.Country        = dsCus.Tables[0].Rows[0]["Country"].ToString();
                    User.SecurityCode   = dsCus.Tables[0].Rows[0]["SecurityCode"].ToString();
                    User.IsActive       = Convert.ToBoolean(dsCus.Tables[0].Rows[0]["IsActive"].ToString());
                    User.IsActivePolicy = Convert.ToBoolean(dsCus.Tables[0].Rows[0]["IsActivePolicy"].ToString());

                    User.YourID        = dsCus.Tables[0].Rows[0]["YID"].ToString();
                    User.ZipCode       = dsCus.Tables[0].Rows[0]["ZipCode"].ToString();
                    User.SignUpDate    = Convert.ToDateTime(dsCus.Tables[0].Rows[0]["SignUp_Date"].ToString());
                    User.Payment       = decimal.Parse(dsCus.Tables[0].Rows[0]["Payment"].ToString());
                    User.IsSecCodeSent = Convert.ToBoolean(dsCus.Tables[0].Rows[0]["IsSecCodeSent"].ToString());
                    User.VerifyEmail   = Convert.ToBoolean(dsCus.Tables[0].Rows[0]["VerifyEmail"].ToString());

                    User.Address     = dsCus.Tables[0].Rows[0]["Address"].ToString();
                    User.City        = dsCus.Tables[0].Rows[0]["City"].ToString();
                    User.CompanyName = dsCus.Tables[0].Rows[0]["Company_Name"].ToString();
                    User.EmailID     = dsCus.Tables[0].Rows[0]["EmailID"].ToString();
                    User.FirstName   = dsCus.Tables[0].Rows[0]["FirstName"].ToString();
                    User.LastName    = dsCus.Tables[0].Rows[0]["LastName"].ToString();

                    User.PhoneNo    = dsCus.Tables[0].Rows[0]["PhoneNo"].ToString();
                    User.ZipCode    = dsCus.Tables[0].Rows[0]["ZipCode"].ToString();
                    User.State      = dsCus.Tables[0].Rows[0]["State"].ToString();
                    User.PersonalID = dsCus.Tables[0].Rows[0]["PersonalID"].ToString();
                }


                User.CustID      = Userid;
                User.EmailID     = NewEmailID;
                User.LastUpdated = DateTime.Now;
                Client.InsertUser(User);

                //Send Email to inform email ID changed...
                char          c           = '"';
                StringBuilder strMailBody = new StringBuilder();
                //header
                strMailBody.Append("<p>&nbsp;</p>");
                strMailBody.Append("<div style=" + c + "margin-left: auto;height:500px;margin-right: auto;position: absolute;text-align: center;top: 0;width: 100%;z-index: 999;" + c + ">");
                strMailBody.Append("<div style=" + c + "background: url('" + url + "images/image.png') repeat-x scroll 0 0 transparent;height: 75px; width:798px;  position: relative;top: 0;z-index: 999;" + c + ">" + "<br/>");


                //body
                strMailBody.Append("<p>&nbsp;</p><table style='font-family: Tahoma;' border='0' cellpadding='0' cellspacing='0' width='600'><tbody><tr><td><table style='font-family: Tahoma;' border='0' cellpadding='0' cellspacing='0' width='600'>");
                strMailBody.Append("<tbody><tr style='font-family: Tahoma; font-size: 15px; color: rgb(33, 33, 33); text-align: left; ' valign='top'><td style='padding:35px 20px;font-family: Tahoma;'>");
                strMailBody.Append("<br/>" + dsCus.Tables[0].Rows[0]["FirstName"].ToString() + "  " + dsCus.Tables[0].Rows[0]["LastName"].ToString() + "," + "<br /><br/>");
                strMailBody.Append("Your Email Address is changed.<br /><br/>");
                strMailBody.Append("Here is your Sign In information for your records:<br /><br/>");
                strMailBody.Append("Email: " + NewEmailID + "<br />");
                //strMailBody.Append("<b>" + "Secure Password: "******"SecurityCode"].ToString() + "<br /><br/>");
                strMailBody.Append("To start using dscoverage.com please click <a href='" + url + "Login.aspx' target='_blank'>here</a> <br/><br/>");
                strMailBody.Append("If you are having trouble with the above link please copy and paste the following link into your browser:<br/><br/>");
                strMailBody.Append("<span style='color:rgb(99,135,175)'>" + url + "Login.aspx </span><br/><br/>");
                strMailBody.Append("Sincerely,<br/>");
                strMailBody.Append("dscoverage.com<br/>");
                strMailBody.Append("</tr></tbody></table><p>&nbsp;</p>");

                //footer
                strMailBody.Append("<div style=" + c + "background: url('" + url + "images/footer-b.jpg') no-repeat scroll 0 0 transparent;color: #939393;font-size: 10px;height: 60px;line-height: 44px;overflow: hidden;padding: 0 20px;width: 760px;margin-top: 5px;" + c + ">" + "<p style='float: left;color: white;'>Copyright © " + DateTime.Now.Year.ToString() + " <a href='https://dscoverage.com' target='_blank' style='color:white;font-weight: bolder;'>dscoverage.com</a>, Inc. All Rights Reserved.</p></div>");

                string Subject = ConfigurationManager.AppSettings["ConfirmEmailSubject"].ToString();
                bool   Sent    = CommonFunction.SendEmail(NewEmailID, strMailBody.ToString(), Subject);

                lblSuccess.Text  = "Thank you for visiting our site.";
                lblsuccess1.Text = "You have successfully changed your Email Address. Please visit the Website";
                Session.Clear();
            }
            if (Request.QueryString[Crypto.ArgumentEncrypt("veryid")] != null && Request.QueryString[Crypto.ArgumentEncrypt("your")] == null)
            {
                Guid Userid = Guid.Parse(Crypto.Decrypt(Request.QueryString[Crypto.ArgumentEncrypt("veryid")].ToString(), true));
                ManageUserSVC.ManageUserClient Client = new ManageUserSVC.ManageUserClient();
                string  url   = System.Configuration.ConfigurationManager.AppSettings["HostingPrefix"];
                DataSet Dscus = Client.GetCustomerInfo(Userid);
                if (Dscus != null && Dscus.Tables[0].Rows.Count > 0)
                {
                    if (Dscus.Tables[0].Rows[0]["VerifyEmail"].ToString() == "" || !bool.Parse((Dscus.Tables[0].Rows[0]["VerifyEmail"].ToString())))
                    {
                        char c = '"';
                        //Sending Security code and information...
                        StringBuilder strMailBody = new StringBuilder();
                        //header
                        strMailBody.Append("<p>&nbsp;</p>");
                        strMailBody.Append("<div style=" + c + "margin-left: auto;height:500px;margin-right: auto;position: absolute;text-align: center;top: 0;width: 100%;z-index: 999;" + c + ">");
                        strMailBody.Append("<div style=" + c + "background: url('" + url + "images/image.png') repeat-x scroll 0 0 transparent;height: 75px; width:798px;  position: relative;top: 0;z-index: 999;" + c + ">" + "<br/>");


                        //body
                        strMailBody.Append("<p>&nbsp;</p><table style='font-family: Tahoma;' border='0' cellpadding='0' cellspacing='0' width='600'><tbody><tr><td><table style='font-family: Tahoma;' border='0' cellpadding='0' cellspacing='0' width='600'>");
                        strMailBody.Append("<tbody><tr style='font-family: Tahoma; font-size: 15px; color: rgb(33, 33, 33); text-align: left; ' valign='top'><td style='padding:35px 20px;font-family: Tahoma;'>");
                        strMailBody.Append("<br/>" + Dscus.Tables[0].Rows[0]["FirstName"].ToString() + "  " + Dscus.Tables[0].Rows[0]["LastName"].ToString() + "," + "<br /><br/>");
                        strMailBody.Append("Your registration is complete.<br /><br/>");
                        strMailBody.Append("Here is your Sign In information for your records:<br /><br/>");
                        strMailBody.Append("Email: " + Dscus.Tables[0].Rows[0]["EmailID"].ToString() + "<br />");
                        strMailBody.Append("Secure Password: "******"SecurityCode"].ToString() + "<br /><br/>");
                        //strMailBody.Append("<b><span style='font-size:14px'>Your Application ID Is: " + Dscus.Tables[0].Rows[0]["ApplicationNo"].ToString() + "</span></b><br />");
                        //strMailBody.Append("<b><span style='font-size:14px'>Your User ID Is: " + Dscus.Tables[0].Rows[0]["YID"].ToString() + "</span></b><br />");
                        strMailBody.Append("To start using dscoverage.com please click <a href='" + url + "Login.aspx' target='_blank'>here</a> <br/><br/>");
                        strMailBody.Append("If you are having trouble with the above link please copy and paste the following link into your browser:<br/><br/>");
                        strMailBody.Append("<span style='color:rgb(99,135,175)'>" + url + "Login.aspx</span><br/><br/>");
                        strMailBody.Append("Sincerely,<br/>");
                        strMailBody.Append("dscoverage.com<br/>");
                        strMailBody.Append("</tr></tbody></table><p>&nbsp;</p>");

                        //footer
                        strMailBody.Append("<div style=" + c + "background: url('" + url + "images/footer-b.jpg') no-repeat scroll 0 0 transparent;color: #939393;font-size: 10px;height: 60px;line-height: 44px;overflow: hidden;padding: 0 20px;width: 760px;margin-top: 5px;" + c + ">" + "<p style='float: left;color: white;'>Copyright © " + DateTime.Now.Year.ToString() + " <a href='https://dscoverage.com' target='_blank' style='color:white;font-weight: bolder;'>dscoverage.com</a>, Inc. All Rights Reserved.</p></div>");

                        string Subject = ConfigurationManager.AppSettings["SendingSecCodeToUser"].ToString();
                        bool   Sent    = CommonFunction.SendEmail(Dscus.Tables[0].Rows[0]["EmailID"].ToString().Trim(), strMailBody.ToString(), Subject);
                        Client.Update_VerificationStatus(Userid, true, Sent);

                        lblSuccess.Text  = "Thank you for verifying Email Address.";
                        lblsuccess1.Text = "You can now log into your account. Please check your email for your secure password.";
                    }
                    else
                    {
                        lblSuccess.Text = "You have verified your account already. Please visit on Website";
                    }
                }
            }
        }