Exemple #1
0
        public ActionResult Index(string act, string cont, int categid = 2, int pageNum = 0)
        {
            ViewBag.MenuItem      = "good";
            ViewBag.MenuId        = categid;
            ViewBag.ProductDetail = false;
            GoodList goodlist   = new GoodList();
            var      countitems = repo.GetCountItems(categid);

            goodlist.CategId   = categid;
            goodlist.CategName = db.Categs.Find(categid).txt;
            goodlist.PageInfo  = new PageInfo {
                pageNum = pageNum, itemsCount = countitems, pageSize = pagesize, vsblPagesCount = vsblpagescount
            };
            goodlist.Products = repo.GetSkipTake(pageNum * pagesize, pagesize, categid).ToList();
            if (act != null)
            {
                goodlist.Action     = act;
                goodlist.Controller = cont;
                Session["gl"]       = goodlist;
            }
            else
            {
                GoodList gl = (GoodList)Session["gl"];
                goodlist.Action     = gl.Action;
                goodlist.Controller = gl.Controller;
            }
            return(View(goodlist));
        }
Exemple #2
0
 void Awake()
 {
     instance = this;
     //引导页调用
     DownloadProp.Instance.AutoCheckUpdateLocalComponent();
     //引导页调用
     DownloadProp.Instance.UpdatePreview();
     rect = transform.GetComponent <ScrollRect>();
 }
Exemple #3
0
 public void DoRestartRollCall()
 {
     if (!_firegroundEnabled)
     {
         DoClearAll();
         return;
     }
     RollCallItem[] callList = GoodList.ToArray();
     foreach (RollCallItem rci in callList)
     {
         AddToWaitingList(rci);
     }
 }
Exemple #4
0
        public List <Good> SelectGoodByCategory(int categoryId)
        {
            var reference = SelectReferenceByCategoryId(categoryId);
            var goods     = new List <Good>();

            foreach (var item in reference.ToList())
            {
                var good = GoodList.Single(x => x.Id == item.GoodId);
                if (!goods.Contains(good))
                {
                    goods.Add(good);
                }
            }
            return(goods);
        }
Exemple #5
0
 public bool GoodExist(int goodId)
 {
     return(GoodList.Exists(x => x.Id == goodId));
 }
Exemple #6
0
 public void RemoveGood(int goodId)
 {
     GoodList.Remove(GoodList.Find(x => x.Id == goodId));
 }
Exemple #7
0
 public void AddGood(Good good)
 {
     GoodList.Add(good);
 }
Exemple #8
0
 public void RemoveGood(Good good)
 {
     GoodList.Remove(good);
 }