コード例 #1
0
 private void FrmObservarEmpleados_Load(object sender, EventArgs e)
 {
     this.dgvEmpleados =
         ConfiguracionDatagridview.ConfigurationGrid(this.dgvEmpleados);
     this.BuscarEmpleados("COMPLETO ACTIVO", "");
     this.txtBusqueda.Texto_inicial = "Ingrese un texto a buscar";
 }
コード例 #2
0
 private void FrmObservarClientes_Load(object sender, EventArgs e)
 {
     this.dgvClientes =
         ConfiguracionDatagridview.ConfigurationGrid(this.dgvClientes);
     this.txtBusqueda.Texto_inicial = "Ingrese un texto para buscar";
     this.BuscarClientes("COMPLETO", "");
 }
コード例 #3
0
 private void FrmDetallePedido_Load(object sender, EventArgs e)
 {
     this.ContextMenuDatosPedido.IsEditar = true;
     this.dgvPedido =
         ConfiguracionDatagridview.ConfigurationGrid(this.dgvPedido);
     this.BuscarPedido(this.Id_pedido);
     Font font = new Font("Segoe UI Semibold", 9.75F,
                          FontStyle.Bold, GraphicsUnit.Point, ((byte)(0)));
 }
コード例 #4
0
 public void ObtenerTablaPedido(DataTable dt)
 {
     this.lblMistico.Text        = "Editar el pedido de la mesa " + this.Numero_mesa;
     this.tablaspedido.Id_pedido = this.Id_pedido;
     this.tablaspedido.IsEditar  = true;
     this.tablaspedido.CrearTablas(dt, this.Numero_mesa);
     this.ContextMenuDatosPedido.IsEditar = true;
     this.dgvProductos =
         ConfiguracionDatagridview.ConfigurationGrid(this.dgvProductos);
     this.dgvProductos.DataSource = this.tablaspedido.TablaVista;
     this.dgvProductos.Focus();
 }
コード例 #5
0
        private void FrmObservarVentas_Load(object sender, EventArgs e)
        {
            this.resumenVenta     = new ResumenVenta();
            this.containerResumen = new PoperContainer(resumenVenta);

            this.filtrosventa = new Filtrosventa();
            this.filtrosventa.rdNinguno.Checked    = true;
            this.filtrosventa.btnSeleccione.Click += BtnSeleccione_Click;
            this.containerFiltros = new PoperContainer(filtrosventa);
            this.dgvVentas        =
                ConfiguracionDatagridview.ConfigurationGrid(this.dgvVentas);
            this.Horas();
        }
コード例 #6
0
        private void FrmPedido_Load(object sender, EventArgs e)
        {
            if (!this.Editar)
            {
                this.dgvProductos =
                    ConfiguracionDatagridview.ConfigurationGrid(this.dgvProductos);
                this.dgvProductos.Focus();
                this.tablaspedido.CrearTablas(this.Numero_mesa);
                this.lblMistico.Text = "Agregar al pedido de la mesa " + this.Numero_mesa;

                this.Comprobacion();
            }
        }
コード例 #7
0
        private void FrmFacturarPedido_Load(object sender, EventArgs e)
        {
            this.dgvPedido =
                ConfiguracionDatagridview.ConfigurationGrid(this.dgvPedido);
            this.panelSubTotal.Visible        = false;
            this.rdImprimir.Checked           = true;
            this.chkRecordarOpcion.Checked    = true;
            this.frmFacturaFinal.Is_precuenta = this.IsPrecuenta;
            this.frmFacturaFinal.AsignarReporte();

            this.btnTerminar.Enabled              = true;
            this.opcionesPedido.Total_parcial     = this.Total_parcial;
            this.opcionesPedido.frmFacturarPedido = this;
            this.panelDescuentos.Controls.Add(this.opcionesPedido);
        }
