Esempio n. 1
0
 //赋值整个list
 private List<GoodInfoForList> initGoodInfoList(List<Model.hp_campaign> list)
 {
     GoodInfoForList goodinfo;
     List<GoodInfoForList> newlist = new List<GoodInfoForList>();
     for (int i = 0; i < list.Count(); i++)
     {
         goodinfo = new GoodInfoForList(list[i]);
         newlist.Add(goodinfo);
     }
     return newlist;
 }
Esempio n. 2
0
        private List<object> initGoodList(List<Model.hp_goodinfo> list)
        {
            //List<GoodInfoForList> newlist=new List<GoodInfoForList> ();
            List<object> newlist = new List<object>();
            object m = null;
            foreach (var model in list)
            {
                if (model.classid == StringHelper.CLS_HPARTY)
                {
                    m = new GoodInfoForList(model);
                }
                else if (model.classid == StringHelper.CLS_CAMPAIGN)
                {
                    m = "这里是活动";
                }
                    newlist.Add(m);

            }
            return newlist;
        }
Esempio n. 3
0
 private List<GoodInfoForList> initGoodInfoList(List<Model.hp_goodinfo> list)
 {
     List<GoodInfoForList> newlist = new List<GoodInfoForList>();
     foreach (var model in list)
     {
         GoodInfoForList info = new GoodInfoForList(model);
         newlist.Add(info);
     }
     return newlist;
 }
Esempio n. 4
0
 //1.FavoriteManager那里调用
 public GoodInfoForList GetItemFromHparty(int goodid, int count_id)
 {
     var model = entity.hp_hparty.First(o => o.goodid == goodid);
     GoodInfoForList goodinfo = null;
     goodinfo = new GoodInfoForList(model);
     goodinfo.state = StringHelper.FAVORITED;//查询出来的就是已收藏的,历史遗留问题。交给时间去解决吧
     return goodinfo;
 }