コード例 #1
0
        public ActionResult CapNhatDaiLy(int id)
        {
            var daiLy   = daiLyService.GetById(id);
            var daiLyVm = Mapper.Map <DaiLy, DaiLyViewModel>(daiLy);

            return(View(daiLyVm));
        }
コード例 #2
0
        public ActionResult ChiTietPhieuXuat(int id)
        {
            var px    = phieuXuatService.GetById(id);
            var ctpx  = ctPhieuXuatService.GetMultiByIdPhieuXuat(px.Id, new string[] { "Sach" });
            var daiLy = daiLyService.GetById((int)px.IdDaiLy);

            var pxVm = Mapper.Map <PhieuXuat, PhieuXuatViewModel>(px);

            pxVm.ctPhieuXuats = Mapper.Map <IEnumerable <CtPhieuXuat>, IEnumerable <CtPhieuXuatViewModel> >(ctpx);
            pxVm.DaiLy        = Mapper.Map <DaiLy, DaiLyViewModel>(daiLy);
            return(View(pxVm));
        }