private void InitializeModel(NewClaimModel model) { model.Claim_Team_List = new List <SelectListItem>(); if (ClaimHelper.IsManager(HonanClaimsPortal.Helpers.ClaimTeamManagers.RisksmartGCCManager) || ClaimHelper.IsMemberOfTeam(HonanClaimsPortal.Helpers.ClaimTeamsByTeamNames.RisksmartGCC)) { model.Claim_Team_List.Add(new SelectListItem() { Text = ClaimTeams.RisksmartGCC, Value = ClaimTeams.RisksmartGCC }); } if (ClaimHelper.IsManager(HonanClaimsPortal.Helpers.ClaimTeamManagers.RisksmartPropertyManager) || ClaimHelper.IsMemberOfTeam(HonanClaimsPortal.Helpers.ClaimTeamsByTeamNames.RisksmartProperty)) { model.Claim_Team_List.Add(new SelectListItem() { Text = ClaimTeams.RisksmartProperty, Value = ClaimTeams.RisksmartProperty }); } if (ClaimHelper.IsManager(HonanClaimsPortal.Helpers.ClaimTeamManagers.PropertyClaimsManager) || ClaimHelper.IsMemberOfTeam(HonanClaimsPortal.Helpers.ClaimTeamsByTeamNames.PropertyClaims)) { model.Claim_Team_List.Add(new SelectListItem() { Text = ClaimTeams.PropertyClaims, Value = ClaimTeams.PropertyClaims }); } if (ClaimHelper.IsManager(HonanClaimsPortal.Helpers.ClaimTeamManagers.GCCClaimsManager) || ClaimHelper.IsMemberOfTeam(HonanClaimsPortal.Helpers.ClaimTeamsByTeamNames.GCCClaims)) { model.Claim_Team_List.Add(new SelectListItem() { Text = ClaimTeams.GCCClaims, Value = ClaimTeams.GCCClaims }); } //model.Claim_Team_List = new List<SelectListItem>() //{ // new SelectListItem(){ Text = ClaimTeams.RisksmartGCC, Value=ClaimTeams.RisksmartGCC}, // new SelectListItem(){ Text = ClaimTeams.RisksmartProperty, Value=ClaimTeams.RisksmartProperty}, // new SelectListItem(){ Text = ClaimTeams.PropertyClaims, Value=ClaimTeams.PropertyClaims}, // new SelectListItem(){ Text = ClaimTeams.GCCClaims, Value=ClaimTeams.GCCClaims} //}; model.Claim_Type_List = new List <SelectListItem>() { new SelectListItem() { Text = Enum.GetName(typeof(ClaimType), 0), Value = Enum.GetName(typeof(ClaimType), 0) }, new SelectListItem() { Text = Enum.GetName(typeof(ClaimType), 1), Value = Enum.GetName(typeof(ClaimType), 1) } }; }
private void InitializeModel(PropertyClaim model, ClaimServices claimServices) { // Add Gender list model.GenderList = new List <string>() { "", "Male", "Female" }; pickListServices = new PicklistServicecs(); model.Policy_Section_List = pickListServices.GetPickListItems("Property Claims Policy Section"); model.Policy_Section_List.Insert(0, new PicklistItem()); //Get Suburbs model.PropertySuburbList = pickListServices.GetPickListItems("H_Suburbs"); model.PropertySuburbList.Insert(0, new PicklistItem()); //Get States model.PropertyStateList = pickListServices.GetPickListItems("H_State"); model.PropertyStateList.Insert(0, new PicklistItem()); model.Policy_Class_List = pickListServices.GetPickListItems("Honan Policy Classes"); model.Policy_Class_List.Insert(0, new PicklistItem()); model.Causation_List = pickListServices.GetPickListItems("Property Claims Causation"); model.Causation_List.Insert(0, new PicklistItem()); model.YesNoList = new List <string>() { "", "Yes", "No" }; model.ComplexityList = new List <string>() { "", "High", "Med", "Low" }; model.Liability_Reserve = model.Liability_Res_Source; model.Defence_Reserve = model.Defence_Res_Source; if (ClaimHelper.IsManager(HonanClaimsPortal.Helpers.ClaimTeamManagers.PropertyClaimsManager)) { model.Assigned_User_List = claimServices.GetUsers(new List <string>() { "Property Claims Manager" }); } model.Outcome_List = pickListServices.GetPickListItems("Property Claims Outcome"); model.Outcome_List.Insert(0, new PicklistItem()); model.Claim_Status_List = pickListServices.GetPickListItems("Honan Claim Status"); model.IncidentCategoryList = pickListServices.GetPickListItems("Property Claims Incident Category"); model.IncidentCategoryList.Insert(0, new PicklistItem()); model.Policy_Section_List = pickListServices.GetPickListItems("Property Claims Policy Section"); model.Policy_Section_List.Insert(0, new PicklistItem()); model.Notification_Status_List = pickListServices.GetPickListItems("Honan Notification Status"); model.Notification_Status_List.Insert(0, new PicklistItem()); model.Claim_Received = model.Claim_Received == null || model.Claim_Received == false ? false : true; model.Claim_Acknowledged = model.Claim_Acknowledged == null || model.Claim_Acknowledged == false ? false : true; model.Review = model.Review == null || model.Review == false ? false : true; model.Outcome_Settlement = model.Outcome_Settlement == null || model.Outcome_Settlement == false ? false : true; model.Outcome_Declined = model.Outcome_Declined == null || model.Outcome_Declined == false ? false : true; model.Claim_Closed = model.Claim_Closed == null || model.Claim_Closed == false ? false : true; model.Litigated = model.Litigated == null || model.Litigated == false ? false : true; model.Claim_Lodged = model.Claim_Lodged == null || model.Claim_Lodged == false ? false : true; model.Claim_Not_Lodged = model.Claim_Not_Lodged == null || model.Claim_Not_Lodged == false ? false : true; model.Claim_Approved = model.Claim_Approved == null || model.Claim_Approved == false ? false : true; model.Claim_Declined = model.Claim_Declined == null || model.Claim_Declined == false ? false : true; //Calculations PaymentServices paymentServices = new PaymentServices(); decimal val, liabilityReserveGross = 0, defenceReserveGross = 0; if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(model.H_Claimsid, "Liability Reserve", false), out val)) { model.Net_Paid_Liability = val; } if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(model.H_Claimsid, "Defence Reserve", false), out val)) { model.Net_Paid_Defence = val; } if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(model.H_Claimsid, "Liability Reserve", true), out val)) { liabilityReserveGross = val; model.Liability_Reserve = model.Liability_Reserve - model.Net_Paid_Liability; } if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(model.H_Claimsid, "Defence Reserve", true), out val)) { defenceReserveGross = val; model.Defence_Reserve = model.Defence_Reserve - model.Net_Paid_Defence; } model.Total_Reserve = model.Liability_Reserve + model.Defence_Reserve; model.Gross_Paid_To_Date = liabilityReserveGross + defenceReserveGross; model.Total_Incurred = model.Total_Reserve + model.Net_Paid_Liability + model.Net_Paid_Defence; if (model.Total_Reserve < model.Excess) { model.Current_Exposure = model.Total_Reserve; } else { model.Current_Exposure = model.Excess - model.Net_Paid_Liability - model.Net_Paid_Defence; } decimal totalNet = model.Net_Paid_Liability + model.Net_Paid_Defence; if (totalNet > model.Excess) { model.Over_Excess_Paid = totalNet - model.Excess; } else { model.Over_Excess_Paid = 0; } if (model.Reported_Time != null) { string time = DateTime.Parse(model.Reported_Time.ToString()).ToString("HH:mm"); model.Reported_TimeH = time.Split(':')[0].PadLeft(2, '0'); model.Reported_TimeM = time.Split(':')[1].PadLeft(2, '0'); } if (model.Incident_Time != null) { string time = DateTime.Parse(model.Incident_Time.ToString()).ToString("HH:mm"); model.Incident_TimeH = time.Split(':')[0].PadLeft(2, '0'); model.Incident_TimeM = time.Split(':')[1].PadLeft(2, '0'); } model.IncidentTypeList = pickListServices.GetPickListItems("Property Claims Incident Type"); }
private void InitializeModel(RisksmartGccClaim model, ClaimServices claimServices) { pickListServices = new PicklistServicecs(); if (ClaimHelper.IsManager(HonanClaimsPortal.Helpers.ClaimTeamManagers.RisksmartGCCManager)) { model.Assigned_User_List = claimServices.GetUsers(new List <string>() { "Risksmart GCC Manager" }); } model.Claim_Status_List = pickListServices.GetPickListItems("Honan Claim Status"); //Get Reported By Types model.ReportedByTypeList = pickListServices.GetPickListItems("Risksmart GCC Reported By Type"); //Get Regions //model.RegionList = pickListServices.GetPickListItems("H_StoreRegion"); //model.RegionList = pickListServices.GetStoreRegions(); model.RegionList = pickListServices.GetStoreRegionsByAccount(model.Accountid); if (model.RegionList == null) { model.RegionList = new List <PicklistItem>(); } model.RegionList.Insert(0, new PicklistItem()); // Add Juristiction list model.JuristictionList = new List <string>() { "", "NSW", "VIC", "QLD", "WA", "SA", "TAS" }; // Add Gender list model.GenderList = new List <string>() { "", "Male", "Female" }; //Get Incident categoris model.IncidentCategoryList = pickListServices.GetPickListItems("Risksmart GCC Incident Category"); model.IncidentCategoryList.Insert(0, new PicklistItem()); //Get Incident Party Types model.IncidentPartyTypeList = pickListServices.GetPickListItems("Risksmart GCC Incident Party Type"); model.IncidentPartyTypeList.Insert(0, new PicklistItem()); model.Policy_Section_List = pickListServices.GetPickListItems("Risksmart GCC Policy Section"); model.Policy_Section_List.Insert(0, new PicklistItem()); //Get Outcome List model.Outcome_List = pickListServices.GetPickListItems("Risksmart GCC Outcome"); model.Outcome_List.Insert(0, new PicklistItem()); model.Policy_Class_List = pickListServices.GetPickListItems("Risksmart GCC Policy Class"); model.Policy_Class_List.Insert(0, new PicklistItem()); model.Client_Group_List = pickListServices.GetPickListItems("Risksmart GCC Client Group"); model.Client_Group_List.Insert(0, new PicklistItem()); model.Notification_Status_List = pickListServices.GetPickListItems("Honan Notification Status"); model.Notification_Status_List.Insert(0, new PicklistItem()); model.Bodily_Location_List = pickListServices.GetPickListItems("Honan Claims Bodily Location"); model.Bodily_Location_List.Insert(0, new PicklistItem()); if (model.Reported_Time != null) { string time = DateTime.Parse(model.Reported_Time.ToString()).ToString("HH:mm"); model.Reported_TimeH = time.Split(':')[0].PadLeft(2, '0'); model.Reported_TimeM = time.Split(':')[1].PadLeft(2, '0'); } if (model.Incident_Time != null) { string time = DateTime.Parse(model.Incident_Time.ToString()).ToString("HH:mm"); model.Incident_TimeH = time.Split(':')[0].PadLeft(2, '0'); model.Incident_TimeM = time.Split(':')[1].PadLeft(2, '0'); } // Add CCTV available list model.CCTVAvailableList = new List <string>() { "", "Yes", "No" }; // Add CCTV viewed list model.CCTVViewedList = new List <string>() { "", "Yes", "No" }; model.PanelLawyersRetainedList = new List <string>() { "", "Yes", "No" }; model.Total_Incurred = model.Total_Reserve + model.Net_Paid_Liability + model.Net_Paid_Defence; model.Liability_Reserve = model.Liability_Res_Source; model.Defence_Reserve = model.Defence_Res_Source; PaymentServices paymentServices = new PaymentServices(); decimal val, liabilityReserveGross = 0, defenceReserveGross = 0; if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(model.H_Claimsid, "Liability Reserve", false), out val)) { model.Net_Paid_Liability = val; } if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(model.H_Claimsid, "Defence Reserve", false), out val)) { model.Net_Paid_Defence = val; } if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(model.H_Claimsid, "Liability Reserve", true), out val)) { liabilityReserveGross = val; model.Liability_Reserve = model.Liability_Reserve - model.Net_Paid_Liability; } if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(model.H_Claimsid, "Defence Reserve", true), out val)) { defenceReserveGross = val; model.Defence_Reserve = model.Defence_Reserve - model.Net_Paid_Defence; } model.Total_Reserve = model.Liability_Reserve + model.Defence_Reserve; model.Gross_Paid_To_Date = liabilityReserveGross + defenceReserveGross; model.Total_Incurred = model.Total_Reserve + model.Net_Paid_Liability + model.Net_Paid_Defence; if (model.Total_Reserve < model.Excess) { model.Current_Exposure = model.Total_Reserve; } else { model.Current_Exposure = model.Excess - model.Net_Paid_Liability - model.Net_Paid_Defence; } decimal totalNet = model.Net_Paid_Liability + model.Net_Paid_Defence; if (totalNet > model.Excess) { model.Over_Excess_Paid = totalNet - model.Excess; } else { model.Over_Excess_Paid = 0; } model.Claim_Received = model.Claim_Received == null || model.Claim_Received == false ? false : true; model.Claim_Acknowledged = model.Claim_Acknowledged == null || model.Claim_Acknowledged == false ? false : true; model.Review = model.Review == null || model.Review == false ? false : true; model.Outcome_Settlement = model.Outcome_Settlement == null || model.Outcome_Settlement == false ? false : true; model.Outcome_Declined = model.Outcome_Declined == null || model.Outcome_Declined == false ? false : true; model.Litigated = model.Litigated == null || model.Litigated == false ? false : true; model.Claim_Closed = model.Claim_Closed == null || model.Claim_Closed == false ? false : true; model.IncidentTypeList = pickListServices.GetPickListItems("Risksmart GCC Incident Type"); model.YesNoList = new List <string>() { "", "Yes", "No" }; model.Bodily_Location_List = pickListServices.GetPickListItems("Honan Claims Bodily Location"); model.Bodily_Location_List.Insert(0, new PicklistItem()); }
private void InitializeModel(GccClaim claim, ClaimServices claimServices) { pickListServices = new PicklistServicecs(); //Get Incident categoris claim.IncidentCategoryList = pickListServices.GetPickListItems("GCC Incident Category"); claim.IncidentCategoryList.Insert(0, new PicklistItem()); claim.IncidentPartyTypeList = pickListServices.GetPickListItems("GCC Incident Type"); claim.IncidentPartyTypeList.Insert(0, new PicklistItem()); claim.Policy_Class_List = pickListServices.GetPickListItems("GCC Policy Class"); claim.Policy_Class_List.Insert(0, new PicklistItem()); claim.YesNoList = new List <string>() { "", "Yes", "No" }; if (ClaimHelper.IsManager(HonanClaimsPortal.Helpers.ClaimTeamManagers.RisksmartGCCManager)) { claim.Assigned_User_List = claimServices.GetUsers(new List <string>() { "GCC Claims Manager" }); } claim.Claim_Status_List = pickListServices.GetPickListItems("Honan Claim Status"); //Get Reported By Types //claim.ReportedByTypeList = pickListServices.GetPickListItems("Risksmart GCC Reported By Type"); //Get Regions claim.RegionList = pickListServices.GetPickListItems("H_StoreRegion"); // Add Juristiction list claim.JuristictionList = new List <string>() { "", "NSW", "VIC", "QLD", "WA", "SA", "TAS" }; // Add Gender list claim.GenderList = new List <string>() { "", "Male", "Female" }; //Get Incident Party Types claim.IncidentPartyTypeList = pickListServices.GetPickListItems("GCC Incident Type"); claim.IncidentPartyTypeList.Insert(0, new PicklistItem()); //claim.Policy_Section_List = pickListServices.GetPickListItems("Risksmart GCC Policy Section"); //claim.Policy_Section_List.Insert(0, new PicklistItem()); //Get Outcome List claim.Outcome_List = pickListServices.GetPickListItems("Risksmart GCC Outcome"); claim.Outcome_List.Insert(0, new PicklistItem()); claim.Policy_Class_List = pickListServices.GetPickListItems("Honan Policy Classes"); claim.Policy_Class_List.Insert(0, new PicklistItem()); claim.Client_Group_List = pickListServices.GetPickListItems("Honan Claims Client Group"); claim.Client_Group_List.Insert(0, new PicklistItem()); claim.Notification_Status_List = pickListServices.GetPickListItems("Honan Notification Status"); claim.Notification_Status_List.Insert(0, new PicklistItem()); if (claim.Reported_Time != null) { string time = DateTime.Parse(claim.Reported_Time.ToString()).ToString("HH:mm"); claim.Reported_TimeH = time.Split(':')[0].PadLeft(2, '0'); claim.Reported_TimeM = time.Split(':')[1].PadLeft(2, '0'); } if (claim.Incident_Time != null) { string time = DateTime.Parse(claim.Incident_Time.ToString()).ToString("HH:mm"); claim.Incident_TimeH = time.Split(':')[0].PadLeft(2, '0'); claim.Incident_TimeM = time.Split(':')[1].PadLeft(2, '0'); } // Add CCTV available list claim.CCTVAvailableList = new List <string>() { "", "Yes", "No" }; // Add CCTV viewed list claim.CCTVViewedList = new List <string>() { "", "Yes", "No" }; //claim.PanelLawyersRetainedList = new List<string>() { "", "Yes", "No" }; claim.Total_Incurred = claim.Total_Reserve + claim.Net_Paid_Liability + claim.Net_Paid_Defence; claim.Liability_Reserve = claim.Liability_Res_Source; claim.Defence_Reserve = claim.Defence_Res_Source; PaymentServices paymentServices = new PaymentServices(); decimal val, liabilityReserveGross = 0, defenceReserveGross = 0; if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(claim.H_Claimsid, "Liability Reserve", false), out val)) { claim.Net_Paid_Liability = val; } if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(claim.H_Claimsid, "Defence Reserve", false), out val)) { claim.Net_Paid_Defence = val; } if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(claim.H_Claimsid, "Liability Reserve", true), out val)) { liabilityReserveGross = val; claim.Liability_Reserve = claim.Liability_Reserve - claim.Net_Paid_Liability; } if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(claim.H_Claimsid, "Defence Reserve", true), out val)) { defenceReserveGross = val; claim.Defence_Reserve = claim.Defence_Reserve - claim.Net_Paid_Defence; } claim.Total_Reserve = claim.Liability_Reserve + claim.Defence_Reserve; claim.Gross_Paid_To_Date = liabilityReserveGross + defenceReserveGross; claim.Total_Incurred = claim.Total_Reserve + claim.Net_Paid_Liability + claim.Net_Paid_Defence; if (claim.Total_Reserve < claim.Excess) { claim.Current_Exposure = claim.Total_Reserve; } else { claim.Current_Exposure = claim.Excess - claim.Net_Paid_Liability - claim.Net_Paid_Defence; } decimal totalNet = claim.Net_Paid_Liability - claim.Net_Paid_Defence; if (totalNet > claim.Excess) { claim.Over_Excess_Paid = totalNet - claim.Excess; } else { claim.Over_Excess_Paid = 0; } claim.Claim_Closed = claim.Claim_Closed == null || claim.Claim_Closed == false ? false : true; claim.Claim_Declined = claim.Claim_Declined == null || claim.Claim_Declined == false ? false : true; claim.Partial_Indemnity_Granted = claim.Partial_Indemnity_Granted == null || claim.Partial_Indemnity_Granted == false ? false : true; claim.Indemnity_Granted = claim.Indemnity_Granted == null || claim.Indemnity_Granted == false ? false : true; claim.Expert_Appointed = claim.Expert_Appointed == null || claim.Expert_Appointed == false ? false : true; claim.Claim_Acknowledged = claim.Claim_Acknowledged == null || claim.Claim_Acknowledged == false ? false : true; claim.Claim_Lodged = claim.Claim_Lodged == null || claim.Claim_Lodged == false ? false : true; claim.Claim_Not_Lodged = claim.Claim_Not_Lodged == null || claim.Claim_Not_Lodged == false ? false : true; }