// GET: eFleetVehicleIncidentReporting
        public ActionResult Index()
        {
            eFleetVehicleIncidentModel objeFleetVehicleIncidentModel = new eFleetVehicleIncidentModel();

            try
            {
                //Added by Ashwajit Bansod dated Sep-13-2017 creating as session for eFleet Vehicle Incident Reporting
                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;
                        }
                    }
                }
                ViewBag.VehicleNumber = _IEfleetVehicleIncidentReport.GetVehicleNumber();
                ViewBag.StateList     = _ICommonMethod.GetStateByCountryId(1);//Added By bhushan HardCoded value bcoz only one country id
                return(View("RegisterVehicleIncident", objeFleetVehicleIncidentModel));
            }
            catch (Exception ex)
            {
                ViewBag.Message           = ex.Message;
                ViewBag.AlertMessageClass = ObjAlertMessageClass.Danger;
            }
            return(View("RegisterVehicleIncident"));
        }
예제 #2
0
        public ActionResult Index()
        {
            try
            {
                //Added by Ashwajit Bansod on 18/08/2017 for scenario as if view Driver Registration
                // set Session["eTrac_SelectedDasboardLocationID"] is objeTracLoginModel.LocationID.
                eTracLoginModel ObjLoginModel        = null;
                var             objeFleetDriverModel = new eFleetDriverModel();
                if (Session != null)
                {
                    if (Session["eTrac"] != null)
                    {
                        ObjLoginModel = (eTracLoginModel)(Session["eTrac"]);
                        if (Convert.ToInt64(Session["eTrac_SelectedDasboardLocationID"]) == 0)
                        {
                            (Session["eTrac_SelectedDasboardLocationID"]) = ObjLoginModel.LocationID;
                        }
                    }
                }

                objeFleetDriverModel.LocationID = ObjLoginModel.LocationID;
                ViewBag.EmployeeList            = _IEfleetDriver.GetAllEmployees(objeFleetDriverModel.LocationID, objeFleetDriverModel.DriverID);
                ViewBag.Country   = _IEfleetDriver.GetAllcountries();
                ViewBag.StateList = _ICommonMethod.GetStateByCountryId(1);//Added By bhushan HardCoded value bcoz only one country id
                return(View("RegisterDriver", objeFleetDriverModel));
            }
            catch (Exception ex)
            {
                ViewBag.Message           = ex.Message;
                ViewBag.AlertMessageClass = ObjAlertMessageClass.Danger;
            }
            return(View());
        }
예제 #3
0
        //
        // GET: /Guest/
        public ActionResult Index()
        {
            var ObjLoginModel       = (eTracLoginModel)(Session["eTrac"]);
            EmployeeVIewModel model = new EmployeeVIewModel();

            ViewBag.StateList = _ICommonMethod.GetStateByCountryId(1);
            model             = _IGuestUserRepository.GetEmployee(ObjLoginModel.UserId);
            return(View(model));
        }
예제 #4
0
        public ActionResult GetEmployeeDetailsForEdit(string Id)
        {
            var model = new EmployeeVIewModel();

            try
            {
                if (Id != null)
                {
                    var  id      = Cryptography.GetDecryptedData(Id, true);
                    long _UserId = 0;
                    long.TryParse(id, out _UserId);
                    var ObjLoginModel = (eTracLoginModel)(Session["eTrac"]);
                    ViewBag.StateList = _ICommonMethod.GetStateByCountryId(1);
                    model             = _IGuestUserRepository.GetEmployee(ObjLoginModel.UserId);
                    model.Image       = model.Image == null ? HostingPrefix + ConstantImages.Replace("~", "") + "no-profile-pic.jpg" : HostingPrefix + ProfilePicPath.Replace("~", "") + model.Image;
                    return(PartialView("~/Views/NewAdmin/ePeople/_EditEmployeeInfo.cshtml", model));
                }
                else
                {
                    return(PartialView("~/Views/NewAdmin/ePeople/_EditEmployeeInfo.cshtml", new EmployeeVIewModel()));
                }
            }
            catch (Exception ex)
            {
                return(PartialView("~/Views/NewAdmin/ePeople/_EditEmployeeInfo.cshtml", new EmployeeVIewModel()));
            }
        }
