protected void Page_Load(object sender, EventArgs e)
 {
     CourseManager curso = new CourseManager();
     GridView2.DataSource = curso.getAll();
     GridView2.DataBind();
     var count = curso.getAll().Count;
     this.contador.Text = Convert.ToString(count);
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            CourseManager curso = new CourseManager();

            GridView2.DataSource = curso.getAll();
            GridView2.DataBind();
            var count = curso.getAll().Count;

            this.contador.Text = Convert.ToString(count);
        }
        protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            string codigo = e.Values["CourseID"].ToString();

            CourseManager curso = new CourseManager();
            curso.Remove(Convert.ToInt32(codigo));
            this.GridView2.DataSource = curso.getAll();
            this.GridView2.DataBind();
        }
        protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            string codigo = e.Values["CourseID"].ToString();

            CourseManager curso = new CourseManager();

            curso.Remove(Convert.ToInt32(codigo));
            this.GridView2.DataSource = curso.getAll();
            this.GridView2.DataBind();
        }