Exemplo n.º 1
0
 static public bool GetRecivedCommand(Guid guid, out PDiscountCard.AlohaExternal.ICommandResponse RecivedCommand)
 {
     if (RecivedCommands.TryGetValue(guid, out RecivedCommand))
     {
         return(true);
     }
     return(false);
 }
Exemplo n.º 2
0
 static public void ComplitedRecivedCommand(PDiscountCard.AlohaExternal.ICommandResponse RecivedCommand)
 {
     PDiscountCard.AlohaExternal.ICommandResponse RC;
     if (RecivedCommands.TryGetValue(RecivedCommand.RequestId, out RC))
     {
         if (RecivedCommand.Success)
         {
             RecivedCommand.Status = 1;
         }
         else
         {
             RecivedCommand.Status = 2;
         }
         RC = RecivedCommand;
     }
 }
Exemplo n.º 3
0
 static public bool AddRecivedCommand(PDiscountCard.AlohaExternal.ICommandResponse RecivedCommand)
 {
     PDiscountCard.AlohaExternal.ICommandResponse RC;
     if (!RecivedCommands.TryGetValue(RecivedCommand.RequestId, out RC))
     {
         RecivedCommand.Status = 0;
         RecivedCommands.Add(RecivedCommand.RequestId, RecivedCommand);
         return(true);
     }
     else
     {
         if (!RC.Success)
         {
             return(false);
         }
         else
         {
             RC = RecivedCommand;
             return(true);
         }
     }
 }