コード例 #1
0
        private List <IntroducerAuditViewModel> GetIntroducer(string id)
        {
            var bad        = new BaseAuditDAL();
            var introducer = new IntroducerAuditDAL();
            var baseaduit  = bad.Get(id);

            if (baseaduit == null)
            {
                return(null);
            }
            var introducerAudit     = introducer.FindByAuditID(baseaduit.ID);
            var introducerAuditList = new List <IntroducerAuditViewModel>();

            foreach (var model in introducerAudit)
            {
                var collateral = new IntroducerAuditViewModel()
                {
                    ID            = model.ID,
                    Account       = model.Account,
                    AccountBank   = model.AccountBank,
                    AuditID       = baseaduit.ID,
                    Contract      = model.Contract,
                    Name          = model.Name,
                    RebateAmmount = model.RebateAmmount,
                    RebateRate    = model.RebateRate,
                    Sequence      = model.Sequence
                };
                introducerAuditList.Add(collateral);
            }
            return(introducerAuditList.OrderBy(p => p.Sequence).ToList());
        }
コード例 #2
0
        private IEnumerable <IntroducerAuditViewModel> GetIntroducer(BaseAudit baseAudit)
        {
            var introducer = new IntroducerAuditDAL();

            var introducerAudit     = introducer.FindByAuditID(baseAudit.ID);
            var introducerAuditList = introducerAudit.Select(model =>
                                                             new IntroducerAuditViewModel
            {
                ID            = model.ID,
                Account       = model.Account,
                AccountBank   = model.AccountBank,
                AuditID       = baseAudit.ID,
                Contract      = model.Contract,
                Name          = model.Name,
                RebateAmmount = model.RebateAmmount,
                RebateRate    = model.RebateRate,
                Sequence      = model.Sequence
            }).ToList();

            return(introducerAuditList.OrderBy(p => p.Sequence).ToList());
        }