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; }
public DevicesRepository(DynThingsEntities dynThingsEntities) { db = dynThingsEntities; }
public static void Refresh() { db = new DynThingsEntities(); }
public UserNotificationsRepository(DynThingsEntities dynThingsEntities) { db = dynThingsEntities; }
public EndPointTypesRepository(DynThingsEntities dynThingsEntities) { db = dynThingsEntities; }
public LocationsRepository(DynThingsEntities dynThingsEntities) { db = dynThingsEntities; }
public DynSettingsRepository(DynThingsEntities dynThingsEntities) { db = dynThingsEntities; }
public IOTypesRepository(DynThingsEntities dynThingsEntities) { db = dynThingsEntities; }
public RolesRepository(DynThingsEntities dynThingsEntities) { db = dynThingsEntities; }
public EndpointIOsRepository(DynThingsEntities dynThingsEntities) { db = dynThingsEntities; }
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; }
public MediaFilesRepository(DynThingsEntities dynThingsEntities) { db = dynThingsEntities; }
public ThingCategorysRepository(DynThingsEntities dynThingsEntities) { db = dynThingsEntities; }
public DynUsersRepository(DynThingsEntities dynThingsEntities) { db = dynThingsEntities; }
public EndPointCommandsRepository(DynThingsEntities dynThingsEntities) { db = dynThingsEntities; }
public ThingsReport(DynThingsEntities dynThingsEntities) { this.db = dynThingsEntities; }
public EndpointsReport(DynThingsEntities dynThingsEntities) { this.db = dynThingsEntities; }
public AlertsRepository(DynThingsEntities dynThingsEntities) { this.db = dynThingsEntities; }
public AlertConditionTypesRepository(DynThingsEntities dynThingsEntities) { db = dynThingsEntities; }