public ProfileAppService(
     IAppFolders appFolders,
     IBinaryObjectManager binaryObjectManager, 
     ITimeZoneService timezoneService)
 {
     _appFolders = appFolders;
     _binaryObjectManager = binaryObjectManager;
     _timeZoneService = timezoneService;
 }
 public ProfileController(
     UserManager userManager,
     IBinaryObjectManager binaryObjectManager,
     IAppFolders appFolders)
 {
     _userManager = userManager;
     _binaryObjectManager = binaryObjectManager;
     _appFolders = appFolders;
 }
 public TenantDemoDataBuilder(
     OrganizationUnitManager organizationUnitManager,
     UserManager userManager,
     RandomUserGenerator randomUserGenerator,
     IBinaryObjectManager binaryObjectManager, 
     IAppFolders appFolders)
 {
     _organizationUnitManager = organizationUnitManager;
     _userManager = userManager;
     _randomUserGenerator = randomUserGenerator;
     _binaryObjectManager = binaryObjectManager;
     _appFolders = appFolders;
 }
예제 #4
0
 public UsersController(IBinaryObjectManager binaryObjectManager, IBackgroundJobManager backgroundJobManager)
     : base(binaryObjectManager, backgroundJobManager)
 {
 }
예제 #5
0
 public ProfileController(IAppFolders appFolders, IBinaryObjectManager binaryObjectManager)
     : base(appFolders)
 {
     _binaryObjectManager = binaryObjectManager;
 }
예제 #6
0
 public FileController(IOptions <ApplicationConfiguration> options, IBinaryObjectManager storager)
 {
     _options  = options;
     _storager = storager;
 }
 /// <summary>
 /// ctor
 /// </summary>
 /// <param name="customerRepository"></param>
 /// <param name="smtpEmailSenderConfiguration"></param>
 /// <param name="cateRepository"></param>
 /// <param name="productRepository"></param>
 /// <param name="binaryObjectManager"></param>
 /// <param name="ordeRepository"></param>
 /// <param name="costRepository"></param>
 /// <param name="applyRepository"></param>
 /// <param name="objectManager"></param>
 /// <param name="formRepository"></param>
 /// <param name="customerPriceRepository"></param>
 public DashboardAppService(
     IRepository <Customer> customerRepository,
     ISmtpEmailSenderConfiguration smtpEmailSenderConfiguration,
     IRepository <Category> cateRepository,
     IRepository <Product> productRepository,
     IBinaryObjectManager binaryObjectManager,
     IRepository <Order> ordeRepository, IRepository <CustomerCost> costRepository, IRepository <ApplyCharge> applyRepository, IBinaryObjectManager objectManager, IRepository <CustomerForm> formRepository, IRepository <CustomerPreferencePrice> customerPriceRepository)
 {
     _customerRepository           = customerRepository;
     _smtpEmailSenderConfiguration = smtpEmailSenderConfiguration;
     _cateRepository          = cateRepository;
     _productRepository       = productRepository;
     _binaryObjectManager     = binaryObjectManager;
     _ordeRepository          = ordeRepository;
     _costRepository          = costRepository;
     _applyRepository         = applyRepository;
     _objectManager           = objectManager;
     _formRepository          = formRepository;
     _customerPriceRepository = customerPriceRepository;
 }
예제 #8
0
 public ChatControllerBase(IBinaryObjectManager binaryObjectManager, IChatAppService chatAppService)
 {
     BinaryObjectManager = binaryObjectManager;
     ChatAppService      = chatAppService;
 }
예제 #9
0
 /// <summary>
 /// ctor
 /// </summary>
 /// <param name="appFolders"></param>
 /// <param name="binaryObjectManager"></param>
 public FileController(IAppFolders appFolders, IBinaryObjectManager binaryObjectManager)
 {
     _appFolders          = appFolders;
     _binaryObjectManager = binaryObjectManager;
 }
예제 #10
0
 public ContactsController(IContactAppService contactAppService, IBinaryObjectManager binaryObjectManager)
 {
     this._contactAppService   = contactAppService;
     this._binaryObjectManager = binaryObjectManager;
 }
예제 #11
0
 public TitleAppService(IRepository <Title, long> titleRepository, ITitleListExcelExporter titleListExcelExporter, IBinaryObjectManager binaryObjectManager)
 {
     this._titleRepository        = titleRepository;
     this._titleListExcelExporter = titleListExcelExporter;
     this._binaryObjectManager    = binaryObjectManager;
 }
