Пример #1
0
        public List <HomeList> SetDefaultHomeList(string uid, int homegroup)
        {
            List <HomeList> listshome = new List <HomeList>();

            for (int i = 0; i < homegroup; i++)
            {
                HomeList newlist = new HomeList();
                listshome.Add(newlist);
            }
            return(SetDefaultHome(uid, listshome));
        }
Пример #2
0
        public HomeList SetGropHome(int count)
        {
            HomeList homelist = new HomeList();

            for (int i = 0; i < count; i++)
            {
                HomeInfo newhome = new HomeInfo();
                homelist.Blocks.Add(newhome);
            }

            return(homelist);
        }
Пример #3
0
        public List <HomeList> GetHomeWhereWithBlock(string strwhere)
        {
            List <HomeList> dals = new List <HomeList>();
            string          sql  = "select * from Ananas_Home where " + strwhere;
            SqlDataReader   data = SqlServerDBHelper.GetReader(sql);

            while (data.Read())
            {
                HomeList dal = new HomeList()
                {
                    ID         = data["ID"].ToString(),
                    UID        = data["UID"].ToString(),
                    Type       = data["Type"].ToString(),
                    Order      = data["Order"].ToString(),
                    GroupClass = data["Value"].ToString(),
                    Blocks     = this.GetHomeWhere("GroupID ='" + data["ID"].ToString() + "'").OrderBy(d => d.Order).ToList()
                };

                dals.Add(dal);
            }
            return(dals);
        }