Ejemplo n.º 1
0
 public Cache_BO()
 {
     //reportDailyService = new ReportDailyService();
     reportTypeService           = new ReportTypeService();
     dataObservationMongoService = new DataObservationMongoService();
     sitesService = new SitesService();
 }
Ejemplo n.º 2
0
 public AppsController(
     UserManager <DeveloperUser> userManager,
     SignInManager <DeveloperUser> signInManager,
     ILoggerFactory loggerFactory,
     DeveloperDbContext dbContext,
     ServiceLocation serviceLocation,
     StorageService storageService,
     OSSApiService ossApiService,
     AppsContainer appsContainer,
     CoreApiService coreApiService,
     IConfiguration configuration,
     SitesService siteService)
 {
     _userManager     = userManager;
     _signInManager   = signInManager;
     _logger          = loggerFactory.CreateLogger <AppsController>();
     _dbContext       = dbContext;
     _serviceLocation = serviceLocation;
     _storageService  = storageService;
     _ossApiService   = ossApiService;
     _appsContainer   = appsContainer;
     _coreApiService  = coreApiService;
     _configuration   = configuration;
     _siteService     = siteService;
 }
Ejemplo n.º 3
0
        public async Task Recover(
            DeveloperUser user,
            App thisApp,
            CoreApiService coreApiService,
            AppsContainer appsContainer,
            SitesService sitesService,
            EventService eventService,
            ChannelService channelService,
            int pageNumber)
        {
            RootRecover(user);
            var token = await appsContainer.AccessToken(thisApp.AppId, thisApp.AppSecret);

            Grants = await coreApiService.AllUserGrantedAsync(token, pageNumber, 15);

            var sites = await sitesService.ViewMySitesAsync(token);

            Sites = sites.Sites;

            var errorLogs = await eventService.ViewAsync(token);

            ErrorLogs = errorLogs.Logs;

            var channels = await channelService.ViewMyChannelsAsync(token);

            Channels = channels.Channels;
        }
Ejemplo n.º 4
0
 public SitesController()
 {
     areasService       = new AreasService();
     groupService       = new GroupService();
     userProfileService = new UserProfileService();
     sitesService       = new SitesService();
 }
Ejemplo n.º 5
0
        public async Task Recover(
            DeveloperUser user,
            DeveloperApp appInDb,
            CoreApiService coreApiService,
            AppsContainer appsContainer,
            SitesService sitesService,
            EventService eventService,
            ChannelService channelService,
            RecordsService recordsService,
            int pageNumber)
        {
            RootRecover(user);
            var token = await appsContainer.AccessToken(appInDb.AppId, appInDb.AppSecret);

            Grants = await coreApiService.AllUserGrantedAsync(token, pageNumber, 15);

            var sites = await sitesService.ViewMySitesAsync(token);

            Sites = sites.Sites;

            var errorLogs = await eventService.ViewAsync(token);

            ErrorLogs = errorLogs.Logs;

            var channels = await channelService.ViewMyChannelsAsync(token);

            Channels = channels.Channels;

            var records = await recordsService.ViewMyRecordsAsync(token, Array.Empty <string>());

            Records = records.Records;

            Trusted = appInDb.TrustedApp;
        }
Ejemplo n.º 6
0
 public DataController()
 {
     dataObservationMongoService = new DataObservationMongoService();
     areasService       = new AreasService();
     sitesService       = new SitesService();
     groupService       = new GroupService();
     userProfileService = new UserProfileService();
 }
 public SMSServerController()
 {
     registerSMSService = new RegisterSMSService();
     sitesService       = new SitesService();
     groupService       = new GroupService();
     userProfileService = new UserProfileService();
     sMSServerService   = new SMSServerService();
     observationService = new ObservationService();
 }
 public HomeController()
 {
     dataObservationMongoService = new DataObservationMongoService();
     dataAlarmMongoService = new DataAlarmMongoService();
     areasService = new AreasService();
     sitesService = new SitesService();
     groupService = new GroupService();
     observationService = new ObservationService();
     userProfileService = new UserProfileService();
 }
Ejemplo n.º 9
0
 public AiurUploader(
     AppsContainer appsContainer,
     TokenService tokenService,
     SitesService sitesService,
     AiurCache aiurCache)
 {
     _appsContainer = appsContainer;
     _tokenService  = tokenService;
     _sitesService  = sitesService;
     _aiurCache     = aiurCache;
 }
Ejemplo n.º 10
0
        public static async Task <ViewAppViewModel> SelfCreateAsync(
            DeveloperUser user,
            App thisApp,
            CoreApiService coreApiService,
            AppsContainer appsContainer,
            SitesService sitesService,
            EventService eventService)
        {
            var model = new ViewAppViewModel(user, thisApp);
            await model.Recover(user, thisApp, coreApiService, appsContainer, sitesService, eventService);

            return(model);
        }
Ejemplo n.º 11
0
 public SitesController(
     DeveloperDbContext dbContext,
     AppsContainer appsContainer,
     SitesService sitesService,
     FoldersService foldersService,
     FilesService filesService)
 {
     _dbContext      = dbContext;
     _appsContainer  = appsContainer;
     _sitesService   = sitesService;
     _foldersService = foldersService;
     _filesService   = filesService;
 }
 public DashboardController(
     SitesService sitesService,
     AppsContainer appsContainer,
     FoldersService foldersService,
     FilesService filesService,
     MVPDbContext dbContext)
 {
     _sitesService   = sitesService;
     _appsContainer  = appsContainer;
     _foldersService = foldersService;
     _filesService   = filesService;
     _dbContext      = dbContext;
 }
