Exemplo n.º 1
0
        public void AnularFac()
        {
            FacturasDb xAnular  = new FacturasDb();
            string     Conexion = Properties.Settings.Default.Conexion;

            try
            {
                string Serie      = (ddSerie.SelectedValue.ToString());
                int    Numero     = int.Parse(txtNumero.Text);
                bool   Completado = xAnular.AnularFacturas(Serie, Numero, Conexion);
                if (Completado == true)
                {
                    Mensaje("Factura fue anulada exitosamente.", "success", "");
                    btnPreAnular.Visible = false;
                }
                else
                {
                    Mensaje("La factura no se ha podido anular.", "danger", "");
                }
            }
            catch (Exception ex)
            {
                Mensaje("Error: ", "danger", ex.Message);
            }
        }