Esempio n. 1
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            try
            {
                FacturaBL ObjetoFactura = new FacturaBL();
                //Numero de Factura Generada
                Int32 FacturaID = Convert.ToInt32(ObjetoFactura.Crear(ObtenerFactura()));

                //Insertamos el detalle de factura
                if (FacturaID != -1)
                {
                    try
                    {
                        //Insertamos el detalle de la factura
                        InsertarDetalle(FacturaID);

                        //Mostramos el modulo de pagos
                        frmrptCotizacion PagarFactura = new frmrptCotizacion(FacturaID);
                        PagarFactura.ShowDialog(this);
                        //Inhabilitamos el boton de guardar para evitar que se guarde nuevamente la factura;
                        btnGuardar.Enabled = false;
                    }
                    catch (Exception Ex)
                    {
                        MessageBox.Show(Ex.Message, "Error en facturacion", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
            catch (Exception Ex)
            {
                MessageBox.Show(Ex.Message, "Error al Crear Cotizacion", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 2
0
        private void btnVisualizar_Click(object sender, EventArgs e)
        {
            //Ver Cotizacion Existente
            frmrptCotizacion ReporteCotizacion = new frmrptCotizacion(FacturaID);

            ReporteCotizacion.ShowDialog(this);
        }