예제 #12
0
 public ProductAppService(IRepository <Product, long> productRepository, IRepository <ProductOption, long> productOptionRepository, IProductListExcelExporter productListExcelExporter, IRepository <ProductSupplier, long> productSupplierRepository, IRepository <Supplier, long> supplierRepository, IRepository <ProductResource, long> productResourceRepository, IRepository <ProductPrice, long> productPriceRepository, IBinaryObjectManager binaryObjectManager)
 {
     this._productRepository         = productRepository;
     this._productOptionRepository   = productOptionRepository;
     this._productListExcelExporter  = productListExcelExporter;
     this._productSupplierRepository = productSupplierRepository;
     this._supplierRepository        = supplierRepository;
     this._productPriceRepository    = productPriceRepository;
     this._productResourceRepository = productResourceRepository;
     this._binaryObjectManager       = binaryObjectManager;
 }
예제 #13
0
 public ContactAppService(IRepository <Contact, long> contactRepository, IContactListExcelExporter contactListExcelExporter, IBinaryObjectManager binaryObjectManager)
 {
     this._contactRepository        = contactRepository;
     this._contactListExcelExporter = contactListExcelExporter;
     this._binaryObjectManager      = binaryObjectManager;
 }
예제 #14
0
 public TenantDemoDataBuilder(OrganizationUnitManager organizationUnitManager, UserManager userManager, RandomUserGenerator randomUserGenerator, IBinaryObjectManager binaryObjectManager, IAppFolders appFolders)
 {
     this._organizationUnitManager = organizationUnitManager;
     this._userManager             = userManager;
     this._randomUserGenerator     = randomUserGenerator;
     this._binaryObjectManager     = binaryObjectManager;
     this._appFolders = appFolders;
 }
예제 #15
0
 public TaxAppService(IRepository <Tax, long> taxRepository, ITaxListExcelExporter taxListExcelExporter, IBinaryObjectManager binaryObjectManager)
 {
     this._taxRepository        = taxRepository;
     this._taxListExcelExporter = taxListExcelExporter;
     this._binaryObjectManager  = binaryObjectManager;
 }
예제 #16
0
 public DemoUiComponentsController(IBinaryObjectManager binaryObjectManager)
 {
     _binaryObjectManager = binaryObjectManager;
 }
예제 #17
0
 public SettingsController(ITenantSettingsAppService tenantSettingsAppService, IMultiTenancyConfig multiTenancyConfig, TenantManager tenantManager, IBinaryObjectManager binaryObjectManager, IRepository <PaymentSetting, long> paymentSettingRepository)
 {
     this._tenantSettingsAppService = tenantSettingsAppService;
     this._multiTenancyConfig       = multiTenancyConfig;
     this._tenantManager            = tenantManager;
     this._binaryObjectManager      = binaryObjectManager;
     this._paymentSettingRepository = paymentSettingRepository;
 }
예제 #18
0
 /// <summary>
 /// ctor
 /// </summary>
 /// <param name="customerRepository"></param>
 /// <param name="customerListExcelExporter"></param>
 /// <param name="chargeRecordRepository"></param>
 /// <param name="applyChargeRepository"></param>
 /// <param name="objectManager"></param>
 public CustomerAppService(IRepository <Customer, int> customerRepository,
                           ICustomerListExcelExporter customerListExcelExporter, IRepository <ChargeRecord> chargeRecordRepository, IRepository <ApplyCharge> applyChargeRepository, IBinaryObjectManager objectManager)
 {
     _customerRepository        = customerRepository;
     _customerListExcelExporter = customerListExcelExporter;
     _chargeRecordRepository    = chargeRecordRepository;
     _applyChargeRepository     = applyChargeRepository;
     _objectManager             = objectManager;
 }
예제 #19
0
 public EstimatesController(IEstimateAppService estimateAppService, ISupplierAppService supplierAppService, ICustomerAppService customerAppServer, IBinaryObjectManager binaryObjectManager, IProductAppService productAppService, ITitleAppService titleAppService, IRepository <PaymentSetting, long> paymentSettingRepository, IRepository <TenantPaymentSettings, long> tenantPaymentSettingsRepository)
 {
     this._estimateAppService              = estimateAppService;
     this._supplierAppService              = supplierAppService;
     this._customerAppServer               = customerAppServer;
     this._binaryObjectManager             = binaryObjectManager;
     this._titleAppService                 = titleAppService;
     this._tenantPaymentSettingsRepository = tenantPaymentSettingsRepository;
     this._productAppService               = productAppService;
     this._paymentSettingRepository        = paymentSettingRepository;
 }
