Exemple #1
0
 protected void AddCourse(object sender, EventArgs e)
 {
     Page.ClientScript.RegisterStartupScript(GetType(), "id", "toggle_forms('Courses')", true);
     if (Page.IsValid)
     {
         DBHandler.DBHandler db = new DBHandler.DBHandler(con);
         Entities.Subjects   t1 = new Entities.Subjects()
         {
             subjectId   = CourseId.Value,
             subjectName = CourseName.Value,
         };
         db.AddCourse(t1);
         GridView2.DataBind();
         UpdatePanel4.Update();
         TecherSection1.UpdateCourse();
         ExamDate1.UpdateCourse();
     }
 }
Exemple #2
0
 protected void AddSection(object sender, EventArgs e)
 {
     Page.ClientScript.RegisterStartupScript(GetType(), "id", "toggle_forms('AddSections')", true);
     if (Page.IsValid)
     {
         DBHandler.DBHandler db = new DBHandler.DBHandler(con);
         Entities.Section    t1 = new Entities.Section()
         {
             sectionName = SectionName.Value,
         };
         db.InsertSection(t1);
         SSections.DataBind();
         GSections.DataBind();
         UpdatePanel3.Update();
         AddClassSection1.UpdateSection();
         TecherSection1.UpdateSection();
         StudentSection1.UpdateSection();
         ExamDate1.UpdateSection();
         SectionLabel.Text = "Section Added Successfully";
     }
 }
Exemple #3
0
 protected void AddClass(object sender, EventArgs e)
 {
     Page.ClientScript.RegisterStartupScript(GetType(), "id", "toggle_forms('AddClasses')", true);
     if (Page.IsValid)
     {
         DBHandler.DBHandler db = new DBHandler.DBHandler(con);
         Entities.Class      t1 = new Entities.Class()
         {
             classId   = ClassId.Value,
             className = ClassName.Value,
         };
         db.InsertClass(t1);
         SClasses.DataBind();
         GClasses.DataBind();
         UpdatePanel2.Update();
         AddClassSection1.UpdateClass();
         TecherSection1.UpdateClass();
         StudentSection1.UpdateClass();
         ExamDate1.UpdateClass();
         ClassLabel.Text = "Class Added Successfully";
     }
 }