Ejemplo n.º 1
0
        public static R68ClaimRepaymentOtherInc[] CreateOtherIncome()
        {
            R68ClaimRepaymentOtherInc[] OtherIncs = new R68ClaimRepaymentOtherInc[OtherIncome.Rows.Count];

            _loggingService.LogInfo(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType
                                    , String.Concat("Processing ", OtherIncome.Rows.Count, " OtherIncome records."));

            for (int i = 0; i < OtherIncome.Rows.Count; i++)
            {
                R68ClaimRepaymentOtherIncomeCreator otherIncCreator = new R68ClaimRepaymentOtherIncomeCreator(new DefaultR68ClaimRepaymentOtherIncomeBuilder(_loggingService), _loggingService);
                otherIncCreator.SetInputRow(OtherIncome.Rows[i]);
                otherIncCreator.CreateR68ClaiMRepaymentOtherInc();
                OtherIncs[i] = otherIncCreator.GetR68ClaimRepaymentOtherInc();
            }

            return(OtherIncs);
        }
Ejemplo n.º 2
0
        public static void TestSerialize()
        {
            R68ClaimGASDS gasds = new R68ClaimGASDS();

            gasds.ConnectedCharities = r68_YesNoType.no;
            gasds.CommBldgs          = r68_YesNoType.no;

            R68ClaimRepaymentOtherInc otherinc = new R68ClaimRepaymentOtherInc();

            otherinc.Payer  = "Peter Other";
            otherinc.Gross  = 13.12M;
            otherinc.OIDate = Convert.ToDateTime("2014-10-31");
            otherinc.Tax    = 2.62M;

            R68ClaimRepaymentOtherInc[] OtherIncs = new R68ClaimRepaymentOtherInc[1];
            OtherIncs[0] = otherinc;

            R68ClaimRepaymentGADDonor donor = new R68ClaimRepaymentGADDonor();

            donor.Fore  = "Jane";
            donor.Sur   = "Smith";
            donor.House = "1";
            donor.Item  = "BA23 9CD";

            R68ClaimRepaymentGAD gad = new R68ClaimRepaymentGAD();

            gad.Item        = donor;
            gad.TotalString = "12.00";
            gad.Date        = Convert.ToDateTime("2014-10-03");

            XmlDocument xmlGad =
                XmlSerializationHelpers.SerializeItem(gad);

            byte[] bytes = Encoding.UTF8.GetBytes(xmlGad.OuterXml);

            xmlGad.Save(@"C:\Temp\GAD.xml");

            R68ClaimRepaymentGAD[] GADS = new R68ClaimRepaymentGAD[1];
            GADS[0] = gad;

            R68ClaimRepayment repayment = new R68ClaimRepayment();

            repayment.EarliestGAdateSpecified = true;
            repayment.EarliestGAdate          = Convert.ToDateTime("2014-10-03");
            repayment.GAD      = GADS;
            repayment.OtherInc = OtherIncs;

            R68ClaimRegulator regulator = new R68ClaimRegulator();

            regulator.Item  = R68ClaimRegulatorRegName.CCEW;
            regulator.RegNo = "A1234";

            R68Claim claim = new R68Claim();

            claim.OrgName   = "My Organisation";
            claim.HMRCref   = "AA12345";
            claim.GASDS     = gasds;
            claim.Regulator = regulator;
            claim.Repayment = repayment;

            XmlDocument claimXml =
                XmlSerializationHelpers.SerializeItem(claim);

            claimXml.Save(@"C:\Temp\R68Claim.xml");
        }
Ejemplo n.º 3
0
 public void InitialiseR68ClaimRepyamentOtherInc(ILoggingService loggingService)
 {
     _r68ClaimRepaymentOtherInc = new R68ClaimRepaymentOtherInc();
     _loggingService            = loggingService;
 }