Пример #1
0
        // GET: DoanController/Details/5
        public ActionResult Details(int id)
        {
            idND = id;
            string strId   = nguoidiRepo.getKH(id);
            string strIdnv = nguoidiRepo.getNV(id);
            Doans  d       = _doanService.Get(id);

            idTours       = d.TourId;
            ViewBag.doan  = d;
            ViewBag.kh    = khachhangRepo.GetAll(strId);
            ViewBag.nv    = nhanVienRepo.GetAllId(strIdnv);
            ViewBag.nvs   = nhanVienRepo.GetAll();
            ViewBag.khall = khachhangRepo.GetAlll();
            ViewBag.gia   = gia.Get(Convert.ToInt32(d.TourId));
            ViewBag.slKh  = nguoidiRepo.CountKH(strId);
            ViewBag.slNV  = nguoidiRepo.CountNV(strIdnv);
            try
            {
                ViewBag.tongtien = tongTien();
            }
            catch (System.Exception ex)
            {
                ViewBag.tongtien = 0;
            }
            ViewBag.tour = tour.Get(d.TourId);
            return(View());
        }
Пример #2
0
        public IActionResult Index(int?id)
        {
            ViewBag.Doans = doanRepo.GetAll();
            int idDoan = id ?? 0;

            ViewBag.id   = idDoan;
            idd          = idDoan;
            ViewBag.doan = doanRepo.Get(idDoan);
            if (idDoan != 0)
            {
                return(View(repo.GetChiTietHoaDon(idDoan)));
            }
            return(View(new List <ChiPhis>()));
        }