コード例 #1
0
        public ActionResult ChinhSuaLoTrinh(string MaLT)
        {
            ViewBag.MaKH  = KhachHangQueries.DanhSachKhachHang();
            ViewBag.model = LoTrinhQueries.ChiTiet_LoTrinh(MaLT);
            var model = LoTrinhQueries.LayDanhSachLoTrinh();

            return(View(model));
        }
コード例 #2
0
        public ActionResult MenuThemLoTrinh(LoTrinhViewModel lotrinh)
        {
            ViewBag.MaKH = KhachHangQueries.DanhSachKhachHang();
            LoTrinh x = (new QuanLyThueXeEntities()).LoTrinhs.SingleOrDefault(n => n.TenLoTrinh == lotrinh.TenLoTrinh && n.MaKH == lotrinh.MaKH && n.Dang == true);

            if (x != null)
            {
                @ViewBag.ThongBaoTrungTen = "Lộ trình này đã có";
                return(View());
            }
            LoTrinhQueries.ThemLoTrinh(lotrinh);
            return(RedirectToAction("MenuDanhSachLoTrinh", "LoTrinh"));
        }
コード例 #3
0
 public ActionResult MenuThemBangGia(BangGiaViewModel BG)
 {
     ViewBag.MaLoaiXe  = LoaiXeQueries.LayDanhSachLoaiXe();
     ViewBag.MaKH      = KhachHangQueries.DanhSachKhachHang();
     ViewBag.MaLoTrinh = LoTrinhQueries.LayDanhSachLoTrinh();
     if (BangGiaQueries.Kiemtra(BG))
     {
         BangGiaQueries.ThemBangGia(BG);
         ViewBag.BangGia = "Thêm thành công";
         return(View());
     }
     else
     {
         ViewBag.BangGia = "Thêm thất bại.Bảng giá nãy đã tồn tại";
         return(View());
     }
 }
コード例 #4
0
        public ActionResult MenuThemHopDong(HopDongViewModel HD, CT_HopDongViewModel CTHD, KhachHangViewModel KH, TuyenDuongMoiViewModel tuyenDuongMoi, string LoaiXe, string strSoLuong, string strMaChiPhi, string strSoLuongCP, string iNgayLech = "1")
        {
            TaiKhoanViewModel taiKhoan = Session["TaiKhoan"] as TaiKhoanViewModel;

            HD.MaNV           = taiKhoan.MaNV;
            ViewBag.LoTrinh   = LoTrinhQueries.LayDanhSachLoTrinh();
            ViewBag.LoaiXe    = LoaiXeQueries.LayDanhSachLoaiXe();
            ViewBag.KhachHang = KhachHangQueries.DanhSachKhachHang();
            if (String.IsNullOrEmpty(LoaiXe))
            {
                var model = HopDongQueries.ThemHopDongTuyenDuongMoi(HD, CTHD, KH, tuyenDuongMoi);
            }
            else
            {
                var model = HopDongQueries.ThemHopDong(HD, CTHD, KH, LoaiXe, strSoLuong, strMaChiPhi, strSoLuongCP, iNgayLech);
            }
            return(RedirectToAction("MenuDanhSachHopDong", "HopDong"));
        }