示例#1
0
        protected void displaySections()
        {
            DataSet ds = new DataSet();

            ds = this.ConnSQL.getSectionsList();
            SectionsList.DataSource = ds.Tables["sectionslist"].DefaultView;
            SectionsList.DataBind();
        }
示例#2
0
        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();
        }
示例#3
0
 protected void SectionsList_PageIndexChanging(Object sender, GridViewPageEventArgs e)
 {
     SectionsList.PageIndex = e.NewPageIndex;
     SectionsList.DataBind();
 }