Example #1
0
        public IHttpActionResult Put(WebPayment webPayment)
        {
            string response = crudFuction.BizUpdatePayment(webPayment.WebPaymentToBizPayment());

            if (!response.Equals("EXITO"))
            {
                return(BadRequest(response));
            }
            else
            {
                return(Ok(response));
            }
        }
Example #2
0
        /// <summary>
        /// Bizs the payment to web payment.
        /// </summary>
        /// <param name="DataPayment">The data payment.</param>
        /// <returns>WebPayment.</returns>
        public static WebPayment BizPaymentToWebPayment(this BizPayment DataPayment)
        {
            WebPayment webPayment = new WebPayment
            {
                Id            = DataPayment.Id,
                UserId        = DataPayment.UserId,
                PaymentStatus = DataPayment.PaymentStatus,
                Nombre        = DataPayment.Nombre,
                Amount        = DataPayment.Amount,
                StatusName    = DataPayment.StatusName,
                PaymentDate   = DataPayment.PaymentDate,
            };

            return(webPayment);
        }
Example #3
0
        /// <summary>
        /// Webs the payment to biz payment.
        /// </summary>
        /// <param name="DataPayment">The data payment.</param>
        /// <returns>BizPayment.</returns>
        public static BizPayment WebPaymentToBizPayment(this WebPayment DataPayment)
        {
            BizPayment bizPayment = new BizPayment
            {
                Id            = DataPayment.Id,
                UserId        = DataPayment.UserId,
                PaymentStatus = DataPayment.PaymentStatus,
                Nombre        = DataPayment.Nombre,
                Amount        = DataPayment.Amount,
                StatusName    = DataPayment.StatusName,
                PaymentDate   = DataPayment.PaymentDate,
            };

            return(bizPayment);
        }
Example #4
0
 public PaymentTransactionRepository()
 {
     _db = new WebPayment();
 }
Example #5
0
 public TrainController(WebPayment db)
 {
     _db = db;
 }