예제 #20
0
 public TrucksController(ITruckAppService truckAppService, IGenericAppService genericAppService, IBinaryObjectManager binaryObjectManager)
 {
     this._truckAppService     = truckAppService;
     this._genericAppService   = genericAppService;
     this._binaryObjectManager = binaryObjectManager;
 }
예제 #21
0
 public FillLotAppService(IRepository <FillLot, long> fillLotRepository, IRepository <Address, long> addressRepository, IRepository <FillLotTank, long> fillLotTankRepository, IFillLotListExcelExporter fillLotListExcelExporter, IBinaryObjectManager binaryObjectManager, IRepository <CountryRegion> countryRegionRepository, IRepository <Country> countryRepository)
 {
     this._fillLotRepository        = fillLotRepository;
     this._addressRepository        = addressRepository;
     this._fillLotTankRepository    = fillLotTankRepository;
     this._fillLotListExcelExporter = fillLotListExcelExporter;
     this._binaryObjectManager      = binaryObjectManager;
     this._countryRegionRepository  = countryRegionRepository;
     this._countryRepository        = countryRepository;
 }
예제 #22
0
 public TaxRuleAppService(IRepository <TaxRule, long> taxRuleRepository, IRepository <Tax, long> taxRepository, IRepository <TaxRuleRule, long> taxRuleRuleRepository, IRepository <Country> countryRepository, IRepository <CountryRegion> countryRegionRepository, IRepository <ProductPriceTaxRule, long> productPriceTaxRuleRepository, ITaxRuleListExcelExporter taxRuleListExcelExporter, IBinaryObjectManager binaryObjectManager)
 {
     this._taxRepository                 = taxRepository;
     this._taxRuleRepository             = taxRuleRepository;
     this._taxRuleRuleRepository         = taxRuleRuleRepository;
     this._countryRepository             = countryRepository;
     this._countryRegionRepository       = countryRegionRepository;
     this._productPriceTaxRuleRepository = productPriceTaxRuleRepository;
     this._taxRuleListExcelExporter      = taxRuleListExcelExporter;
     this._binaryObjectManager           = binaryObjectManager;
 }
예제 #23
0
 public ProfileController(UserManager userManager, IBinaryObjectManager binaryObjectManager)
 {
     _userManager = userManager;
     _binaryObjectManager = binaryObjectManager;
 }
예제 #24
0
 public SuppliersController(ISupplierAppService supplierAppService, IGenericAppService genericAppService, IBinaryObjectManager binaryObjectManager)
 {
     this._supplierAppService  = supplierAppService;
     this._genericAppService   = genericAppService;
     this._binaryObjectManager = binaryObjectManager;
 }
예제 #25
0
 public SupplierAppService(IRepository <Supplier, long> supplierRepository, IBinaryObjectManager binaryObjectManager, ISupplierListExcelExporter supplierListExcelExporter)
 {
     this._supplierRepository        = supplierRepository;
     this._binaryObjectManager       = binaryObjectManager;
     this._supplierListExcelExporter = supplierListExcelExporter;
 }
 public EmergencyDeliveryFeeAppService(IRepository <EmergencyDeliveryFee, long> emergencyDeliveryFeeRepository, IEmergencyDeliveryFeeListExcelExporter emergencyDeliveryFeeListExcelExporter, IBinaryObjectManager binaryObjectManager)
 {
     this._emergencyDeliveryFeeRepository        = emergencyDeliveryFeeRepository;
     this._emergencyDeliveryFeeListExcelExporter = emergencyDeliveryFeeListExcelExporter;
     this._binaryObjectManager = binaryObjectManager;
 }
예제 #27
0
 public ChatController(IBinaryObjectManager binaryObjectManager, IChatAppService chatAppService) :
     base(binaryObjectManager, chatAppService)
 {
 }
예제 #28
0
 public FileController(IBinaryObjectManager binaryObjectManager)
 {
     _binaryObjectManager = binaryObjectManager;
 }
예제 #29
0
 public ChatController(IBinaryObjectManager binaryObjectManager, IChatMessageManager chatMessageManager) :
     base(binaryObjectManager, chatMessageManager)
 {
 }
