Exemplo n.º 1
0
 public static aspnet_Tab GetTabPathByTabId(int TabId)
 {
     using (TabDataContext tabDC = new TabDataContext(Settings.ConnectionString))
     {
         tabDC.ObjectTrackingEnabled = false;
         aspnet_Tab entity = (from x in tabDC.aspnet_Tabs 
                         where x.TabId == TabId
                     select x).SingleOrDefault();
         return entity;
     }
 }
Exemplo n.º 2
0
 public List<aspnet_Tab> GetListByPortalIdIsSecure(int PortalId, bool IsSecure)
 {
     using (TabDataContext tabDC = new TabDataContext(Settings.ConnectionString))
     {
         tabDC.ObjectTrackingEnabled = false;
         var query = from x in tabDC.aspnet_Tabs where x.IsSecure == IsSecure select x;
         if(PortalId >= 0)
             query = query.Where(x=>x.PortalId == PortalId);
         List<aspnet_Tab> list = query.ToList();
         int count = list.Count;
         return list;
     }
 }
Exemplo n.º 3
0
 public static List<aspnet_Tab> GetListByPortalId_ContentItemId_IsSecure(int PortalId, int ContentItemId, bool IsSecure)
 {
     using (TabDataContext dbContext = new TabDataContext(Settings.ConnectionString))
     {
         dbContext.CommandTimeout = Settings.CommandTimeout;
         var query = from x in dbContext.aspnet_Tabs
                     where x.PortalId == PortalId
                     && x.ContentItemId == ContentItemId
                     && x.IsSecure == IsSecure
                     select x;
         return query.ToList();
     }
 }
Exemplo n.º 4
0
 public DataTable GetActiveListByPortalIdIsSecure(int PortalId, bool IsSecure)
 {
     using (TabDataContext tabDC = new TabDataContext(Settings.ConnectionString))
     {
         tabDC.ObjectTrackingEnabled = false;
         List<aspnet_Tab> list = (from x in tabDC.aspnet_Tabs
                                  where x.PortalId == PortalId && x.IsSecure == IsSecure && x.IsVisible == true
                                  select x).ToList();
         DataTable dt = LinqHelper.ToDataTable(list);
         return dt;
     }
 }