コード例 #1
0
ファイル: HoaDonController.cs プロジェクト: Shiba22222/QLKS
        public ActionResult GoiDichVu(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            GoiDichVuModel mod = new GoiDichVuModel();

            mod.dsDichVu     = db.tblDichVus.Where(t => t.ton_kho > 0).ToList();
            mod.dsDvDaDat    = db.tblDichVuDaDats.Where(u => u.ma_hd == id).ToList();
            ViewBag.ma_hd    = id;
            ViewBag.so_phong = db.tblHoaDons.Find(id).tblPhieuDatPhong.tblPhong.so_phong;
            return(View(mod));
        }
コード例 #2
0
        public ActionResult GoiDichVu(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            GoiDichVuModel mod = new GoiDichVuModel();

            mod.dsDichVu    = db.DICHVUs.Where(t => t.TONKHO == null || t.TONKHO > 0).ToList();
            mod.dsDvDaDat   = db.DICHVUDADATs.Where(u => u.MAHD == id).ToList();
            ViewBag.MAHD    = id;
            ViewBag.SOPHONG = db.HOADONs.Find(id).PHIEUDATPHONG.PHONG.SOPHONG;
            return(View(mod));
        }