예제 #30
0
 public ProfileController(UserManager userManager, IBinaryObjectManager binaryObjectManager)
 {
     _userManager         = userManager;
     _binaryObjectManager = binaryObjectManager;
 }
 public ChatControllerBase(IBinaryObjectManager binaryObjectManager, IChatMessageManager chatMessageManager)
 {
     BinaryObjectManager = binaryObjectManager;
     ChatMessageManager  = chatMessageManager;
 }
예제 #32
0
 public ProductsController(IProductAppService productAppService, IPriceAppService priceAppService, ICustomerAppService customerAppService, ISpecificPriceAppService specificPriceAppService, ITaxRuleAppService taxRuleAppService, ISupplierAppService supplierAppService, IBinaryObjectManager binaryObjectManager, IOrganizationUnitAppService organizationUnitAppService, IRepository <ProductOption, long> productOptionRepository)
 {
     this._productAppService          = productAppService;
     this._priceAppService            = priceAppService;
     this._customerAppService         = customerAppService;
     this._specificPriceAppService    = specificPriceAppService;
     this._taxRuleAppService          = taxRuleAppService;
     this._supplierAppService         = supplierAppService;
     this._binaryObjectManager        = binaryObjectManager;
     this._organizationUnitAppService = organizationUnitAppService;
     this._productOptionRepository    = productOptionRepository;
 }
예제 #33
0
 public ImageAppService(IRepository <Image> imageRepository, IAppFolders appFolders, IBinaryObjectManager binaryObjectManager)
 {
     _appFolders          = appFolders;
     _binaryObjectManager = binaryObjectManager;
     _imageRepository     = imageRepository;
 }
