public async Task <AppResponse <long> > CreateAccountTypeAsync(CreateAccountTypeInput input)
        {
            bool isSurgeryExist = await _systemtLookupsManager.IsAccountTypeExistAsync(input.Name);

            if (isSurgeryExist)
            {
                return new AppResponse <long>
                       {
                           IsSuccessful      = false,
                           StatusCode        = StatusCodes.ENTITY_ALREADY_EXIST,
                           StatusDescription = L("AccountTypeExist")
                       }
            }
            ;

            long id = await _systemtLookupsManager.CreatAccountTypeAsync(input);

            return(new AppResponse <long>
            {
                Data = id,
                IsSuccessful = true,
                StatusCode = StatusCodes.SUCCESS,
                StatusDescription = L("Created")
            });
        }
Пример #2
0
        public async Task <IActionResult> CreateAccountTypeAsync([FromBody] CreateAccountTypeInput input)
        {
            AppResponse <long> response = await _systemLookupsService.CreateAccountTypeAsync(input);

            return(Ok(response));
        }