} // IsExistById /* * public IsExistByGuidResponse IsExistByGuid(IsExistByGuidRequest request) * { * * IsExistByGuidResponse response = new IsExistByGuidResponse(); * * try * { * * if (new UserCap().IsExistByGuid(request.Guid)) * response.Result = new Ac4yProcessResult() { Code = Ac4yProcessResult.SUCCESS }; * else * response.Result = new Ac4yProcessResult() { Code = Ac4yProcessResult.INEFFECTIVE }; * * } * catch (Exception exception) * { * response.Result = (new Ac4yProcessResult() { Code = Ac4yProcessResult.FAIL, Message = exception.Message, Description = exception.StackTrace }); * } * * return response; * * } // IsExistByGuid */ public UpdateByIdResponse UpdateById(UpdateByIdRequest request) { UpdateByIdResponse response = new UpdateByIdResponse(); try { if (new UserCap().IsExistById(request.Id)) { User responseUser = new UserCap().UpdateById(request.Id, request.User); response.Result = new Ac4yProcessResult() { Code = Ac4yProcessResult.SUCCESS }; response.User = responseUser; } else { response.Result = new Ac4yProcessResult() { Code = Ac4yProcessResult.FAIL, Message = "Adott id-val nem létezik rekord." }; } } catch (Exception exception) { response.Result = (new Ac4yProcessResult() { Code = Ac4yProcessResult.FAIL, Message = exception.Message, Description = exception.StackTrace }); } return(response); } // UpdateById
} // UpdateById /* * public UpdateByGuidResponse UpdateByGuid(UpdateByGuidRequest request) * { * * UpdateByGuidResponse response = new UpdateByGuidResponse(); * * try * { * if (new UserCap().IsExistByGuid(request.Guid)) { * * new UserCap().UpdateByGuid(request.Guid, request.User); * * response.Result = new Ac4yProcessResult() { Code = Ac4yProcessResult.SUCCESS }; * } * else * { * response.Result = new Ac4yProcessResult() { Code = Ac4yProcessResult.FAIL, Message = "Adott id-val nem létezik rekord." }; * } * * } * catch (Exception exception) * { * response.Result = (new Ac4yProcessResult() { Code = Ac4yProcessResult.FAIL, Message = exception.Message, Description = exception.StackTrace }); * } * * return response; * * } // UpdateByGuid */ public InsertResponse Insert(InsertRequest request) { InsertResponse response = new InsertResponse(); try { User responseUser = new UserCap().Insert(request.User); response.Result = new Ac4yProcessResult() { Code = Ac4yProcessResult.SUCCESS }; response.User = responseUser; } catch (Exception exception) { response.Result = (new Ac4yProcessResult() { Code = Ac4yProcessResult.FAIL, Message = exception.Message, Description = exception.StackTrace }); } return(response); } // Insert