public async Task <AppResponse <long> > CreateAccountSubTypeAsync(CreateAccountSubTypeInput input)
        {
            bool isSurgeryExist = await _systemtLookupsManager.IsAccountSubTypeExistAsync(input.Name);

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

            long id = await _systemtLookupsManager.CreateAccountSubTypeAsync(input);

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

            return(Ok(response));
        }