Beispiel #1
0
        public async Task CreateApplicationTypeAsync(CreateRefApplicationInput input)
        {
            var applicantType = new RefApplicantType
            {
                Name = input.Name,
                Code = input.Code
            };


            var valueExist = _refApplicantType.FirstOrDefault(p => p.Name == input.Name);

            if (valueExist == null)
            {
                await _refApplicantType.InsertAsync(applicantType);
            }
            else
            {
                throw new UserFriendlyException("There is already a Application Type with given name");
            }
        }
Beispiel #2
0
        public async Task <ActionResult> CreateApplicationType(CreateRefApplicationInput input)
        {
            await this.refApplicationTypeAppService.CreateApplicationTypeAsync(input);

            return(RedirectToAction("CreateApplicationType"));
        }