Exemplo n.º 1
0
        public virtual void DisbandGroups(HttpContext context)
        {
            YZRequest  request  = new YZRequest(context);
            JObject    post     = request.GetPostData <JObject>();
            List <int> groupids = post["groupids"].ToObject <List <int> >();

            using (IYZDbProvider provider = YZDbProviderManager.DefaultProvider)
            {
                using (IDbConnection cn = provider.OpenConnection())
                {
                    foreach (int groupid in groupids)
                    {
                        GroupManager.DisbandGroup(provider, cn, groupid);
                    }
                }
            }
        }