protected void btnSubscription_Click(object sender, EventArgs e) { objDAEntities.Email = txtemail.Text.Trim(); JaslokMailer objMailer = new JaslokMailer(); objBusinessLogic.AddJaslokTimesSubscription(objDAEntities); List <Parameters> lstParameters = new List <Parameters>(); lstParameters.Add(new Parameters { ShortCodeName = "email", ShortCodeValue = txtemail.Text.Trim() }); DataSet ds = new DataSet(); ds = (DataSet)objBusinessLogic.GetFormsEmailDetail((int)AppGlobal.JaslokEmailHandler.EmailFormJasloktimesSubscribe); string EmailToId = Convert.ToString(ds.Tables[0].Rows[0]["EmailToId"]); string EmailCCId = Convert.ToString(ds.Tables[0].Rows[0]["EmailCCId"]); objMailer.SendEmail("jasloktimes", lstParameters, EmailToId, EmailCCId); objMailer.SendEmail("jasloktimes_user", lstParameters, objDAEntities.Email, EmailCCId); string message = "You have subscribe Successfully!"; //dialog.Visible = true; //Page.ClientScript.RegisterStartupScript(this.GetType(), "Popup", "ShowPopup('" + message + "');", true); ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('You have subscribe Successfully!!!');", true); txtemail.Text = ""; //ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('You have subscribe Successfully!!!');", true); }
protected void btnSubmitComp_Click1(object sender, EventArgs e) { if (cptchComplaint.IsValid) { JaslokMailer objMailer = new JaslokMailer(); List <Parameters> lstParameters = new List <Parameters>(); string lsEmailStatus = string.Empty; //if (Captcha1.UserValidated) // { // objDAEntities.EnquiryTypeId = AppGlobal.FeedbackId; objDAEntities.Name = txtName.Text.Trim(); objDAEntities.Email = txtEmail.Text; objDAEntities.PhoneNo = txtPhoneNo.Text; objDAEntities.Description = txtComplaint.Text; objBusinessLogic.SaveComplaint(objDAEntities); // ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Save Successfully!!!');", false); lstParameters.Add(new Parameters { ShortCodeName = "Username", ShortCodeValue = txtName.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "EmailAdd", ShortCodeValue = txtEmail.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "Complaint", ShortCodeValue = txtComplaint.Text.Trim() }); DataSet ds = new DataSet(); ds = (DataSet)objBusinessLogic.GetFormsEmailDetail((int)AppGlobal.JaslokEmailHandler.EmailFormComplaint); string EmailToId = Convert.ToString(ds.Tables[0].Rows[0]["EmailToId"]); string EmailCCId = Convert.ToString(ds.Tables[0].Rows[0]["EmailCCId"]); lsEmailStatus = objMailer.SendEmail("complaint", lstParameters, EmailToId, EmailCCId); lsEmailStatus = objMailer.SendEmail("complaint_user", lstParameters, objDAEntities.Email, EmailCCId); // divcontentpane.Visible = false; // PanelMessage.Visible = true; clear(); Response.Redirect("/complaint/success"); // } // else // { // Label1.ForeColor = System.Drawing.Color.Red; // Label1.Text = "You have Entered InValid Captcha Characters please Enter again"; // FillCapctha(); // } } }
public void PermanentUserSendEmail(string Username, string Email, string MRNO, string Password, string MobileNo, string TemplateName) { List <Parameters> lstParameters = new List <Parameters>(); lstParameters.Add(new Parameters { ShortCodeName = "Username", ShortCodeValue = user.DisplayName }); lstParameters.Add(new Parameters { ShortCodeName = "Email", ShortCodeValue = user.Email }); lstParameters.Add(new Parameters { ShortCodeName = "MRNO", ShortCodeValue = MRNO }); lstParameters.Add(new Parameters { ShortCodeName = "Password", ShortCodeValue = Password }); DataSet ds = new DataSet(); ds = null; ds = (DataSet)objBusinessLogic.GetFormsEmailDetail(AppGlobal.EmailFormPermanentRegistration); string EmailToId = Convert.ToString(ds.Tables[0].Rows[0]["EmailToId"]); string EmailCCId = Convert.ToString(ds.Tables[0].Rows[0]["EmailCCId"]); lsEmailStatus = objMailer.SendEmail(TemplateName, lstParameters, EmailToId, EmailCCId); TemplateName = TemplateName + "_user"; lsEmailStatus = objMailer.SendEmail(TemplateName, lstParameters, user.Email, EmailCCId); if (TemplateName == "PermanentRegistration_user") { lsSmsStatus = objMailer.SendSms(TemplateName, lstParameters, MobileNo); } lstParameters = null; }
protected void btnSubmitQuickEnq_Click(object sender, EventArgs e) { JaslokMailer objMailer = new JaslokMailer(); List <EmailParaMeters> lstParameters = new List <EmailParaMeters>(); string lsEmailStatus = string.Empty; // if (Captcha1.UserValidated) //{ // objDAEntities.EnquiryTypeId = AppGlobal.FeedbackId; objDAEntities.Name = txtName.Text.Trim(); objDAEntities.Age = Convert.ToInt32(txtAge.Text.Trim()); objDAEntities.Gender = rdoGenderCom.SelectedItem.Text; objDAEntities.PhoneNo = txtMobile.Text.Trim(); objDAEntities.Email = txtEmail.Text.Trim(); objDAEntities.Description = txtQuestion.Text.Trim(); objBusinessLogic.SaveQuickEnquiry(objDAEntities); lstParameters.Add(new EmailParaMeters { ShortCodeName = "Username", ShortCodeValue = txtName.Text.Trim() }); lstParameters.Add(new EmailParaMeters { ShortCodeName = "Age", ShortCodeValue = txtAge.Text.Trim() }); lstParameters.Add(new EmailParaMeters { ShortCodeName = "Gender", ShortCodeValue = rdoGenderCom.SelectedItem.Text }); lstParameters.Add(new EmailParaMeters { ShortCodeName = "MobileNo", ShortCodeValue = txtMobile.Text.Trim() }); lstParameters.Add(new EmailParaMeters { ShortCodeName = "EmailAdd", ShortCodeValue = txtEmail.Text.Trim() }); lstParameters.Add(new EmailParaMeters { ShortCodeName = "Question", ShortCodeValue = txtQuestion.Text.Trim() }); lsEmailStatus = objMailer.SendEmail("quickenquiry", lstParameters, AppGlobal.QuickEnquiryEmailAddress); divcontentpane.Visible = false; PanelMessage.Visible = true; //ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Save Successfully!!!');", true); clear(); // } // else // { // Label1.ForeColor = System.Drawing.Color.Red; // Label1.Text = "You have Entered InValid Captcha Characters please Enter again"; // FillCapctha(); //} }
protected void btnForgotPasword_Click(object sender, EventArgs e) { JaslokMailer objMailer = new JaslokMailer(); List <Parameters> lstParameters = new List <Parameters>(); MembershipUser objUser = Membership.GetUser(txtForgotPasswordUserName.Text.Trim()); string lsEmailStatus = string.Empty; if (objUser != null) { UserInfo objInfo = new UserInfo(); objInfo = UserController.GetUserByName(objUser.UserName); string lsmobileNumber = objInfo.Profile.GetPropertyValue("PhoneNumber"); string lsPassword; lsPassword = objUser.GetPassword(); //sendmail(objUser.Email, lsPassword); if (!string.IsNullOrEmpty(lsmobileNumber)) { CommonFn.SendSMS(lsmobileNumber.Replace("-", ""), "Your password is: " + lsPassword); } lstParameters.Add(new Parameters { ShortCodeName = "Username", ShortCodeValue = txtForgotPasswordUserName.Text }); lstParameters.Add(new Parameters { ShortCodeName = "Password", ShortCodeValue = lsPassword }); lsEmailStatus = objMailer.SendEmail("forgotpassword", lstParameters, objInfo.Email, null); if (string.IsNullOrEmpty(lsEmailStatus)) { lblForgotPassError.Text = "Password has been sent to your email address."; lblForgotPassError.CssClass = "successText"; } else { lblForgotPassError.Text = "Problem in sending email"; lblForgotPassError.CssClass = "errorText"; } txtForgotPasswordUserName.Text = ""; //lblGeneratedPassword.Text = lsPassword; } else { //Response.Redirect("/"); lblForgotPassError.CssClass = "errorText"; lblForgotPassError.Text = "Username does not exist."; txtForgotPasswordUserName.Text = ""; } }
protected void btnOTPVerification_Click(object sender, EventArgs e) { int UserID = -1; if (!OTPVerification(OTPCheck.Verification, out UserID)) { UserInfo objUserInfo = new UserInfo(); objUserInfo = UserController.GetUserById(0, UserID); objUserInfo.Membership.Approved = true; MembershipUser objUser = Membership.GetUser(objUserInfo.Username); string LsPassword = objUser.GetPassword(); UserController.UpdateUser(0, objUserInfo); CommonFn.SendSMS(objUserInfo.Profile.GetPropertyValue("PhoneNumber").Replace("-", string.Empty), "Thank you for verifying your mobile number, your login details for Jaslok is: Visitor ID- " + objUserInfo.Username + " and Password- " + LsPassword); setLoginFields(); lblLoginError.CssClass = "successText"; lblLoginError.Text = "User login details that has been sent to your registered mobile number"; JaslokMailer objMailer = new JaslokMailer(); List <Parameters> lstParameters = new List <Parameters>(); string lsEmailStatus = string.Empty; lstParameters.Add(new Parameters { ShortCodeName = "Username", ShortCodeValue = objUserInfo.Username }); lstParameters.Add(new Parameters { ShortCodeName = "Password", ShortCodeValue = LsPassword }); lsEmailStatus = objMailer.SendEmail("registration", lstParameters, objUserInfo.Email); } }
protected void btnForgotPasword_Click(object sender, EventArgs e) { JaslokMailer objMailer = new JaslokMailer(); List <Parameters> lstParameters = new List <Parameters>(); string lsEmailStatus = string.Empty; bool _isPermanentUser = objBusinessLogic.IsExistMrNo(txtForgotPasswordUserName.Text.Trim()); if (!_isPermanentUser) { MembershipUser objUser = Membership.GetUser(txtForgotPasswordUserName.Text.Trim()); if (objUser != null) { UserInfo objInfo = new UserInfo(); objInfo = UserController.GetUserByName(objUser.UserName); string lsmobileNumber = objInfo.Profile.GetPropertyValue("PhoneNumber"); string lsPassword; lsPassword = objUser.GetPassword(); //sendmail(objUser.Email, lsPassword); if (!string.IsNullOrEmpty(lsmobileNumber)) { CommonFn.SendSMS(lsmobileNumber.Replace("-", ""), "Your password is: " + lsPassword); } lstParameters.Add(new Parameters { ShortCodeName = "Username", ShortCodeValue = txtForgotPasswordUserName.Text }); lstParameters.Add(new Parameters { ShortCodeName = "Password", ShortCodeValue = lsPassword }); lsEmailStatus = objMailer.SendEmail("forgotpassword", lstParameters, objInfo.Email, null); if (string.IsNullOrEmpty(lsEmailStatus)) { lblForgotPassError.Text = "Password has been sent to your email address."; lblForgotPassError.CssClass = "successText"; divLoginForm.Attributes.Add("style", "display:none;"); divForgotPassword.Attributes.Add("style", "display:block;"); } else { lblForgotPassError.Text = "Problem in sending email"; lblForgotPassError.CssClass = "errorText"; divLoginForm.Attributes.Add("style", "display:none;"); divForgotPassword.Attributes.Add("style", "display:block;"); } txtForgotPasswordUserName.Text = ""; //lblGeneratedPassword.Text = lsPassword; } else { lblForgotPassError.CssClass = "errorText"; lblForgotPassError.Text = "Username does not exist."; txtForgotPasswordUserName.Text = ""; divLoginForm.Attributes.Add("style", "display:none;"); divForgotPassword.Attributes.Add("style", "display:block;"); } } else { var PatientDetails = (dynamic)null; if (host.StartsWith("www.")) { PatientDetails = objPatIndex.GetPatientDetails("JEEVAPG", "JEEVAPG@16", txtForgotPasswordUserName.Text.Trim()); } else { PatientDetails = objlocalPatIndex.GetPatientDetails("JEEVAPG", "JEEVAPG@16", txtForgotPasswordUserName.Text.Trim()); } if (PatientDetails.WEBPWD != null) { if (!string.IsNullOrEmpty(PatientDetails.WEBPWD)) { CommonFn.SendSMS(PatientDetails.PatMobile.Replace("-", ""), "Your password is: " + PatientDetails.WEBPWD); } lstParameters.Add(new Parameters { ShortCodeName = "Username", ShortCodeValue = txtForgotPasswordUserName.Text }); lstParameters.Add(new Parameters { ShortCodeName = "Password", ShortCodeValue = PatientDetails.WEBPWD }); lsEmailStatus = objMailer.SendEmail("forgotpassword", lstParameters, PatientDetails.PatEmail, null); if (string.IsNullOrEmpty(lsEmailStatus)) { lblForgotPassError.Text = "Password has been sent to your email address."; lblForgotPassError.CssClass = "successText"; divLoginForm.Attributes.Add("style", "display:none;"); divForgotPassword.Attributes.Add("style", "display:block;"); } else { lblForgotPassError.Text = "Problem in sending email"; lblForgotPassError.CssClass = "errorText"; divLoginForm.Attributes.Add("style", "display:none;"); divForgotPassword.Attributes.Add("style", "display:block;"); } txtForgotPasswordUserName.Text = ""; } else { lblForgotPassError.Text = "MRNumber not found, Please enter valid MRNumber."; lblForgotPassError.CssClass = "errorText"; divLoginForm.Attributes.Add("style", "display:none;"); divForgotPassword.Attributes.Add("style", "display:block;"); } } }
protected void btnSubmitEstimateS_Click(object sender, EventArgs e) { if (cptchEstimate.IsValid) { JaslokMailer objMailer = new JaslokMailer(); List <Parameters> lstParameters = new List <Parameters>(); string lsEmailStatus = string.Empty; // if (Captcha1.UserValidated) //{ // objDAEntities.EnquiryTypeId = AppGlobal.FeedbackId; objDAEntities.Name = txtName.Text.Trim(); objDAEntities.Age = Convert.ToInt16(txtAge.Text.Trim()); objDAEntities.Gender = rdoGenderCom.SelectedItem.Text; objDAEntities.Mobile = Convert.ToString(txtMobile.Text.Trim()); objDAEntities.Email = txtEmail.Text; objDAEntities.Option1 = txtWhichHealth.Text; objDAEntities.Option2 = txtNumberofPackage.Text; objDAEntities.Option3 = txt1stPreffed.Text; objDAEntities.Comment = txtComment.Text; objBusinessLogic.SaveEstimate(objDAEntities); lstParameters.Add(new Parameters { ShortCodeName = "Username", ShortCodeValue = txtName.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "Age", ShortCodeValue = txtAge.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "Gender", ShortCodeValue = rdoGenderCom.SelectedItem.Text }); lstParameters.Add(new Parameters { ShortCodeName = "MobileNo", ShortCodeValue = txtMobile.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "EmailAdd", ShortCodeValue = txtEmail.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "HealthCheckOptFor", ShortCodeValue = txtWhichHealth.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "IndividualPkgNumber", ShortCodeValue = txtNumberofPackage.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "PreferredDay", ShortCodeValue = txt1stPreffed.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "Comments", ShortCodeValue = txtComment.Text.Trim() }); DataSet ds = new DataSet(); ds = (DataSet)objBusinessLogic.GetFormsEmailDetail((int)AppGlobal.JaslokEmailHandler.EmailFormEstimate); string EmailToId = Convert.ToString(ds.Tables[0].Rows[0]["EmailToId"]); string EmailCCId = Convert.ToString(ds.Tables[0].Rows[0]["EmailCCId"]); lsEmailStatus = objMailer.SendEmail("estimate", lstParameters, EmailToId, EmailCCId); lsEmailStatus = objMailer.SendEmail("estimate_user", lstParameters, objDAEntities.Email, EmailCCId); //ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Save Successfully!!!');", false); // ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Save Successfully!!!');", true); // divcontentpane.Visible = false; // PanelMessage.Visible = true; clear(); Response.Redirect("/estimate-request/success"); // } //else // { // FillCapctha(); // } } }
protected void btnSubmit_Click(object sender, EventArgs e) { //string strWorkExp = "<WorkExpList>"; //if (gdWorkExp.Rows.Count > 0) //{ try { Upload(); DataSet ds = new DataSet(); ds = null; objDAEntities.FunctionId = Convert.ToInt32(lblFunctionID.Text); objDAEntities.PositionID = Convert.ToInt32(lblJobId.Text); objDAEntities.ApplicantFirstName = txtFirstName.Text.Trim(); objDAEntities.ApplicantMiddleName = txtMiddleName.Text; objDAEntities.ApplicantLastName = txtLastName.Text; objDAEntities.ApplicantDOB = Convert.ToDateTime(rdpDOB.SelectedDate).ToShortDateString().ToString(); objDAEntities.ApplicantGender = ddlGender.SelectedValue; objDAEntities.ApplicantReligion = txtReligion.Text; objDAEntities.ApplicantNationality = ddlNationality.SelectedValue; objDAEntities.ApplicantLandLineOffice = txtLandLineOffice1.Text.Trim() + "-" + txtLandLineOffice2.Text.Trim(); objDAEntities.ApplicantLandLineResidance = txtLandLineRes1.Text.Trim() + "-" + txtLandLineRes2.Text.Trim(); objDAEntities.ApplicantMobile = txtMobile.Text; objDAEntities.ApplicantEmail = txtEmail.Text; objDAEntities.ApplicantCurrentAddress = txtCurrentAddress.Text; objDAEntities.ApplicantPermanentAddress = txtPermanentAddress.Text; objDAEntities.AdditionalQualification = txtAddotionalQual.Text; objDAEntities.TotalExpInYear = DBNull.Value; if (ddlTotalExp.SelectedValue != "") { objDAEntities.TotalExpInYear = Convert.ToInt32(ddlTotalExp.SelectedValue); } objDAEntities.TotalExpInMonth = DBNull.Value; if (ddlTotalExpMonth.SelectedValue != "") { objDAEntities.TotalExpInMonth = Convert.ToInt32(ddlTotalExpMonth.SelectedValue); } objDAEntities.AdditionalExpInYear = DBNull.Value; if (ddlOtherExp.SelectedValue != "") { objDAEntities.AdditionalExpInYear = Convert.ToInt32(ddlOtherExp.SelectedValue); } objDAEntities.AdditionalExpInMonth = DBNull.Value; if (ddlOtherExpMonth.SelectedValue != "") { objDAEntities.AdditionalExpInMonth = Convert.ToInt32(ddlOtherExpMonth.SelectedValue); } objDAEntities.ApplicantCurrSal = DBNull.Value; if (txtCurrSal.Text != "") { objDAEntities.ApplicantCurrSal = Convert.ToDouble(txtCurrSal.Text); } objDAEntities.ApplicantExpSal = DBNull.Value; if (txtExpSal.Text != "") { objDAEntities.ApplicantExpSal = Convert.ToDouble(txtExpSal.Text); } objDAEntities.ApplicantCVPath = ViewState["FilePath"].ToString(); objDAEntities.ApplicantID = objBusinessLogic.SaveCandidateApplication(objDAEntities); if (objDAEntities.ApplicantID > 0) { DataTable dt = new DataTable(); dt = getWorkExpTable(); // Add Work Experience for (int i = 0; i <= dt.Rows.Count - 1; i++) { if (dt.Rows[i]["CompanyName"] != null) { DataSet dsnew = new DataSet(); dsnew = null; objDAEntities.ApplicantID = objDAEntities.ApplicantID; objDAEntities.CompanyName = Convert.ToString(dt.Rows[i]["CompanyName"]); objDAEntities.empDesignation = Convert.ToString(dt.Rows[i]["empDesignation"]); objDAEntities.CompanyTurnOver = Convert.ToString(dt.Rows[i]["CompanyTurnOver"]); if (!string.IsNullOrEmpty(Convert.ToString(dt.Rows[i]["NoOfEmployee"]))) { objDAEntities.NoOfEmployee = Convert.ToInt32(dt.Rows[i]["NoOfEmployee"]); } objDAEntities.JobResponsibilities = Convert.ToString(dt.Rows[i]["JobResponsibilities"]); objDAEntities.Location = Convert.ToString(dt.Rows[i]["Location"].ToString()); objDAEntities.FromDate = Convert.ToString(dt.Rows[i]["FromDate"]); objDAEntities.ToDate = Convert.ToString(dt.Rows[i]["ToDate"]); objDAEntities.Reporting = Convert.ToString(dt.Rows[i]["Reporting"]); if (!string.IsNullOrEmpty(Convert.ToString(dt.Rows[i]["SalaryInlacs"]))) { objDAEntities.SalaryInlacs = Convert.ToDouble(dt.Rows[i]["SalaryInlacs"]); } // objDAEntities.SalaryInlacs =(!string.IsNullOrEmpty(Convert.ToString(dt.Rows[i]["SalaryInlacs"])))?Convert.ToDouble(dt.Rows[i]["SalaryInlacs"]):; objDAEntities.ReasonForLeaving = Convert.ToString(dt.Rows[i]["ReasonForLeaving"]); string msg = objBusinessLogic.SaveWorkExpByApplicant(objDAEntities); } } // Add Qualification for (int i = 1; i <= 5; i++) { string ddlName = "ddlQualification" + i.ToString(); DropDownList ddlQualID = (DropDownList)this.FindControl(ddlName); //ddlQualID.ID = ddlName; if (ddlQualID.SelectedValue != "") { if (Convert.ToInt32(ddlQualID.SelectedValue) > 0) { string strDegree = "txtDegree" + i.ToString(); TextBox txtDegree = (TextBox)this.FindControl(strDegree); string strUniversity = "txtUniversity" + i.ToString(); TextBox txtUniversity = (TextBox)this.FindControl(strUniversity); string strSpecialization = "txtSpecialization" + i.ToString(); TextBox txtSpecialization = (TextBox)this.FindControl(strSpecialization); string strGrade = "txtGrade" + i.ToString(); TextBox txtGrade = (TextBox)this.FindControl(strGrade); objDAEntities.ApplicantID = objDAEntities.ApplicantID; objDAEntities.AppQualification = ddlQualID.SelectedItem.Text; objDAEntities.AppDegree = txtDegree.Text; objDAEntities.AppUniversityName = txtUniversity.Text; objDAEntities.AppSpecialization = txtSpecialization.Text; objDAEntities.AppPercentage_Grade = txtGrade.Text; string msg = objBusinessLogic.Save_ApplicantQualification(objDAEntities); } } } } JaslokMailer objMailer = new JaslokMailer(); List <Parameters> lstParameters = new List <Parameters>(); lstParameters.Add(new Parameters { ShortCodeName = "Post", ShortCodeValue = txtPost.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "Username", ShortCodeValue = txtFirstName.Text.Trim() + " " + (!string.IsNullOrEmpty(txtMiddleName.Text.Trim()) ? (txtMiddleName.Text.Trim() + " ") : string.Empty) + txtLastName.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "DateOfBirth", ShortCodeValue = Convert.ToDateTime(rdpDOB.SelectedDate).ToString("dd/MM/yyyy") }); lstParameters.Add(new Parameters { ShortCodeName = "Gender", ShortCodeValue = ddlGender.SelectedValue }); lstParameters.Add(new Parameters { ShortCodeName = "EmailAdd", ShortCodeValue = txtEmail.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "Permanent", ShortCodeValue = txtPermanentAddress.Text.Trim() }); DataSet objds = new DataSet(); objds = null; objds = (DataSet)objBusinessLogic.GetFormsEmailDetail((int)AppGlobal.JaslokEmailHandler.ApplyJaslokCareer); string EmailToId = Convert.ToString(objds.Tables[0].Rows[0]["EmailToId"]); string EmailCCId = Convert.ToString(objds.Tables[0].Rows[0]["EmailCCId"]); objMailer.SendEmail("career", lstParameters, EmailToId, EmailCCId); //objMailer.SendEmail("career", lstParameters, AppGlobal.CareerEmailAddress); lblMessage.CssClass = "successlbl"; lblMessage.Text = "Application saved successfully!!!"; clear(); } catch (Exception ex) { lblMessage.CssClass = "errorlbl"; lblMessage.Text = ex.Message; } finally { ViewState["WorkExpData"] = null; } }
protected void btnSubmit_Click(object sender, EventArgs e) { Boolean DSFlag = false; JaslokMailer objMailer = new JaslokMailer(); List <Parameters> lstParameters = new List <Parameters>(); string lsEmailStatus = string.Empty; string lsSmsStatus = string.Empty; try { UserInfo objuser = UserController.Instance.GetCurrentUserInfo(); // DataSet dsUsername = objBusinessLogic.IsExistMRNumber(objuser.Username); bool check = false; if (!string.IsNullOrEmpty(objuser.Username)) { check = objBusinessLogic.IsExistMrNo(objuser.Username.Trim()); } //int count=dsUsername.Tables[0].Rows.Count; //if (dsUsername.Tables[0].Rows.Count > 0) //{ /*if (Captcha1.UserValidated) * {*/ //objDAEntities.DoctorScheduleId = Convert.ToInt32(hdnDoctorId.Value); //objDAEntities.DoctorId = Convert.ToInt32(Request.QueryString["DI"]); int SpecialtyId = 0; Int32.TryParse(drpSpecialty.SelectedValue, out SpecialtyId); objDAEntities.SpecialtyId = Convert.ToInt32(drpSpecialty.SelectedValue); TimeSpan time = DateTime.ParseExact(drpTimeSlot.SelectedValue, "h:mm tt", CultureInfo.InvariantCulture).TimeOfDay; objDAEntities.TimeDate = DateTime.ParseExact(ddlAppointMentDate.SelectedValue, "dd/MM/yyyy", CultureInfo.InvariantCulture) + time; objDAEntities.Name = txtName.Text; objDAEntities.Day = Convert.ToDateTime(txtdob.SelectedDate).ToString("dd/MM/yyyy");//Convert.ToString(txtdob.SelectedDate); objDAEntities.DOB = Convert.ToDateTime(txtdob.SelectedDate); objDAEntities.Email = txtEmail.Text; objDAEntities.PhoneNo = txtPhoneNo.Text; objDAEntities.MobileNo = txtMobileNo.Text; objDAEntities.Location = ddlCountry.SelectedItem.Text; objDAEntities.Address = txtState.Text; objDAEntities.Description = txtInquiry.Text; objDAEntities.AppointmentType = ((Request.RawUrl.ToLower().Contains("/consultationappointment/follow-up") == true) ? "Follow-Up" : "New"); LinkButton objButtonClicked = (LinkButton)sender; switch (objButtonClicked.Text.ToLower()) { case "pay later": objBusinessLogic.SaveBookAppointment(objDAEntities); // CommonFn.SendSMS(txtMobileNo.Text, "Your appointment date is: " + ddlAppointMentDate.SelectedValue); lstParameters.Add(new Parameters { ShortCodeName = "Username", ShortCodeValue = txtName.Text.Trim() }); //lsEmailStatus = objMailer.SendEmail("fixanappointment", lstParameters, txtEmail.Text); lstParameters.Add(new Parameters { ShortCodeName = "Username", ShortCodeValue = txtName.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "Day", ShortCodeValue = objDAEntities.Day }); lstParameters.Add(new Parameters { ShortCodeName = "Email", ShortCodeValue = txtEmail.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "PhoneNo", ShortCodeValue = txtPhoneNo.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "MobileNo", ShortCodeValue = txtMobileNo.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "Location", ShortCodeValue = ddlCountry.SelectedItem.Text }); lstParameters.Add(new Parameters { ShortCodeName = "Username", ShortCodeValue = txtName.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "Address", ShortCodeValue = txtState.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "Description", ShortCodeValue = txtInquiry.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "Apponintment", ShortCodeValue = objDAEntities.TimeDate.ToString("dd-MMM-yyyy hh:mm tt") }); lstParameters.Add(new Parameters { ShortCodeName = "DoctorName", ShortCodeValue = lblDoctorName.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "AppointmentType", ShortCodeValue = objDAEntities.AppointmentType }); lstParameters.Add(new Parameters { ShortCodeName = "Speciality", ShortCodeValue = lblDocotrSpecialty.Text.Trim() }); lsSmsStatus = objMailer.SendSms("fixanappointment", lstParameters, txtMobileNo.Text); DataSet ds = new DataSet(); ds = null; ds = (DataSet)objBusinessLogic.GetFormsEmailDetail(AppGlobal.EmailFormFixAnappointment); string EmailToId = Convert.ToString(ds.Tables[0].Rows[0]["EmailToId"]); string EmailCCId = Convert.ToString(ds.Tables[0].Rows[0]["EmailCCId"]); lsEmailStatus = objMailer.SendEmail("fixanappointment", lstParameters, objDAEntities.Email, EmailCCId); lsEmailStatus = objMailer.SendEmail("fixanappointment_Admin", lstParameters, AppGlobal.FixAppointmentEmailAddress); //ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('We have received your appointment request, you should receive a reply or a call shortly');", true); PlaceMessage.Visible = true; placeRightPart.Visible = false; Clear(); break; case "pay now": objDAEntities.FacilityName = "Consultation Appointment"; objDAEntities.ConsultingCharge = Convert.ToInt32(dsDoctorDetail.Tables[0].Rows[0]["ConsultingCharge"]); objDAEntities.FollowUpCharge = Convert.ToInt32(dsDoctorDetail.Tables[0].Rows[0]["FollowUpCharge"]); objDAEntities.AppointmentTypeCharge = ((Request.RawUrl.ToLower().Contains("/consultationappointment/follow-up")) == true) ? objDAEntities.FollowUpCharge : objDAEntities.ConsultingCharge; objDAEntities.dName = lblDoctorName.Text; objDAEntities.MRNumber = objuser.Username; //Session["Amount"] = lblAppointmentType.Text; //Session["Amount"] = "10"; //Session["ConsultationAppointment"] = objDAEntities; objDAEntities.Amount = Convert.ToInt32(lblAppointmentType.Text); objDAEntities.FacilityName = "Consultation Appointment"; objDAEntities.Guid = System.Guid.NewGuid().ToString(); Session["Guid"] = "App-" + objDAEntities.Guid; objBusinessLogic.SaveAppointmentInfoGuid(objDAEntities); if (CommonFn.UserID <= 0) { Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "$(document).ready(function(){loadUserPopup();});", true); } else if (check == true) { PlaceMessage.Visible = true; placeRightPart.Visible = false; Clear(); string amount = HttpUtility.UrlEncode(objBusinessLogic.Encrypt(objDAEntities.Amount.ToString())); Response.Redirect("/Payment.aspx?amount=" + amount); // Response.Redirect("/PaymentResponse.aspx"); //string pageurl = "/Payment.aspx"; //Response.Write("<script> window.open('" + pageurl + "','_blank'); </script>"); } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "$(document).ready(function(){PermanentRegReminderBox();});", true); } break; } /*} * else * FillCapctha();*/ //} //else //{ // Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "$(document).ready(function(){PermanentRegReminderBox();});", true); //} } catch (Exception ex) { //Response.Write(ex.ToString()); } }
protected void btnSubmit_Click(object sender, EventArgs e) { Boolean DSFlag = false; JaslokMailer objMailer = new JaslokMailer(); List <Parameters> lstParameters = new List <Parameters>(); string lsEmailStatus = string.Empty; string lsSmsStatus = string.Empty; try { /*if (Captcha1.UserValidated) * {*/ //objDAEntities.DoctorScheduleId = Convert.ToInt32(hdnDoctorId.Value); objDAEntities.DoctorId = Convert.ToInt32(Request.QueryString["DI"]); int SpecialtyId = 0; Int32.TryParse(drpSpecialty.SelectedValue, out SpecialtyId); objDAEntities.SpecialtyId = Convert.ToInt32(drpSpecialty.SelectedValue); TimeSpan time = DateTime.ParseExact(drpTimeSlot.SelectedValue, "h:mm tt", CultureInfo.InvariantCulture).TimeOfDay; objDAEntities.TimeDate = DateTime.ParseExact(ddlAppointMentDate.SelectedValue, "dd/MM/yyyy", CultureInfo.InvariantCulture) + time; objDAEntities.Name = txtName.Text; objDAEntities.Day = Convert.ToDateTime(txtdob.SelectedDate).ToString("dd/MM/yyyy");//Convert.ToString(txtdob.SelectedDate); objDAEntities.Email = txtEmail.Text; objDAEntities.PhoneNo = txtPhoneNo.Text; objDAEntities.MobileNo = txtMobileNo.Text; objDAEntities.Location = ddlCountry.SelectedItem.Text; objDAEntities.Address = txtState.Text; objDAEntities.Description = txtInquiry.Text; objDAEntities.AppointmentType = (drpAppointmentType.SelectedValue == "Follow-Up") ? "Follow-Up" : "New"; objBusinessLogic.SaveBookAppointment(objDAEntities); lstParameters.Add(new Parameters { ShortCodeName = "Date", ShortCodeValue = objDAEntities.TimeDate.ToString() }); //lsSmsStatus = objMailer.SendSms("fixanappointment", lstParameters, txtMobileNo.Text); // CommonFn.SendSMS(txtMobileNo.Text, "Your appointment date is: " + ddlAppointMentDate.SelectedValue); lstParameters.Add(new Parameters { ShortCodeName = "Username", ShortCodeValue = txtName.Text.Trim() }); //lsEmailStatus = objMailer.SendEmail("fixanappointment", lstParameters, txtEmail.Text); lstParameters.Add(new Parameters { ShortCodeName = "Username", ShortCodeValue = txtName.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "Day", ShortCodeValue = objDAEntities.Day }); lstParameters.Add(new Parameters { ShortCodeName = "Email", ShortCodeValue = txtEmail.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "PhoneNo", ShortCodeValue = txtPhoneNo.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "MobileNo", ShortCodeValue = txtMobileNo.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "Location", ShortCodeValue = ddlCountry.SelectedItem.Text }); lstParameters.Add(new Parameters { ShortCodeName = "Username", ShortCodeValue = txtName.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "Address", ShortCodeValue = txtState.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "Description", ShortCodeValue = txtInquiry.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "Apponintment", ShortCodeValue = objDAEntities.TimeDate.ToString("dd-MMM-yyyy hh:mm tt") }); lstParameters.Add(new Parameters { ShortCodeName = "DoctorName", ShortCodeValue = lblDoctorName.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "AppointmentType", ShortCodeValue = objDAEntities.AppointmentType }); lstParameters.Add(new Parameters { ShortCodeName = "Speciality", ShortCodeValue = lblDocotrSpecialty.Text.Trim() }); lsSmsStatus = objMailer.SendSms("fixanappointment", lstParameters, txtMobileNo.Text); DataSet ds = new DataSet(); ds = null; ds = (DataSet)objBusinessLogic.GetFormsEmailDetail(AppGlobal.EmailFormFixAnappointment); string EmailToId = Convert.ToString(ds.Tables[0].Rows[0]["EmailToId"]); string EmailCCId = Convert.ToString(ds.Tables[0].Rows[0]["EmailCCId"]); lsEmailStatus = objMailer.SendEmail("fixanappointment", lstParameters, EmailCCId, objDAEntities.Email); lsEmailStatus = objMailer.SendEmail("fixanappointment_Admin", lstParameters, AppGlobal.FixAppointmentEmailAddress); //ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('We have received your appointment request, you should receive a reply or a call shortly');", true); PlaceMessage.Visible = true; placeRightPart.Visible = false; Clear(); /*} * else * FillCapctha();*/ } catch (Exception ex) { //Response.Write(ex.ToString()); } }
//void FillCapctha() //{ // try // { // Random random = new Random(); // string combination = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; // StringBuilder captcha = new StringBuilder(); // for (int i = 0; i < 6; i++) // captcha.Append(combination[random.Next(combination.Length)]); // Session["captcha"] = captcha.ToString(); // //imgCaptcha.ImageUrl = "GenerateCaptcha.ascx?" + DateTime.Now.Ticks.ToString(); // } // catch // { // throw; // } //} //protected void ValidateCaptcha(object sender, ServerValidateEventArgs e) //{ // //Captcha1.ValidateCaptcha(txtCaptcha.Text.Trim()); // //e.IsValid = Captcha1.UserValidated; // //if (e.IsValid) // //{ // // //ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Valid Captcha!');", true); // //} // //else // //{ // // ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please enter valid text!!!');", false); // //} //} protected void btnSubmitFeedbck_Click(object sender, EventArgs e) { // Captcha1.ValidateCaptcha(txtCaptcha.Text.Trim()); if (cptchFeedback.IsValid) { JaslokMailer objMailer = new JaslokMailer(); List <Parameters> lstParameters = new List <Parameters>(); string lsEmailStatus = string.Empty; //if (Captcha1.UserValidated) //{ // objDAEntities.EnquiryTypeId = AppGlobal.FeedbackId; objDAEntities.Name = txtName.Text.Trim(); objDAEntities.Gender = rdoGenderCom.SelectedItem.Text; objDAEntities.PhoneNo = txtMobile.Text.Trim(); objDAEntities.Email = txtEmail.Text; objDAEntities.Description = txtFeedBack.Text; objBusinessLogic.SaveFeedBack(objDAEntities); lstParameters.Add(new Parameters { ShortCodeName = "Username", ShortCodeValue = txtName.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "Gender", ShortCodeValue = rdoGenderCom.SelectedItem.Text }); lstParameters.Add(new Parameters { ShortCodeName = "MobileNo", ShortCodeValue = txtMobile.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "EmailAdd", ShortCodeValue = txtEmail.Text.Trim() }); lstParameters.Add(new Parameters { ShortCodeName = "Feedback", ShortCodeValue = txtFeedBack.Text.Trim() }); DataSet ds = new DataSet(); ds = (DataSet)objBusinessLogic.GetFormsEmailDetail((int)AppGlobal.JaslokEmailHandler.EmailFormFeedBack); string EmailToId = Convert.ToString(ds.Tables[0].Rows[0]["EmailToId"]); string EmailCCId = Convert.ToString(ds.Tables[0].Rows[0]["EmailCCId"]); lsEmailStatus = objMailer.SendEmail("feedback", lstParameters, EmailToId, EmailCCId); lsEmailStatus = objMailer.SendEmail("feedback_user", lstParameters, objDAEntities.Email, EmailCCId); //ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Save Successfully!!!');", true); // fdback.Visible = false; /// divcontentpane.Visible = false; //PanelMessage.Visible = true; //Response.Write(lsEmailStatus); clear(); Response.Redirect("/feedback/success"); } //} //else //{ // FillCapctha(); //} }
protected void btnSubmitEstimateS_Click(object sender, EventArgs e) { JaslokMailer objMailer = new JaslokMailer(); List <EmailParaMeters> lstParameters = new List <EmailParaMeters>(); string lsEmailStatus = string.Empty; // if (Captcha1.UserValidated) //{ // objDAEntities.EnquiryTypeId = AppGlobal.FeedbackId; objDAEntities.Name = txtName.Text.Trim(); objDAEntities.Age = Convert.ToInt16(txtAge.Text.Trim()); objDAEntities.Gender = rdoGenderCom.SelectedItem.Text; objDAEntities.Mobile = Convert.ToString(txtMobile.Text.Trim()); objDAEntities.Email = txtEmail.Text; objDAEntities.Option1 = txtWhichHealth.Text; objDAEntities.Option2 = txtNumberofPackage.Text; objDAEntities.Option3 = txt1stPreffed.Text; objDAEntities.Comment = txtComment.Text; objBusinessLogic.SaveEstimate(objDAEntities); lstParameters.Add(new EmailParaMeters { ShortCodeName = "Username", ShortCodeValue = txtName.Text.Trim() }); lstParameters.Add(new EmailParaMeters { ShortCodeName = "Age", ShortCodeValue = txtAge.Text.Trim() }); lstParameters.Add(new EmailParaMeters { ShortCodeName = "Gender", ShortCodeValue = rdoGenderCom.SelectedItem.Text }); lstParameters.Add(new EmailParaMeters { ShortCodeName = "MobileNo", ShortCodeValue = txtMobile.Text.Trim() }); lstParameters.Add(new EmailParaMeters { ShortCodeName = "EmailAdd", ShortCodeValue = txtEmail.Text.Trim() }); lstParameters.Add(new EmailParaMeters { ShortCodeName = "HealthCheckOptFor", ShortCodeValue = txtWhichHealth.Text.Trim() }); lstParameters.Add(new EmailParaMeters { ShortCodeName = "IndividualPkgNumber", ShortCodeValue = txtNumberofPackage.Text.Trim() }); lstParameters.Add(new EmailParaMeters { ShortCodeName = "PreferredDay", ShortCodeValue = txt1stPreffed.Text.Trim() }); lstParameters.Add(new EmailParaMeters { ShortCodeName = "Comments", ShortCodeValue = txtComment.Text.Trim() }); lsEmailStatus = objMailer.SendEmail("estimate", lstParameters, AppGlobal.EstimateRequestEmailAddress); //ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Save Successfully!!!');", false); // ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Save Successfully!!!');", true); divcontentpane.Visible = false; PanelMessage.Visible = true; clear(); // } //else // { // FillCapctha(); // } }