public RelationshipEventsController( CrmSecurity crmSecurity, DaoFactory daoFactory, ApiContext apiContext, MessageTarget messageTarget, MessageService messageService, FileWrapperHelper fileWrapperHelper, ASC.Files.Core.Data.DaoFactory filesDaoFactory, FileUploader fileUploader, SecurityContext securityContext, NotifyClient notifyClient, FilesSettingsHelper filesSettingsHelper, IMapper mapper) : base(daoFactory, crmSecurity, mapper) { _apiContext = apiContext; _messageTarget = messageTarget; _messageService = messageService; _fileWrapperHelper = fileWrapperHelper; _filesDaoFactory = filesDaoFactory; _fileUploader = fileUploader; _securityContext = securityContext; _notifyClient = notifyClient; _filesSettingsHelper = filesSettingsHelper; }
public InvoiceDao( DbContextManager <CrmDbContext> dbContextManager, TenantManager tenantManager, SecurityContext securityContext, FactoryIndexerInvoice factoryIndexer, IOptionsMonitor <ILog> logger, ICache ascCache, SettingsManager settingsManager, InvoiceSetting invoiceSetting, InvoiceFormattedData invoiceFormattedData, CrmSecurity crmSecurity, TenantUtil tenantUtil, IMapper mapper) : base(dbContextManager, tenantManager, securityContext, logger, ascCache, mapper) { _factoryIndexer = factoryIndexer; _settingsManager = settingsManager; _invoiceSetting = invoiceSetting; _invoiceFormattedData = invoiceFormattedData; _crmSecurity = crmSecurity; _tenantUtil = tenantUtil; }
public SearchDao(DbContextManager <CrmDbContext> dbContextManager, TenantManager tenantManager, DaoFactory daoFactory, SecurityContext securityContext, CrmSecurity crmSecurity, TenantUtil tenantUtil, PathProvider pathProvider, FactoryIndexerTask tasksDtoIndexer, FactoryIndexerInvoice invoicesDtoIndexer, IOptionsMonitor <ILog> logger, ICache ascCache, WebImageSupplier webImageSupplier, BundleSearch bundleSearch, IMapper mapper ) : base(dbContextManager, tenantManager, securityContext, logger, ascCache, mapper) { _daoFactory = daoFactory; _factoryIndexerTask = tasksDtoIndexer; _factoryIndexerInvoice = invoicesDtoIndexer; _crmSecurity = crmSecurity; _tenantUtil = tenantUtil; _pathProvider = pathProvider; _webImageSupplier = webImageSupplier; _bundleSearch = bundleSearch; }
public ImportDataOperation(Global global, TenantManager tenantManager, IOptionsMonitor <ILog> logger, UserManager userManager, CrmSecurity crmSecurity, NotifyClient notifyClient, SettingsManager settingsManager, CurrencyProvider currencyProvider, DaoFactory daoFactory, SecurityContext securityContext ) { _userManager = userManager; _securityContext = securityContext; _dataStore = global.GetStore(); _tenantManager = tenantManager; _tenantID = tenantManager.GetCurrentTenant().TenantId; _author = _securityContext.CurrentAccount; _notifyClient = notifyClient; Id = String.Format("{0}_{1}", _tenantID, (int)_entityType); _log = logger.Get("ASC.CRM"); _crmSecurity = crmSecurity; _settingsManager = settingsManager; _currencyProvider = currencyProvider; _daoFactory = daoFactory; }
public DealDao(DbContextManager <CrmDbContext> dbContextManager, TenantManager tenantManager, SecurityContext securityContext, CrmSecurity crmSecurity, FactoryIndexerDeal factoryIndexer, FilesIntegration filesIntegration, TenantUtil tenantUtil, AuthorizationManager authorizationManager, IOptionsMonitor <ILog> logger, ICache ascCache, IMapper mapper, BundleSearch bundleSearch) : base(dbContextManager, tenantManager, securityContext, logger, ascCache, mapper) { _crmSecurity = crmSecurity; _factoryIndexer = factoryIndexer; _filesIntegration = filesIntegration; _bundleSearch = bundleSearch; _mapper = mapper; _tenantUtil = tenantUtil; _authorizationManager = authorizationManager; }
public InvoiceTaxDtoTypeConverter(ApiDateTimeHelper apiDateTimeHelper, EmployeeWraperHelper employeeWraperHelper, CrmSecurity crmSecurity) { _apiDateTimeHelper = apiDateTimeHelper; _employeeWraperHelper = employeeWraperHelper; _crmSecurity = crmSecurity; }
public BaseApiController(DaoFactory daoFactory, CrmSecurity crmSecurity, IMapper mapper) { _daoFactory = daoFactory; _crmSecurity = crmSecurity; _mapper = mapper; }
public TaskTemplateController(CrmSecurity crmSecurity, DaoFactory daoFactory, EmployeeWraperHelper employeeWraperHelper, IMapper mapper) : base(daoFactory, crmSecurity, mapper) { _employeeWraperHelper = employeeWraperHelper; }
public CasesDtoTypeConverter(ApiDateTimeHelper apiDateTimeHelper, EmployeeWraperHelper employeeWraperHelper, CrmSecurity crmSecurity, DaoFactory daoFactory) { _apiDateTimeHelper = apiDateTimeHelper; _employeeWraperHelper = employeeWraperHelper; _CRMSecurity = crmSecurity; _daoFactory = daoFactory; }
public ListItemsController(CrmSecurity crmSecurity, DaoFactory daoFactory, MessageTarget messageTarget, MessageService messageService, IMapper mapper) : base(daoFactory, crmSecurity, mapper) { _messageTarget = messageTarget; _messageService = messageService; }
public TaskDtoTypeConverter(ApiDateTimeHelper apiDateTimeHelper, EmployeeWraperHelper employeeWraperHelper, CrmSecurity crmSecurity, DaoFactory daoFactory, EntityDtoHelper entityDtoHelper) { _apiDateTimeHelper = apiDateTimeHelper; _employeeWraperHelper = employeeWraperHelper; _crmSecurity = crmSecurity; _daoFactory = daoFactory; _entityDtoHelper = entityDtoHelper; }
public OpportunityDtoTypeConverter(ApiDateTimeHelper apiDateTimeHelper, EmployeeWraperHelper employeeWraperHelper, CrmSecurity crmSecurity, DaoFactory daoFactory, CurrencyProvider currencyProvider) { _apiDateTimeHelper = apiDateTimeHelper; _employeeWraperHelper = employeeWraperHelper; _crmSecurity = crmSecurity; _daoFactory = daoFactory; _currencyProvider = currencyProvider; }
public TagsController(CrmSecurity crmSecurity, DaoFactory daoFactory, ApiContext apiContext, MessageTarget messageTarget, MessageService messageService, IMapper mapper) : base(daoFactory, crmSecurity, mapper) { _apiContext = apiContext; _messageTarget = messageTarget; _messageService = messageService; }
public CurrencyRatesController(CrmSecurity crmSecurity, DaoFactory daoFactory, MessageService messageService, SettingsManager settingsManager, Global global, CurrencyProvider currencyProvider, IMapper mapper) : base(daoFactory, crmSecurity, mapper) { _messageService = messageService; _settingsManager = settingsManager; _global = global; _currencyProvider = currencyProvider; }
public ContactDtoTypeConverter(ApiDateTimeHelper apiDateTimeHelper, EmployeeWraperHelper employeeWraperHelper, CrmSecurity crmSecurity, CurrencyProvider currencyProvider, PathProvider pathProvider, DaoFactory daoFactory) { _apiDateTimeHelper = apiDateTimeHelper; _employeeDtoHelper = employeeWraperHelper; _crmSecurity = crmSecurity; _currencyProvider = currencyProvider; _pathProvider = pathProvider; _daoFactory = daoFactory; }
public InvoiceItemDtoTypeConverter(ApiDateTimeHelper apiDateTimeHelper, EmployeeWraperHelper employeeWraperHelper, CrmSecurity crmSecurity, SettingsManager settingsManager, CurrencyProvider currencyProvider, DaoFactory daoFactory) { _apiDateTimeHelper = apiDateTimeHelper; _employeeWraperHelper = employeeWraperHelper; _crmSecurity = crmSecurity; _settingsManager = settingsManager; _currencyProvider = currencyProvider; _daoFactory = daoFactory; }
public RelationshipEventDtoTypeConverter( ApiDateTimeHelper apiDateTimeHelper, EmployeeWraperHelper employeeWraperHelper, FileWrapperHelper fileWrapperHelper, CrmSecurity crmSecurity, DaoFactory daoFactory, EntityDtoHelper entityDtoHelper) { _apiDateTimeHelper = apiDateTimeHelper; _employeeWraperHelper = employeeWraperHelper; _crmSecurity = crmSecurity; _daoFactory = daoFactory; _fileWrapperHelper = fileWrapperHelper; _entityDtoHelper = entityDtoHelper; }
public ListItemDao( CrmSecurity crmSecurity, DbContextManager <CrmDbContext> dbContextManager, TenantManager tenantManager, SecurityContext securityContext, IOptionsMonitor <ILog> logger, ICache ascCache, IMapper mapper) : base(dbContextManager, tenantManager, securityContext, logger, ascCache, mapper) { }
public TasksController(CrmSecurity crmSecurity, DaoFactory daoFactory, ApiContext apiContext, MessageTarget messageTarget, MessageService messageService, NotifyClient notifyClient, IMapper mapper, FactoryIndexerCase factoryIndexerCase) : base(daoFactory, crmSecurity, mapper) { _apiContext = apiContext; _messageTarget = messageTarget; _messageService = messageService; _notifyClient = notifyClient; _mapper = mapper; }
public InvoiceItemDao( DbContextManager <CrmDbContext> dbContextManager, TenantManager tenantManager, SecurityContext securityContext, CrmSecurity crmSecurity, IOptionsMonitor <ILog> logger, ICache ascCache, IMapper mapper ) : base(dbContextManager, tenantManager, securityContext, logger, ascCache, mapper) { _crmSecurity = crmSecurity; }
public ReportsController(CrmSecurity crmSecurity, DaoFactory daoFactory, SettingsManager settingsManager, Global global, ReportHelper reportHelper, FileWrapperHelper fileWrapperHelper, DocbuilderReportsUtilityHelper docbuilderReportsUtilityHelper, IMapper mapper ) : base(daoFactory, crmSecurity, mapper) { _settingsManager = settingsManager; _global = global; _reportHelper = reportHelper; _fileWrapperHelper = fileWrapperHelper; _docbuilderReportsUtilityHelper = docbuilderReportsUtilityHelper; }
public VoipEngine(DaoFactory daoFactory, CrmSecurity crmSecurity, TenantUtil tenantUtil, DistributedTaskQueueOptionsManager optionsManager, SecurityContext securityContext, IOptionsMonitor <ILog> logger, TenantManager tenantManager, VoipDao voipDao) { _crmSecurity = crmSecurity; _tenantUtil = tenantUtil; _securityContext = securityContext; _queue = optionsManager.Get <QueueItem>(); _logger = logger.Get("ASC.CRM"); _tenantManager = tenantManager; _voipDao = voipDao; _daoFactory = daoFactory; }
public Global(StorageFactory storageFactory, SecurityContext securityContext, SetupInfo setupInfo, FilesLinkUtility filesLinkUtility, CrmSecurity crmSecurity, TenantManager tenantManager, SettingsManager settingsManager, IConfiguration configuration ) { _storageFactory = storageFactory; _filesLinkUtility = filesLinkUtility; _setupInfo = setupInfo; _securityContext = securityContext; _crmSecurity = crmSecurity; _tenantID = tenantManager.GetCurrentTenant().TenantId; _settingsManager = settingsManager; _configuration = configuration; }
public CasesController(CrmSecurity crmSecurity, DaoFactory daoFactory, ApiContext apiContext, MessageTarget messageTarget, MessageService messageService, NotifyClient notifyClient, SecurityContext securityContext, DisplayUserSettingsHelper displayUserSettingsHelper, UserManager userManager, IMapper mapper) : base(daoFactory, crmSecurity, mapper) { _apiContext = apiContext; _messageTarget = messageTarget; _messageService = messageService; _notifyClient = notifyClient; _securityContext = securityContext; _displayUserSettingsHelper = displayUserSettingsHelper; _userManager = userManager; _mapper = mapper; }
public RelationshipEventDao(DbContextManager <CrmDbContext> dbContextManager, TenantManager tenantManager, SecurityContext securityContext, FilesIntegration filesIntegration, FactoryIndexerEvents factoryIndexerEvents, CrmSecurity crmSecurity, TenantUtil tenantUtil, IOptionsMonitor <ILog> logger, ICache ascCache, IMapper mapper ) : base(dbContextManager, tenantManager, securityContext, logger, ascCache, mapper) { _filesIntegration = filesIntegration; _tenantUtil = tenantUtil; _crmSecurity = crmSecurity; _factoryIndexer = factoryIndexerEvents; }
public VoIPController(CrmSecurity crmSecurity, DaoFactory daoFactory, Global global, ContactPhotoManager contactPhotoManager, StorageFactory storageFactory, CommonLinkUtility commonLinkUtility, SecurityContext securityContext, TenantUtil tenantUtil, VoipEngine voipEngine, ApiContext apiContext, SignalrServiceClient signalrServiceClient, IMapper mapper) : base(daoFactory, crmSecurity, mapper) { _global = global; _contactPhotoManager = contactPhotoManager; _storageFactory = storageFactory; _commonLinkUtility = commonLinkUtility; _securityContext = securityContext; _tenantUtil = tenantUtil; _voipEngine = voipEngine; _apiContext = apiContext; _signalrServiceClient = signalrServiceClient; }
public DealsController(CrmSecurity crmSecurity, DaoFactory daoFactory, ApiContext apiContext, MessageTarget messageTarget, MessageService messageService, NotifyClient notifyClient, CurrencyProvider currencyProvider, UserManager userManager, EmployeeWraperHelper employeeWraperHelper, DisplayUserSettingsHelper displayUserSettingsHelper, SecurityContext securityContext, IMapper mapper) : base(daoFactory, crmSecurity, mapper) { _apiContext = apiContext; _messageTarget = messageTarget; _messageService = messageService; _notifyClient = notifyClient; _currencyProvider = currencyProvider; _userManager = userManager; _employeeWraperHelper = employeeWraperHelper; _displayUserSettingsHelper = displayUserSettingsHelper; _securityContext = securityContext; }
public async Task Invoke(HttpContext context, WebItemSecurity webItemSecurity, CrmSecurity crmSecurity, Global global, ImportFromCSV importFromCSV) { if (!webItemSecurity.IsAvailableForMe(ProductEntryPoint.ID)) { throw crmSecurity.CreateSecurityException(); } var fileUploadResult = new FileUploadResult(); if (context.Request.Form.Files.Count == 0) { await context.Response.WriteAsync(JsonSerializer.Serialize(fileUploadResult)); } var fileName = context.Request.Form.Files[0].FileName; var contentLength = context.Request.Form.Files[0].Length; String assignedPath; global.GetStore().SaveTemp("temp", out assignedPath, context.Request.Form.Files[0].OpenReadStream()); var jObject = importFromCSV.GetInfo(context.Request.Form.Files[0].OpenReadStream(), context.Request.Form["importSettings"]); var jsonDocumentAsDictionary = JsonSerializer.Deserialize <Dictionary <string, string> >(jObject.ToString()); jsonDocumentAsDictionary.Add("assignedPath", assignedPath); fileUploadResult.Success = true; fileUploadResult.Data = Global.EncodeTo64(JsonSerializer.Serialize(jsonDocumentAsDictionary)); await context.Response.WriteAsync(JsonSerializer.Serialize(fileUploadResult)); }
public UtilsController(CrmSecurity crmSecurity, DaoFactory daoFactory, MessageService messageService, SettingsManager settingsManager, CurrencyProvider currencyProvider, InvoiceSetting invoiceSetting, ImportFromCSVManager importFromCSVManager, OrganisationLogoManager organisationLogoManager, Global global, ImportFromCSV importFromCSV, ExportToCsv exportToCsv, IMapper mapper) : base(daoFactory, crmSecurity, mapper) { _messageService = messageService; _currencyProvider = currencyProvider; _settingsManager = settingsManager; _invoiceSetting = invoiceSetting; _importFromCSVManager = importFromCSVManager; _organisationLogoManager = organisationLogoManager; _global = global; _importFromCSV = importFromCSV; _exportToCsv = exportToCsv; }
public async System.Threading.Tasks.Task Invoke(HttpContext context, SetupInfo setupInfo, CrmSecurity crmSecurity, FileSizeComment fileSizeComment, WebItemSecurity webItemSecurity, MessageTarget messageTarget, MessageService messageService, DaoFactory daoFactory, ContactPhotoManager contactPhotoManager) { if (!webItemSecurity.IsAvailableForMe(ProductEntryPoint.ID)) { throw crmSecurity.CreateSecurityException(); } context.Request.EnableBuffering(); var contactId = Convert.ToInt32(context.Request.Form["contactID"]); Contact contact = null; if (contactId != 0) { contact = daoFactory.GetContactDao().GetByID(contactId); if (!crmSecurity.CanEdit(contact)) { throw crmSecurity.CreateSecurityException(); } } var fileUploadResult = new FileUploadResult(); if (context.Request.Form.Files.Count == 0) { await context.Response.WriteAsync(JsonSerializer.Serialize(fileUploadResult)); } var fileName = context.Request.Form.Files[0].FileName; var contentLength = context.Request.Form.Files[0].Length; if (String.IsNullOrEmpty(fileName) || contentLength == 0) { throw new InvalidOperationException(CRMErrorsResource.InvalidFile); } if (0 < setupInfo.MaxImageUploadSize && setupInfo.MaxImageUploadSize < contentLength) { fileUploadResult.Success = false; fileUploadResult.Message = fileSizeComment.GetFileImageSizeNote(CRMCommonResource.ErrorMessage_UploadFileSize, false).HtmlEncode(); await context.Response.WriteAsync(JsonSerializer.Serialize(fileUploadResult)); } if (FileUtility.GetFileTypeByFileName(fileName) != FileType.Image) { fileUploadResult.Success = false; fileUploadResult.Message = CRMJSResource.ErrorMessage_NotImageSupportFormat.HtmlEncode(); await context.Response.WriteAsync(JsonSerializer.Serialize(fileUploadResult)); } var uploadOnly = Convert.ToBoolean(context.Request.Form["uploadOnly"]); var tmpDirName = Convert.ToString(context.Request.Form["tmpDirName"]); try { ContactPhotoManager.PhotoData photoData; if (contactId != 0) { photoData = contactPhotoManager.UploadPhoto(context.Request.Form.Files[0].OpenReadStream(), contactId, uploadOnly); } else { if (String.IsNullOrEmpty(tmpDirName) || tmpDirName == "null") { tmpDirName = Guid.NewGuid().ToString(); } photoData = contactPhotoManager.UploadPhotoToTemp(context.Request.Form.Files[0].OpenReadStream(), tmpDirName); } fileUploadResult.Success = true; fileUploadResult.Data = photoData; } catch (Exception e) { fileUploadResult.Success = false; fileUploadResult.Message = e.Message.HtmlEncode(); await context.Response.WriteAsync(JsonSerializer.Serialize(fileUploadResult)); } if (contact != null) { var messageAction = contact is Company ? MessageAction.CompanyUpdatedPhoto : MessageAction.PersonUpdatedPhoto; messageService.Send(messageAction, messageTarget.Create(contact.ID), contact.GetTitle()); } await context.Response.WriteAsync(JsonSerializer.Serialize(fileUploadResult)); }