Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="ListOpenID"></param>
        /// <param name="GroupID"></param>
        /// <returns></returns>
        public ActionResult ChangeGroup(string ListOpenID, string GroupID)
        {
            WeChatOrgService pService = new WeChatOrgService();

            pService.ChangeWXGroup(ListOpenID, GroupID);
            EGExceptionResult pResult = pService.GetActionResult();

            if (pResult == null)
            {
                pResult = new EGExceptionResult(true, "创建成功", ((int)EGActionCode.执行成功).ToString());
            }
            return(Json(pResult));
        }
Beispiel #2
0
        public ActionResult GetWXGroups()
        {
            //从缓存中换取微信分组信息集合
            WeChatOrgService pOrgService = new WeChatOrgService();
            //pOrgService.ReLoadAllWeChatGroup();
            List <GroupsJson_Group> pList   = pOrgService.GetWCGroupList_Cache();
            EGExceptionResult       pResult = pOrgService.GetActionResult();

            if (pResult != null)
            {
                return(new EmptyResult());
            }
            return(Json(pList));
        }
Beispiel #3
0
        public ActionResult CreateWXGroup(string groupname)
        {
            //服务
            WeChatOrgService pOrgService = new WeChatOrgService();
            //新建微信分组,保存数据库,但不获取新集合
            List <GroupsJson_Group> pList   = pOrgService.CreateWXGroupAndLoad(groupname);
            EGExceptionResult       pResult = pOrgService.GetActionResult();

            if (pResult != null)
            {
                return(Json(pResult));
            }
            return(Json(pList));
        }
Beispiel #4
0
        public ActionResult QueryUserTable(int PageIndex = 1, int RowCountInPage = 10, string filterString = "")
        {
            int iRecCount = -1;
            //获取微信用户集合
            WeChatOrgService  pOrgService = new WeChatOrgService();
            List <WeChatUser> pList       = pOrgService.QueryWCUserList_Cache(PageIndex, RowCountInPage, filterString, ref iRecCount);
            EGExceptionResult pResult     = pOrgService.GetActionResult();

            if (pResult != null)
            {
                return(Json(pResult));
            }
            //生成结果json,包含目标条件所有记录数,及经过分页后记录集合
            var param = new { RecordsCount = iRecCount, Users = pList };

            return(Json(param));
        }
Beispiel #5
0
        public ActionResult ReLoadWXUser()
        {
            //获取基础服务接口、微信端服务接口、本地端服务接口
            WeChatOrgService pOrgService = new WeChatOrgService();

            //重新从微信端获取微信用户数据并保存在数据库
            pOrgService.ReLoadAllWeChatUser();
            List <GroupsJson_Group> pGroups = pOrgService.ReLoadAllWeChatGroup();
            EGExceptionResult       pResult = pOrgService.GetActionResult();

            if (pResult != null)
            {
                return(Json(pResult));
            }
            pResult = new EGExceptionResult(true, "", "");
            //返回视图
            return(Json(pResult));
        }