コード例 #1
0
ファイル: ActivityBusiness.cs プロジェクト: gofixiao/YXERP
 /// <summary>
 /// 根据活动Code获取活动
 /// </summary>
 /// <param name="activitycode"></param>
 /// <returns></returns>
 public ActivityEntity GetActivityByCode(string activitycode)
 {
     ActivityEntity model = new ActivityEntity();
     DataTable dt = ActivityDAL.BaseProvider.GetActivityByCode(activitycode);
     if (dt.Rows.Count > 0)
     {
         model.FillData(dt.Rows[0]);
     }
     return model;
 }
コード例 #2
0
 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;
 }
コード例 #3
0
        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;
        }
コード例 #4
0
        public static List<ActivityEntity> GetActivitys(string userid, EnumActivityStage stage, int filterType, string keyWords, string beginTime, string endTime, string orderBy, 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, orderBy, 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;

        }
コード例 #5
0
ファイル: ActivityBusiness.cs プロジェクト: gofixiao/YXERP
 /// <summary>
 /// 获取活动列表
 /// </summary>
 /// <param name="userid">负责人</param>
 /// <param name="status">状态</param>
 /// <param name="keyWords">关键词</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 List<ActivityEntity> GetActivitys(string userid, EnumActivityStage stage, string keyWords, 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, keyWords, pageSize, pageIndex, ref totalCount, ref pageCount, agentid, clientid);
     foreach (DataRow dr in dt.Rows)
     {
         ActivityEntity model = new ActivityEntity();
         model.FillData(dt.Rows[0]);
         list.Add(model);
     }
     return list;
 }