Exemplo n.º 1
0
        /// <summary>
        /// 活动报名人员列表(2.1.33) Jermyn20130428
        /// </summary>
        /// <param name="EventID">活动ID</param>
        /// <param name="Page"></param>
        /// <param name="PageSize"></param>
        /// <returns></returns>
        public GetResponseParams <LEventSignUpEntity> GetEventApplies(string EventID, int Page, int PageSize)
        {
            #region 判断对象不能为空
            if (EventID == null || EventID.ToString().Equals(""))
            {
                return(new GetResponseParams <LEventSignUpEntity>
                {
                    Flag = "0",
                    Code = "419",
                    Description = "活动ID不能为空",
                });
            }
            if (PageSize == 0)
            {
                PageSize = 15;
            }
            #endregion

            GetResponseParams <LEventSignUpEntity> response = new GetResponseParams <LEventSignUpEntity>();
            response.Flag        = "1";
            response.Code        = "200";
            response.Description = "成功";
            try
            {
                #region 业务处理
                LEventSignUpEntity usersInfo = new LEventSignUpEntity();

                usersInfo.ICount = _currentDAO.GetEventAppliesCount(EventID);

                IList <LEventSignUpEntity> usersInfoList = new List <LEventSignUpEntity>();
                if (usersInfo.ICount > 0)
                {
                    DataSet ds = new DataSet();
                    ds = _currentDAO.GetEventAppliesList(EventID, Page, PageSize);
                    if (ds != null && ds.Tables[0].Rows.Count > 0)
                    {
                        usersInfoList = DataTableToObject.ConvertToList <LEventSignUpEntity>(ds.Tables[0]);
                    }
                }

                usersInfo.EntityList = usersInfoList;
                #endregion
                response.Params = usersInfo;
                return(response);
            }
            catch (Exception ex)
            {
                response.Flag        = "0";
                response.Code        = "103";
                response.Description = "错误:" + ex.ToString();
                return(response);
            }
        }
Exemplo n.º 2
0
        public IList <LEventSignUpEntity> GetEventSignUp(LEventSignUpEntity entity, int Page, int PageSize)
        {
            IList <LEventSignUpEntity> usersInfoList = new List <LEventSignUpEntity>();
            DataSet ds = new DataSet();

            ds = _currentDAO.GetEventSignUpList(entity, Page, PageSize);
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                usersInfoList = DataTableToObject.ConvertToList <LEventSignUpEntity>(ds.Tables[0]);
            }
            return(usersInfoList);
        }
Exemplo n.º 3
0
        public string ReplaceTemplate(string message, LEventSignUpEntity eventVip, VipEntity vip, LEventsEntity eventEntity)
        {
            message = message.Replace("$VipName$", eventVip.UserName);
            message = message.Replace("$Region$", null);
            message = message.Replace("$Seat$", null);
            message = message.Replace("$Ver$", new Random().Next().ToString());
            message = message.Replace("$CustomerId$", eventVip.CustomerId);
            message = message.Replace("$UserId$", vip.VIPID);
            message = message.Replace("$OpenId$", vip.WeiXinUserId);
            message = message.Replace("$EventName$", eventEntity.Title);

            return(message);
        }
Exemplo n.º 4
0
 public void Update(LEventSignUpEntity pEntity, bool pIsUpdateNullField, IDbTransaction pTran)
 {
     _currentDAO.Update(pEntity, pIsUpdateNullField, pTran);
 }
Exemplo n.º 5
0
 /// <summary>
 /// 更新
 /// </summary>
 /// <param name="pEntity">实体实例</param>
 /// <param name="pTran">事务实例,可为null,如果为null,则不使用事务来更新</param>
 public void Update(LEventSignUpEntity pEntity, IDbTransaction pTran)
 {
     Update(pEntity, true, pTran);
 }
Exemplo n.º 6
0
 /// <summary>
 /// 在事务内创建一个新实例
 /// </summary>
 /// <param name="pEntity">实体实例</param>
 /// <param name="pTran">事务实例,可为null,如果为null,则不使用事务来更新</param>
 public void Create(LEventSignUpEntity pEntity, IDbTransaction pTran)
 {
     _currentDAO.Create(pEntity, pTran);
 }
Exemplo n.º 7
0
 /// <summary>
 /// 创建一个新实例
 /// </summary>
 /// <param name="pEntity">实体实例</param>
 public void Create(LEventSignUpEntity pEntity)
 {
     _currentDAO.Create(pEntity);
 }
Exemplo n.º 8
0
 /// <summary>
 /// 分页根据实体条件查询实体
 /// </summary>
 /// <param name="pQueryEntity">以实体形式传入的参数</param>
 /// <param name="pOrderBys">排序组合</param>
 /// <returns>符合条件的实体集</returns>
 public PagedQueryResult <LEventSignUpEntity> PagedQueryByEntity(LEventSignUpEntity pQueryEntity, OrderBy[] pOrderBys, int pPageSize, int pCurrentPageIndex)
 {
     return(_currentDAO.PagedQueryByEntity(pQueryEntity, pOrderBys, pPageSize, pCurrentPageIndex));
 }
Exemplo n.º 9
0
 /// <summary>
 /// 根据实体条件查询实体
 /// </summary>
 /// <param name="pQueryEntity">以实体形式传入的参数</param>
 /// <param name="pOrderBys">排序组合</param>
 /// <returns>符合条件的实体集</returns>
 public LEventSignUpEntity[] QueryByEntity(LEventSignUpEntity pQueryEntity, OrderBy[] pOrderBys)
 {
     return(_currentDAO.QueryByEntity(pQueryEntity, pOrderBys));
 }
Exemplo n.º 10
0
 /// <summary>
 /// 删除
 /// </summary>
 /// <param name="pEntity"></param>
 public void Delete(LEventSignUpEntity pEntity)
 {
     _currentDAO.Delete(pEntity);
 }
Exemplo n.º 11
0
 public void Update(LEventSignUpEntity pEntity, bool pIsUpdateNullField)
 {
     _currentDAO.Update(pEntity, pIsUpdateNullField);
 }
Exemplo n.º 12
0
 /// <summary>
 /// 更新
 /// </summary>
 /// <param name="pEntity">实体实例</param>
 public void Update(LEventSignUpEntity pEntity)
 {
     Update(pEntity, true);
 }