public NoticesController(
     INoticeService noticeService,
     ITagService tagService)
 {
     _noticeService = noticeService ?? throw new ArgumentNullException(nameof(noticeService));
     _tagService    = tagService ?? throw new ArgumentNullException(nameof(tagService));
 }
예제 #2
0
 public InfoNoticeController(IBaseApiManager BaseApiManager, IHttpContextAccessor Accessor, INoticeCategoryService NoticeCategoryService, INoticeService NoticeService) : base(BaseApiManager)
 {
     this.BaseApiManager        = BaseApiManager;
     this.Accessor              = Accessor;
     this.NoticeCategoryService = NoticeCategoryService;
     this.NoticeService         = NoticeService;
 }
예제 #3
0
 public WorkOrderController(ITaskService taskService, UserManager <AppUser> userManager, IReportService reportService, INoticeService noticeService)
 {
     _taskService   = taskService;
     _userManager   = userManager;
     _reportService = reportService;
     _noticeService = noticeService;
 }
 public HomeController(IReportService reportService, UserManager <AppUser> userManager, ITaskService taskService, INoticeService noticeService)
 {
     _reportService = reportService;
     _userManager   = userManager;
     _taskService   = taskService;
     _noticeService = noticeService;
 }
예제 #5
0
 public ProjectController(
     IExcelManager excelManager,
     ICacheManager cacheManager,
     IWorkContext workContext,
     IWebEventService webLogger,
     IReservationService reservationService,
     INodeInReservationService nodesInReservationService,
     IProjectService projectService,
     INoteService noteService,
     IUserService userService,
     IRoleService roleService,
     IEntitiesInRoleService entitiesInRoleService,
     IAreaService areaService,
     INoticeService noticeService,
     INoticeInUserService noticeInUserService)
 {
     this._excelManager              = excelManager;
     this._cacheManager              = cacheManager;
     this._workContext               = workContext;
     this._webLogger                 = webLogger;
     this._reservationService        = reservationService;
     this._nodesInReservationService = nodesInReservationService;
     this._projectService            = projectService;
     this._noteService               = noteService;
     this._userService               = userService;
     this._roleService               = roleService;
     this._entitiesInRoleService     = entitiesInRoleService;
     this._areaService               = areaService;
     this._noticeService             = noticeService;
     this._noticeInUserService       = noticeInUserService;
 }
예제 #6
0
        /// <summary>
        /// 公告列表
        /// </summary>
        /// <param name="noticeService"></param>
        /// <returns></returns>
        public IActionResult NoticesManager([FromServices] INoticeService noticeService)
        {
            // var notices = IstoreHouse.GetAllNotices();
            var notices = noticeService.AllNotices();

            return(View("notices", notices));
        }
예제 #7
0
        public string SalonInfo([FromBody] SUID model)
        {
            string value = CodeHelp.GetResults(0, "失败", "");

            try
            {
                if (string.IsNullOrEmpty(model.suid.ToString()))
                {
                    value = CodeHelp.GetResults(0, "失败", "沙龙ID不能为空");
                }
                else
                {
                    SalonSimple     salon = new SalonSimple();
                    List <AllSalon> list  = new List <AllSalon>();
                    SalonService    sa    = new SalonService();
                    INoticeService  nots  = new INoticeService();
                    //取沙龙的基本信息和环境图
                    list = sa.GetSalonInfo(model.suid, 3);
                    if (list != null && list.Count > 0)
                    {
                        if (list[0].Status != 4)
                        {
                            value = CodeHelp.GetResults(0, "无法找到页面,该沙龙暂时不提供此服务。", "沙龙未开通");
                        }
                        else
                        {
                            if (list[0].Opendate < DateTime.Now)
                            {
                                value = CodeHelp.GetResults(0, "无法找到页面,该沙龙暂时不提供此服务。", "沙龙未开通");
                            }
                            else
                            {
                                list.First().Address = list.First().Address.Replace("|", "");
                                Tnotice noice        = new Tnotice();
                                noice = nots.GetNotice(model.suid);
                                if (noice != null)
                                {
                                    list.First().noticecontent = noice.content;
                                }
                                else
                                {
                                    list.First().noticecontent = "暂无公告";
                                }
                                value = CodeHelp.GetResults(1, "成功", list).ToLower();
                            }
                        }
                    }
                    else
                    {
                        value = CodeHelp.GetResults(0, "失败", "未取到数据");
                    }
                }
            }
            catch (Exception ex)
            {
                value = CodeHelp.GetResults(0, "失败", ex.Message);
            }
            return(value);
        }
