public JsonResult AddClassGroupMember(string classId, string groupTitle, string accountIds)
        {
            try
            {
                var param_classId = Dianda.Common.QueryString.Decrypt(classId).ToInt();
                var gbll = new Class_GroupBLL();
                var gmbll = new Class_GroupMemberBLL();

                var groupNameCheck = new Class_GroupBLL().GetList(" Delflag=0 and ClassId=" + param_classId + " and Title='" + groupTitle.Trim() + "'", "");
                if (groupNameCheck != null && groupNameCheck.Count > 0)
                    return Json(new { Code = 0, Msg = "班级内存在此小组名称!" }, JsonRequestBehavior.AllowGet);
                var gModel = new Class_Group();
                gModel.ClassId = param_classId;
                gModel.CreateDate = DateTime.Now;
                gModel.Display = true;
                gModel.Delflag = false;
                gModel.Title = groupTitle;
                gbll.Add(gModel);

                var ids = accountIds.Split(',');
                foreach (var item in ids)
                {
                    if (!string.IsNullOrEmpty(item))
                    {
                        var gmModel = new Class_GroupMember();
                        gmModel.AccountId = item.ToInt();
                        gmModel.GroupId = gModel.Id;
                        gmModel.Delflag = false;
                        gmModel.CreateDate = DateTime.Now;
                        gmbll.Add(gmModel);
                    }
                }

                return Json(new { Code = 0, Msg = "提交成功" }, JsonRequestBehavior.AllowGet);
            }
            catch (Exception ex)
            {
                return Json(new { Code = -1, Msg = ex.Message }, JsonRequestBehavior.AllowGet);
            }
        }
 //删除班级小组成员
 public JsonResult DeleteClassGroupMember(string groupId, int accountId)
 {
     try
     {
         var bll = new Class_GroupMemberBLL();
         //var model = bll.GetModel(groupId.Split('|')[1].ToInt(), accountId);
         //model.Delflag = true;
         //bll.Update(model);
         bll.Delete(groupId.Split('|')[1].ToInt(), accountId);
         return Json(new { Code = 0, Msg = "提交成功" }, JsonRequestBehavior.AllowGet);
     }
     catch (Exception ex)
     {
         return Json(new { Code = -1, Msg = ex.Message }, JsonRequestBehavior.AllowGet);
     }
 }
        public JsonResult AddMemberToClassGroup(string groupId, string accountIds)
        {
            try
            {
                var gmbll = new Class_GroupMemberBLL();

                var ids = accountIds.Split(',');
                foreach (var item in ids)
                {
                    if (!string.IsNullOrEmpty(item))
                    {
                        var gmModel = new Class_GroupMember();
                        gmModel.AccountId = item.ToInt();
                        gmModel.GroupId = groupId.ToInt();
                        gmModel.Delflag = false;
                        gmModel.CreateDate = DateTime.Now;
                        gmbll.Add(gmModel);
                    }
                }

                return Json(new { Code = 0, Msg = "提交成功" }, JsonRequestBehavior.AllowGet);
            }
            catch (Exception ex)
            {
                return Json(new { Code = -1, Msg = ex.Message }, JsonRequestBehavior.AllowGet);
            }
        }
        //删除班级小组
        public JsonResult DeleteClassGroup(string classId, int groupId)
        {
            try
            {
                var param_classId = Dianda.Common.QueryString.Decrypt(classId).ToInt();
                var bll = new Class_GroupBLL();
                var model = bll.GetModel(groupId, " ClassId=" + param_classId);
                model.Delflag = true;
                bll.Update(model);

                var membll = new Class_GroupMemberBLL();
                var member = membll.GetListModel("GroupId=" + model.Id);
                foreach (var item in member)
                {
                    item.Delflag = true;
                    membll.Update(item);
                }

                return Json(new { Code = 0, Msg = "提交成功" }, JsonRequestBehavior.AllowGet);
            }
            catch (Exception ex)
            {
                return Json(new { Code = -1, Msg = ex.Message }, JsonRequestBehavior.AllowGet);
            }
        }