Example #1
0
        public IList <Dashboard_Menu_DTO> Get_Dashboard_Menu_ByID(int?menuID)
        {
            _dbcontext = new InnonAnalyticsEngineEntities();
            IList <tblDashboard> tbl_dashboards = (from e in _dbcontext.tblDashboards
                                                   where (menuID.HasValue ? e.Parent_Id == menuID : e.Parent_Id == null) &&
                                                   e.Is_Deleted == false
                                                   orderby e.Title
                                                   select e).ToList();

            return(Dashboard_Menu_DTO_Converter.Dashboard_Menu_DTO_Converter_list_Table_To_DTO(tbl_dashboards));
        }
Example #2
0
        public IList <Dashboard_Menu_DTO> Get_Dashboard_Menu_ByID_ByUserId(int?menuID, string user_ID)
        {
            _dbcontext = new InnonAnalyticsEngineEntities();


            IList <tblDashboard> tbl_dashboards = _dbcontext.AspNetUserDashboards.Where(userdashboard => userdashboard.User_Id == user_ID)
                                                  .Select(dashboard => dashboard.tblDashboard).ToList();

            tbl_dashboards = (from e in tbl_dashboards
                              where (menuID.HasValue ? e.Parent_Id == menuID : e.Parent_Id == null) &&
                              e.Is_Deleted == false
                              orderby e.Title
                              select e).ToList();


            return(Dashboard_Menu_DTO_Converter.Dashboard_Menu_DTO_Converter_list_Table_To_DTO(tbl_dashboards));
        }
Example #3
0
        public IList <Dashboard_Menu_DTO> Get_Dashboard_Menu()
        {
            IList <tblDashboard> tbl_dashboards = _dbcontext.tblDashboards.Where(dashboard => dashboard.Is_Deleted == false && dashboard.Parent_Id == null).ToList();

            return(Dashboard_Menu_DTO_Converter.Dashboard_Menu_DTO_Converter_list_Table_To_DTO(tbl_dashboards));
        }
Example #4
0
        public IList <Dashboard_Menu_DTO> Get_All_Parent_Child_Dashboards_By_User_Id(IEnumerable <string> user_ids)
        {
            IList <tblDashboard> tbl_dashboards = _dbcontext.AspNetUserDashboards.Where(userdashboard => user_ids.Contains(userdashboard.User_Id)).Select(dashboard => dashboard.tblDashboard).ToList();

            return(Dashboard_Menu_DTO_Converter.Dashboard_Menu_DTO_Converter_list_Table_To_DTO(tbl_dashboards));
        }