コード例 #8
0
        private void FrmAgregarDetallePlato_Load(object sender, EventArgs e)
        {
            this.dgvInsumos =
                ConfiguracionDatagridview.ConfigurationGrid(this.dgvInsumos);
            this.dgvInsumosUsados =
                ConfiguracionDatagridview.ConfigurationGrid(this.dgvInsumosUsados);

            if (this.panel1.Controls.Count > 0)
            {
                this.panel1.Controls.Clear();
            }

            FrmObservarInsumos insumos = new FrmObservarInsumos();

            insumos.detallePlato    = this;
            insumos.FormBorderStyle = FormBorderStyle.None;
            insumos.Dock            = DockStyle.Fill;
            insumos.TopLevel        = false;
            this.panel1.Controls.Add(insumos);
            insumos.Show();

            this.CrearTabla();
            this.txtCantidad.Text = "0";
        }
コード例 #9
0
        private void AsignarDatos()
        {
            try
            {
                if (Row_venta != null)
                {
                    this.Id_pedido              = Convert.ToInt32(Row_venta.Cells["Id_pedido"].Value);
                    this.lblId_venta.Text      += " " + Convert.ToString(Row_venta.Cells["Id_venta"].Value);
                    this.lblIdPedido.Text      += " " + Convert.ToString(Row_venta.Cells["Id_pedido"].Value);
                    this.lblFecha.Text         += " " + Convert.ToDateTime(Row_venta.Cells["Fecha_venta"].Value).ToLongDateString();
                    this.lblHora.Text          += " " + Convert.ToDateTime(Row_venta.Cells["Hora_venta"].Value).ToLongTimeString();
                    this.lblMesa.Text          += " " + Convert.ToString(Row_venta.Cells["Num_mesa"].Value);
                    this.lblEmpleado.Text      += " " + Convert.ToString(Row_venta.Cells["Nombre_empleado"].Value);
                    this.lblCliente.Text       += " " + Convert.ToString(Row_venta.Cells["Nombre_cliente"].Value);
                    this.lblTotal_parcial.Text += " " + Convert.ToInt32(Row_venta.Cells["Total_parcial"].Value).ToString("C");
                    this.lblPropina.Text       += " " + Convert.ToInt32(Row_venta.Cells["Propina"].Value).ToString("C");
                    this.lblSubTotal.Text      += " " + Convert.ToInt32(Row_venta.Cells["Subtotal"].Value).ToString("C");
                    this.lblDescuento.Text     += " " + Convert.ToString(Row_venta.Cells["Descuento"].Value);
                    this.lblTotalFinal.Text    += " " + Convert.ToInt32(Row_venta.Cells["Total_final"].Value).ToString("C");
                    this.txtObservaciones.Text  = Convert.ToString(Row_venta.Cells["Observaciones"].Value);

                    DataTable dtDetallePedido;
                    DataTable dtDetalleVenta;
                    DataTable DatosPrincipales = NVentas.BuscarVentaFinal(this.Id_pedido.ToString(), out dtDetallePedido, out dtDetalleVenta);

                    this.dgvPagos =
                        ConfiguracionDatagridview.ConfigurationGrid(this.dgvPagos);

                    this.dgvDetalle_pedido =
                        ConfiguracionDatagridview.ConfigurationGrid(this.dgvDetalle_pedido);

                    this.dgvDetalle_pedido.DataSource = dtDetallePedido;
                    this.dgvPagos.DataSource          = dtDetalleVenta;

                    if (dtDetallePedido != null)
                    {
                        string[] columns_header =
                        {
                            "Id pedido", "Id tipo", "Tipo", "Nombre", "Precio", "Cantidad", "Total", "Observaciones"
                        };
                        bool[] columns_visible =
                        {
                            false, false, false, true, true, true, true, true
                        };
                        this.dgvDetalle_pedido = DatagridString.ChangeHeaderTextAndVisible(this.dgvDetalle_pedido, columns_header, columns_visible);
                    }

                    if (dtDetalleVenta != null)
                    {
                        string[] columns_header =
                        {
                            "Id venta", "Método de pago", "Valor", "Vaucher", "Observaciones"
                        };
                        bool[] columns_visible =
                        {
                            false, true, true, false, true
                        };
                        this.dgvPagos = DatagridString.ChangeHeaderTextAndVisible(this.dgvPagos, columns_header, columns_visible);
                    }
                }
            }
            catch (Exception ex)
            {
                Mensajes.MensajeErrorCompleto(this.Name, "AsignarDatos()",
                                              "Hubo un error al asignar los datos de la venta", ex.Message);
            }
        }
