Beispiel #1
0
        public ActionResult MenuDanhSachBangGia()
        {
            var lst = BangGiaQueries.LayDanhSachBangGia();

            ViewBag.KhachHangTT = KhachHangQueries.LayDanhSachKhachHangThanThiet();
            return(View(lst));
        }
        public JsonResult GetBangGia(string maLoTrinh, string maLoaiXe, string soluong, string maKhachHang, string giamGia, string strMaChiPhi, string strSoLuongCP, string iNgayLech = "1")
        {
            var data    = BangGiaQueries.chiTietBangGia(maLoTrinh, maLoaiXe, soluong, maKhachHang, giamGia, strMaChiPhi, strSoLuongCP, iNgayLech);
            var niemyet = BangGiaQueries.chiTietBangGiaNiemYet(maLoTrinh, maLoaiXe, soluong, maKhachHang);

            return(Json(new { data = data, niemyet = niemyet }, JsonRequestBehavior.AllowGet));
        }
Beispiel #3
0
 public ActionResult ChinhsuaGia(BangGiaViewModel bg)
 {
     ViewBag.MaLoaiXe  = LoaiXeQueries.LayDanhSachLoaiXe();
     ViewBag.MaKH      = KhachHangQueries.LayDanhSachKhachHangThanThiet();
     ViewBag.MaLoTrinh = LoTrinhQueries.LayDanhSachLoTrinh();
     BangGiaQueries.ChinhsuaGia(bg);
     return(RedirectToAction("MenuDanhSachBangGia", "BangGia"));
 }
Beispiel #4
0
        public ActionResult ChinhsuaGia(string id)
        {
            var bg = BangGiaQueries.LayChiTietGia(id);

            ViewBag.MaLoaiXe  = LoaiXeQueries.LayDanhSachLoaiXe();
            ViewBag.MaKH      = KhachHangQueries.LayDanhSachKhachHangThanThiet();
            ViewBag.MaLoTrinh = LoTrinhQueries.LayDanhSachLoTrinh();
            return(View(bg));
        }
Beispiel #5
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());
     }
 }
Beispiel #6
0
        //thông tin chi tiết giá
        public ActionResult ChiTietGia(string mabg)
        {
            var bg = BangGiaQueries.LayChiTietGia(mabg);

            return(View(bg));
        }
Beispiel #7
0
        public JsonResult LayDanhSachBangGiaTheoMaKhachHang(string maKhangHang)
        {
            var model = BangGiaQueries.LayDanhSachBangGiaTheoMaKhachHang(maKhangHang);

            return(Json(model, JsonRequestBehavior.AllowGet));
        }
        public JsonResult TuyenDuongMoi(TuyenDuongMoiViewModel tuyenDuongMoi)
        {
            var data = BangGiaQueries.TinhBangGiaTuyenDuongMoi(tuyenDuongMoi);

            return(Json(new { data = data }, JsonRequestBehavior.AllowGet));
        }
        public JsonResult LayDanhSachLoTrinhTheoMaKhachHangTrongBangGia(String maKhachHang)
        {
            var model = BangGiaQueries.LayDanhSachLoTrinhTheoMaKhachHangTrongBangGia(maKhachHang);

            return(Json(model, JsonRequestBehavior.AllowGet));
        }
        public JsonResult LayDanhSachLoaiXeMaKHVaMaLT(string maKhachHang, string maLoTrinh)
        {
            var model = BangGiaQueries.LayDanhSachLoaiXeMaKHVaMaLT(maKhachHang, maLoTrinh);

            return(Json(model, JsonRequestBehavior.AllowGet));
        }