public ActionResult MenuDieuPhoiTaiXe() { HopDongQueries.CapNhatTrangThai(); var model = CT_HopDongQueries.LayDanhSachChiTietHopDongTheoTrangThai("0"); return(View(model)); }
public ActionResult LichChayTheoMaNV(String MaNV) { var model = CT_HopDongQueries.LayDSCTHDTheoMaNV(MaNV); ViewBag.TrangThai = TrangThaiQueries.LayDanhSachTrangThai(); return(View(model)); }
public ActionResult ChiTietDieuPhoiXe(CT_HopDongViewModel CTHD, String MaXeCu) { //ViewBag.MaXe = new SelectList(XeQueries.LayDanhSachXeTheoLoaiXe(model.MaLoaiXe), "MaXe", "BienSo", model.MaXe); CT_HopDongViewModel model = CT_HopDongQueries.LayThongTinChiTietCTHD(CTHD.SoCTHopDong); var xe = XeQueries.LayThongTinChiTietXe(CTHD.MaXe); if (xe != null) { if (xe.Status == "1") { DieuPhoiQueries.CapNhatXeBiTrung(xe.MaXe, model); } else { DieuPhoiQueries.CapNhatXeBoChon(model.MaXe); } } if (String.IsNullOrEmpty(CTHD.MaXe) && String.IsNullOrEmpty(CTHD.BienSoXe)) { DieuPhoiQueries.CapNhatXeBoChon(MaXeCu); CTHD.MaCongTy = null; } // hàm xử lý khi có mã xe cũ là của detra mà đổi sang thuê xe ngoài if (!String.IsNullOrEmpty(MaXeCu) && !String.IsNullOrEmpty(CTHD.BienSoXe)) { DieuPhoiQueries.CapNhatXeBoChon(MaXeCu); CTHD.MaXe = null; } CT_HopDongQueries.CapNhatDieuPhoiXe(CTHD); TrangThaiQueries.CapNhatTrangThaiXeDangCho(CTHD.MaXe); return(RedirectToAction("MenuLichTheoNgay", "Home")); }
public ActionResult ChiTietDieuPhoiTaiXe(int SoCTHopDong) { var model = CT_HopDongQueries.LayThongTinChiTietCTHD(SoCTHopDong); ViewBag.TaiXe = NhanVienQueries.LayDSNVDangChoTheoMaLoaiNV("LNV2"); ViewBag.PhuXe = NhanVienQueries.LayDanhSachNhanVien(); return(View(model)); }
public ActionResult ChiTietDieuPhoiXe(int SoCTHopDong) { var model = CT_HopDongQueries.LayThongTinChiTietCTHD(SoCTHopDong); ViewBag.Xe = XeQueries.LayDanhSachXeTheoLoaiXe(model.MaLoaiXe); ViewBag.LoaiXe = LoaiXeQueries.LayDanhSachLoaiXe(); ViewBag.CongTy = CongTiesQueries.LayDanhSachCongTy(); return(View(model)); }
public JsonResult LichTheoNgay(String ngay) { //if(!String.IsNullOrEmpty(ngay)) //{ // ngay = DateTime.Now.ToString("dd/MM/yyyy"); //} DateTime date = DateTime.Parse(ngay); var result = CT_HopDongQueries.LayDanhSachChiTietHopDongTheoNgay(date); return(Json(result, JsonRequestBehavior.AllowGet)); }
public ActionResult ChiTietHopDong(String SoHopDong) { var model = HopDongQueries.LayThongTinHopDong(SoHopDong); ViewBag.CTCPPS = ChiTietChiPhiPhatSinhQueries.LayDanhSachCTCPPhatSinhTheoSoHopDong(SoHopDong); ViewBag.LoaiXe = LoaiXeQueries.LayDanhSachLoaiXe(); ViewBag.CTHD = CT_HopDongQueries.GroupbyCTHopDong(SoHopDong); ViewBag.CongTy = CongTiesQueries.LayThongTinChiTietCty("DETRA"); ViewBag.ChiPhi = ChiPhiPhatSinhQueries.DanhSachChiPhiPhatSinh(); return(View(model)); }
public ActionResult ChiTietDieuPhoiTaiXe(CT_HopDongViewModel CTHD, string MaTaiXeCu, string MaPhuXeCu) { CT_HopDongViewModel model = CT_HopDongQueries.LayThongTinChiTietCTHD(CTHD.SoCTHopDong); var taixe = NhanVienQueries.LayThongTinChiTiet(CTHD.MaTaiXe); var phuxe = NhanVienQueries.LayThongTinChiTiet(CTHD.PhuXe); if (taixe != null) { if (taixe.Status == "1") { DieuPhoiQueries.CapNhatTaiXeBiTrung(taixe.MaNV, model); } else { DieuPhoiQueries.CapNhatNhanVienBoChon(model.MaTaiXe); } } if (phuxe != null) { if (phuxe.Status == "1") { DieuPhoiQueries.CapNhatTaiXeBiTrung(phuxe.MaNV, model); } else { DieuPhoiQueries.CapNhatNhanVienBoChon(model.PhuXe); } } if (String.IsNullOrEmpty(CTHD.MaTaiXe) && String.IsNullOrEmpty(CTHD.TaiXeNgoai)) { DieuPhoiQueries.CapNhatNhanVienBoChon(MaTaiXeCu); } if (String.IsNullOrEmpty(CTHD.PhuXe)) { DieuPhoiQueries.CapNhatNhanVienBoChon(MaPhuXeCu); } CT_HopDongQueries.CapNhatDieuPhoiTaiXe(CTHD); TrangThaiQueries.CapNhatTrangThaiPhuXeDangCho(CTHD.PhuXe); TrangThaiQueries.CapNhatTrangThaiTaiXeDangCho(CTHD.MaTaiXe); return(RedirectToAction("MenuLichTheoNgay", "Home")); }
public JsonResult LayDanhThoiGian() { var data = CT_HopDongQueries.layDanhSachCTHDTheoThang(); return(Json(new { data = data }, JsonRequestBehavior.AllowGet)); }
public ActionResult MenuLichTheoNgay() { var model = CT_HopDongQueries.LayDanhSachChiTietHopDongTheoNgay(DateTime.Today); return(View(model)); }
public ActionResult ChinhSuaCTHD(int SoCTHopDong) { var model = CT_HopDongQueries.LayThongTinChiTietCTHD(SoCTHopDong); return(View(model)); }
public ActionResult MenuDanhSachCTHD() { var model = CT_HopDongQueries.LayDanhSachCTDH(); return(View(model)); }