public async Task<DocumentProperty> SetProperties(IDocumentDataService documentDataService, string languageCode)
        {
            var documentTypeId = await documentDataService.GetDocumentTypeIdByCode(Constants.DocumentType.Book);
            var languageId = await documentDataService.GetLanguageIdByCode(languageCode);
            var property = new DocumentProperty()
            {
                CanBeLent = true,
                MaxDaysRent = Constants.BooksPropertyForLoan.LoanDays,
                TypeId = documentTypeId,
                FinePrice = Constants.BooksPropertyForLoan.FineValue,
                LanguageId = languageId,
                CreateUser = Constants.DefaultUser,
                CreateDate = DateTime.Now
            };

            return await documentDataService.AddDocumentProperties(property);
        }
Exemple #2
0
        public async Task <DocumentProperty> SetProperties(IDocumentDataService documentDataService, string languageCode)
        {
            var documentTypeId = await documentDataService.GetDocumentTypeIdByCode(Constants.DocumentType.Book);

            var languageId = await documentDataService.GetLanguageIdByCode(languageCode);

            var property = new DocumentProperty()
            {
                CanBeLent   = true,
                MaxDaysRent = Constants.BooksPropertyForLoan.LoanDays,
                TypeId      = documentTypeId,
                FinePrice   = Constants.BooksPropertyForLoan.FineValue,
                LanguageId  = languageId,
                CreateUser  = Constants.DefaultUser,
                CreateDate  = DateTime.Now
            };

            return(await documentDataService.AddDocumentProperties(property));
        }
Exemple #3
0
 public DocumentBusinessService(IDocumentDataService documentDataService, IMapper mapper, IProductDataService productDataService)
 {
     _documentDataService = documentDataService;
     _mapper             = mapper;
     _productDataService = productDataService;
 }
Exemple #4
0
 public DocumentsBusinessService(IMapper mapper, IDocumentDataService documentDataService)
 {
     _mapper = mapper;
     _documentDataService = documentDataService;
 }
Exemple #5
0
 public DocumentService(IDocumentDataService dataService, IUserService userService)
 {
     this._dataService = dataService;
     this._userService = userService;
 }
Exemple #6
0
 public DocumentService(IDocumentDataService documentDataService)
 {
     this._documentDataService = documentDataService;
 }
 public DocumentService(IDocumentDataService documentDataService)
 {
     this._documentDataService = documentDataService;
 }