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; } } }
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; } } } }
private void button1_Click(object sender, EventArgs e) { frmVenta form = new frmVenta(); form.Show(); this.Hide(); }
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(); } } } }
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(); }
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(); } }
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(); }
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(); }
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(); } } }
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(); } } }
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"); } }
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(); } }
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(); } } }
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(); } } } }