private static void AddClaimants(List <Claimant> claimants, Claimant newClaimant)
        {
            if (claimants.Any(l => l.ID == newClaimant.ID))
            {
                throw new ArgumentException(GlobalConstants.InvalidAdding);
            }

            claimants.Add(newClaimant);
        }
示例#2
0
 public static void Encode(XdrDataOutputStream stream, Claimant encodedClaimant)
 {
     stream.WriteInt((int)encodedClaimant.Discriminant.InnerValue);
     switch (encodedClaimant.Discriminant.InnerValue)
     {
     case ClaimantType.ClaimantTypeEnum.CLAIMANT_TYPE_V0:
         ClaimantV0.Encode(stream, encodedClaimant.V0);
         break;
     }
 }
示例#3
0
        public static void Encode(XdrDataOutputStream stream, CreateClaimableBalanceOp encodedCreateClaimableBalanceOp)
        {
            Asset.Encode(stream, encodedCreateClaimableBalanceOp.Asset);
            Int64.Encode(stream, encodedCreateClaimableBalanceOp.Amount);
            int claimantssize = encodedCreateClaimableBalanceOp.Claimants.Length;

            stream.WriteInt(claimantssize);
            for (int i = 0; i < claimantssize; i++)
            {
                Claimant.Encode(stream, encodedCreateClaimableBalanceOp.Claimants[i]);
            }
        }
        public static void Encode(XdrDataOutputStream stream, ClaimableBalanceEntry encodedClaimableBalanceEntry)
        {
            ClaimableBalanceID.Encode(stream, encodedClaimableBalanceEntry.BalanceID);
            int claimantssize = encodedClaimableBalanceEntry.Claimants.Length;

            stream.WriteInt(claimantssize);
            for (int i = 0; i < claimantssize; i++)
            {
                Claimant.Encode(stream, encodedClaimableBalanceEntry.Claimants[i]);
            }
            Asset.Encode(stream, encodedClaimableBalanceEntry.Asset);
            Int64.Encode(stream, encodedClaimableBalanceEntry.Amount);
            ClaimableBalanceEntryExt.Encode(stream, encodedClaimableBalanceEntry.Ext);
        }
示例#5
0
        public static Claimant Decode(XdrDataInputStream stream)
        {
            Claimant     decodedClaimant = new Claimant();
            ClaimantType discriminant    = ClaimantType.Decode(stream);

            decodedClaimant.Discriminant = discriminant;
            switch (decodedClaimant.Discriminant.InnerValue)
            {
            case ClaimantType.ClaimantTypeEnum.CLAIMANT_TYPE_V0:
                decodedClaimant.V0 = ClaimantV0.Decode(stream);
                break;
            }
            return(decodedClaimant);
        }
示例#6
0
        public static CreateClaimableBalanceOp Decode(XdrDataInputStream stream)
        {
            CreateClaimableBalanceOp decodedCreateClaimableBalanceOp = new CreateClaimableBalanceOp();

            decodedCreateClaimableBalanceOp.Asset  = Asset.Decode(stream);
            decodedCreateClaimableBalanceOp.Amount = Int64.Decode(stream);
            int claimantssize = stream.ReadInt();

            decodedCreateClaimableBalanceOp.Claimants = new Claimant[claimantssize];
            for (int i = 0; i < claimantssize; i++)
            {
                decodedCreateClaimableBalanceOp.Claimants[i] = Claimant.Decode(stream);
            }
            return(decodedCreateClaimableBalanceOp);
        }
        private static void GenerateClaimants(List <Claimant> claimants, List <Lawyer> lawyers)
        {
            Claimant claimantSokolova  = new Claimant("6608189050", "Iva Sokolova", "Sofia, German", 45);
            Claimant claimantDraganov  = new Claimant("8805068055", "Nikola Draganov", "Sofia, Mladost", 22);
            Claimant claimantStanilova = new Claimant("7712165040", "Katerina Stanilova", "Sofia, bul. Malinov 44", 66);
            Claimant claimantPetrova   = new Claimant("8209085030", "Violeta Petrova", "Sofia, Lulin", 22);
            Claimant claimantDragiev   = new Claimant("6614195080", "Vencislav Dragiev", "Sofia, Lulin", 41);

            AddClaimants(claimants, claimantSokolova);
            AddClaimants(claimants, claimantDraganov);
            AddClaimants(claimants, claimantStanilova);
            AddClaimants(claimants, claimantPetrova);
            AddClaimants(claimants, claimantDragiev);

            AddLawyersToClaimants(claimants, lawyers);
        }
        public static ClaimableBalanceEntry Decode(XdrDataInputStream stream)
        {
            ClaimableBalanceEntry decodedClaimableBalanceEntry = new ClaimableBalanceEntry();

            decodedClaimableBalanceEntry.BalanceID = ClaimableBalanceID.Decode(stream);
            int claimantssize = stream.ReadInt();

            decodedClaimableBalanceEntry.Claimants = new Claimant[claimantssize];
            for (int i = 0; i < claimantssize; i++)
            {
                decodedClaimableBalanceEntry.Claimants[i] = Claimant.Decode(stream);
            }
            decodedClaimableBalanceEntry.Asset  = Asset.Decode(stream);
            decodedClaimableBalanceEntry.Amount = Int64.Decode(stream);
            decodedClaimableBalanceEntry.Ext    = ClaimableBalanceEntryExt.Decode(stream);
            return(decodedClaimableBalanceEntry);
        }
示例#9
0
        private IEnumerable <Claimant> GetClaimantsByClaimNumber(string claimNumber)
        {
            var claimantTable = importedData.FirstOrDefault(o => o.TableName.Equals(Constants.ClaimClaimant));

            var claimants = new List <Claimant>();

            if (claimantTable != null)
            {
                foreach (DataRow row in claimantTable.Rows)
                {
                    if (claimNumber.Equals(row["KeyInternSchadenummer"].ToString()))
                    {
                        try
                        {
                            var claimant = new Claimant
                            {
                                ClaimantName          = row["ClaimantName"].ToString(),
                                ClaimantAddressArea   = row["ClaimantAddressArea"].ToString(),
                                ClaimantAddressCity   = row["ClaimantAddressCity"].ToString(),
                                ClaimantAddressStreet = row["ClaimantAddressStreet"].ToString(),
                                ClaimantCode          = row["ClaimantCode"].ToString(),
                                ClaimantPostCode      = row["ClaimantPostCode"].ToString()
                            };

                            claimants.Add(claimant);
                        }
                        catch (Exception exception)
                        {
                            Logger.Log(LogLevel.Error, exception,
                                       $"While importing EDF Claim Claimant for - {row["KeyInternSchadenummer"]} : ClaimNumber");
                        }
                    }
                }
            }

            return(claimants);
        }
 public CivilCase(Defendant defendant, Judge judge, List <Witness> witnesses, List <JudicialAssessor> judicialAssessors, Claimant claimant)
     : base(defendant, judge, witnesses)
 {
     this.Claimant          = claimant;
     this.JudicialAssessors = judicialAssessors;
 }