Example #1
0
        private Transaction updateSWR(Transaction tr)
        {
            //Controlled writers - SWR

            int           ref_number = 1;
            List <Record> revs       = _records.FindAll(o => o.GroupNo == tr.GroupNo && o.TransmissionNo == tr.TransactionNo && o.Type == "SWR");


            foreach (Record r in revs)
            {
                IPName writer = new IPName();
                writer.LastName      = r.Line.Substring(28, 45);
                writer.FirstName     = r.Line.Substring(73, 30);
                writer.IPINameNo     = r.Line.Substring(115, 11);
                writer.NaturalPerson = true;
                writer.RefNumber     = r.Line.Substring(19, 9);



                Shareholder sh = new Shareholder();
                sh.InterestedParty = writer;
                sh.Controlled      = true;
                sh.Level           = 1;
                sh.RefNo           = ref_number;
                //sh.

                sh.Role = r.Line.Substring(104, 2);
                sh.POwn = Decimal.Parse(r.Line.Substring(129, 5)) / 100;
                sh.MOwn = Decimal.Parse(r.Line.Substring(137, 5)) / 100;
                sh.SOwn = Decimal.Parse(r.Line.Substring(145, 5)) / 100;

                sh.PSoc = Int32.Parse(r.Line.Substring(126, 3));
                sh.MSoc = Int32.Parse(r.Line.Substring(134, 3));
                sh.SSoc = Int32.Parse(r.Line.Substring(142, 3));

                TIS territory_controll = new TIS();
                territory_controll.TISN    = 2136;
                territory_controll.Name    = "WORLD";
                territory_controll.Inluded = true;

                List <TIS> tisList = new List <TIS>();
                tisList.Add(territory_controll);

                tr.Work.addShareholderList(sh, tisList, this._cis_tables);

                int line = r.LineNo;
            }



            return(tr);
        }
Example #2
0
        public void addShareholderList(Shareholder sh, List <TIS> tisList, CISTables validator)
        {
            RightSplitOption validSplitOption = SplitOptions.Find(o => validator.TISValidList(o.Territories, tisList) && validator.TISValidList(tisList, o.Territories));


            if (validSplitOption != null)
            {
                validSplitOption.addShareholder(sh);
            }
            else
            {
                RightSplitOption commonTis          = new RightSplitOption();
                RightSplitOption notCommonBase      = new RightSplitOption();
                RightSplitOption notCommonInclusion = new RightSplitOption();


                //Console.WriteLine("Error");
            }
        }
Example #3
0
 public void addShareholder(Shareholder sh)
 {
     _shareholders.Add(sh);
 }