private bool StoreinDB(byte[] buffer, ManageUserSVC.ManageUserClient client, ManageUserSVC.ManageUserCoverageData Coverage) { bool Valid = true; List <usp_GetEvedenceResult> DsCus = new List <usp_GetEvedenceResult>(); DsCus = client.GetEvedenceInfoByCusID(Guid.Parse(Session["CustomerIDForAdmin"].ToString())); if (DsCus != null && DsCus.Count > 0) { foreach (usp_GetEvedenceResult item in DsCus) { if (item.IsActive.Value) { client.Update_Evidence(Guid.Parse(Session["CustomerIDForAdmin"].ToString()), DateTime.Now, false, item.EvidenceID, true); } } } if (DsCus != null && DsCus.Count > 0) { //client.Delete_Evidence(Guid.Parse(Session["CustomerIDForAdmin"].ToString())); //Insert Newely generated Evedence after renew... client.InsertEvedence(Guid.NewGuid(), DateTime.Now, Guid.Parse(Session["CustomerIDForAdmin"].ToString()), DateTime.Now, true, true, buffer); } else { //Inserted New Evedence. client.InsertEvedence(Guid.NewGuid(), DateTime.Now, Guid.Parse(Session["CustomerIDForAdmin"].ToString()), DateTime.Now, true, true, buffer); } return(Valid); }
protected void dowload(string link, ManageUserSVC.ManageUserCoverageData Coverage) { object obj = new object(); lock (obj) { string WkFilePath = Request.PhysicalApplicationPath + @"WkHtml\wkhtmltopdf.exe"; string args = string.Format("\"{0}\" - ", link); args += "-O Landscape"; args += " -L 30"; var startInfo = new ProcessStartInfo(WkFilePath, args) { UseShellExecute = false, RedirectStandardOutput = true }; using (ManageUserSVC.ManageUserClient Cl = new ManageUserSVC.ManageUserClient()) { var proc = new Process { StartInfo = startInfo }; proc.Start(); string output = proc.StandardOutput.ReadToEnd(); byte[] buffer = proc.StandardOutput.CurrentEncoding.GetBytes(output); proc.WaitForExit(); proc.Close(); bool Valid = StoreinDB(buffer, Cl, Coverage); } } }
protected void Button1_Click(object sender, EventArgs e) { lblCerty.Visible = false; lblEve.Visible = false; Guid CustID = Guid.Parse(Session["UserID"].ToString()); ManageUserSVC.ManageUserClient Cl = new ManageUserSVC.ManageUserClient(); DataSet dsCus = new DataSet(); dsCus = Cl.GetCustomerInfo(CustID); bool isactive = false; decimal payment = 0; string email = ""; if (dsCus != null && dsCus.Tables[0].Rows.Count > 0) { payment = Convert.ToDecimal(dsCus.Tables[0].Rows[0]["Payment"].ToString()); email = dsCus.Tables[0].Rows[0]["EmailID"].ToString(); string emailvarify = Convert.ToString(dsCus.Tables[0].Rows[0]["VerifyEmail"].ToString()); isactive = Convert.ToBoolean(dsCus.Tables[0].Rows[0]["IsActivePolicy"].ToString()); ManageUserSVC.ManageUserCustomerData User = new ManageUserSVC.ManageUserCustomerData(); if (emailvarify != "") { if (isactive == true) { DataSet dsCus2 = new DataSet(); dsCus2 = Cl.GetCoveragebyCustomerId(CustID); ManageUserSVC.ManageUserCoverageData Coverage = new ManageUserSVC.ManageUserCoverageData(); if (dsCus2 != null && dsCus2.Tables[0].Rows.Count > 0) { DateTime Coverdate = Convert.ToDateTime(dsCus2.Tables[0].Rows[0]["CoverDate"].ToString()); string fiveyrs = Convert.ToString(dsCus2.Tables[0].Rows[0]["_5YrClaim"].ToString()); string threeyrs = Convert.ToString(dsCus2.Tables[0].Rows[0]["_3YrLoss"].ToString()); string custid = Convert.ToString(dsCus2.Tables[0].Rows[0]["Cust_ID"].ToString()); string insurance = Convert.ToString(dsCus2.Tables[0].Rows[0]["InsuranceType"].ToString()); DataSet CovData = new DataSet(); CovData = Cl.CreateEvedenceInfoByCusID(CustID); if (CovData != null && CovData.Tables[0].Rows.Count > 0) { Coverage.CoverageID = Guid.Parse(CovData.Tables[0].Rows[0]["CoverID"].ToString()); } else { Coverage.CoverageID = Guid.NewGuid(); } Coverage.CoverageDate = Coverdate; Coverage.CustID = Guid.Parse(dsCus2.Tables[0].Rows[0]["Cust_ID"].ToString()); Session["CustomerIDForAdmin"] = CustID; Coverage.yr3Loss = Convert.ToBoolean(threeyrs); Coverage.yr5Loss = Convert.ToBoolean(fiveyrs); Coverage.Status = "True"; Session["CoverageInfo"] = Coverage; } if (Session["CoverageInfo"] != null) { if (payment == 0) { if (email != "") { string Memres = CheckMember(email); if (Memres == "Y") { User.Payment = Convert.ToDecimal(System.Configuration.ConfigurationManager.AppSettings["Membership"]); } else { User.Payment = Convert.ToDecimal(System.Configuration.ConfigurationManager.AppSettings["Non-Membership"]); } } decimal pay = User.Payment * 100; bool property = false; Cl.Update_Payment(CustID, pay, property); } if (Chkmail.Checked == true) { ManageUserSVC.ManageUserCoverageData Coverage2 = (ManageUserSVC.ManageUserCoverageData)Session["CoverageInfo"]; Cl.InsertCoverageData(Coverage2); string Local = System.Configuration.ConfigurationManager.AppSettings["HostingPrefix"]; dowload(Local.Replace("https://", "http://") + "ProofEvidence.aspx?" + Crypto.ArgumentEncrypt("sss") + "=" + Crypto.Encrypt(CustID.ToString(), true), Coverage2); SendEmailForProofOfEvidnce(Cl, CustID, Local); BindEvedences(CustID, Cl); lblEve.Visible = true; lblEve.Text = "Evidence Regenerated Successfully"; } else { ManageUserSVC.ManageUserCoverageData Coverage2 = (ManageUserSVC.ManageUserCoverageData)Session["CoverageInfo"]; Cl.InsertCoverageData(Coverage2); string Local = System.Configuration.ConfigurationManager.AppSettings["HostingPrefix"]; dowload(Local.Replace("https://", "http://") + "ProofEvidence.aspx?" + Crypto.ArgumentEncrypt("sss") + "=" + Crypto.Encrypt(CustID.ToString(), true), Coverage2); BindEvedences(CustID, Cl); lblEve.Visible = true; lblEve.Text = "Evidence Regenerated Successfully"; } } else { lblEve.Visible = true; lblEve.Text = "Coverage Data is not present!"; } } else { BindEvedences(CustID, Cl); lblEve.Visible = true; lblEve.Text = "Policy is not active,Please activate the policy!"; } } else { lblEve.Visible = true; lblEve.Text = "Email Address is not verified!"; } } }
private void SendEmailForProofOfEvidnce(ManageUserSVC.ManageUserClient Client, Guid CustID, string Local) { DataSet dsCus = new DataSet(); dsCus = Client.GetCustomerInfo(CustID); StringBuilder strMailBody = new StringBuilder(); string url = System.Configuration.ConfigurationManager.AppSettings["HostingPrefix"]; if (Session["RenewCoverageInfo"] != null) { lblMessage.Text = "Payment Successful! Your Account is Renewed Successfully!"; string renewSubject = ConfigurationManager.AppSettings["SendingRenewMail"].ToString(); ManageUserSVC.ManageUserCoverageData Coverage = new ManageUserSVC.ManageUserCoverageData(); Coverage = Session["RenewCoverageInfo"] as ManageUserCoverageData; string mailtemplate = File.ReadAllText(Server.MapPath(@"~/EmailTemplate/RenewMailTemplate.html")); mailtemplate = mailtemplate.Replace("[FullName]", dsCus.Tables[0].Rows[0]["FirstName"].ToString() + " " + dsCus.Tables[0].Rows[0]["LastName"].ToString()); mailtemplate = mailtemplate.Replace("[URL]", url); mailtemplate = mailtemplate.Replace("[CoverageDate]", Coverage.CoverageDate.ToShortDateString()); CommonFunction.SendEmail(dsCus.Tables[0].Rows[0]["EmailID"].ToString().Trim(), mailtemplate, renewSubject); } //header strMailBody.Append("<p> </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> </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 Evidence of Coverage has been generated.<br /><br />"); strMailBody.Append("To view your Evidence of Coverage please click <a href='" + url + "ViewDoc.ashx?" + Crypto.ArgumentEncrypt("ching") + "=" + Crypto.Encrypt(CustID.ToString(), true) + "&" + Crypto.ArgumentEncrypt("type") + "=" + Crypto.Encrypt("eve", true) + "' target='dscoverageview'>here</a><br/><br/>"); strMailBody.Append("Sincerely,<br/>"); strMailBody.Append("dscoverage.ca<br/>"); strMailBody.Append("</tr></tbody></table>"); //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.ca' target='_blank' style='color:white;font-weight: bolder;'>dscoverage.ca</a>, Inc. All Rights Reserved.</p></div>"); string pSubject = ConfigurationManager.AppSettings["SendingProofOfEvedence"].ToString(); CommonFunction.SendEmail(dsCus.Tables[0].Rows[0]["EmailID"].ToString().Trim(), strMailBody.ToString(), pSubject); List <usp_GetEvedenceResult> DsCus = new List <usp_GetEvedenceResult>(); DsCus = Client.GetEvedenceInfoByCusID(CustID); if (DsCus != null && DsCus.Count > 0) { //MKP //Guid EVEID = Guid.Parse(DsCus.ToList()[0].EvidenceID.ToString()); foreach (usp_GetEvedenceResult item in DsCus) { if (item.IsActive == true) { Guid EVEID = Guid.Parse(item.EvidenceID.ToString()); bool Updated = Client.Update_Evidence(CustID, DateTime.Now, true, EVEID, true); } } } }
protected void btn3Next_Click(object sender, EventArgs e) { coverageInformation.LabelEmailValidate.Visible = false; coverageInformation.LabelPayment.Visible = false; string EmailAdd = ""; if (IsValidcoverage()) { string Date = coverageInformation.CoverageDate.Text; ManageUserSVC.ManageUserCoverageData Coverage = new ManageUserSVC.ManageUserCoverageData(); ManageUserSVC.ManageUserClient client = new ManageUserSVC.ManageUserClient(); if (ViewState["RenewCustomer"] != null) { DataSet Data = ViewState["RenewCustomer"] as DataSet; if (Data != null && Data.Tables[0].Rows.Count > 0) { DataSet CovData = new DataSet(); Guid CustomerID = Guid.Parse(Data.Tables[0].Rows[0]["Cust_ID"].ToString()); if (VerifyEmail(CustomerID)) { if (!coverageInformation.ThreeYearCheck.Checked && !coverageInformation.FiveYearCheck.Checked) { Coverage.CoverageID = Guid.NewGuid(); DateTime CoverageDate = DateTime.ParseExact(Date, "MM/dd/yyyy", System.Globalization.CultureInfo.GetCultureInfo("en-US")); Coverage.CoverageDate = CoverageDate; Coverage.CustID = Guid.Parse(Data.Tables[0].Rows[0]["Cust_ID"].ToString()); Coverage.yr3Loss = coverageInformation.ThreeYearCheck.Checked; Coverage.yr5Loss = coverageInformation.FiveYearCheck.Checked; Coverage.Status = "True"; Session["RenewCoverageInfo"] = Coverage; multiViewRegistration.ActiveViewIndex = 3; this.Page.Form.DefaultButton = btn4AutoRize.UniqueID; } else { Response.Redirect("Reason.aspx"); } DataSet ds = new DataSet(); ds = client.GetCustomerInfo(CustomerID); if (ds != null && ds.Tables[0].Rows.Count > 0) { EmailAdd = ds.Tables[0].Rows[0]["EmailID"].ToString(); } } else { coverageInformation.LabelEmailValidate.Visible = true; coverageInformation.LabelEmailValidate.Focus(); } } } else { if (VerifyEmail(Guid.Parse(ViewState["custID"].ToString()))) { if (!coverageInformation.ThreeYearCheck.Checked && !coverageInformation.FiveYearCheck.Checked) { Coverage.CoverageID = Guid.NewGuid(); Session["CustomerID"] = ViewState["custID"].ToString(); Session["CustomerID"] = ViewState["custID"].ToString(); DateTime CoverageDate = DateTime.ParseExact(Date, "MM/dd/yyyy", System.Globalization.CultureInfo.GetCultureInfo("en-US")); Coverage.CoverageDate = CoverageDate; Coverage.CustID = Guid.Parse(ViewState["custID"].ToString()); Coverage.yr3Loss = coverageInformation.ThreeYearCheck.Checked; Coverage.yr5Loss = coverageInformation.FiveYearCheck.Checked; Coverage.Status = "True"; Session["CoverageInfo"] = Coverage; //pnl3Coverage.Visible = false; //pnl4Payment.Visible = true; //pnlPropay.Visible = true; multiViewRegistration.ActiveViewIndex = 3; } else { Response.Redirect("Reason.aspx"); } DataSet ds = new DataSet(); ds = client.GetCustomerInfo(Guid.Parse(ViewState["custID"].ToString())); if (ds != null && ds.Tables[0].Rows.Count > 0) { EmailAdd = ds.Tables[0].Rows[0]["EmailID"].ToString(); } } else { coverageInformation.LabelEmailValidate.Visible = true; coverageInformation.LabelEmailValidate.Focus(); } } creditCardInformation.LabelAmount.Text = System.Configuration.ConfigurationManager.AppSettings["Non-Membership"]; if (EmailAdd != "") { string Memres = CheckMember(EmailAdd); if (Memres == "Y") { creditCardInformation.LabelAmount.Text = System.Configuration.ConfigurationManager.AppSettings["Membership"]; } else { creditCardInformation.LabelAmount.Text = System.Configuration.ConfigurationManager.AppSettings["Non-Membership"]; } } } this.Page.Form.DefaultButton = btn4AutoRize.UniqueID; Response.Cookies.Clear(); }
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> </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> </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> </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> </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."; } } }