コード例 #10
0
        private void FrmRealizarPedido_Load(object sender, EventArgs e)
        {
            DialogResult dialog = this.Comprobacion();

            if (dialog == DialogResult.OK)
            {
                this.comandas.ObtenerReporte();

                this.lblMistico.Text =
                    "Realizar un nuevo pedido para la mesa " + this.Numero_mesa;
                if (this.IsEditar)
                {
                    try
                    {
                        string    rpta;
                        DataTable dtDetalle;
                        DataTable dtPedido =
                            NPedido.BuscarPedidosYDetalle("ID PEDIDO", this.Id_pedido.ToString(), out dtDetalle, out rpta);
                        if (dtPedido != null)
                        {
                            this.lblMesero.Text = "Mesero: " + Convert.ToString(dtPedido.Rows[0]["Nombre_empleado"]);
                            //Recorrer las tablas de pedido y detalle y crear las Listas
                            this.tablasPedido = new TablasPedido(this.IsEditar, this.Id_pedido, dtDetalle);
                            DataTable dtCliente =
                                NClientes.BuscarClientes("ID CLIENTE", Convert.ToString(dtPedido.Rows[0]["Id_cliente"]));
                            if (dtCliente != null)
                            {
                                this.contextMenuDatosPedido.ObtenerCliente(DatagridString.ReturnValuesOfCells(dtCliente, 0, out rpta));
                            }
                            else
                            {
                                throw new Exception("No se encontró el cliente");
                            }
                            Label lbl1 = new Label();
                            lbl1.AutoSize = true;
                            lbl1.Location = new System.Drawing.Point(this.dgvProductos.Location.X,
                                                                     this.panelProductosParaAgregar.Location.Y + this.panelProductosParaAgregar.Height);
                            this.Controls.Add(lbl1);
                            this.chkImprimirComandas.Visible = true;
                            this.chkImprimirComandas.Checked = true;

                            this.panelProductosParaAgregar.Visible = true;
                            this.dgvProductos.Location             = new System.Drawing.Point(this.dgvProductos.Location.X,
                                                                                              this.panelProductosParaAgregar.Location.Y + this.panelProductosParaAgregar.Height + lbl1.Height);
                            this.dgvProductos =
                                ConfiguracionDatagridview.ConfigurationGrid(this.dgvProductos);
                            this.dgvProductosEditar =
                                ConfiguracionDatagridview.ConfigurationGrid(this.dgvProductosEditar);
                            this.btnQuitar.Location =
                                new System.Drawing.Point(this.dgvProductos.Location.X - this.btnQuitarProductosEditado.Width - 2, this.dgvProductos.Location.Y);
                            this.btnQuitarProductosEditado.Visible = true;
                        }
                        else
                        {
                            throw new Exception(rpta);
                        }
                    }
                    catch (Exception ex)
                    {
                        Mensajes.MensajeErrorCompleto("TablasPedido.cs", "TablasPedido(bool isEditar, int id_pedido)",
                                                      "Hubo un error al inicializar las tablas del pedido para editar", ex.Message);
                    }
                    this.ActualizarProductos();
                }
                else
                {
                    this.panelProductosParaAgregar.Visible = false;
                    this.btnQuitarProductosEditado.Visible = false;
                    this.dgvProductos =
                        ConfiguracionDatagridview.ConfigurationGrid(this.dgvProductos);
                    this.tablasPedido = new TablasPedido();
                }
            }
            else
            {
                this.Close();
            }
        }