private void btnUnflag_Clicked(object sender, EventArgs e) { PolicyFlag.Instance.PolicyNumber = PolicyNumber.Trim(); PolicyFlag.Instance.Flagged = false; PopupNavigation.Instance.PopAsync(true); }
public int CompareTo(ESHClass other) { int value = PolicyNumber.CompareTo(other.PolicyNumber); if (value == 0) { value = TimeStamp.CompareTo(other.TimeStamp); } return(value); }
protected void registrarSiniestroBtn_Click(object sender, EventArgs e) { SqlConnection sqlConnection1 = new SqlConnection(clientesDataSource.ConnectionString); SqlCommand cmd = new SqlCommand(); int claimID; int rowsAffected; try { cmd.CommandText = "[transport].[sp_registrar_caso_siniestro]"; cmd.CommandType = CommandType.StoredProcedure; cmd.Connection = sqlConnection1; SqlParameter claimIDOut = new SqlParameter("@claimID", SqlDbType.Int) { Direction = ParameterDirection.Output }; cmd.Parameters.Add(claimIDOut); cmd.Parameters.AddWithValue("@personID", PersonID); cmd.Parameters.AddWithValue("@client", lblClient.Text); cmd.Parameters.AddWithValue("@claimDate", Convert.ToDateTime(dp1.Value)); cmd.Parameters.AddWithValue("@observations", txtObservations.Text); cmd.Parameters.AddWithValue("@policyNumber", PolicyNumber); cmd.Parameters.AddWithValue("@certificateID", CertificateID); cmd.Parameters.AddWithValue("@user", User.Identity.Name); cmd.Parameters.AddWithValue("@carrier", txtCarrier.Text); cmd.Parameters.AddWithValue("@commodity", txtCommodity.Text); cmd.Parameters.AddWithValue("@invoiceNumber", txtInvoiceNumber.Text); cmd.Parameters.AddWithValue("@invoiceAmount", decimal.Parse(txtInvoiceAmount.Text)); cmd.Parameters.AddWithValue("@origin", txtOrigin.Text); cmd.Parameters.AddWithValue("@destination", txtDestination.Text); cmd.Parameters.AddWithValue("@contact", txtContact.Text); cmd.Parameters.AddWithValue("@phoneNumber", txtPhoneNumber.Text); cmd.Parameters.AddWithValue("@location", txtLocation.Text); sqlConnection1.Open(); rowsAffected = cmd.ExecuteNonQuery(); claimID = int.Parse(cmd.Parameters["@claimID"].Value.ToString()); sqlConnection1.Close(); //SaveDetails(claimID); //Direcciono a la pagina de busqueda Response.Redirect("ClaimSearch.aspx?PolicyNumber=" + PolicyNumber.Replace(".", "")); } catch (Exception exp) { ErrorLabel.Text = exp.Message; ErrorLabel.Visible = true; } }
public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hash = 17; hash = hash * 23 + EnvelopeID.GetHashCode(); hash = hash * 23 + (PolicyNumber != null ? PolicyNumber.GetHashCode() : -2); hash = hash * 23 + (TZ != null ? TZ.GetHashCode() : -1); return(hash); } }
private void btnSubmit_Clicked(object sender, EventArgs e) { PolicyFlag.Instance.PolicyNumber = PolicyNumber.Trim(); if (entComment.Text != null) { PolicyFlag.Instance.Comment = entComment.Text.Trim(); } PolicyFlag.Instance.Flagged = true; PolicyFlag.Instance.RemindOnDate = remindDtPicker.Date.ToString("yyyy/MM/dd"); PopupNavigation.Instance.PopAsync(true); }
// short hand for // public String GetPolicyType() // {PolicyNumber.Substring(0, 1).ToUpper();} public String GetPolicyType() => PolicyNumber.Substring(0, 1).ToUpper();
MailMessage CreateMessage(string emailid) { MailDefinition md = new MailDefinition(); string PaymentType = Context.Items[CSAAWeb.Constants.PC_PAYMT_TYPE].ToString(); string PaymentUpdated = Context.Items[CSAAWeb.Constants.PC_IS_ENROLLED].ToString(); if (PaymentType == CSAAWeb.Constants.PC_CC) { if (PaymentUpdated == CSAAWeb.Constants.PC_POL_NOTENROLL_STATUS) { md.BodyFileName = CSAAWeb.Constants.PC_SUCCESS_HTML; md.From = Config.Setting("FromAddress"); md.Subject = CSAAWeb.Constants.ENROLL_SUCCESS_MAIL; md.Priority = MailPriority.Normal; md.IsBodyHtml = true; EmbeddedMailObject logo = new EmbeddedMailObject(); logo.Path = Server.MapPath(CSAAWeb.Constants.PC_LOGO_PATH); logo.Name = "logo"; md.EmbeddedObjects.Add(logo); EmbeddedMailObject pass = new EmbeddedMailObject(); pass.Path = Server.MapPath(CSAAWeb.Constants.PC_CORRECT_ICON_PATH); pass.Name = CSAAWeb.Constants.PASS_MAIL; md.EmbeddedObjects.Add(pass); EmbeddedMailObject thanks = new EmbeddedMailObject(); thanks.Path = Server.MapPath("/PaymentToolimages/thank-email.jpg"); thanks.Name = "thanks"; md.EmbeddedObjects.Add(thanks); } else if (PaymentUpdated == CSAAWeb.Constants.PC_POL_ENROLL_STATUS) { md.BodyFileName = CSAAWeb.Constants.PC_SUCCESS_HTML; md.From = Config.Setting("FromAddress"); md.Subject = CSAAWeb.Constants.MODIFY_SUCCESS_MAIL; md.Priority = MailPriority.Normal; md.IsBodyHtml = true; EmbeddedMailObject logo = new EmbeddedMailObject(); logo.Path = Server.MapPath(CSAAWeb.Constants.PC_LOGO_PATH); logo.Name = "logo"; md.EmbeddedObjects.Add(logo); EmbeddedMailObject pass = new EmbeddedMailObject(); pass.Path = Server.MapPath(CSAAWeb.Constants.PC_CORRECT_ICON_PATH); pass.Name = CSAAWeb.Constants.PASS_MAIL; md.EmbeddedObjects.Add(pass); EmbeddedMailObject thanks = new EmbeddedMailObject(); thanks.Path = Server.MapPath("/PaymentToolimages/thank-email.jpg"); thanks.Name = "thanks"; md.EmbeddedObjects.Add(thanks); } else { md.BodyFileName = "/PaymentToolimages/CCFailed.html"; md.From = Config.Setting("FromAddress"); md.Subject = "Enrollment Failed"; md.Priority = MailPriority.Normal; md.IsBodyHtml = true; EmbeddedMailObject logo = new EmbeddedMailObject(); logo.Path = Server.MapPath(CSAAWeb.Constants.PC_LOGO_PATH); logo.Name = "logo"; md.EmbeddedObjects.Add(logo); EmbeddedMailObject fail = new EmbeddedMailObject(); fail.Path = Server.MapPath("/PaymentToolimages/cancel-icon.png"); fail.Name = "fail"; md.EmbeddedObjects.Add(fail); } ListDictionary replacements = new ListDictionary(); replacements.Add("<%NAME%>", Context.Items[CSAAWeb.Constants.PC_CUST_NAME].ToString()); replacements.Add("<%DATE%>", DateTime.Now.ToString(CSAAWeb.Constants.FULL_DATE_TIME_FORMAT)); replacements.Add("<%CARDNO%>", Context.Items[CSAAWeb.Constants.PC_CCNumber].ToString()); replacements.Add("<%POLICY%>", PolicyNumber.ToString().ToUpper()); //CHG0072116 - PC Edit Card Details CH3:START - changed the content and subject for email WRT edit/Enrollment details. if (PaymentUpdated == CSAAWeb.Constants.PC_POL_ENROLL_STATUS) { replacements.Add("<%RESPONSE%>", CSAAWeb.Constants.PC_EDIT_RESPONSE); } else { replacements.Add("<%RESPONSE%>", Context.Items["Response"].ToString()); } //CHG0072116 - PC Edit Card Details CH3:END - changed the content and subject for email WRT edit/Enrollment details. //Clearing context Context.Items.Clear(); System.Net.Mail.MailMessage fileMsg; fileMsg = md.CreateMailMessage(emailid, replacements, this); return(fileMsg); } else { if (PaymentUpdated == CSAAWeb.Constants.PC_POL_NOTENROLL_STATUS) { md.BodyFileName = "/PaymentToolimages/ECheckSuccess.html"; md.From = Config.Setting("FromAddress"); md.Subject = CSAAWeb.Constants.ENROLL_SUCCESS_MAIL; md.Priority = MailPriority.Normal; md.IsBodyHtml = true; EmbeddedMailObject logo = new EmbeddedMailObject(); logo.Path = Server.MapPath(CSAAWeb.Constants.PC_LOGO_PATH); logo.Name = "logo"; md.EmbeddedObjects.Add(logo); EmbeddedMailObject pass = new EmbeddedMailObject(); pass.Path = Server.MapPath(CSAAWeb.Constants.PC_CORRECT_ICON_PATH); pass.Name = CSAAWeb.Constants.PASS_MAIL; md.EmbeddedObjects.Add(pass); EmbeddedMailObject thanks = new EmbeddedMailObject(); thanks.Path = Server.MapPath("/PaymentToolimages/thank-email.jpg"); thanks.Name = "thanks"; md.EmbeddedObjects.Add(thanks); } else if (PaymentUpdated == CSAAWeb.Constants.PC_POL_ENROLL_STATUS) { md.BodyFileName = "/PaymentToolimages/ECheckSuccess.html"; md.From = Config.Setting("FromAddress"); md.Subject = CSAAWeb.Constants.MODIFY_SUCCESS_MAIL; md.Priority = MailPriority.Normal; md.IsBodyHtml = true; EmbeddedMailObject logo = new EmbeddedMailObject(); logo.Path = Server.MapPath(CSAAWeb.Constants.PC_LOGO_PATH); logo.Name = "logo"; md.EmbeddedObjects.Add(logo); EmbeddedMailObject pass = new EmbeddedMailObject(); pass.Path = Server.MapPath(CSAAWeb.Constants.PC_CORRECT_ICON_PATH); pass.Name = CSAAWeb.Constants.PASS_MAIL; md.EmbeddedObjects.Add(pass); EmbeddedMailObject thanks = new EmbeddedMailObject(); thanks.Path = Server.MapPath("/PaymentToolimages/thank-email.jpg"); thanks.Name = "thanks"; md.EmbeddedObjects.Add(thanks); } else { md.BodyFileName = "/PaymentToolimages/ECFailed.html"; md.From = Config.Setting("FromAddress"); md.Subject = "Enrollment Failed"; md.Priority = MailPriority.Normal; md.IsBodyHtml = true; EmbeddedMailObject logo = new EmbeddedMailObject(); logo.Path = Server.MapPath(CSAAWeb.Constants.PC_LOGO_PATH); logo.Name = "logo"; md.EmbeddedObjects.Add(logo); EmbeddedMailObject fail = new EmbeddedMailObject(); fail.Path = Server.MapPath("/PaymentToolimages/cancel-icon.png"); fail.Name = "fail"; md.EmbeddedObjects.Add(fail); } ListDictionary replacements = new ListDictionary(); replacements.Add("<%ACCOUNTHOLDNAME%>", Context.Items[CSAAWeb.Constants.PC_CUST_NAME].ToString()); //PC Phase II 4/20 - Modified the date time format if echeck enrollment success sceanrio replacements.Add("<%DATE%>", DateTime.Now.ToString(CSAAWeb.Constants.FULL_DATE_TIME_FORMAT)); //replacements.Add("<%RECEIPT%>", Context.Items[CSAAWeb.Constants.PC_CNFRMNUMBER].ToString()); replacements.Add("<%ACCOUNTTYPE%>", Context.Items[CSAAWeb.Constants.PC_EC_ACCOUNT_TYPE].ToString()); replacements.Add("<%BANKNAME%>", Context.Items[CSAAWeb.Constants.PC_EC_BANK_NAME].ToString()); replacements.Add("<%ACCOUNTNUMBER%>", Context.Items[CSAAWeb.Constants.PC_EC_ACC_NUMBER].ToString()); replacements.Add("<%POLICYNO%>", PolicyNumber.ToString().ToUpper()); //CHG0072116 - PC Edit Card Details CH4: START - changed the content and subject for email WRT edit/Enrollment details. if (PaymentUpdated == CSAAWeb.Constants.PC_POL_ENROLL_STATUS) { replacements.Add("<%RESPONSE%>", CSAAWeb.Constants.PC_EDIT_RESPONSE); } else { replacements.Add("<%RESPONSE%>", Context.Items["Response"].ToString()); } //CHG0072116 - PC Edit Card Details CH4: END - changed the content and subject for email WRT edit/Enrollment details. System.Net.Mail.MailMessage fileMsg; fileMsg = md.CreateMailMessage(emailid, replacements, this); return(fileMsg); } }
protected bool Equals(PolicyNumber other) { return(string.Equals(_number, other._number)); }