private void VerPedido(object sender, RoutedEventArgs e)
        {
            ListaPedidos menuRecepcion = new ListaPedidos(this, guardado);

            menuRecepcion.Show();
            this.Close();
        }
Example #2
0
        public DetallePedido(ListaPedidos window, Byte pIdPedido, int pRutCliente)
        {
            InitializeComponent();

            ped = new PedidoController();

            object objetoDetalle = ped.DetallePedido(pIdPedido, pRutCliente);

            PropertyInfo piRutCliente = objetoDetalle.GetType().GetProperty("RutCliente");
            int          rutCliente   = (int)(piRutCliente.GetValue(objetoDetalle, null));

            txtRut.Text = Convert.ToString(rutCliente);

            PropertyInfo piNombreCliente = objetoDetalle.GetType().GetProperty("NombreCliente");
            string       nombreCliente   = (string)(piNombreCliente.GetValue(objetoDetalle, null));

            txtNombre.Text = nombreCliente;

            PropertyInfo piHoraPedido = objetoDetalle.GetType().GetProperty("HoraPedido");
            DateTime     horaPedido   = (DateTime)(piHoraPedido.GetValue(objetoDetalle, null));

            txtHoraPedido.Text = Convert.ToString(horaPedido);

            PropertyInfo piHoraEntrega = objetoDetalle.GetType().GetProperty("HoraEntrega");
            DateTime     horaEntrega   = (DateTime)(piHoraEntrega.GetValue(objetoDetalle, null));

            txtHoraEntrega.Text = Convert.ToString(horaEntrega);

            PropertyInfo piEstado = objetoDetalle.GetType().GetProperty("Estado");
            string       estado   = (string)(piEstado.GetValue(objetoDetalle, null));

            txtEstado.Text = estado;

            PropertyInfo piFormaPago = objetoDetalle.GetType().GetProperty("FormaPago");
            string       formaPago   = (string)(piFormaPago.GetValue(objetoDetalle, null));

            txtFormaPago.Text = formaPago;
        }
 public MenuRecepcion(ListaPedidos listaPedidosVentana, Empleado empleadoSesion)
 {
     InitializeComponent();
     guardado = empleadoSesion;
 }