public void bindData(int claimID, bool isPrimeSessionFields = false) { // main binding routine Claim claim = null; clientID = SessionHelper.getClientId(); leadID = SessionHelper.getLeadId(); CRM.Data.Entities.LeadPolicy policy = null; hf_ClaimIdForStatus.Value =Convert.ToString(claimID); List<StatusMaster> statusMasters = null; List<SubStatusMaster> subStatusMasters = null; List<ProgressStatus> progressStatuses = null; // check for policy limits were defined. if no limit, create them automatically. // this is to fix claims created for the app.clamruler.com checkPolicyLimits(claimID, this.policyID); statusMasters = StatusManager.GetList(clientID); subStatusMasters = SubStatusManager.GetAll(clientID); CollectionManager.Fillchk(chkLossType, "TypeOfDamageId", "TypeOfDamage", TypeofDamageManager.GetAll(clientID, false)); CollectionManager.FillCollection(ddlLeadStatus, "StatusId", "StatusName", statusMasters); //chetu code CollectionManager.FillCollection(ddlClaimStatusReview, "StatusId", "StatusName", statusMasters); fillClaimStatusReview(clientID); //Bind InvoiceType CollectionManager.FillCollection(ddlInvoiceType, "InvoiceTypeID", "InvoiceTypes", InvoiceTypeManager.GetAll()); CollectionManager.FillCollection(ddlSubStatus, "SubStatusId", "SubStatusName", subStatusMasters); CollectionManager.FillCollection(ddlSupervisors, "ContactID", "ContactName", ContactManager.GetAll(clientID, (int)Globals.ContactType.Supervisor)); CollectionManager.FillCollection(ddlManager, "ContactID", "ContactName", ContactManager.GetAll(clientID, (int)Globals.ContactType.OwnerManager)); //CollectionManager.FillCollection(ddlOwnerManagerEntityName, "ContactID", "ContactName", ContactManager.GetAll(clientID, (int)Globals.ContactType.OwnerManagerEntityName)); ddlOwnerManagerEntityName.DataSource = CarrierLocationManager.GetCarrierLocation(clientID); ; ddlOwnerManagerEntityName.DataValueField = "CarrierLocationID"; ddlOwnerManagerEntityName.DataTextField = "LocationName"; ddlOwnerManagerEntityName.DataBind(); ddlOwnerManagerEntityName.Items.Insert(0, new ListItem("--- Select ---", "0")); CollectionManager.FillCollection(ddlTeamLeader, "ContactID", "ContactName", ContactManager.GetAll(clientID, (int)Globals.ContactType.TeamLead)); // bind contacts CollectionManager.FillCollection(ddlOutsideAdjuster, "ContactID", "ContactName", ContactManager.GetAll(clientID, (int)Globals.ContactType.OutsideAdjuster)); CollectionManager.FillCollection(ddlContentsAdjuster, "ContactID", "ContactName", ContactManager.GetAll(clientID, (int)Globals.ContactType.ContentsAdjuster)); CollectionManager.FillCollection(ddlExaminer, "ContactID", "ContactName", ContactManager.GetAll(clientID, (int)Globals.ContactType.Examiner)); CollectionManager.FillCollection(ddlCompanyBuilder, "ContactID", "ContactName", ContactManager.GetAll(clientID, (int)Globals.ContactType.CompanyBuilder)); CollectionManager.FillCollection(ddlCompanyInventory, "ContactID", "ContactName", ContactManager.GetAll(clientID, (int)Globals.ContactType.CompanyInventory)); CollectionManager.FillCollection(ddlOurBuilder, "ContactID", "ContactName", ContactManager.GetAll(clientID, (int)Globals.ContactType.OurBuilder)); CollectionManager.FillCollection(ddlInventoryCompany, "ContactID", "ContactName", ContactManager.GetAll(clientID, (int)Globals.ContactType.InventoryCompany)); //NEW OC 11/10 EXAMINER CollectionManager.FillCollection(ddlEstimator, "ContactID", "ContactName", ContactManager.GetAll(clientID, (int)Globals.ContactType.Estimator)); CollectionManager.FillCollection(ddlDeskAdjuster, "ContactID", "ContactName", ContactManager.GetAll(clientID, (int)Globals.ContactType.DeskAdjuster)); // 2014-04-27 using (ProgressStatusManager repository = new ProgressStatusManager()) { progressStatuses = repository.GetAll(); } CollectionManager.FillCollection(ddlProgressStatus, "ProgressStatusID", "ProgressDescription", progressStatuses); claim = ClaimsManager.Get(claimID); if (claim != null) { // carrier invoice program if (claim.LeadPolicy != null && claim.LeadPolicy.Carrier != null) { bindCarrierInvoiceProfile(claim.LeadPolicy.Carrier.CarrierID); } if (isPrimeSessionFields) { // prime session fields when claim is access via direct URL this.claimID = claim.ClaimID; SessionHelper.setPolicyID(claim.LeadPolicy.Id); SessionHelper.setLeadId(claim.LeadPolicy.LeadId); } activateTabs(true); fillForm(claim); claimComments.dataBind(claimID); claimContacts.bindData(claimID); claimDocuments.bindData(claimID); propertyLimits.bindData(this.policyID); //casualtyLimits.bindData(this.claimID); propertySubLimits.bindData(this.claimID); //bindDocuments(leadID); //bindContacts(); //bindLienHolders(); //fillComments(leadID); //bindCoverages(); //activateLinks(); if (claim.AdjusterID.HasValue) { // adde two new fiels AdjusterSettingsPayroll adjusterSettingsPayroll = AdjusterManager.GetAdjusterSttingPayrollData(claim.AdjusterID.Value); if (adjusterSettingsPayroll != null) { txtAdjusterBranch.Text = adjusterSettingsPayroll.AdjusterBranch; txtBranchCode.Text = adjusterSettingsPayroll.BranchCode; } } } else { // new claim activateTabs(false); fillPolicyInfo(policyID); propertyLimits.bindData(this.policyID); //casualtyLimits.bindData(this.claimID); propertySubLimits.bindData(this.claimID); ViewState["LastStatusID"] = "0"; //clearFields(); } }