private void btn_ver_Click(object sender, EventArgs e) { index = grd_letra.SelectedCells[0].RowIndex; DataGridViewRow dtg = grd_letra.Rows[index]; objVoucher = new LetraCab(); if (dtg.Cells[11].Value.ToString() == "ANULADO") { operacionLetra = "A"; index = grd_letra.SelectedCells[0].RowIndex; objVoucher = objListLetra[index]; CanjeLetraNuevo check = new CanjeLetraNuevo(); this.Hide(); check.Show(); } else { operacionLetra = "V"; index = grd_letra.SelectedCells[0].RowIndex; objVoucher = objListLetra[index]; CanjeLetraNuevo check = new CanjeLetraNuevo(); this.Hide(); check.Show(); } }
public CanjeLetraNuevo() { InitializeComponent(); this.ControlBox = false; txt_tipodoc.Text = "LT"; objLetra = new LetraCab(); objMonedaDao = new MonedaDAO(); objVoucherDao = new VoucherDAO(); objDocumentoDAO = new DocumentoDAO(); objMonedaDao.tipoCambio(); comboMoneda(); this.StartPosition = FormStartPosition.Manual; this.Location = new Point(50, 20); canjeletranuevo = this; txt_Tcambio.Text = objMonedaDao.getTipoCambioVenta(dpick_Fecha.Value.ToString("dd/MM/yyyy")).ToString().PadRight(5, '0'); if (CanjeLetra.operacionLetra == "V") { objLetra = CanjeLetra.objVoucher; llenarCabecera(objLetra); objListaLetraDet = objVoucherDao.listarLetraDet(objLetra.NroRegistro, Ventas.UNIDADNEGOCIO); llenarDetalle(objListaLetraDet); sumatoria(); btn_SaveData.Enabled = false; btn_Modificar.Visible = true; } else if (CanjeLetra.operacionLetra == "A") { objLetra = CanjeLetra.objVoucher; llenarCabecera(objLetra); objListaLetraDet = objVoucherDao.listarLetraDet(objLetra.NroRegistro, Ventas.UNIDADNEGOCIO); llenarDetalle(objListaLetraDet); sumatoria(); btn_Add.Enabled = false; btn_Anular.Enabled = false; btn_Buscar.Enabled = false; btn_Modificar.Enabled = false; btn_SaveData.Enabled = false; grd_facturas.Enabled = false; dpck_Fechavcto.Enabled = false; dpick_Fecha.Enabled = false; dtp_compromiso.Enabled = false; cmb_Moneda.Enabled = false; btn_Modificar.Visible = false; } else if (CanjeLetra.operacionLetra == "N") { Modificar = "N"; if (Ventas.UNIDADNEGOCIO == "01") { txt_SerieDcto.Text = "0001"; } else { txt_SerieDcto.Text = "0001"; } habilitarBotones(true, false); } }
private void btn_Nuevo_Click(object sender, EventArgs e) { btn_Nuevo.Enabled = false; this.Hide(); operacionLetra = "N"; CanjeLetraNuevo Check = new CanjeLetraNuevo(); Check.Show(); btn_Nuevo.Enabled = true; }