Example #1
0
 //
 private void LlamarCliente()
 {
     try
     {
         using (LlamarClienteService service = new LlamarClienteService())
         {
             service.LlamarCliente(this.IdCaja, _ticketTrabajado.Secuencia);
         }
     }
     catch (Exception ex)
     {
         Com.Hit.TurnoMatic.Utils.Log.LogError(TAG, "GetCajaByIdUsuario", ex);
     }
 }
        private void LLamar()
        {
            LlamarCliente _llamarCliente = null;

            using (LlamarClienteService service = new LlamarClienteService())
            {
                _llamarCliente = service.GetLlamarCliente();
            }
            //
            if (_llamarCliente != null)
            {
                //
                string fileNameNumero = string.Format("{0}.wav", _llamarCliente.NumeroTicket);
                //
                string fileNameCaja = string.Format("caja0{0}.wav", _llamarCliente.IdCaja);
                //
                SoundPlayer soundNumero = new SoundPlayer(string.Format("{0}\\Numeros\\{1}", this.PathSound, fileNameNumero));
                SoundPlayer soundCaja   = new SoundPlayer(string.Format("{0}\\Cajas\\{1}", this.PathSound, fileNameCaja));
                //
                this.rTxtLlamandoCliente.Text += String.Format("Numero {0} a {1} Estatus {2}", _llamarCliente.NumeroTicket, _llamarCliente.Caja, _llamarCliente.Estatus) + System.Environment.NewLine;

                if (File.Exists(string.Format("{0}\\Numeros\\{1}", this.PathSound, fileNameNumero)))
                {
                    //
                    soundNumero.Play();
                }

                //
                System.Threading.Thread.Sleep(4000);
                //
                if (File.Exists(string.Format("{0}\\Cajas\\{1}", this.PathSound, fileNameCaja)))
                {
                    //
                    soundCaja.Play();
                }
                //
                using (LlamarClienteService service = new LlamarClienteService())
                {
                    service.ChangeLlamarCliente(_llamarCliente.NumeroTicket);
                }

                System.Threading.Thread.Sleep(2000);
            }
        }