public Int32 GetVIPCardTradeList(string cardNo, string beginDate, string endDate, ref VIPCardTradeRecord cardTradeRecord)
        {
            int cByte = ParamFieldLength.PACKAGE_HEAD + ParamFieldLength.CARD_NO + ParamFieldLength.BEGINDATE + ParamFieldLength.ENDDATE;
            byte[] sendByte = new byte[cByte];
            int byteOffset = 0;
            Array.Copy(BitConverter.GetBytes((int)Command.ID_GET_VIPCARDTRADELIST), sendByte, BasicTypeLength.INT32);
            byteOffset = BasicTypeLength.INT32;
            Array.Copy(BitConverter.GetBytes(cByte), 0, sendByte, byteOffset, BasicTypeLength.INT32);
            byteOffset += BasicTypeLength.INT32;

            byte[] tempByte = null;
            //cardNo
            tempByte = Encoding.UTF8.GetBytes(cardNo);
            Array.Copy(tempByte, 0, sendByte, byteOffset, tempByte.Length);
            byteOffset += ParamFieldLength.CARD_NO;
            //beginDate
            tempByte = Encoding.UTF8.GetBytes(beginDate);
            Array.Copy(tempByte, 0, sendByte, byteOffset, tempByte.Length);
            byteOffset += ParamFieldLength.BEGINDATE;
            //endDate
            tempByte = Encoding.UTF8.GetBytes(endDate);
            Array.Copy(tempByte, 0, sendByte, byteOffset, tempByte.Length);
            byteOffset += ParamFieldLength.ENDDATE;

            int result = 0;
            using (SocketClient socket = new SocketClient(ConstantValuePool.BizSettingConfig.IPAddress, ConstantValuePool.BizSettingConfig.Port))
            {
                Byte[] receiveData = null;
                Int32 operCode = socket.SendReceive(sendByte, out receiveData);
                if (operCode == (int)RET_VALUE.SUCCEEDED)
                {
                    result = BitConverter.ToInt32(receiveData, ParamFieldLength.PACKAGE_HEAD);
                    string strReceive = Encoding.UTF8.GetString(receiveData, ParamFieldLength.PACKAGE_HEAD + BasicTypeLength.INT32, receiveData.Length - ParamFieldLength.PACKAGE_HEAD - BasicTypeLength.INT32).Trim('\0');
                    cardTradeRecord = JsonConvert.DeserializeObject<VIPCardTradeRecord>(strReceive);
                }
                socket.Close();
            }
            return result;
        }
 public Int32 GetVIPCardTradeList(string cardNo, DateTime beginDate, DateTime endDate, out VIPCardTradeRecord cardTradeRecord)
 {
     cardTradeRecord = new VIPCardTradeRecord();
     VIPCard card = null;
     try
     {
         _daoManager.OpenConnection();
         card = _vipCardDao.GetVIPCard(cardNo);
     }
     catch (Exception exception)
     {
         LogHelper.GetInstance().Error(string.Format("[GetVIPCardTradeList]参数:cardNo_{0},beginDate_{1},endDate_{2}", cardNo, beginDate, endDate), exception);
     }
     finally
     {
         _daoManager.CloseConnection();
     }
     int result = 0;
     if (card != null)
     {
         result = card.Status;
     }
     if (result == 1)
     {
         if (card != null)
         {
             cardTradeRecord.Balance = card.Balance;
             cardTradeRecord.Integral = card.Integral;
             cardTradeRecord.DiscountRate = card.DiscountRate;
         }
         cardTradeRecord.VIPCardTradeList = _vipCardTradeDao.GetVIPCardTradeList(cardNo, beginDate, endDate);
     }
     return result;
 }