예제 #1
0
 private void btGenVenta_Click(object sender, EventArgs e)
 {
     if (cotizacion.CodCotizacion != "" && dgvCotizaciones.CurrentRow != null)
     {
         if (Application.OpenForms["frmVenta"] != null)
         {
             Application.OpenForms["frmVenta"].Close();
         }
         else
         {
             frmVenta form = new frmVenta();
             form.MdiParent          = this.MdiParent;
             form.Proceso            = 1;
             form.Procede            = 3;
             form.txtCotizacion.Text = dgvCotizaciones.CurrentRow.Cells[codigo.Name].Value.ToString();
             KeyPressEventArgs ee = new KeyPressEventArgs((char)Keys.Return);
             //form.inicializar_formulario();
             form.Show();
             form.txtCotizacion_KeyPress(form.txtCotizacion, ee);
             form.txtCotizacion.Visible = true;
             form.label4.Visible        = true;
             form.label38.Visible       = false;
             form.txtcodpedido.Visible  = false;
             //form.cmbFormaPago_SelectionChangeCommitted(sender,e);
             form.btnGuardar.Enabled = true;
             form.btnNuevo.Enabled   = true;
             //form.btnEditar.Enabled = true;
             form.btnEliminar.Enabled = true;
         }
     }
 }
예제 #2
0
 private void btGenVenta_Click(object sender, EventArgs e)
 {
     if (dgvGuiasRemision.Rows.Count >= 1 && dgvGuiasRemision.CurrentRow != null && Convert.ToBoolean(dgvGuiasRemision.CurrentRow.Cells[facturado.Name].Value) == false)
     {
         if (guia.CodGuiaRemision != "")
         {
             if (Application.OpenForms["frmVenta"] != null)
             {
                 Application.OpenForms["frmVenta"].Close();
             }
             else
             {
                 frmVenta form = new frmVenta();
                 form.MdiParent = this.MdiParent;
                 form.Proceso   = 1;
                 //form.CargaFormaPagos();
                 //form.txtGuias.Text = guia.CodGuiaRemision.ToString();
                 //form.txtGuias.ReadOnly = true;
                 KeyPressEventArgs ee = new KeyPressEventArgs((char)Keys.Return);
                 form.Show();
                 form.txtGuias_KeyPress(sender, ee);
                 form.txtCodCliente.ReadOnly = true;
             }
         }
     }
 }
예제 #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            frmVenta form = new frmVenta();

            form.Show();
            this.Hide();
        }
예제 #4
0
 private void dgvVentasSeparacion_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (dgvVentasSeparacion.Rows.Count >= 1 && e.RowIndex != -1 && e.ColumnIndex != -1)
     {
         DataGridViewCell celda = dgvVentasSeparacion.CurrentCell;
         if (celda.Value.ToString() == "ABONAR")
         {
             frmPargarSeparacion form = new frmPargarSeparacion();
             //form.MdiParent = this;
             Int32 id = Convert.ToInt32(dgvVentasSeparacion.Rows[e.RowIndex].Cells[codigoFactura.Name].Value.ToString());
             form.codSeparacion = id;
             form.Proceso       = 1;
             form.ShowDialog();
         }
         else if (celda.Value.ToString() == "GENERAR VENTA")
         {
             if (Application.OpenForms["frmVenta"] != null)
             {
                 Application.OpenForms["frmVenta"].Close();
             }
             else
             {
                 frmVenta form = new frmVenta();
                 form.MdiParent     = this.MdiParent;
                 form.CodSeparacion = Convert.ToInt32(dgvVentasSeparacion.CurrentRow.Cells[codigoFactura.Name].Value.ToString());
                 form.label38.Text  = "Separacion";
                 form.Proceso       = 5;
                 form.Show();
             }
         }
     }
 }
예제 #5
0
 private void btGenVenta_Click(object sender, EventArgs e)
 {
     if (dgvPedidosPendientes.Rows.Count >= 1 && dgvPedidosPendientes.CurrentRow != null)
     {
         if (pedido.CodPedido != "")
         {
             if (Application.OpenForms["frmVenta"] != null)
             {
                 Application.OpenForms["frmVenta"].Close();
             }
             else
             {
                 frmVenta form = new frmVenta();
                 form.MdiParent = this.MdiParent;
                 form.Proceso   = 4;
                 //form.VericarPedido = true;
                 form.CodPedido = Convert.ToInt32(dgvPedidosPendientes.CurrentRow.Cells[Pedido_.Name].Value);
                 //form.txtPedido.ReadOnly = true;
                 //KeyPressEventArgs ee = new KeyPressEventArgs((char)Keys.Return);
                 //form.txtPedido_KeyPress(form.txtPedido, ee);
                 form.Show();
             }
         }
     }
 }
        private void ventasToolStripMenuItem_Click(object sender, EventArgs e)
        {
            /*var venta = new AddVenta();
             * venta.ShowDialog();*/
            var venta = new frmVenta();

            venta.Show();
        }
