示例#1
0
        public ActionResult GetProductToDay()
        {
            //TODO: get category chinh sach dai ly
            var todayCode = DateTime.Today.AddDays(1).TotalSeconds();
            var result    = GetProducts(todayCode);

            var     cate     = result;
            decimal quantity = 0;

            if (cate != null)
            {
                // lay so luong dat nhieu nhat
                var maxProductWeight = cate.Products.OrderByDescending(m => m.Weight / m.WeightRecipe).FirstOrDefault();
                if (maxProductWeight != null)
                {
                    quantity = Math.Round(Math.Ceiling(maxProductWeight.Weight * 10 / maxProductWeight.WeightRecipe) / 10, 2);
                }
            }
            var storageWareHouseDA = new StorageWareHouseDA();
            var order = storageWareHouseDA.GetStorageWarehousingItem(todayCode, AgencyId);

            return(Json(new { Quantity = quantity, Data = result, Status = order?.Status }));
        }
示例#2
0
        public ActionResult DetailOrder(int orderId)
        {
            var item = _da.GetStorageWarehousingItem(orderId);

            return(View(item));
        }
        public ActionResult GetStorageWarehousingItem(string key, int id)
        {
            var obj = key != Keyapi ? new StorageWarehousingItem() : _da.GetStorageWarehousingItem(id);

            return(Json(obj, JsonRequestBehavior.AllowGet));
        }