예제 #8
0
 public SystemController(ApplicationConfigServices _applicationConfigServices, INoticeService _noticeService, IUserService _userService,
                         IMessageService _messageService)
     : base(_applicationConfigServices)
 {
     noticeService  = _noticeService;
     userService    = _userService;
     messageService = _messageService;
 }
 public NoticeRepository(INoticeService noticeService,
                         IMapper mapper,
                         IOptions <Config> config)
 {
     _noticeService   = noticeService;
     _mapper          = mapper;
     _assetsContainer = new BlobContainerClient(config.Value.ConexaoStorage, "assets");
 }
예제 #10
0
 public NoticeController(IMemberNoticeService memberNotice, INoticeService notice, IEventLogService eventLog, ICommonDataService common, IMemberService member)
 {
     _notice       = notice;
     _eventLog     = eventLog;
     _common       = common;
     _memberNotice = memberNotice;
     _member       = member;
 }
 public CheckQRCodeRequestHandler(Request request, ClientConnection clientConnection, INoticeService noticeService, IQRCodesService qrCodesService, ILoadUsersService loadUsersService)
 {
     this.request          = (CheckQRCodeRequest)request;
     this.clientConnection = clientConnection;
     this.noticeService    = noticeService;
     this.qrCodesService   = qrCodesService;
     this.loadUsersService = loadUsersService;
 }
예제 #12
0
 public static INoticeService BuildNoticeService()
 {
     if (notice_Service == null)
     {
         notice_Service = new NoticeService();
     }
     return(notice_Service);
 }
 public WorkOrderController(IAppUserService appUserService, ITaskService taskService, UserManager <AppUser> userManager, IFileService fileService, INoticeService noticeService)
 {
     _appUserService = appUserService;
     _taskService    = taskService;
     _userManager    = userManager;
     _fileService    = fileService;
     _noticeService  = noticeService;
 }
예제 #14
0
 public SpiderService(
     IBaseRepository <SpiderTask> spiderRepository,
     INoticeService noticeService
     )
 {
     _spiderRepository = spiderRepository;
     _novelService     = noticeService;
 }
예제 #15
0
 /// <summary>
 /// 首页
 /// </summary>
 /// <param name="postService"></param>
 /// <param name="categoryService"></param>
 /// <param name="searchDetailsService"></param>
 /// <param name="noticeService"></param>
 /// <param name="postAccessRecordService"></param>
 /// <param name="fastShareService"></param>
 public HomeController(IPostService postService, ICategoryService categoryService, ISearchDetailsService searchDetailsService, INoticeService noticeService, IPostAccessRecordService postAccessRecordService, IFastShareService fastShareService)
 {
     CategoryService         = categoryService;
     PostService             = postService;
     SearchDetailsService    = searchDetailsService;
     NoticeService           = noticeService;
     PostAccessRecordService = postAccessRecordService;
     FastShareService        = fastShareService;
 }
예제 #16
0
        public void AddNewNotice(string content, bool stopTheGame, [FromServices] INoticeService noticeService)
        {
            Notice notice = new Notice(content);

            //managerPlayer.PublishNotice(notice);
            //IstoreHouse.SaveChanges();
            noticeService.PublishNotice(notice);
            return;
        }
예제 #17
0
 public NoticeController(
     IWorkContextAccessor workContextAccessor,
     INoticeService noticeService,
     IMapper mapper)
     : base(workContextAccessor)
 {
     _noticeService = noticeService;
     _mapper        = mapper;
 }
예제 #18
0
 public NoticeController()
 {
     noticeService = ServiceBuilder.BuildNoticeService();
     paginate      = new Paginate()
     {
         PageSize = GLB.noticePerPageCount
     };
     conta_List_Notice = new Container_List_Notice();
 }
예제 #19
0
        public NoticeViewModel(INoticeService noticeService)
        {
            //NoticePaging = new NoticePagingViewModel();
            NoticeSearchCriteria = new NoticeSearchCriteriaViewModel();
            Notices          = new PagedResult <Notice>();
            ImportantNotices = new List <Notice>();

            _noticeService = noticeService;
        }
예제 #20
0
        public void ModifyNotice(int noticeId, string newContent, [FromServices] INoticeService noticeService)
        {
            //Notice notice = IstoreHouse.GetEntityById<Notice>(noticeId);
            //managerPlayer.ModifyNotice(notice, newContent);
            //IstoreHouse.SaveChanges();
            Notice notice = noticeService.GetNoticeById(noticeId);

            noticeService.ModifyNotice(notice, newContent);
            return;
        }
