private void Details()
        {
            DBHandler.DBHandler db = new DBHandler.DBHandler(con);
            Entities.StudentExam t1 = new Entities.StudentExam()
            {
                pKId = Session["School"].ToString(),
            };
            Entities.Class c1 = new Entities.Class()
            {
                className = "Class 5",
            };
            Entities.ExamType e1 = new Entities.ExamType()
            {
                examType = "Mid term",
            };
            DataSet ds = new DataSet();
            ds = db.Graph(t1, c1, e1);

            if (ds != null
            && ds.Tables.Count > 0
            && ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    string sub;
                    string per;
                    sub = ds.Tables[0].Rows[i]["subjectName"].ToString();
                    per = ds.Tables[0].Rows[i]["Percentage"].ToString();
                    chartData = chartData + sub + "-" + per + "$";

                }
                Response.Write(chartData);
            }
        }
        private void Details()
        {
            DBHandler.DBHandler  db = new DBHandler.DBHandler(con);
            Entities.StudentExam t1 = new Entities.StudentExam()
            {
                pKId = Session["School"].ToString(),
            };
            Entities.Class c1 = new Entities.Class()
            {
                className = "Class 5",
            };
            Entities.ExamType e1 = new Entities.ExamType()
            {
                examType = "Mid term",
            };
            DataSet ds = new DataSet();

            ds = db.Graph(t1, c1, e1);

            if (ds != null &&
                ds.Tables.Count > 0 &&
                ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    string sub;
                    string per;
                    sub       = ds.Tables[0].Rows[i]["subjectName"].ToString();
                    per       = ds.Tables[0].Rows[i]["Percentage"].ToString();
                    chartData = chartData + sub + "-" + per + "$";
                }
                Response.Write(chartData);
            }
        }
Ejemplo n.º 3
0
 public void AddExamypes(Entities.ExamType e1)
 {
     using (WSqlCommand s1 = new WSqlCommand(dbconstring, "[dbo].[spInsertExamType]"))
     {
         s1.AddParameter("@examTypeId", System.Data.SqlDbType.NVarChar, e1.examTypeId);
         s1.AddParameter("@examType", System.Data.SqlDbType.NVarChar, e1.examType);
         s1.Execute();
     }
 }
Ejemplo n.º 4
0
        public DataSet Graph(Entities.StudentExam c1, Entities.Class c2, Entities.ExamType e1)
        {
            DataSet ds;

            using (WSqlCommand dbCom = new WSqlCommand(dbconstring, "[dbo].[spSelectStudentMarks]"))
            {
                dbCom.AddParameter("@studentId", SqlDbType.NVarChar, c1.pKId);
                dbCom.AddParameter("@className", SqlDbType.NVarChar, c2.className);
                dbCom.AddParameter("@examType", SqlDbType.NVarChar, e1.examType);

                ds = new DataSet();
                ds = dbCom.Execute();
            }
            return(ds);
        }
Ejemplo n.º 5
0
 protected void AddExam(object sender, EventArgs e)
 {
     Page.ClientScript.RegisterStartupScript(GetType(), "id", "toggle_forms('ExamType')", true);
     if (Page.IsValid)
     {
         DBHandler.DBHandler db = new DBHandler.DBHandler(con);
         Entities.ExamType   e1 = new Entities.ExamType()
         {
             examTypeId = ExamID.Value,
             examType   = ExamName.Value,
         };
         db.AddExamypes(e1);
         GridView1.DataBind();
         UpdatePanel1.Update();
         ExamDate1.UpdateExam();
     }
 }
        protected void AddExamDate(object sender, EventArgs e)
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "id", "toggle_forms('ExamDate')", true);
            if (Page.IsValid)
            {

                DBHandler.DBHandler db = new DBHandler.DBHandler(con);
                Entities.ExamDate cc1 = new Entities.ExamDate()
                {
                    examDate = EDate.Text,
                    totalMarks = Convert.ToInt32(TotalMarks.Value),

                };
                Entities.Section s1 = new Entities.Section()
                {
                    sectionName = DropDownList2.SelectedValue,

                };
                Entities.Class c1 = new Entities.Class()
                {
                    className = DropDownList1.SelectedValue,

                };
                Entities.Subjects s2 = new Entities.Subjects()
                {
                    subjectName = DropDownList3.SelectedValue,

                };
                Entities.personalInfo p1 = new Entities.personalInfo()
                {
                    pKId = Session["School"].ToString(),

                };

                Entities.ExamType e1 = new Entities.ExamType()
                {
                    examTypeId = DropDownList4.SelectedValue,
                };
                db.AddExamDate(cc1, s2, s1, c1, p1, e1);
                GridView1.DataBind();
                UpdatePanel1.Update();

            }
        }