Ejemplo n.º 13
0
 public AppsController(
     DeveloperDbContext dbContext,
     AppsContainer appsContainer,
     CoreApiService coreApiService,
     SitesService siteService,
     EventService eventService)
 {
     _dbContext      = dbContext;
     _appsContainer  = appsContainer;
     _coreApiService = coreApiService;
     _siteService    = siteService;
     _eventService   = eventService;
 }
Ejemplo n.º 14
0
 public DashboardController(
     SitesService sitesService,
     AppsContainer appsContainer,
     UserManager <ColossusUser> userManager,
     FoldersService foldersService,
     FilesService filesService)
 {
     _sitesService   = sitesService;
     _appsContainer  = appsContainer;
     _userManager    = userManager;
     _foldersService = foldersService;
     _filesService   = filesService;
 }
Ejemplo n.º 15
0
 public DashboardController(
     SitesService sitesService,
     AppsContainer appsContainer,
     UserManager <AiurDriveUser> userManager,
     FoldersService foldersService,
     FilesService filesService,
     AiurCache cache)
 {
     _sitesService   = sitesService;
     _appsContainer  = appsContainer;
     _userManager    = userManager;
     _foldersService = foldersService;
     _filesService   = filesService;
     _cache          = cache;
 }
Ejemplo n.º 16
0
        public static async Task <ViewAppViewModel> SelfCreateAsync(
            DeveloperUser user,
            DeveloperApp appInDb,
            CoreApiService coreApiService,
            AppsContainer appsContainer,
            SitesService sitesService,
            EventService eventService,
            ChannelService channelService,
            int pageNumber)
        {
            var model = new ViewAppViewModel(user, appInDb);
            await model.Recover(user, appInDb, coreApiService, appsContainer, sitesService, eventService, channelService, pageNumber);

            return(model);
        }
Ejemplo n.º 17
0
 private void GetSite()
 {
     if (Request.QueryString["icode"] != null)
     {
         var site = new SitesService().GetSiteByCode(Request.QueryString["icode"]);
         if (site != null)
         {
             StateManager.AddSite(site);
             Response.RedirectWithQueryString(site.SitesTypes.default_page);
         }
     }
     else
     {
         Response.RedirectWithQueryString(PageFlowExtensions.GetCreateSitePageUrl().AbsoluteUri);
     }
 }
Ejemplo n.º 18
0
 private void GetSite()
 {
     if (Request.QueryString["icode"] != null)
     {
         var site = new SitesService().GetSiteByCode(Request.QueryString["icode"]);
         if (site != null)
         {
             StateManager.AddSite(site);
             Response.RedirectWithQueryString(site.SitesTypes.default_page);
         }
     }
     else
     {
         Response.RedirectWithQueryString(PageFlowExtensions.GetCreateSitePageUrl().AbsoluteUri);
     }
 }
 public ReportController()
 {
     dataObservationMongoService = new DataObservationMongoService();
     dataAlarmMongoService       = new DataAlarmMongoService();
     areasService               = new AreasService();
     sitesService               = new SitesService();
     groupService               = new GroupService();
     observationService         = new ObservationService();
     userProfileService         = new UserProfileService();
     reportTypeService          = new ReportTypeService();
     reportDailyNhietDoService  = new ReportDailyNhietDoService();
     reportDailyMucNuocService  = new ReportDailyMucNuocService();
     reportDailyLuongMuaService = new ReportDailyLuongMuaService();
     reportDailyApSuatService   = new ReportDailyApSuatService();
     reportDailyDoAmService     = new ReportDailyDoAmService();
     reportDailyTocDoGioService = new ReportDailyTocDoGioService();
     reportDailyHuongGioService = new ReportDailyHuongGioService();
 }
Ejemplo n.º 20
0
        public async Task Recover(
            DeveloperUser user,
            App thisApp,
            CoreApiService coreApiService,
            OSSApiService ossApiService,
            AppsContainer appsContainer,
            SitesService sitesService)
        {
            base.RootRecover(user, 1);
            var token = await appsContainer.AccessToken(thisApp.AppId, thisApp.AppSecret);

            var buckets = await ossApiService.ViewMyBucketsAsync(token);

            Buckets = buckets.Buckets;

            var grants = await coreApiService.AllUserGrantedAsync(token);

            Grants = grants.Grants;

            var sites = await sitesService.ViewMySitesAsync(token);

            Sites = sites.Sites;
        }
Ejemplo n.º 21
0
        public async Task Recover(
            DeveloperUser user,
            App thisApp,
            CoreApiService coreApiService,
            AppsContainer appsContainer,
            SitesService sitesService,
            EventService eventService)
        {
            RootRecover(user);
            var token = await appsContainer.AccessToken(thisApp.AppId, thisApp.AppSecret);


            var grants = await coreApiService.AllUserGrantedAsync(token);

            Grants = grants.Grants;

            var sites = await sitesService.ViewMySitesAsync(token);

            Sites = sites.Sites;

            var errorLogs = await eventService.ViewAsync(token);

            ErrorLogs = errorLogs.Logs;
        }
Ejemplo n.º 22
0
 public SitesController(SitesService sitesService)
 {
     _sitesService = sitesService;
 }
Ejemplo n.º 23
0
 public SitesController(SitesService siteService)
 {
     this._siteService = siteService;
 }