Beispiel #1
0
        public void BindDDLs(AnnexContractView annexContractView, ObjectContext db)
        {
            //contract validities ddl
            IContractValiditiesRepository contractValiditiesRepository = new ContractValiditiesRepository(db);

            annexContractView.ContractValidities = new SelectList(contractValiditiesRepository.GetValid().OrderBy("Name ASC").ToList(), "ContractValidityPK", "Name");

            //contracts ddl
            IContractsRepository contractsRepository = new ContractsRepository(db);

            annexContractView.Contracts = new SelectList(contractsRepository.GetValid().OrderBy("Name ASC").ToList(), "ContractPK", "Name");

            //currencies ddl
            ICurrenciesRepository currenciesRepository = new CurrenciesRepository(db);

            annexContractView.Currencies = new SelectList(currenciesRepository.GetValid().OrderBy(c => c.Name).Select(c => new { value = c.CurrencyPK, text = c.Name + " (" + c.Sign + ")" }), "value", "text");
        }
Beispiel #2
0
 public void ConvertTo(AnnexContractView annexContractView, AnnexContract annexContract)
 {
     annexContract.AnnexContractPK        = annexContractView.AnnexContractPK;
     annexContract.ContractFK             = annexContractView.ContractFK;
     annexContract.Name                   = annexContractView.Name;
     annexContract.Number                 = annexContractView.Number;
     annexContract.Date                   = annexContractView.Date;
     annexContract.ContractValidityFK     = annexContractView.ContractValidityFK;
     annexContract.AnnexContractBegin     = annexContractView.AnnexContractBegin;
     annexContract.AnnexContractEnd       = annexContractView.AnnexContractEnd;
     annexContract.TerminationDate        = annexContractView.TerminationDate;
     annexContract.TerminationDescription = annexContractView.TerminationDescription;
     annexContract.Terminated             = annexContractView.Terminated;
     annexContract.CurrencyFK             = annexContractView.CurrencyFK;
     annexContract.MIO     = annexContractView.MIO;
     annexContract.TSI     = annexContractView.TSI;
     annexContract.GZR     = annexContractView.GZR;
     annexContract.OPL     = annexContractView.OPL;
     annexContract.AUP     = annexContractView.AUP;
     annexContract.Deleted = annexContractView.Deleted;
 }