예제 #5
0
        public ActionResult Index()
        {
            var objmodel = new VendorSetupManagementModel();

            ViewBag.AccountSection = true;
            eTracLoginModel objLoginSession = new eTracLoginModel();

            objLoginSession = (eTracLoginModel)Session["eTrac"];
            try
            {
                long CountryId = 1;
                ViewBag.Country             = _ICommonMethod.GetAllcountries();
                ViewBag.StateList           = _ICommonMethod.GetStateByCountryId(CountryId);
                ViewBag.JobTitleList        = _ICommonMethod.GetGlobalCodeData("UserJobTitle");
                ViewBag.ClientInvoicingTerm = _IGlobalAdmin.ListClientInvoicingTerm();
                ViewBag.VendorType          = _IVendorManagement.ListVendorType();
                ViewBag.OperatingHolder     = _IGlobalAdmin.ListCompanyHolder(true);
                ViewBag.ContractType        = _IGlobalAdmin.ListContractType();
                ViewBag.PaymentModeList     = _IVendorManagement.PaymentModeList();
                ViewBag.PaymentTermList     = _IVendorManagement.PaymentTermList();
                ViewBag.CostCodeList        = _IVendorManagement.ListAllCostCode();
                ViewBag.LocationListData    = _ICommonMethod.ListAllLocation();
            }
            catch (Exception ex)
            {
                ViewBag.Message = ex.Message; ViewBag.AlertMessageClass = ObjAlertMessageClass.Danger; return(View("Error"));
            }
            return(View("~/Areas/AdminSection/Views/AdminCompany/Index.cshtml", objmodel));//D:\Project\eTrac\WorkOrderEMS\Areas\AdminSection\Views\AdminCompany\CompanyView.cshtml
        }
예제 #6
0
        public JsonResult GetStateByCountryID(string CountryID)
        {
            int _countryId = 0;

            if (!string.IsNullOrEmpty(CountryID))
            {
                int.TryParse(CountryID, out _countryId);
                StateModel          State = new StateModel();
                CommonMethodManager _CommonMethodManager = new CommonMethodManager();

                State.Data = _ICommonMethod.GetStateByCountryId(_countryId);
                return(Json(State, JsonRequestBehavior.AllowGet));
            }
            else
            {
                return(Json(null, JsonRequestBehavior.AllowGet));
            }
        }
예제 #7
0
        public ActionResult OperationDashboard()
        {
            eTracLoginModel    ObjLoginModel       = null;
            long               Totalrecords        = 0;
            GlobalAdminManager _GlobalAdminManager = new GlobalAdminManager();
            var details = new LocationDetailsModel();

            if (Session["eTrac"] != null)
            {
                ObjLoginModel = (eTracLoginModel)(Session["eTrac"]);
            }
            #region WO
            UserType _UserType = (WorkOrderEMS.Helper.UserType)ObjLoginModel.UserRoleId;
            if (_UserType == UserType.Administrator)
            {
                ViewBag.Location = _ICommonMethod.GetLocationByAdminId(ObjLoginModel.UserId);
            }
            else if (_UserType == UserType.Manager)
            {
                ViewBag.Location = _ICommonMethod.GetLocationByManagerId(ObjLoginModel.UserId);
            }
            else
            {
                ViewBag.Location = _ICommonMethod.GetAllLocation();
            }
            ViewBag.AssignToUserWO           = _GlobalAdminManager.GetLocationEmployeeWO(ObjLoginModel.LocationID);
            ViewBag.AssignToUser             = _GlobalAdminManager.GetLocationEmployee(ObjLoginModel.LocationID);
            ViewBag.Asset                    = _ICommonMethod.GetAssetList(ObjLoginModel.LocationID);
            ViewBag.GetAssetListWO           = _ICommonMethod.GetAssetListWO(ObjLoginModel.LocationID);
            ViewBag.UpdateMode               = false;
            ViewBag.PriorityLevel            = _ICommonMethod.GetGlobalCodeData("WORKPRIORITY");
            ViewBag.WorkRequestType          = _ICommonMethod.GetGlobalCodeData("WORKREQUESTTYPE");
            ViewBag.WorkRequestProjectTypeID = _ICommonMethod.GetGlobalCodeData("WORKREQUESTPROJECTTYPE");
            ViewBag.FacilityRequest          = _ICommonMethod.GetGlobalCodeData("FACILITYREQUESTTYPE");
            ViewBag.StateId                  = _ICommonMethod.GetStateByCountryId(1);
            #endregion WO


            return(PartialView("_OperationDashboard"));
        }
예제 #8
0
 public JsonResult GetStateList()
 {
     return(Json(_ICommonMethod.GetStateByCountryId(1), JsonRequestBehavior.AllowGet));
 }