Exemple #1
0
 public IHttpActionResult PutNewBalance(Card card)
 {
     try
     {
         var mngr = new CardManager();
         mngr.UpdateBalance(card);
         apiResp = new ApiResponse
         {
             Message = "Se a ingresado nuevo saldo"
         };
         return(Ok(apiResp));
     }
     catch (BusinessException bex)
     {
         SystemParam sy  = new SystemParam();
         var         spm = new SystemParamManager();
         sy.IdSystemParam = 3;
         sy = spm.RetrieveById(sy);
         return(InternalServerError(new Exception(bex.ExceptionId + "-" + bex.AppMessage.Message + " " + sy.Value)));
     }
 }
        public IHttpActionResult RetrieveById(int pIdSystemParam)
        {
            try
            {
                var systemParam = new SystemParam
                {
                    IdSystemParam = pIdSystemParam
                };

                systemParam = mng.RetrieveById(systemParam);

                apiResp      = new ApiResponse();
                apiResp.Data = systemParam;

                return(Ok(apiResp));
            }
            catch (BusinessException bex)
            {
                return(InternalServerError(new Exception(bex.ExceptionId + "-" + bex.AppMessage.Message)));
            }
        }