protected void displaySections() { DataSet ds = new DataSet(); ds = this.ConnSQL.getSectionsList(); SectionsList.DataSource = ds.Tables["sectionslist"].DefaultView; SectionsList.DataBind(); }
protected void btnAddNewSection_Click(object sender, EventArgs e) { string sectionName = SectionName.Text; string sectionDesc = SectionDesc.Text; int sectionID = 0; // logger.Debug("Add New Section: " + sectionName.Length + " " + sectionDesc.Length); if (sectionName.Length >= 3 && sectionDesc.Length >= 3) { // logger.Debug("Add New Section: "+sectionName+" "+sectionDesc); try { sectionID = AdminSections.AddNewSection(sectionName, sectionDesc); } catch (Exception ex) { logger.Error("Add New Section Error: " + ex.Message); } SectionName.Text = ""; SectionDesc.Text = ""; } SectionsList.DataBind(); }
protected void SectionsList_PageIndexChanging(Object sender, GridViewPageEventArgs e) { SectionsList.PageIndex = e.NewPageIndex; SectionsList.DataBind(); }