예제 #1
0
 private void clearCall()
 {
     onClearCall();
     dg       = new DataGadget();
     dg.state = "READY";
     ie       = null;
     tx       = null;
     count    = 0;
     txCount  = 0;
     reqs     = 0;
 }
예제 #2
0
 public void onUpdateTrans()
 {
     log.Debug("------onUpdateTrans Event--------");
     trans.mne.ERR_CODE = -10;
     trans.mne.ERR_DESC = "Petición actualizada";
     trans.mne.msg      = "UPDATE";
     if (tr != null)
     {
         if (tr.alive)
         {
             tr.stop();
             tr = null;
         }
     }
     Thread.Sleep(2000);
 }
예제 #3
0
 public Transaction NewRequestEvent(NewRequestArg e)
 {
     dg = new DataGadget();
     log.Debug("---------------   Request parameters for " + (e.param.op == 1 ? "Venta" : "Devolución") + " -----------------");
     dg.op    = e.param.op;
     dg.ip    = e.param.ip;
     dg.state = e.param.state;
     if (dg.op == 1)
     {
         log.Debug("nor: " + e.param.nor);
         log.Debug("bnc: " + e.param.bnc);
         log.Debug("mnt: " + e.param.mnt);
         log.Debug("loc: " + e.param.loc);
         log.Debug("arm: " + e.param.arm);
         if (e.param.nor == "")
         {
             throw new NullFieldException("Número de orden vacio.");
         }
         else
         {
             dg.nor = e.param.nor;
         }
         if (e.param.bnc == "")
         {
             throw new NullFieldException("Banco vacio.");
         }
         else
         {
             dg.bnc = e.param.bnc;
         }
         if (e.param.mnt == "")
         {
             throw new NullFieldException("Monto vacio.");
         }
         else
         {
             dg.mnt = e.param.mnt;
         }
         if (e.param.loc == "")
         {
             throw new NullFieldException("Localidad vacia.");
         }
         else
         {
             dg.loc = e.param.loc;
         }
         dg.arm    = e.param.arm;
         trans.nor = dg.nor;
         trans.mnt = dg.mnt;
         trans.mne = new MensajeNegocio();
     }
     else
     {
         log.Debug("nor: " + e.param.nor);
         log.Debug("tct: " + e.param.tct);
         log.Debug("mnt: " + e.param.mnt);
         if (e.param.nor == "")
         {
             throw new NullFieldException("Número de orden vacio.");
         }
         else
         {
             dg.nor = e.param.nor;
         }
         if (e.param.tct == "")
         {
             throw new NullFieldException("Número de tarjeta trunco vacio.");
         }
         else
         {
             dg.tct = e.param.tct;
         }
         if (e.param.mnt == "")
         {
             throw new NullFieldException("Monto vacio.");
         }
         else
         {
             dg.mnt = e.param.mnt;
         }
         trans.nor = dg.nor;
         trans.mnt = dg.mnt;
         trans.mne = new MensajeNegocio();
     }
     tr             = new Cronos(timeResponse);
     tr.onFinished += new Cronos.Finish(this.onTrTimeFinished);
     log.Debug("Inicia el conteo");
     tr.start();
     return(trans);
 }