Exemplo n.º 1
0
        public async Task <bool> updateComapnyLogo(ComapnyLogoDto companyLogoDto)
        {
            try
            {
                var oCompany = await _Comapnies.SingleOrDefaultAsync(r => r.id == companyLogoDto.id);

                oCompany.logo     = companyLogoDto.logo;
                oCompany.logoMime = companyLogoDto.mime;
                await _uow.SaveChangesAsync();

                return(true);
            }
            catch
            {
                return(false);
            }
        }
Exemplo n.º 2
0
        public async Task <HttpResponseMessage> UpdateCompanyLogo(ComapnyLogoDto companyLogoDto)
        {
            // var oResultDto = new ResultDto();
            companyLogoDto.id = Setting.payloadDto.companyId;
            bool blnUpdateLogo = await _AccountingService.updateComapnyLogo(companyLogoDto);

            if (blnUpdateLogo)
            {
                return(new HttpResponseMessage(HttpStatusCode.OK));
            }
            // oResultDto.resultCode = "200";
            else
            {
                return(new HttpResponseMessage(HttpStatusCode.NotModified));
            }
            // oResultDto.resultCode = "404";
        }