Example #1
0
        protected override EmptyResponseData ProcessRequest(DTO.Base.APIRequest <SetVipDealerRP> pRequest)
        {
            var rd     = new EmptyResponseData();
            var VipBLL = new VipBLL(CurrentUserInfo);

            bool Flag = VipBLL.IsSetVipDealer(pRequest.UserID);

            try
            {
                if (Flag)
                {
                    VipEntity Entity = VipBLL.GetByID(pRequest.UserID);
                    if (Entity != null)
                    {
                        Entity.Col48 = "1";
                        VipBLL.Update(Entity);
                    }
                    else
                    {
                        throw new APIException("会员不存在!")
                              {
                                  ErrorCode = 103
                              };
                    }
                }
                else
                {
                    //var Result = VipBLL.GetSetVipDealerUpset();
                    throw new APIException("您当前会员卡等级不符合!")
                          {
                              ErrorCode = 105
                          };
                }
            }
            catch (Exception ex)
            {
                throw new APIException(ex.Message);
            }

            return(rd);
        }