Ejemplo n.º 1
0
        public ActionResult GetOrderDetailByOrderNumber(string OrderNumber)
        {
            List <OrderDetailForRedisRF> lists = new List <OrderDetailForRedisRF>();

            try
            {
                if (RCommon.RedisOperation.Exists("Check:" + OrderNumber))
                {
                    lists = RCommon.RedisOperation.GetList <List <OrderDetailForRedisRF> >("Check:" + OrderNumber);
                }
                else
                {
                    var response = new OrderManagementService().GetOrderDetailListByOrderNumber(OrderNumber, Session["CustomerID"].ToString());
                    if (response.Count() > 0)
                    {
                        lists = response.ToList();
                        RCommon.RedisOperation.SetList("Check:" + OrderNumber, lists);
                    }
                }
            }
            catch (Exception ex)
            {
            }
            return(Json(lists, JsonRequestBehavior.AllowGet));
            //recModelList;
        }
Ejemplo n.º 2
0
        public ActionResult GetOrderDetail2(string OrderNumber)
        {
            IEnumerable <OrderDetailInfo> orderModelList;

            orderModelList = new OrderManagementService().GetOrderDetailList2(OrderNumber, Session["CustomerID"].ToString(), Session["WareHouseName"].ToString());
            return(Json(orderModelList.ToList(), JsonRequestBehavior.AllowGet));
            //recModelList;
        }
Ejemplo n.º 3
0
 public ActionResult Index(string CustomerID, string WareHouseName, string WareHouseID, string OrderNumber)
 {
     if (Session[Constants.USER_INFO_KEY] == null || CustomerID == null || WareHouseName == null)
     {
         return(RedirectToAction("", "login"));
     }
     Session["CustomerID"]    = CustomerID;
     Session["WareHouseName"] = WareHouseName;
     Session["WareHouseIDs"]  = WareHouseID;
     ViewBag.OrderNumber      = OrderNumber;
     ViewBag.CustomerID       = Session["CustomerID"];
     ViewBag.WareHouseName    = Session["WareHouseName"];
     ViewBag.WareHouseID      = Session["WareHouseIDs"];
     if (!RCommon.RedisOperation.Exists(OrderNumber))
     {
         List <OrderDetailForRedisRF> orderDetails = new List <OrderDetailForRedisRF>();
         var response = new OrderManagementService().GetOrderDetailList(OrderNumber, CustomerID, WareHouseName);
         orderDetails = response.ToList();
         RCommon.RedisOperation.SetList(OrderNumber, orderDetails);
     }
     return(View());
 }