Exemple #1
0
        private void Ventana_Logs_Load(object sender, EventArgs e)
        {
            var logs = ControladorAdministrativo.getLogs();

            DataTable dt = new DataTable();

            dt.Columns.Add("Id", typeof(int));
            dt.Columns.Add("Fecha", typeof(string));
            dt.Columns.Add("Descripcion", typeof(string));

            foreach (Log log in logs)
            {
                dt.Rows.Add(new object[] { log.Id, log.Fecha, log.Descripcion });
            }
            dataGridView1.DataSource = dt;
        }