private void btnConsultar_Click(object sender, EventArgs e) { if (btnConsultar.Text.Equals("Imprimir")) { Imprimit im = new Imprimit(); im.Show(); } else { if (validarRegistro()) { guardarFactura(); if (MessageBox.Show("Factura emitida con éxito\n¿Desea imprimir la factura?", "Imprimir", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { Imprimit im = new Imprimit(); im.Show(); } else { this.Close(); } } } }
private void btnImprimir_Click(object sender, EventArgs e) { Imprimit im = new Imprimit(); im.Show(); }