public virtual void ExitGroup(HttpContext context) { YZRequest request = new YZRequest(context); int groupid = request.GetInt32("groupid"); using (IYZDbProvider provider = YZDbProviderManager.DefaultProvider) { using (IDbConnection cn = provider.OpenConnection()) { GroupManager.DeleteGroupMember(provider, cn, groupid, YZAuthHelper.LoginUserAccount); } } }
public virtual void DeleteGroupMembers(HttpContext context) { YZRequest request = new YZRequest(context); int groupid = request.GetInt32("groupid"); JArray jPost = request.GetPostData <JArray>(); BPMObjectNameCollection uids = jPost.ToObject <BPMObjectNameCollection>(); using (IYZDbProvider provider = YZDbProviderManager.DefaultProvider) { using (IDbConnection cn = provider.OpenConnection()) { foreach (string uid in uids) { GroupManager.DeleteGroupMember(provider, cn, groupid, uid); } } } }