Пример #1
0
        public IHttpActionResult GetAllDashboard([FromUri] string type = "factory")
        {
            int            companyId = Global.GetCompanyIdFromToken();
            DashboardModel model     = new DashboardModel();

            switch (type)
            {
            case "factory":
                return(Content(HttpStatusCode.OK, model.GetAllFactoryByCompanyId(companyId)));

            case "equipmentclass":
                return(Content(HttpStatusCode.OK, model.GetAllEquipmentClassBoardByCompanyId(companyId)));
            }

            return(Content(HttpStatusCode.OK, ""));
        }