Esempio n. 1
0
        public Views.userSign gethenchman(Model.users row)
        {
            Views.userSign model = new Views.userSign();
            if (row != null)
            {
                model.id = row.id;

                if (row.name != null)
                {
                    model.name = row.name;
                }
                if (row.sex != null)
                {
                    model.sex = row.sex;
                }
                if (row.type != null)
                {
                    model.type = row.type;
                }
                if (row.url != null)
                {
                    model.url = row.url;
                }
                if (row.skill != null)
                {
                    model.skill = row.skill;
                }
            }
            return(model);
        }
Esempio n. 2
0
        public List <Views.userSign> getFollowbyid(string id)
        {
            List <Views.userSign> signList = new List <Views.userSign>();

            Cook.DAL.follow_          follow     = new Cook.DAL.follow_();
            Cook.DAL.users            user       = new DAL.users();
            List <Cook.Model.follow_> followList = DataTableToList(follow.GetList("", "", id));

            foreach (Cook.Model.follow_ item in followList)
            {
                Views.userSign sign = follow.getFollow(user.GetModel(item.id.ToString()));
                sign.time = item.time;
                signList.Add(sign);
            }
            return(signList);
        }
Esempio n. 3
0
        public List <Views.userSign> gethenchmanbyid(string id)
        {
            List <Views.userSign> signList = new List <Views.userSign>();

            Cook.DAL.henchman_          hen        = new Cook.DAL.henchman_();
            Cook.DAL.users              user       = new DAL.users();
            List <Cook.Model.henchman_> followList = DataTableToList(hen.GetList("", "", id));

            foreach (Cook.Model.henchman_ item in followList)
            {
                Views.userSign sign = hen.gethenchman(user.GetModel(item.id.ToString()));
                sign.time = item.time;
                signList.Add(sign);
            }
            return(signList);
        }