Ejemplo n.º 7
0
        protected void ShowMarks(object sender, EventArgs e)
        {
            DBHandler.DBHandler  db = new DBHandler.DBHandler(con);
            Entities.StudentExam t1 = new Entities.StudentExam()
            {
                pKId = Session["School"].ToString(),
            };
            Entities.Class c1 = new Entities.Class()
            {
                className = DropDownList3.SelectedValue,
            };
            Entities.ExamType e1 = new Entities.ExamType()
            {
                examType = DropDownList4.SelectedValue,
            };
            DataSet ds = new DataSet();

            ds = db.Graph(t1, c1, e1);
            GridView7.DataSource = ds;
            GridView7.DataBind();
            Page.ClientScript.RegisterStartupScript(GetType(), "id", "toggle_forms('ProgrssStudent')", true);
        }
        protected void AddExamDate(object sender, EventArgs e)
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "id", "toggle_forms('ExamDate')", true);
            if (Page.IsValid)
            {
                DBHandler.DBHandler db  = new DBHandler.DBHandler(con);
                Entities.ExamDate   cc1 = new Entities.ExamDate()
                {
                    examDate   = EDate.Text,
                    totalMarks = Convert.ToInt32(TotalMarks.Value),
                };
                Entities.Section s1 = new Entities.Section()
                {
                    sectionName = DropDownList2.SelectedValue,
                };
                Entities.Class c1 = new Entities.Class()
                {
                    className = DropDownList1.SelectedValue,
                };
                Entities.Subjects s2 = new Entities.Subjects()
                {
                    subjectName = DropDownList3.SelectedValue,
                };
                Entities.personalInfo p1 = new Entities.personalInfo()
                {
                    pKId = Session["School"].ToString(),
                };

                Entities.ExamType e1 = new Entities.ExamType()
                {
                    examTypeId = DropDownList4.SelectedValue,
                };
                db.AddExamDate(cc1, s2, s1, c1, p1, e1);
                GridView1.DataBind();
                UpdatePanel1.Update();
            }
        }
        protected void AddExam(object sender, EventArgs e)
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "id", "toggle_forms('ExamType')", true);
            if (Page.IsValid)
            {
                DBHandler.DBHandler db = new DBHandler.DBHandler(con);
                Entities.ExamType e1 = new Entities.ExamType()
                {
                    examTypeId = ExamID.Value,
                    examType = ExamName.Value,
                };
                db.AddExamypes(e1);
                GridView1.DataBind();
                UpdatePanel1.Update();
                ExamDate1.UpdateExam();

            }
        }
Ejemplo n.º 10
0
 public void AddExamDate(Entities.ExamDate c1, Entities.Subjects s2, Entities.Section s3, Entities.Class c2, Entities.personalInfo p1, Entities.ExamType e1)
 {
     using (WSqlCommand s1 = new WSqlCommand(dbconstring, "[dbo].[spInsertExamDate]"))
     {
         s1.AddParameter("@subjectName", System.Data.SqlDbType.NVarChar, s2.subjectName);
         s1.AddParameter("@sectionName", System.Data.SqlDbType.NVarChar, s3.sectionName);
         s1.AddParameter("@className", System.Data.SqlDbType.NVarChar, c2.className);
         s1.AddParameter("@examTypeId", System.Data.SqlDbType.NVarChar, e1.examTypeId);
         s1.AddParameter("@iAm", System.Data.SqlDbType.NVarChar, p1.pKId);
         s1.AddParameter("@examDate", System.Data.SqlDbType.Date, c1.examDate);
         s1.AddParameter("@totalMarks", System.Data.SqlDbType.Int, c1.totalMarks);
         s1.Execute();
     }
 }