예제 #34
0
        public virtual async Task <JsonResult> UpdateTenantLogos(TenantLogosUploadModel model)
        {
            JsonResult   jsonResult;
            Guid?        headerImageId;
            BinaryObject binaryObject;
            BinaryObject binaryObject1;
            BinaryObject binaryObject2;
            BinaryObject binaryObject3;

            try
            {
                bool flag = false;
                ITenantSettingsAppService tenantSettingsAppService = this._tenantSettingsAppService;
                int?tenantId = this.AbpSession.TenantId;
                TenantLogosEditDto tenantLogos = await tenantSettingsAppService.GetTenantLogos(tenantId.Value);

                if (this.Request.Files.Count > 0)
                {
                    foreach (object key in this.Request.Files.Keys)
                    {
                        HttpPostedFileBase item = this.Request.Files[key.ToString()];
                        if (item.ContentLength > 512000)
                        {
                            throw new UserFriendlyException(this.L("TenantCompanyLogo_Warn_SizeLimit"));
                        }
                        string str = key.ToString();
                        if (str == "HeaderImage")
                        {
                            headerImageId = tenantLogos.HeaderImageId;
                            if (headerImageId.HasValue)
                            {
                                headerImageId = tenantLogos.HeaderImageId;
                                if (headerImageId.Value != Guid.Empty)
                                {
                                    IBinaryObjectManager binaryObjectManager = this._binaryObjectManager;
                                    headerImageId = tenantLogos.HeaderImageId;
                                    await binaryObjectManager.DeleteAsync(headerImageId.Value);
                                }
                            }
                            binaryObject = new BinaryObject(item.InputStream.GetAllBytes());
                            await this._binaryObjectManager.SaveAsync(binaryObject);

                            tenantLogos.HeaderImageId = new Guid?(binaryObject.Id);
                            flag = true;
                        }
                        else if (str == "HeaderMobileImage")
                        {
                            headerImageId = tenantLogos.HeaderMobileImageId;
                            if (headerImageId.HasValue)
                            {
                                headerImageId = tenantLogos.HeaderMobileImageId;
                                if (headerImageId.Value != Guid.Empty)
                                {
                                    IBinaryObjectManager binaryObjectManager1 = this._binaryObjectManager;
                                    headerImageId = tenantLogos.HeaderMobileImageId;
                                    await binaryObjectManager1.DeleteAsync(headerImageId.Value);
                                }
                            }
                            binaryObject1 = new BinaryObject(item.InputStream.GetAllBytes());
                            await this._binaryObjectManager.SaveAsync(binaryObject1);

                            tenantLogos.HeaderMobileImageId = new Guid?(binaryObject1.Id);
                            flag = true;
                        }
                        else if (str == "MailImage")
                        {
                            headerImageId = tenantLogos.MailImageId;
                            if (headerImageId.HasValue)
                            {
                                headerImageId = tenantLogos.MailImageId;
                                if (headerImageId.Value != Guid.Empty)
                                {
                                    IBinaryObjectManager binaryObjectManager2 = this._binaryObjectManager;
                                    headerImageId = tenantLogos.MailImageId;
                                    await binaryObjectManager2.DeleteAsync(headerImageId.Value);
                                }
                            }
                            binaryObject2 = new BinaryObject(item.InputStream.GetAllBytes());
                            await this._binaryObjectManager.SaveAsync(binaryObject2);

                            tenantLogos.MailImageId = new Guid?(binaryObject2.Id);
                            flag = true;
                        }
                        else if (str == "InvoiceImage")
                        {
                            headerImageId = tenantLogos.InvoiceImageId;
                            if (headerImageId.HasValue)
                            {
                                headerImageId = tenantLogos.InvoiceImageId;
                                if (headerImageId.Value != Guid.Empty)
                                {
                                    IBinaryObjectManager binaryObjectManager3 = this._binaryObjectManager;
                                    headerImageId = tenantLogos.InvoiceImageId;
                                    await binaryObjectManager3.DeleteAsync(headerImageId.Value);
                                }
                            }
                            binaryObject3 = new BinaryObject(item.InputStream.GetAllBytes());
                            await this._binaryObjectManager.SaveAsync(binaryObject3);

                            tenantLogos.InvoiceImageId = new Guid?(binaryObject3.Id);
                            flag = true;
                        }
                        binaryObject  = null;
                        binaryObject1 = null;
                        binaryObject2 = null;
                        binaryObject3 = null;
                        item          = null;
                    }
                }
                if (model.ClearHeaderImageId.HasValue && model.ClearHeaderImageId.Value)
                {
                    headerImageId = model.HeaderImageId;
                    if (headerImageId.HasValue)
                    {
                        IBinaryObjectManager binaryObjectManager4 = this._binaryObjectManager;
                        headerImageId = tenantLogos.HeaderImageId;
                        await binaryObjectManager4.DeleteAsync(headerImageId.Value);

                        headerImageId             = null;
                        tenantLogos.HeaderImageId = headerImageId;
                        flag = true;
                    }
                }
                if (model.ClearHeaderMobileImageId.HasValue && model.ClearHeaderMobileImageId.Value)
                {
                    headerImageId = model.HeaderMobileImageId;
                    if (headerImageId.HasValue)
                    {
                        IBinaryObjectManager binaryObjectManager5 = this._binaryObjectManager;
                        headerImageId = tenantLogos.HeaderMobileImageId;
                        await binaryObjectManager5.DeleteAsync(headerImageId.Value);

                        headerImageId = null;
                        tenantLogos.HeaderMobileImageId = headerImageId;
                        flag = true;
                    }
                }
                if (model.ClearMailImageId.HasValue && model.ClearMailImageId.Value)
                {
                    headerImageId = model.MailImageId;
                    if (headerImageId.HasValue)
                    {
                        IBinaryObjectManager binaryObjectManager6 = this._binaryObjectManager;
                        headerImageId = tenantLogos.MailImageId;
                        await binaryObjectManager6.DeleteAsync(headerImageId.Value);

                        headerImageId           = null;
                        tenantLogos.MailImageId = headerImageId;
                        flag = true;
                    }
                }
                if (model.ClearInvoiceImageId.HasValue && model.ClearInvoiceImageId.Value)
                {
                    headerImageId = model.InvoiceImageId;
                    if (headerImageId.HasValue)
                    {
                        IBinaryObjectManager binaryObjectManager7 = this._binaryObjectManager;
                        headerImageId = tenantLogos.InvoiceImageId;
                        await binaryObjectManager7.DeleteAsync(headerImageId.Value);

                        headerImageId = null;
                        tenantLogos.InvoiceImageId = headerImageId;
                        flag = true;
                    }
                }
                if (flag)
                {
                    await this._tenantSettingsAppService.UpdateTenantLogos(tenantLogos);
                }
                jsonResult = this.Json(new MvcAjaxResponse());
            }
            catch (UserFriendlyException userFriendlyException1)
            {
                UserFriendlyException userFriendlyException = userFriendlyException1;
                jsonResult = this.Json(new MvcAjaxResponse(new ErrorInfo(userFriendlyException.Message), false));
            }
            return(jsonResult);
        }