Exemple #1
0
 private void eBar_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == '\r')
     {
         lCODE.Text         = "";
         lVal.Text          = "";
         lTime.Text         = "";
         lTicket.Text       = "";
         lSec.Text          = "";
         lOKT.Text          = "";
         MWin.TicketToCheck = "";
         MWin.TicketOK      = 0;
         MWin.Parser_Ticket(opciones.Srv_User, eBar.Text, 1);
         eBar.Text = "";
         if (MWin.TicketOK == 1)
         {
             MWin.Opcions.Verificar_Ticket = 0;
             try
             {
                 MWin.Opcions.Verificar_Ticket = int.Parse(MWin.LastTicket.Substring(1, 11));
             }
             catch
             {
             }
             Ticket = MWin.LastTicket;
             MWin.Srv_Verificar_Ticket(MWin.Opcions.Verificar_Ticket, 0);
         }
     }
 }
Exemple #2
0
        private void eBar_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar != '\r')
            {
                return;
            }
            MWin.TicketToCheck = "";
            MWin.TicketOK      = 0;
            int num = MWin.Parser_Ticket(opciones.Srv_User, eBar.Text, 1);

            MWin.LastTicket = eBar.Text;
            eBar.Text       = "";
            if (MWin.TicketOK != 1)
            {
                return;
            }
            if (num == 1)
            {
                int _ticket = 0;
                int _id     = 0;
                Gestion.Decode_Mod10(MWin.LastTicket, out _ticket, out _id);
                opciones.TicketTemps   = _ticket;
                opciones.IdTicketTemps = _id;
                if (opciones.IdTicketTemps > 0)
                {
                    MWin.Srv_Sub_Ticket(_id, 0);
                }
            }
            if (num == 2)
            {
                bool flag = false;
                if (MWin.ValidacioTicket == null)
                {
                    MWin.ValidacioTicket      = new DLG_ValidarTicket(ref opciones);
                    MWin.ValidacioTicket.MWin = MWin;
                }
                if (MWin.ValidacioTicket.IsDisposed)
                {
                    MWin.ValidacioTicket      = new DLG_ValidarTicket(ref opciones);
                    MWin.ValidacioTicket.MWin = MWin;
                }
                MWin.ValidacioTicket.Ticket = MWin.LastTicket;
                try
                {
                    MWin.Opcions.Verificar_Ticket = int.Parse(MWin.LastTicket.Substring(1, 11));
                }
                catch
                {
                }
                MWin.Srv_Verificar_Ticket(MWin.Opcions.Verificar_Ticket, 0);
                MWin.ValidacioTicket.Show();
                Close();
            }
        }