예제 #21
0
    private static async Task <IResult> Unread(int userid, INoticeService noticeService)
    {
        if (userid <= 0)
        {
            return(Results.BadRequest(new ApiError(string.Format(Strings.Invalid, "user id"))));
        }
        var notices = await noticeService.Unread(userid);

        return(Results.Ok(notices));
    }
예제 #22
0
        public void DeleteNotice(int noticeId, [FromServices] INoticeService noticeService)
        {
            Notice notice = noticeService.GetNoticeById(noticeId);

            noticeService.RemoveNotice(notice);
            // Notice notice = IstoreHouse.GetEntityById<Notice>(noticeId);
            //managerPlayer.RemoveNotice(notice);
            //IstoreHouse.SaveChanges();

            return;
        }
예제 #23
0
 public NoticeController(
     IDepartmentService DepartmentService
     , INoticeService NoticeService
     , IMemberService MemberService
     , IPermissionsService PermissionsService
     )
 {
     this.DepartmentService = DepartmentService;
     this.NoticeService = NoticeService;
     this.MemberService = MemberService;
     this.PermissionsService = PermissionsService;
 }
예제 #24
0
 public SystemController(ISystemService systemService, IMsgService msgService,
                         INoticeService noticeService, IUsersService usersService, IDemandService demandService,
                         IProductService productService, IQuestionService questionService)
 {
     _SystemService   = systemService;
     _MsgService      = msgService;
     _NoticeService   = noticeService;
     _UsersService    = usersService;
     _DemandService   = demandService;
     _ProductService  = productService;
     _QuestionService = questionService;
 }
예제 #25
0
 /// <summary>
 /// hangfire后台任务
 /// </summary>
 /// <param name="userInfoService"></param>
 /// <param name="postService"></param>
 /// <param name="settingService"></param>
 /// <param name="searchDetailsService"></param>
 /// <param name="linksService"></param>
 /// <param name="httpClientFactory"></param>
 /// <param name="HostEnvironment"></param>
 /// <param name="searchEngine"></param>
 public HangfireBackJob(IUserInfoService userInfoService, IPostService postService, ISystemSettingService settingService, ISearchDetailsService searchDetailsService, ILinksService linksService, IHttpClientFactory httpClientFactory, IWebHostEnvironment HostEnvironment, ISearchEngine <DataContext> searchEngine, IAdvertisementService advertisementService, INoticeService noticeService)
 {
     _userInfoService      = userInfoService;
     _postService          = postService;
     _settingService       = settingService;
     _searchDetailsService = searchDetailsService;
     _linksService         = linksService;
     _httpClientFactory    = httpClientFactory;
     _hostEnvironment      = HostEnvironment;
     _searchEngine         = searchEngine;
     _advertisementService = advertisementService;
     _noticeService        = noticeService;
 }
예제 #26
0
 public CommonController(IWebHelper webHelper,
     INoticeService noticeService,
     LocalizationSettings localizationSettings,
     ILanguageService languageService,
     ICurrentActivity currentActivity,
     ICacheManager cacheManager)
 {
     _webHelper = webHelper;
     _noticeService = noticeService;
     _localizationSettings = localizationSettings;
     _languageService = languageService;
     _currentActivity = currentActivity;
     _cacheManager = cacheManager;
 }
예제 #27
0
    private static async Task <IResult> MarkRead(int noticeid, INoticeService noticeService)
    {
        if (noticeid <= 0)
        {
            return(Results.BadRequest(new ApiError(string.Format(Strings.Invalid, "notice id"))));
        }
        var result = await noticeService.MarkReadAsync(noticeid);

        if (result.Successful)
        {
            return(Results.Ok());
        }
        return(Results.BadRequest(new ApiError(result.ErrorMessage())));
    }
예제 #28
0
    private static async Task <IResult> DeleteAll(int userid, INoticeService noticeService)
    {
        if (userid <= 0)
        {
            return(Results.BadRequest(new ApiError(string.Format(Strings.Invalid, "user id"))));
        }
        var result = await noticeService.DeleteAllAsync(userid);

        if (result.Successful)
        {
            return(Results.Ok());
        }
        return(Results.BadRequest(new ApiError(result.ErrorMessage())));
    }
예제 #29
0
 public CustomerService(
     IRepository <Customer> customerRepository,
     ICacheManager cacheManager,
     IEncryptionService encryptionService,
     INoticeService noticeService,
     IRepository <CustomerAttribute> attributeRepository,
     INotificationSubscriptionManager notificationSubscriptionManager)
 {
     this._customerRepository              = customerRepository;
     this._cacheManager                    = cacheManager;
     this._encryptionService               = encryptionService;
     this._noticeService                   = noticeService;
     this._attributeRepository             = attributeRepository;
     this._notificationSubscriptionManager = notificationSubscriptionManager;
 }
