/// <summary>
        /// 根据活动ID获取活动
        /// </summary>
        /// <param name="activityid"></param>
        /// <returns></returns>
        public static ActivityEntity GetActivityByID(string activityid, string agentid, string clientid)
        {
            ActivityEntity model = new ActivityEntity();
            DataTable dt = ActivityDAL.BaseProvider.GetActivityByID(activityid, agentid, clientid);
            if (dt.Rows.Count > 0)
            {
                model.FillData(dt.Rows[0]);

                model.Owner= OrganizationBusiness.GetUserByUserID(model.OwnerID,model.AgentID);
                model.Members = new List<Users>();
                foreach (var id in model.MemberID.Split('|')) {
                    model.Members.Add(OrganizationBusiness.GetUserByUserID(id, model.AgentID));
                }

            }
            return model;
        }
        /// <summary>
        /// 获取活动列表
        /// </summary>
        /// <param name="userid">负责人</param>
        /// <param name="status">状态</param>
        /// <param name="filterType">过滤类型 0:所有;1:我负责的;2:我参与的</param>
        /// <param name="keyWords">关键词</param>
        /// <param name="beginTime">开始时间</param>
        /// <param name="endTime">结束时间</param>
        /// <param name="pageSize">页Size</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="totalCount">总记录</param>
        /// <param name="pageCount">总页数</param>
        /// <param name="agentid">代理商ID</param>
        /// <param name="clientid">客户端ID</param>
        /// <returns></returns>
        public static List<ActivityEntity> GetActivitys(string userid, EnumActivityStage stage,int filterType, string keyWords,string beginTime,string endTime, int pageSize, int pageIndex, ref int totalCount, ref int pageCount, string agentid, string clientid)
        {
            List<ActivityEntity> list = new List<ActivityEntity>();
            DataTable dt = ActivityDAL.BaseProvider.GetActivitys(userid, (int)stage,filterType, keyWords,beginTime,endTime, pageSize, pageIndex, ref totalCount, ref pageCount, agentid, clientid);
            foreach (DataRow dr in dt.Rows)
            {
                ActivityEntity model = new ActivityEntity();
                model.FillData(dr);
                model.Owner = OrganizationBusiness.GetUserByUserID(model.OwnerID, model.AgentID);
                model.Members = new List<Users>();
                foreach (var id in model.MemberID.Split('|'))
                {
                    model.Members.Add(OrganizationBusiness.GetUserByUserID(id, model.AgentID));
                }
                list.Add(model);
            }
            return list;

        }
 public static ActivityEntity GetActivityBaseInfoByID(string activityid, string agentid, string clientid)
 {
     ActivityEntity model = new ActivityEntity();
     DataTable dt = ActivityDAL.BaseProvider.GetActivityByID(activityid, agentid, clientid);
     if (dt.Rows.Count > 0)
     {
         model.FillData(dt.Rows[0]);
     }
     return model;
 }