Ejemplo n.º 1
0
        public BrokingPlatformIntegrationBase.Interfaces.IClaim GetClaim(int ClaimID)
        {
            var eclipseClaimItem = new EclipseClaim();

            eclipseClaimItem.ClaimFieldGroups = new List <IClaimFieldGroup>();
            var eclipseClaimFieldGroup = new EclipseClaimFieldGroup("", "");

            eclipseClaimFieldGroup.ClaimFields = new List <IClaimField>();

            var eclipseClaim =
                db.tblClaims.Single(m => m.ClaimId == ClaimID);

            var claimId = new Acturis.Data.ActurisClaimField();

            claimId.Name           = "ClaimId";
            claimId.ShortTextValue = eclipseClaim.ClaimId.ToString();
            claimId.TemplateName   = "ShortText";
            eclipseClaimFieldGroup.ClaimFields.Add(claimId);


            var claimName = new Acturis.Data.ActurisClaimField();

            claimName.Name           = "Name";
            claimName.ShortTextValue = eclipseClaim.ClaimId.ToString();
            claimName.TemplateName   = "ShortText";
            eclipseClaimFieldGroup.ClaimFields.Add(claimName);


            var fields = new string[] { "ClaimStatus", "ClaimReference", "LossRegisterId", "SumInsured", "SumInsuredCurrencyISO",
                                        "LossName", "LossDateFrom", "LossDateTo", "LossLocation", "ClaimDescription", "VesselAircraftConvey", "Claimant", "ContentiousLossIndicator",
                                        "UniqueClaimReference", "Interest", "InsuredId", "InsuredName", "ClientId", "ClientName", "ReinsuredId", "ReinsuredName", "PrimaryClaimHandlerId",
                                        "PrimaryClaimHandlerName", "PrimaryClaimHandlerTeamId", "PrimaryClaimHandlerTeamName", "Deleted", "CreatedDate", "LastUpdateDate" };

            foreach (var field in fields)
            {
                var claimRef = new Acturis.Data.ActurisClaimField();
                claimRef.Name = field;
                var object1 = eclipseClaim.GetType().GetProperty(field).GetValue(eclipseClaim, null);
                claimRef.ShortTextValue = (object1 != null) ? object1.ToString() : String.Empty;
                claimRef.TemplateName   = "ShortText";
                eclipseClaimFieldGroup.ClaimFields.Add(claimRef);
            }


            eclipseClaimItem.ClaimID = ClaimID;

            eclipseClaimItem.ClaimFieldGroups.Add(eclipseClaimFieldGroup);
            return(eclipseClaimItem);
        }
Ejemplo n.º 2
0
        public BrokingPlatformIntegrationBase.Interfaces.IClaim GetPolicy(int polictyId)
        {
            var eclipsePolicy = db.tblPolicies.Single(m => m.PolicyId == polictyId);

            var eclipsePolicyItem = new Data.EclipsePolicy();

            eclipsePolicyItem.ClaimFieldGroups = new List <IClaimFieldGroup>();
            var eclipseClaimFieldGroup = new EclipseClaimFieldGroup("", "");

            eclipseClaimFieldGroup.ClaimFields = new List <IClaimField>();


            var policyRef = new Acturis.Data.ActurisClaimField();

            policyRef.Name           = "Policy Reference";
            policyRef.ShortTextValue = eclipsePolicy.PolicyReference;
            policyRef.TemplateName   = "ShortText";
            eclipseClaimFieldGroup.ClaimFields.Add(policyRef);


            var fields = new string[] {
                "PolicyId", "PolicyReference", "ProgrammeReference", "ProductClassId", "ProductClass", "Product", "OwnershipTeamId", "OwnerId", "BusinessType", "PolicyStatus", "PolicyStatusCode",
                "AuthorizedDate", "CancelledDate", "InceptionDate", "ExpiryDate", "Backloaded", "BackloadDescription", "RenewedFromId", "RenewedToId", "PolicyExpired", "PolicyType", "MasterBinder",
                "Deleted", "PrimaryHandlerId", "PrimaryHandlerName", "PrimaryHandlerTeamId", "PrimaryHandlerTeam", "PrimaryProducerId", "PrimaryProducerName", "PrimaryProducerTeamId", "PrimaryProducerTeam",
                "FirstClientId", "FirstClientName", "FirstClientCountry", "FirstInsuredId", "FirstInsuredName", "FirstInsuredCountry", "FirstReinsuredId", "FirstReinsuredName", "FirstReinsuredCountry",
                "FirstBusinessClassId", "FirstBusinessClass", "BusinessClassList", "CreatedDate", "LastUpdateDate"
            };

            foreach (var field in fields)
            {
                var claimRef = new Acturis.Data.ActurisClaimField();
                claimRef.Name = field;
                var object1 = eclipsePolicy.GetType().GetProperty(field).GetValue(eclipsePolicy, null);
                claimRef.ShortTextValue = (object1 != null) ? object1.ToString() : String.Empty;
                claimRef.TemplateName   = "ShortText";
                eclipseClaimFieldGroup.ClaimFields.Add(claimRef);
            }

            eclipsePolicyItem.ClaimID = eclipsePolicy.PolicyId;
            eclipsePolicyItem.ClaimFieldGroups.Add(eclipseClaimFieldGroup);
            return(eclipsePolicyItem);
        }