Пример #1
0
        private void FacturasToolStripMenuItem_Click(object sender, EventArgs e)
        {
            RepositorioBase <Facturas> repositorio = new RepositorioBase <Facturas>();
            List <Facturas>            lista       = new List <Facturas>();

            lista = repositorio.GetList(p => true);
            if (lista.Count > 0)
            {
                MessageBox.Show("Un momento por favor.", "ButterSoft", MessageBoxButtons.OK, MessageBoxIcon.Information);
                ReporteFactura reporte = new ReporteFactura(lista);
                reporte.ShowDialog();
            }
            else
            {
                MessageBox.Show("No hay datos para imprimir.", "ButterSoft", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Пример #2
0
 private void Imprimirbutton_Click(object sender, EventArgs e)
 {
     if (listado == null || listado.Count <= 0)
     {
         MyerrorProvider.Clear();
         MyerrorProvider.SetError(Imprimirbutton, "No hay datos para imprimir.");
         return;
     }
     else
     {
         if (listado.Count > 0)
         {
             ReporteFactura reporte = new ReporteFactura(listado);
             reporte.ShowDialog();
         }
         else
         {
             MyerrorProvider.Clear();
             MyerrorProvider.SetError(Imprimirbutton, "No hay datos para imprimir.");
             return;
         }
     }
 }