public async Task <AppResponse <bool> > EditAccountTypeAsync(long id, EditAccountTypeInput input)
        {
            bool isSurgeryExist = await _systemtLookupsManager.IsAccountTypeExistAsync(input.Name);

            if (isSurgeryExist)
            {
                return new AppResponse <bool>
                       {
                           IsSuccessful      = false,
                           StatusCode        = StatusCodes.ENTITY_ALREADY_EXIST,
                           StatusDescription = string.Format(L("NameExist"), L("AccountType"))
                       }
            }
            ;

            return(new AppResponse <bool>
            {
                Data = await _systemtLookupsManager.EditAccountTypeAsync(id, input),
                IsSuccessful = true,
                StatusCode = StatusCodes.SUCCESS,
                StatusDescription = L("Updated")
            });
        }
示例#2
0
        public async Task <IActionResult> EditAccountTypeAsync(long id, [FromBody] EditAccountTypeInput input)
        {
            AppResponse <bool> response = await _systemLookupsService.EditAccountTypeAsync(id, input);

            return(Ok(response));
        }