示例#1
0
 public Nueva(Core.Sistema.AuditoriaSistema iAuditoria, Conexion.IConexion iConexion)
 {
     this.conexion = iConexion;
     this.orden = new Core.Venta.Orden(this.conexion)
     {
         AuditoriaSistema = iAuditoria,
         Mozo = new Core.Sistema.Usuario(this.conexion)
         {
             Id = 3
         },
         Mesa = new Core.Venta.Mesa(this.conexion)
         {
             Id = 999
         },
         Cliente = new Core.Persona.Cliente(this.conexion)
         {
             Id = 5
         },
         Estado = new Core.Venta.EstadoVenta
         {
             Codigo = "P"
         },
         TipoPago = Core.Venta.TipoPago.EFECTIVO,
         TipoComprobante = Core.Venta.TipoComprobante.BOLETA
     };
     InitializeComponent();
 }
示例#2
0
        private void VerDatos_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                int indice = Funcion.ConvertTo<int>(this.dtgFichaje.SelectedIndex, -1);
                if (indice < 0)
                    Funcion.EjecutaExepcionShomies("Seleccione una fila para ver orden.");

                Clases.DetalleFichajeViewModel fichaje = (Clases.DetalleFichajeViewModel)this.dtgFichaje.Items[indice];

                Core.Venta.Orden orden = new Core.Venta.Orden(this.conexion)
                {
                    Id = fichaje.Orden.Id
                };

                DatosOrden datosOrden = new DatosOrden(orden, this.conexion);
                datosOrden.ShowDialog();
            }
            catch (Utilitario.ExepcionSHomies es)
            {
                MessageBox.Show(es.Message);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
示例#3
0
        private void BuscarOrden()
        {
            try
            {
                LimpiaDatos();

                Core.Venta.Orden ordenBuscar =
                        new Core.Venta.Orden(this.conexion)
                        {
                            Id = Utilitario.Funcion.ConvertTo<int>(this.txtNroOrden.Text.Trim(), 0)
                        };

                if (ordenBuscar.Id != 0)
                {
                    ordenBuscar.GetDatosOrden();

                    this.orden = new Core.Venta.Orden(this.conexion);
                    this.orden = ordenBuscar;

                    this.DetalleOrden();
                    this.LlenaFichadorasOrden();

                    this.grdIngresaDetalle.IsEnabled = false;
                    this.brdProducto.IsEnabled = false;
                    this.dtgCategorias.IsEnabled = false;
                    this.dtgProductos.IsEnabled = false;
                    this.dtgFichadoras.IsEnabled = false;

                    if (this.orden.Estado.Codigo == "A")
                    {
                        this.lblAnulada1.Visibility = System.Windows.Visibility.Visible;
                        this.lblAnulada2.Visibility = System.Windows.Visibility.Visible;
                    }
                    else
                    {
                        this.btnAnular.IsEnabled = true;
                    }
                }

            }
            catch (Exception)
            {

                throw;
            }
        }
示例#4
0
 public DatosOrden(Core.Venta.Orden iOrden, Conexion.IConexion iConexion)
 {
     this.conexion = iConexion;
     this.orden = iOrden;
     InitializeComponent();
 }