public ActionResult ReportTrip() { AssignUserInfo(); dmNguoiDungBusiness = Get <DM_NGUOIDUNGBusiness>(); ReportTripViewModel viewModel = new ReportTripViewModel(); viewModel.groupOfUsers = dmNguoiDungBusiness.GetListUserByDeptParentId(currentUser.DeptParentID.GetValueOrDefault(), 0); return(View(viewModel)); }
public ActionResult Create(long calendarId = 0) { AssignUserInfo(); dmNguoiDungBusiness = Get <DM_NGUOIDUNGBusiness>(); lichCongTacBusiness = Get <LICHCONGTACBusiness>(); qlDangKyXeBusiness = Get <QL_DANGKY_XEBusiness>(); dmDanhMucDataBusiness = Get <DM_DANHMUC_DATABusiness>(); DangKyXeEditViewModel model = new DangKyXeEditViewModel(); model.dangKyXeEntity.DIEM_XUATPHAT = DEFAULT_START_POINT; model.groupOfLanhDaos = dmNguoiDungBusiness.GetListUserByDeptParentId(currentUser.DeptParentID.GetValueOrDefault(), 0); if (calendarId != 0) { LICHCONGTAC calendar = lichCongTacBusiness.Find(calendarId); //kiểm tra lịch công tác chưa bị xóa - mới nhất - chưa được đăng ký if (calendar != null && calendar.IS_DELETE != true && calendar.IS_LATTEST == true) { QL_DANGKY_XE registration = qlDangKyXeBusiness.GetAvailableRegistrationByCalendarId(calendarId); if (registration == null) { registration = new QL_DANGKY_XE(); registration.LICHCONGTAC_ID = calendar.ID; registration.CANBO_ID = calendar.LANHDAO_ID; registration.MUCDICH = calendar.TIEUDE; registration.NGAY_XUATPHAT = calendar.NGAY_CONGTAC; registration.GIO_XUATPHAT = calendar.GIO_CONGTAC; registration.PHUT_XUATPHAT = calendar.PHUT_CONGTAC; registration.DIEM_KETTHUC = calendar.DIADIEM; registration.GHICHU = calendar.GHICHU; model = new DangKyXeEditViewModel(registration); model.groupOfLanhDaos = dmNguoiDungBusiness .GetListUserByDeptParentId(currentUser.DeptParentID.GetValueOrDefault(), calendar.LANHDAO_ID.GetValueOrDefault()); } } } model.groupOfStartPoints = dmDanhMucDataBusiness.GetGroupTextByCode(DMLOAI_CONSTANT.DIEM_XUATPHAT); model.groupOfDestinations = dmDanhMucDataBusiness.GetGroupTextByCode(DMLOAI_CONSTANT.DIEM_DEN); return(View("EditDangKyXe", model)); }