コード例 #1
0
        public async Task <AppResponse <bool> > EditSurgeryProcedureAsync(long id, EditSurgeryProcedureInput input)
        {
            bool isSurgeryExist = await _systemtLookupsManager.IsSurgeryProcedureExistAsync(input.Name);

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

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

            return(Ok(response));
        }