Exemplo n.º 1
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"));
        }