예제 #30
0
 public LoginRequestHandler(Request request,
                            ClientConnection clientConnection,
                            IConnectionsService connectionsService,
                            INoticeService noticeService,
                            ITokensService tokensService,
                            ILoadUsersService loadUsersService,
                            IPendingMessagesService pendingMessagesService,
                            INodeRequestSender nodeRequestSender)
 {
     this.request                = (LoginRequest)request;
     this.clientConnection       = clientConnection;
     this.connectionsService     = connectionsService;
     this.noticeService          = noticeService;
     this.tokensService          = tokensService;
     this.loadUsersService       = loadUsersService;
     this.pendingMessagesService = pendingMessagesService;
     this.nodeRequestSender      = nodeRequestSender;
 }
 public UserMigrationController(
     INodeNoticeService nodeNoticeService,
     IConnectionsService connectionsService,
     INoticeService noticeService,
     IChangeNodeOperationsService changeNodeOperationsService,
     ILoadUsersService loadUsersService,
     IUpdateUsersService updateUsersService,
     IDeleteUsersService deleteUsersService,
     INodeRequestSender nodeRequestSender)
 {
     this.nodeNoticeService           = nodeNoticeService;
     this.connectionsService          = connectionsService;
     this.noticeService               = noticeService;
     this.changeNodeOperationsService = changeNodeOperationsService;
     this.loadUsersService            = loadUsersService;
     this.updateUsersService          = updateUsersService;
     this.deleteUsersService          = deleteUsersService;
     this.nodeRequestSender           = nodeRequestSender;
 }
예제 #32
0
    private static async Task <IResult> Delete(int noticeid, INoticeService noticeService)
    {
        if (noticeid <= 0)
        {
            return(Results.BadRequest(new ApiError(string.Format(Strings.Invalid, "notice id"))));
        }
        var notice = await noticeService.ReadAsync(noticeid);

        if (notice is null)
        {
            return(Results.BadRequest(new ApiError(string.Format(Strings.ItemNotFound, "notice", "id", noticeid))));
        }
        var result = await noticeService.DeleteAsync(notice);

        if (result.Successful)
        {
            return(Results.Ok());
        }
        return(Results.BadRequest(new ApiError(result.ErrorMessage())));
    }
예제 #33
0
 public MessageController(
     ICustomerCompanyService CustomerCompanyService
     , IRelationCateService RelationCateService
     , ICustomerCateService CustomerCateService
     , ICityCateService CityCateService
     , IIndustryCateService IndustryCateService
     , ICustomerService CustomerService
     , IJobCateService JobCateService
     , ICustomerShareService CustomerShareService
     , IMemberService MemberService
     , IPermissionsService PermissionsService
     , IGroupService GroupService
     , IRolesService RolesService
     , INoticeService NoticeService
     , IRuleCateService RuleCateService
     , IPunishService PunishService
     , ITcNoticeService TcNoticeService
     , IDepartmentService DepartmentService
     )
 {
     this.CustomerCompanyService = CustomerCompanyService;
     this.RelationCateService = RelationCateService;
     this.CustomerCateService = CustomerCateService;
     this.CityCateService = CityCateService;
     this.IndustryCateService = IndustryCateService;
     this.CustomerService = CustomerService;
     this.JobCateService = JobCateService;
     this.CustomerShareService = CustomerShareService;
     this.MemberService = MemberService;
     this.PermissionsService = PermissionsService;
     this.GroupService = GroupService;
     this.RolesService = RolesService;
     this.NoticeService = NoticeService;
     this.RuleCateService = RuleCateService;
     this.PunishService = PunishService;
     this.TcNoticeService = TcNoticeService;
     this.DepartmentService = DepartmentService;
 }
예제 #34
0
 public static INoticeService BuildNoticeService()
 {
     if (notice_Service == null)
     {
         notice_Service = new NoticeService();
     }
     return notice_Service;
 }
예제 #35
0
 public ContactsController(INoticeService noticeService)
 {
     _noticeService = noticeService;
 }
예제 #36
0
 public NoticeController()
 {
     noticeService = ServiceBuilder.BuildNoticeService();
     paginate = new Paginate() { PageSize = GLB.noticePerPageCount };
     conta_List_Notice = new Container_List_Notice();
 }