示例#1
0
        public int getTableTotal(string id)
        {
            int status = 0;
            SelTableInfoModel    info1 = new SelTableInfoModel();
            List <SelTableCount> data  = info1.SelTableInfo(id);

            if (data.Count > 0)
            {
                // ViewBag.total = data;
                if (data.First().total > 0)
                {
                    status = 1;
                }
            }
            return(status);
        }
示例#2
0
        //
        // GET: /SelTableInfo/

        public ActionResult SelTableInfo(string SourceAccountId, string RestaurantId, string Status = null, string type = null)
        {
            ViewBag.SourceAccountId = SourceAccountId;
            ViewBag.RestaurantId    = RestaurantId;
            ViewBag.Status          = Status;
            ViewBag.Type            = type;
            List <SelTableInfo> p = null;
            // object obj = System.Web.HttpRuntime.Cache.Get("RestaurantId" + RestaurantId);
            // if (obj != null)
            // {
            //   p = obj as List<SelTableInfo>;
            //}
            //if (p == null)
            //{
            SelTableInfoModel info = new SelTableInfoModel();

            p = info.getTableInfo(RestaurantId);
            //  System.Web.HttpRuntime.Cache.Add("RestaurantId" + RestaurantId, p, null, DateTime.Now.AddHours(2),
            // TimeSpan.Zero, CacheItemPriority.Normal, null);
            //}
            return(View(p));
        }