Ejemplo n.º 1
0
        public async Task <ActionResult> Create(CreateRevenueSourcesInput input)
        {
            if (ModelState.IsValid)
            {
                await _revenueSourceAppService.CreateRevenueResource(input);

                return(RedirectToAction("Index"));
            }
            else
            {
                return(View(input));
            }
        }
Ejemplo n.º 2
0
        public async Task CreateRevenueResource(CreateRevenueSourcesInput input)
        {
            var Exist = _revenueResourceRepository.FirstOrDefault(p => p.Description == input.Description);

            if (Exist == null)
            {
                var resource = new RevenueSource {
                    Code        = input.Code,
                    Description = input.Description
                };
                await _revenueResourceRepository.InsertAsync(resource);
            }
            else
            {
                throw new UserFriendlyException("There is already a Revenue Resource with given name");
            }
        }
Ejemplo n.º 3
0
 public Task CreateRevenueResource(CreateRevenueSourcesInput input)
 {
     throw new NotImplementedException();
 }