Example #1
0
        private List <GroupEntity> GetGroupEntityList(string formatString)
        {
            AnalysisStr        analy = new AnalysisStr(formatString);
            List <GroupEntity> list  = new List <GroupEntity>();
            int paraIndex            = 0;

            while (analy.GetParaIndexOf(paraIndex) != null)
            {
                GroupEntity entityTemp = new GroupEntity();
                entityTemp.EntityID         = int.Parse(analy.GetParaIndexOf(paraIndex++));
                entityTemp.EntityGroupID    = int.Parse(analy.GetParaIndexOf(paraIndex++));
                entityTemp.EntityMemID      = analy.GetParaIndexOf(paraIndex++);
                entityTemp.EntityConfirm    = int.Parse(analy.GetParaIndexOf(paraIndex++)) == 1 ? true : false;
                entityTemp.EntityCreateDate = DateTime.Parse(analy.GetParaIndexOf(paraIndex++));

                list.Add(entityTemp);
            }

            return(list);
        }
Example #2
0
        //根据群组ID返回该群的所有加入请求
        public List <GroupEntity> JoinGroupRequests(int groupID)
        {
            DBConnection       dbc  = new DBConnection();
            List <GroupEntity> list = new List <GroupEntity>();

            dbc.GetConnection();
            string cmdText = "select * from younger_entity_info where entity_groupid=" + groupID + "&&entity_confirm=0";

            dbc.GetDataReader(cmdText);
            while (dbc.dataReader.Read())
            {
                GroupEntity entityTemp = new GroupEntity();
                entityTemp.EntityID         = dbc.dataReader.GetInt16(0);
                entityTemp.EntityGroupID    = dbc.dataReader.GetInt16(1);
                entityTemp.EntityMemID      = dbc.dataReader.GetString(2);
                entityTemp.EntityConfirm    = dbc.dataReader.GetInt16(3) == 1 ? true : false;
                entityTemp.EntityCreateDate = dbc.dataReader.GetDateTime(4);
                list.Add(entityTemp);
            }

            return(list);
        }