Esempio n. 1
0
        private void btnenrestaurante_Click(object sender, EventArgs e)
        {
            try
            {
                if (!EsError)
                {
                    if (VerificarExistenciaCodigo())
                    {
                        MessageBox.Show("El código digitado ya existe en base de datos, por favor cambiarlo", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return;
                    }

                    EstadoPedido ep = new EstadoPedido();

                    ep.Identificacion = Convert.ToInt32(txtidentificacion.Text.Trim());
                    ep.Estado         = cboestado.Text.Trim();


                    Negocio.LNegocio.AgregarEstado(ep);
                    MessageBox.Show("Iniciando Pedido", "Autenticación", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            timer3.Start();
        }
Esempio n. 2
0
        private void btndecamino_Click(object sender, EventArgs e)
        {
            try
            {
                if (!EsError)
                {
                    EstadoPedido ep = new EstadoPedido();

                    ep.Identificacion = Convert.ToInt32(txtidentificacion.Text.Trim());
                    ep.Estado         = cboestado.Text.Trim();


                    Negocio.LNegocio.ModificarEstado(ep);
                    MessageBox.Show("Camino a la Entrega", "Autenticación", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            timer1.Start();
        }