示例#1
0
        public DashboardModels Manage(string Name)
        {
            DashboardModels dashboardModels=null;
            List<DashboardModel> _dashboardModels = null;

            if (Name == "Favorites" || Name == "Index")
            {
                _dashboardModels = _DashboardRepository.GetFavoritesDashboards();

                dashboardModels = new Models.DashboardModels
                {
                    Title = "Favorite Dashboards",
                    SubTitle = "This page allows you to manage all your favorite dashboards",
                    DashboardModelList = _dashboardModels
                };

            }
            else if (Name == "My")
            {
                _dashboardModels = _DashboardRepository.GetMyDashboards();
                dashboardModels = new Models.DashboardModels
                {
                    Title = "My Dashboards",
                    SubTitle = "This page allows you to manage all my  dashboards",
                    DashboardModelList = _dashboardModels
                };
            }
            else if (Name == "Popular")
            {
                _dashboardModels = _DashboardRepository.GetPopularDashboards();

                dashboardModels = new Models.DashboardModels
                {
                    Title = "Popular Dashboards",
                    SubTitle = "This page allows you to manage all Popular dashboards",
                    DashboardModelList = _dashboardModels
                };
            }
            return dashboardModels;
        }
示例#2
0
        public IHttpActionResult GetAllByFactoryId(int factoryId)
        {
            DashboardModels dashboardModel = new Models.DashboardModels();

            return(Ok(dashboardModel.getAllDashboardByFactoryId(factoryId)));
        }
示例#3
0
        public IHttpActionResult GetAll(int companyId)
        {
            DashboardModels dashboardModel = new Models.DashboardModels();

            return(Ok(dashboardModel.getAllEquipmentClassDashboardByCompnayId(companyId)));
        }
示例#4
0
        public IHttpActionResult GetAllByCompanyId(int companyId, string type = null)
        {
            DashboardModels dashboardModel = new Models.DashboardModels();

            return(Ok(dashboardModel.getAllDashboardByCompnayId(companyId, type)));
        }