// GET: eFleetVehicle public ActionResult Index() { try { //Added by Ashwajit Bansod dated 08/23/2017 creating as session for eFleet Vehicle Registration eTracLoginModel ObjLoginModel = null; if (Session != null) { if (Session["eTrac"] != null) { ObjLoginModel = (eTracLoginModel)(Session["eTrac"]); if (Convert.ToInt64(Session["eTrac_SelectedDasboardLocationID"]) == 0) { (Session["eTrac_SelectedDasboardLocationID"]) = ObjLoginModel.LocationID; } } } eFleetVehicleModel objeFleetVehicleModel = new eFleetVehicleModel(); // ViewBag.FuelType = _IEfleetVehicle.GetAllFuelType(); return(View("RegisterVehicle", objeFleetVehicleModel)); } catch (Exception ex) { ViewBag.Message = ex.Message; ViewBag.AlertMessageClass = ObjAlertMessageClass.Danger; } finally { ViewBag.FuelType = _IEfleetVehicle.GetAllFuelType(); ViewBag.GVWR = _ICommonMethod.GetGlobalCodeDataList("eFleetGVWR");//Added by Bhushan Dod for change in GVWR ddl } return(View()); }
public ActionResult AdminNotExistWhileFirstLocationSetup() { ViewBag.Country = _ICommonMethod.GetAllcountries(); //ViewBag.StateList = _ICommonMethod.GetStateByCountryID(eTracDefaultCountry); ViewBag.LocationTypeList = _ICommonMethod.GetGlobalCodeDataList("LOCATIONTYPE"); ViewBag.Services = _ICommonMethod.GetAllServices(); ViewBag.JobTitleList = _ICommonMethod.GetGlobalCodeData("UserJobTitle"); ViewBag.UpdateMode = false; return(View("AdminInitialSetup")); }
public ActionResult Index() { long Totalrecords = 0; LocationMasterModel objLocationMasterModel = null; try { var data = QRCInIt(); //ViewBag.EncryptLastQRC = data.EncryptLastQRC; eTracLoginModel ObjLogin = (eTracLoginModel)Session["eTrac"]; objLocationMasterModel = _ICommonMethod.GetLocationDetailsById(ObjLogin.LocationID); ViewBag.EncryptLastQRC = data.EncryptLastQRC + "," + (string.IsNullOrEmpty(objLocationMasterModel.Address2) ? ObjLogin.Location.ToString().Substring(0, 3).ToUpper() : objLocationMasterModel.Address2.ToString().Substring(0, 3).ToUpper()); ViewBag.ItemAbberivationList = Convert.ToString(ConfigurationManager.AppSettings["ItemAbberivationList"]); ViewBag.PurchType = _ICommonMethod.GetGlobalCodeDataList("PURCHASETYPE"); ViewBag.RefreshMode = false; if (ObjLogin != null && (ObjLogin.UserRoleId == Convert.ToInt64(UserType.GlobalAdmin) || ObjLogin.UserRoleId == Convert.ToInt64(UserType.ITAdministrator))) { //ViewBag.ManagerList = _IGlobalAdmin.GetAllITAdministratorList(0, 1, 1000, "UserEmail", "asc", "", Convert.ToInt64(UserType.Manager), out Totalrecords); ViewBag.LocationList = _IGlobalAdmin.GetAllLocationNew(); ViewBag.AdministratorList = _IGlobalAdmin.GetAllITAdministratorList(0, 0, 1, 1000, "UserEmail", "asc", "", (UserType.Administrator).ToString(), out Totalrecords); } else if (ObjLogin != null && (ObjLogin.UserRoleId == Convert.ToInt64(UserType.Administrator))) { ViewBag.LocationList = _IGlobalAdmin.GetAllLocationNew(); // ViewBag.AdministratorList = _IGlobalAdmin.GetAllITAdministratorList(0, 1, 1000, "UserEmail", "asc", "", Convert.ToInt64(UserType.Manager), out Totalrecords); ViewBag.AdministratorList = _ICommonMethod.GetManagersBYLocationId(ObjLogin.LocationID); } //if (!string.IsNullOrEmpty(successCode) && successCode == "Success") //{ // ModelState.AddModelError("", "Record Saved Sucessfully."); //}D:\Project\eTrac\WorkOrderEMS\Views\NewAdmin\QRCView\_QRCForm.cshtml return(PartialView("~/Views/NewAdmin/QRCView/_QRCForm.cshtml", data)); //return View(data); } catch (Exception ex) { ViewBag.Message = ex.Message; ViewBag.AlertMessageClass = ObjAlertMessageClass.Danger; return(View("Error")); } }