예제 #1
0
 public JsonResult OrderNotification(OrderNotificationModel model)
 {
     if (string.IsNullOrEmpty(model.OrderId) == false)
     {
         var guid  = new Guid(model.OrderId);
         var order = context.Orders.FirstOrDefault(x => x.Id == guid);
         if (order != null)
         {
             order.Description = model.OrderDescription;
             context.SaveChanges();
         }
     }
     return(Json(""));
 }
예제 #2
0
        public JsonResult OrderNotification(OrderNotificationModel model)
        {
            if (string.IsNullOrEmpty(model.OrderId) == false)
            {
                int id    = int.Parse(model.OrderId);
                var order = context.Orders.FirstOrDefault(x => x.Id == id);
                if (order != null)
                {
                    order.Description = model.OrderDescription;
                    order.Status      = "OB";
                    context.SaveChanges();
                }
            }

            return(Json(""));
        }