Ejemplo n.º 1
0
 public ActionResult Create(PaymentViewModel item)
 {
     try
     {
         return RedirectToAction("Index");
     }
     catch
     {
         return View();
     }
 }
Ejemplo n.º 2
0
        private void GeneratePayment(int orderId)
        {
            if (orderId > 1)
            {
                var newPayment = new PaymentViewModel()
                {
                    OrderId = orderId,

                    // CommissionId = 1,
                    DtCreated = DateTime.UtcNow,
                    DtUpdated = DateTime.UtcNow,
                    DiscountAllowed = 10
                };
                db.Payments.Add(newPayment);
                db.SaveChanges();
            }
        }