예제 #1
0
 public ActionResult GetLocalNum()
 {
     string storageNum = this.DefaultStore;
     string productNum = WebUtil.GetFormValue<string>("productNum", string.Empty);
     LocalProductProvider provider = new LocalProductProvider();
     double sum = provider.GetLocalNum(storageNum, productNum);
     this.ReturnJson.AddProperty("Sum", sum);
     return Content(this.ReturnJson.ToString());
 }
예제 #2
0
 public ActionResult GetOrderDetail()
 {
     string orderNum = WebUtil.GetFormValue<string>("orderNum", string.Empty);
     Bill<OrdersEntity, OrderDetailEntity> bill = new OrderBill();
     if (!orderNum.IsEmpty())
     {
         OrderDetailEntity detail = new OrderDetailEntity();
         detail.OrderNum = orderNum;
         List<OrderDetailEntity> listResult = bill.GetOrderDetail(detail);
         if (!listResult.IsNullOrEmpty())
         {
             listResult.Remove(a => a.Num == 0);
             LocalProductProvider provider = new LocalProductProvider();
             string storageNum = this.DefaultStore;
             foreach (OrderDetailEntity item in listResult)
             {
                 item.LocalNum = provider.GetLocalNum(storageNum, item.ProductNum);
             }
             string json = ConvertJson.ListToJson<OrderDetailEntity>(listResult, "List");
             JsonObject jsonObject = new JsonObject(json);
             this.ReturnJson.AddProperty("Data", jsonObject);
         }
     }
     return Content(this.ReturnJson.ToString());
 }