Ejemplo n.º 1
0
        public Dashboard_Widget_DTO Get_Dashboard_Widget_By_Id(int Id)
        {
            tblDashboard_Widget tbl_dashboard_widget = _dbcontext.tblDashboard_Widget.SingleOrDefault(DashboardWidget => DashboardWidget.Id == Id);

            if (tbl_dashboard_widget != null)
            {
                return(Dashboard_Widget_DTO_Convert.Dashboard_Widget_DTO_Convert_Table_To_DTO(tbl_dashboard_widget));
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 2
0
        public IList <Dashboard_Widget_DTO> Get_Dashboard_Widget_For_Home_Page_By_User_ID(string user_id)
        {
            IList <tblDashboard_Widget> tbl_dashboard_widgets = (from dashboardwidget in _dbcontext.tblDashboard_Widget
                                                                 join homepage_widget in _dbcontext.tblHomePage_Widget on dashboardwidget equals homepage_widget.tblDashboard_Widget into dh
                                                                 from homepage_widget in dh.DefaultIfEmpty()
                                                                 where homepage_widget.User_Id == user_id
                                                                 select dashboardwidget).ToList();


            foreach (var tbl_dashboard_widget in tbl_dashboard_widgets)
            {
                tbl_dashboard_widget.tblHomePage_Widget = tbl_dashboard_widget.tblHomePage_Widget.Where(s => s.User_Id == user_id).ToList();
            }
            return(Dashboard_Widget_DTO_Convert.Dashboard_Widget_DTO_Convert_List_Table_To_DTO(tbl_dashboard_widgets));
        }
Ejemplo n.º 3
0
        public IList <Dashboard_Widget_DTO> Get_Dashboard_Widget_By_Dashboard_Id(int Dashboard_Id)
        {
            IList <tblDashboard_Widget> tbl_dashboard_widgets = _dbcontext.tblDashboard_Widget.Where(DashboardWidget => DashboardWidget.Dashboard_Id == Dashboard_Id).ToList();

            return(Dashboard_Widget_DTO_Convert.Dashboard_Widget_DTO_Convert_List_Table_To_DTO(tbl_dashboard_widgets));
        }