예제 #1
0
 public JsonResult CustomerOrderUpdate(ENCustomerOrder order)
 {
     try
     {
         order.Save();
         return(Json(new { Result = "OK" }));
     }
     catch (Exception ex)
     {
         return(Json(new { Result = "ERROR", Message = ex.Message }));
     }
 }
예제 #2
0
 public JsonResult CustomerOrderList()
 {
     try
     {
         var reader = new ENCustomerOrder();
         var list   = reader.ReadAll();
         return(Json(new { Result = "OK", Records = list, TotalRecordCount = list.Count }));
     }
     catch (Exception ex)
     {
         return(Json(new { Result = "ERROR", Message = ex.Message }));
     }
 }
예제 #3
0
        public ActionResult Checkout()
        {
            var cart  = ShoppingCart.Instance;
            var order = new ENCustomerOrder();

            order.DataOrder  = DateTime.Now;
            order.CustomerId = 1;//TODO: Get Customer from Session
            foreach (var item in cart.Items)
            {
                order.AddLine(item.Book, item.Quantity);
            }
            try
            {
                order.Save();
                cart.Items.Clear();
            }
            catch (Exception ex)
            {
            }
            return(View("Cart", ShoppingCart.Instance));
        }
예제 #4
0
파일: Admin.cs 프로젝트: rlm33/svn
 //PEDIDOS CLIENTES
 private void buttonMostrarPedidosPadres_Click(object sender, EventArgs e)
 {
     ENCustomerOrder customerorder = new ENCustomerOrder();
     // List<ENCustomerOrder> list = customerorder.
 }