示例#1
0
        public IActionResult Index(int?page, string SearchString, int?RecruitmentQaidId, int?Id)
        {
            RecruitmentQaidDetailViewModel detail = new RecruitmentQaidDetailViewModel
            {
                QaidId = RecruitmentQaidId,
            };

            if (Id != null)
            {
                var qaidDetail           = _qaidDetail.GetRecruitmentQaidDetailById((int)Id);
                var qaidDetailViewModels = _mapper.Map <RecruitmentQaidDetailViewModel>(qaidDetail);
                detail.AccountTreeId = qaidDetailViewModels.AccountTreeId;
                detail.TypeId        = qaidDetailViewModels.TypeId;
                detail.Debit         = qaidDetailViewModels.Debit;
                detail.Credit        = qaidDetailViewModels.Credit;
                detail.Note          = qaidDetailViewModels.Note;
            }


            var qaidDetailList = _qaidDetail.GetRecruitmentQaidDetails().Where(x => x.QaidId == RecruitmentQaidId);

            ViewBag.QaidDetail = qaidDetailList;

            ViewBag.AccountTreeId = new SelectList(_accTree.GetAccountTrees(), "Id", "DescriptionAr");
            ViewBag.TypeId        = new SelectList(_detailType.GetRecruitmentQaidDetailTypes(), "Id", "Name");
            return(View(detail));
        }
示例#2
0
        public IActionResult Details(long?id)
        {
            if (id == null)
            {
                return(NotFound());
            }
            var recruitmentQaid = _recruitmentQaid.GetRecruitmentQaidById((int)id);

            //var agencyViewModel = _mapper.Map<ForeignAgencyTransferViewModel>(agency);
            if (recruitmentQaid == null)
            {
                return(NotFound());
            }
            ViewBag.QaidDetail = _recruitmentQaidDetail.GetRecruitmentQaidDetails().Where(x => x.QaidId == recruitmentQaid.Id);
            ViewBag.TypeId     = new SelectList(_type.GetRecruitmentQaidTypes(), "Id", "Name", recruitmentQaid.TypeId);
            return(View(recruitmentQaid));
        }