public override void GetTargetData(IFreeformEntity_MsgTgt tgt, ref List <byte> buffer)
        {
            FFTgt_G2H_EFT_WithdrawalRequest tgt2 = tgt as FFTgt_G2H_EFT_WithdrawalRequest;

            buffer.Add(tgt2.AccountType.GetGmuIdInt8());
            buffer.SetBCDValue(tgt2.AmountRequested, 4);
            buffer.SetBCDValue(tgt2.PlayerCardNumber, 5);
            buffer.SetBCDValue(tgt2.Pin, 2);
        }
 internal override IFreeformEntity ParseBufferInternal(ref IFreeformEntity entity, IFreeformEntity rootEntity, int id, byte[] buffer)
 {
     FFTgt_G2H_EFT_WithdrawalRequest tgt = new FFTgt_G2H_EFT_WithdrawalRequest();
     tgt.AccountType = buffer[0].GetAppId<FF_GmuId_EFT_AccountTypes, FF_AppId_EFT_AccountTypes>();
     tgt.AmountRequested = FreeformHelper.GetBytesToBCDDouble(buffer, 1, 4);
     tgt.PlayerCardNumber = FreeformHelper.GetBCDValueString(buffer, 0, 5, 5);
     tgt.Pin = FreeformHelper.GetBCDValueString(buffer, 0, 10, 2);
     return tgt;
 }
        internal override IFreeformEntity ParseBufferInternal(ref IFreeformEntity entity, IFreeformEntity rootEntity, int id, byte[] buffer)
        {
            FFTgt_G2H_EFT_WithdrawalRequest tgt = new FFTgt_G2H_EFT_WithdrawalRequest();

            tgt.AccountType      = buffer[0].GetAppId <FF_GmuId_EFT_AccountTypes, FF_AppId_EFT_AccountTypes>();
            tgt.AmountRequested  = FreeformHelper.GetBytesToBCDDouble(buffer, 1, 4);
            tgt.PlayerCardNumber = FreeformHelper.GetBCDValueString(buffer, 0, 5, 5);
            tgt.Pin = FreeformHelper.GetBCDValueString(buffer, 0, 10, 2);
            return(tgt);
        }
 public void Buffer_WithdrawalRequest()
 {
     FFMsg_G2H msg = FreeformEntityFactory.CreateEntity<FFMsg_G2H>(FF_FlowDirection.G2H,
         new FFCreateEntityRequest_G2H()
         {
             MessageType = FF_AppId_G2H_MessageTypes.FreeForm,
             Command = FF_AppId_G2H_Commands.ResponseRequest,
             SessionID = FF_AppId_SessionIds.ECash,
             TransactionID = 1,
         });
     FFTgt_B2B_EFT tgt = new FFTgt_B2B_EFT();
     msg.AddTarget(tgt);
     FFTgt_G2H_EFT_WithdrawalRequest tgt2 = new FFTgt_G2H_EFT_WithdrawalRequest();            
     tgt.AddTarget(tgt2);
     tgt2.AccountType = FF_AppId_EFT_AccountTypes.PlayerCash;
     tgt2.AmountRequested = 2520;
     tgt2.PlayerCardNumber = "1000500026";
     tgt2.Pin = "0652";
     byte[] buffer = FreeformEntityFactory.CreateBuffer(FF_FlowDirection.G2H, msg);
     string sBuffer = buffer.GetConvertBytesToHexString(string.Empty);
     Assert.IsNotNull(buffer);
 }