예제 #7
0
 private void dgvPedidosPendientes_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (dgvVentas.Rows.Count >= 1 && e.RowIndex != -1)
     {
         frmVenta form = new frmVenta();
         form.MdiParent = this.MdiParent;
         form.CodVenta  = venta.CodFacturaVenta;
         form.Proceso   = 3;
         form.Show();
     }
 }
예제 #8
0
        private void btnAceptar_Click(object sender, EventArgs e)
        {
            frmVenta frm = (frmVenta)Application.OpenForms["frmVenta"];

            frm.Proceso          = 1;
            frm.Procede          = 4;
            frm.numSerie         = tabla.Rows[0]["NumeroSerie"].ToString();
            frm.txtNumero.Text   = frm.numSerie;
            frm.dtpFecha.MinDate = frm.fecha1;
            frm.dtpFecha.MaxDate = frm.fecha2;
            frm.Show();
            Close();
        }
예제 #9
0
        private void dgvNumSerie_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            frmVenta frm = (frmVenta)Application.OpenForms["frmVenta"];

            frm.Proceso          = 1;
            frm.Procede          = 4;
            frm.numSerie         = tabla.Rows[e.RowIndex][0].ToString();
            frm.txtNumero.Text   = frm.numSerie;
            frm.dtpFecha.MinDate = frm.fecha1;
            frm.dtpFecha.MaxDate = frm.fecha2;
            frm.Show();
            Close();
        }
예제 #10
0
 private void btnIrPedido_Click(object sender, EventArgs e)
 {
     if (dgvVentas.Rows.Count >= 1 && dgvVentas.CurrentRow != null)
     {
         DataGridViewRow row = dgvVentas.CurrentRow;
         if (dgvVentas.Rows.Count >= 1)
         {
             frmVenta form = new frmVenta();
             form.MdiParent = this.MdiParent;
             form.CodVenta  = venta.CodFacturaVenta;
             form.Proceso   = 3;
             form.Show();
         }
     }
 }
예제 #11
0
 private void button5_Click(object sender, EventArgs e)
 {
     if (dgvVentasSeparacion.Rows.Count >= 1 && dgvVentasSeparacion.CurrentRow != null)
     {
         DataGridViewRow row = dgvVentasSeparacion.CurrentRow;
         if (dgvVentasSeparacion.Rows.Count >= 1)
         {
             frmVenta form = new frmVenta();
             form.MdiParent = this.MdiParent;
             form.CodVenta  = sepa.CodSeparacion.ToString();
             form.Proceso   = 3;
             form.Show();
         }
     }
 }
예제 #12
0
        private void button1_Click(object sender, EventArgs e)
        {
            ClsAcceso acce = new ClsAcceso();

            int valor = acce.acceso(txtUser.Text, txtPass.Text);

            if (valor == 1)
            {
                frmVenta venta = new frmVenta();
                venta.Show();
            }
            else
            {
                MessageBox.Show("Error");
            }
        }
예제 #13
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms["frmVenta"] != null)
     {
         Application.OpenForms["frmVenta"].Activate();
     }
     else
     {
         frmVenta form1 = new frmVenta();
         form1.MdiParent = this;
         //  form1.CodVendedor = Int32.Parse(e.Row.Cells[codVendedor.Name].Value.ToString());
         //    form1.CodSalConsulExt = Int32.Parse(e.Row.Cells[codSalConsulExt.Name].Value.ToString());
         form1.consultorext = true;
         form1.Proceso      = 1;
         form1.Show();
     }
 }
예제 #14
0
 private void btGenVenta_Click(object sender, EventArgs e)
 {
     if (venta.CodFacturaVenta != "")
     {
         if (Application.OpenForms["frmVenta"] != null)
         {
             Application.OpenForms["frmVenta"].Close();
         }
         else
         {
             frmVenta form = new frmVenta();
             form.MdiParent = this.MdiParent;
             //nota = AdmNota.CargaNotaIngreso(Convert.ToInt32(dgvNotasCredito.CurrentRow.Cells[codreferencia.Name].Value));
             form.CodVenta = dgvNotasCredito.CurrentRow.Cells[CodFacturaVentaRef.Name].Value.ToString();
             form.Proceso  = 3;
             form.Show();
         }
     }
 }
예제 #15
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (dgvPedidosPendientes.Rows.Count >= 1 && dgvPedidosPendientes.CurrentRow != null)
     {
         if (pedido.CodPedido != "")
         {
             if (Application.OpenForms["frmVenta"] != null)
             {
                 Application.OpenForms["frmVenta"].Close();
             }
             else
             {
                 frmVenta form = new frmVenta();
                 form.MdiParent = this.MdiParent;
                 form.Proceso   = 1;
                 //form.txtPedido.Text = pedido.CodPedido.ToString();
                 //form.txtPedido.ReadOnly = true;
                 KeyPressEventArgs ee = new KeyPressEventArgs((char)Keys.Return);
                 //form.txtPedido_KeyPress(form.txtPedido, ee);
                 form.Show();
             }
         }
     }
 }