Пример #1
0
 public void ConsultarTareas()
 {
     foreach (var tarea in Tareas.ToList())
     {
         Console.WriteLine($"Id: {tarea.Id} Titulo: {tarea.Titulo} Vencimiento: {tarea.Vencimiento} Estimacion: {tarea.Estimacion} Estado: {tarea.Estado}");
     }
 }
Пример #2
0
 public void nuevo()
 {
     this.codigo_Externo = this.codigo_Externo == Guid.Empty? Guid.NewGuid() : this.codigo_Externo;
     Tareas.ToList().ForEach(x => {
         x.codigo_Externo_flujo = this.codigo_Externo;
         x.nuevo();
     });
     Prerequisitos.ForEach(x => x.codigo_Externo_flujo = this.codigo_Externo);
 }
        private void Exportar()
        {
            memory = new MemoryStream();
            engine = new ExcelExportEngine();
            engine.SetFormat(ExcelVersion.XLS);
            if (ComprobantesCompra != null)
            {
                engine.AddData(ComprobantesCompra.ToList(), "ComprobantesDeCompra");
            }
            if (Jornales != null)
            {
                engine.AddData(Jornales.ToList(), "Jornales");
            }
            if (Tareas != null)
            {
                engine.AddData(Tareas.ToList(), "Tareas");
            }
            if (Utilitarios != null)
            {
                engine.AddData(Utilitarios.ToList(), "Utilitarios");
            }
            if (Materiales != null)
            {
                engine.AddData(Materiales.ToList(), "Materiales");
            }
            Mensaje m = new Mensaje();

            m.ShowDialog();
            var texto = "";

            if (m.Acepto)
            {
                try
                {
                    texto = $@"C:\ReportesGonelectProgram\{m.Result}.xls";
                    engine.Export(texto);
                }
                catch (Exception)
                {
                    MessageBox.Show($"Error al exportar el archivo {texto}");
                }
            }
        }