Beispiel #1
0
 public void InsertCampusClassSection(Entities.CampusClassSection c1, Entities.personalInfo p1)
 {
     using (WSqlCommand s1 = new WSqlCommand(dbconstring, "[dbo].[spInsertSectionClass]"))
     {
         s1.AddParameter("@pkid", System.Data.SqlDbType.NVarChar, p1.pKId);
         s1.AddParameter("@className", System.Data.SqlDbType.NVarChar, c1.className);
         s1.AddParameter("@sectionName", System.Data.SqlDbType.NVarChar, c1.sectionName);
         s1.Execute();
     }
 }
Beispiel #2
0
        public DataSet SelectClassSection(Entities.CampusClassSection c1, Entities.personalInfo p1)
        {
            DataSet ds;

            using (WSqlCommand s1 = new WSqlCommand(dbconstring, "[dbo].[spSelectCampusDetails]"))
            {
                s1.AddParameter("@pKId", System.Data.SqlDbType.NVarChar, p1.pKId);
                s1.AddParameter("@campusId", System.Data.SqlDbType.Int, c1.campusId);
                s1.AddParameter("@sectionId", System.Data.SqlDbType.Int, c1.sectionName);
                s1.AddParameter("@classId", System.Data.SqlDbType.NVarChar, c1.className);
                ds = new DataSet();
                ds = s1.Execute();
            }
            return(ds);
        }
 protected void ClassAndSection(object sender, EventArgs e)
 {
     DBHandler.DBHandler db = new DBHandler.DBHandler(con);
     Entities.CampusClassSection t1 = new Entities.CampusClassSection()
     {
         className = ClassDropDown.SelectedValue,
         sectionName = SectionDropDown.SelectedValue,
     };
     Entities.personalInfo p1 = new Entities.personalInfo()
     {
         pKId = Session["School"].ToString(),
     };
     db.InsertCampusClassSection(t1, p1);
     ClassSectionLabel.Text = "Added Successfully";
     GridView1.DataBind();
     UpdatePanel1.Update();
     Page.ClientScript.RegisterStartupScript(GetType(), "id", "toggle_forms('ClassAndSection')", true);
 }
 protected void ClassAndSection(object sender, EventArgs e)
 {
     DBHandler.DBHandler         db = new DBHandler.DBHandler(con);
     Entities.CampusClassSection t1 = new Entities.CampusClassSection()
     {
         className   = ClassDropDown.SelectedValue,
         sectionName = SectionDropDown.SelectedValue,
     };
     Entities.personalInfo p1 = new Entities.personalInfo()
     {
         pKId = Session["School"].ToString(),
     };
     db.InsertCampusClassSection(t1, p1);
     ClassSectionLabel.Text = "Added Successfully";
     GridView1.DataBind();
     UpdatePanel1.Update();
     Page.ClientScript.RegisterStartupScript(GetType(), "id", "toggle_forms('ClassAndSection')", true);
 }