public IPagedList GetPagedListByThingID(string search, long ThingID, int pageNumber, int recordsPerPage)
 {
     db = new DynThingsEntities();
     IPagedList cmds = db.EndPointCommands
       .Where(e => search == null || e.Title.Contains(search) && e.Endpoint.ThingID == ThingID)
       .OrderBy(e => e.Title).ToList()
       .ToPagedList(pageNumber, recordsPerPage);
     return cmds;
 }
        public IPagedList GetPagedListByLocationID(string search, long LocationID,long ThingID, int pageNumber, int recordsPerPage)
        {
            List<LinkThingsLocation> lnks = db.LinkThingsLocations.Where(l => l.LocationID == LocationID).ToList();
            db = new DynThingsEntities();
            List<EndPointCommand> cmds = db.EndPointCommands
              .Where(e => search == null || e.Title.Contains(search) && e.Endpoint.Thing.LinkThingsLocations.Any(l => l.LocationID == LocationID))
              .OrderBy(e => e.Title).ToList();

            if (ThingID != 0 )
            {
                cmds = cmds.Where(c => c.Endpoint.ThingID == ThingID).ToList();
            }

             IPagedList plCmds = cmds.ToPagedList(pageNumber, recordsPerPage);
            return plCmds;
        }
Пример #3
0
 public DevicesRepository(DynThingsEntities dynThingsEntities)
 {
     db = dynThingsEntities;
 }
Пример #4
0
        public static void Refresh()
        {
            db = new DynThingsEntities();

        }
 public UserNotificationsRepository(DynThingsEntities dynThingsEntities)
 {
     db = dynThingsEntities;
 }
 public EndPointTypesRepository(DynThingsEntities dynThingsEntities)
 {
     db = dynThingsEntities;
 }
Пример #7
0
 public LocationsRepository(DynThingsEntities dynThingsEntities)
 {
     db = dynThingsEntities;
 }
Пример #8
0
 public DynSettingsRepository(DynThingsEntities dynThingsEntities)
 {
     db = dynThingsEntities;
 }
Пример #9
0
 public IOTypesRepository(DynThingsEntities dynThingsEntities)
 {
     db = dynThingsEntities;
 }
Пример #10
0
 public RolesRepository(DynThingsEntities dynThingsEntities)
 {
     db = dynThingsEntities;
 }
Пример #11
0
 public EndpointIOsRepository(DynThingsEntities dynThingsEntities)
 {
     db = dynThingsEntities;
 }
Пример #12
0
        public IPagedList GetLogsPagedList(string search, long LocationID, long ThingID, int pageNumber, int recordsPerPage)
        {
            db = new DynThingsEntities();
            List<EndPointIO> logs = db.EndPointIOs
              .Where(e => search == null || e.Valu.Contains(search) 
              && e.Endpoint.Thing.LinkThingsLocations.Any(l => l.LocationID == LocationID)
              && e.IOTypeID == 3)
              .OrderByDescending(e => e.ExecTimeStamp).ToList();

            if (ThingID != 0)
            {
                logs = logs.Where(c => c.Endpoint.ThingID == ThingID).ToList();
            }

            IPagedList plLogs = logs.ToPagedList(pageNumber, recordsPerPage);
            return plLogs;
        }
Пример #13
0
 public MediaFilesRepository(DynThingsEntities dynThingsEntities)
 {
     db = dynThingsEntities;
 }
 public ThingCategorysRepository(DynThingsEntities dynThingsEntities)
 {
     db = dynThingsEntities;
 }
Пример #15
0
 public DynUsersRepository(DynThingsEntities dynThingsEntities)
 {
     db = dynThingsEntities;
 }
 public EndPointCommandsRepository(DynThingsEntities dynThingsEntities)
 {
     db = dynThingsEntities;
 }
Пример #17
0
 public ThingsReport(DynThingsEntities dynThingsEntities)
 {
     this.db = dynThingsEntities;
 }
Пример #18
0
 public EndpointsReport(DynThingsEntities dynThingsEntities)
 {
     this.db = dynThingsEntities;
 }
Пример #19
0
 public AlertsRepository(DynThingsEntities dynThingsEntities)
 {
     this.db = dynThingsEntities;
 }
 public AlertConditionTypesRepository(DynThingsEntities dynThingsEntities)
 {
     db = dynThingsEntities;
 }