protected static void exportPhotos(LeadPolicy policy)
        {
            int leadID = (int)policy.LeadId;
            int policyTypeID = (int)policy.PolicyType;
            string policyDescription = policy.LeadPolicyType != null ? policy.LeadPolicyType.Description : "";

            List<LeadsImage> images = LeadsUploadManager.getLeadsImageByLeadID(leadID, policyTypeID);

            if (images == null || images.Count == 0)
                return;

            addPhotos(images, policyDescription);
        }
        protected static void exportCoverage(LeadPolicy policy)
        {
            string coverageHeder = string.Empty;
            int policyTypeID = (int)policy.PolicyType;

            LeadPolicyType policyType = null;

            // create header
            policyType = LeadPolicyTypeManager.Get(policyTypeID);

            if (policyType != null)
                coverageHeder = policyType.Description + " - Coverages";

            doc.NewPage();

            PdfPTable tblHeader = new PdfPTable(new float[] { 30, 60 });
            tblHeader.WidthPercentage = 90;

            PdfPCell headerCell = new PdfPCell(new Phrase(coverageHeder));
            headerCell.Colspan = 2;
            headerCell.HorizontalAlignment = PdfPCell.ALIGN_CENTER;
            tblHeader.AddCell(headerCell);
            doc.Add(tblHeader);

            PdfPTable ptable = new PdfPTable(new float[] { 30, 60 });
            string typeDescripion = "";
            string cityName = null;
            string stateName = null;
            string zipCode = null;
            string inspectionCompleted = null;

            //foreach (LeadPolicy policy in policies) {

            if (!string.IsNullOrEmpty(policy.InsuranceCompanyName)) {
                addTableCell(ptable, "Insurance Type");
                if (policy.PolicyType != null)
                    typeDescripion = policy.LeadPolicyType.Description;

                addTableCell(ptable, typeDescripion);

                addTableCell(ptable, "Insurance Company");
                addTableCell(ptable, policy.InsuranceCompanyName);

                addTableCell(ptable, "Address");
                addTableCell(ptable, policy.InsuranceAddress ?? " ");

                addTableCell(ptable, " ");
                cityName = policy.CityMaster == null ? " " : policy.CityMaster.CityName;
                stateName = policy.StateMaster == null ? " " : policy.StateMaster.StateCode;
                zipCode = policy.InsuranceZipCode ?? " ";

                addTableCell(ptable, cityName + " " + stateName + " " + zipCode);

                addTableCell(ptable, "Policy Number");
                addTableCell(ptable, policy.PolicyNumber ?? " ");

                //addTableCell(ptable, "Claim Number");
                //addTableCell(ptable, policy.ClaimNumber ?? " ");

                //addTableCell(ptable, "Status");
                //addTableCell(ptable, policy.StateMaster == null ? " " : policy.StateMaster.StateName);

                //addTableCell(ptable, "SubStatus");
                //addTableCell(ptable, policy.SubStatusMaster == null ? " " : policy.SubStatusMaster.SubStatusName);

                //addTableCell(ptable, "Site Survey Date");
                //addTableCell(ptable, policy.SiteSurveyDate == null ? " " : Convert.ToDateTime(policy.SiteSurveyDate).ToShortDateString());

                //addTableCell(ptable, "Site Inspection Complete");
                //if (policy.SiteInspectionCompleted == null)
                //	inspectionCompleted = "No";
                //else
                //	inspectionCompleted = policy.SiteInspectionCompleted == 1 ? "Yes" : "No";

                addTableCell(ptable, inspectionCompleted);

                // blank row
                addTableCell(ptable, " ");
                addTableCell(ptable, " ");
            }

            //}
            doc.Add(ptable);
        }
        protected static void exportClaimLog(LeadPolicy policy)
        {
            int leadID = (int)policy.LeadId;
            int policyType = (int)policy.PolicyType;

            string policyDescription = policy.LeadPolicyType != null ? policy.LeadPolicyType.Description : "";

            List<LeadComment> policyComments = LeadCommentManager.getLeadCommentByLeadID(leadID, policyType);

            if (policyComments == null || policyComments.Count == 0)
                return;

            // create table 2 cells
            PdfPTable ptable = new PdfPTable(new float[] { 20, 80 });
            ptable.WidthPercentage = 90;

            addPolicyComments(ptable, policyComments, policyDescription);

            doc.Add(ptable);
        }
 /// <summary>
 /// Create a new LeadPolicy object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="isActive">Initial value of the IsActive property.</param>
 public static LeadPolicy CreateLeadPolicy(global::System.Int32 id, global::System.Boolean isActive)
 {
     LeadPolicy leadPolicy = new LeadPolicy();
     leadPolicy.Id = id;
     leadPolicy.IsActive = isActive;
     return leadPolicy;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the LeadPolicies EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToLeadPolicies(LeadPolicy leadPolicy)
 {
     base.AddObject("LeadPolicies", leadPolicy);
 }
Example #6
0
 public void UpdateCarrierId(LeadPolicy objLeadPolicy)
 {
     LeadPolicy objLeadPolicy2 = DbContextHelper.DbContext.LeadPolicy.First(x => x.Id == objLeadPolicy.Id);
     objLeadPolicy2.CarrierID = objLeadPolicy.CarrierID;
     DbContextHelper.DbContext.SaveChanges();
 }