Пример #1
0
        public void setLabel()
        {
            vReportExamsRepository v = new vReportExamsRepository();
            string id = Request.QueryString["LGID"];

            lblmianginkatbi.InnerText     = Convert.ToDouble(v.getAverageLessonGroup(id.ToInt(), 0)).ToString();
            lblmianginshafahi.InnerText   = Convert.ToDouble(v.getAverageLessonGroup(id.ToInt(), 1)).ToString();
            lblKatbiExamCount.InnerText   = v.ExamCountByLGID(id.ToInt(), 0).ToString();
            lblShafahiExamCount.InnerText = v.ExamCountByLGID(id.ToInt(), 1).ToString();

            TamrinRepository tr = new TamrinRepository();
            int cnt             = tr.countTamrinByid(id.ToInt());

            lbltamrincount.InnerText = cnt.ToString();

            vJavabeTamrinRepository jt = new vJavabeTamrinRepository();
            OzviatRepository        or = new OzviatRepository();
            int stucnt = or.countStudentsOfLessonGroupByid(id.ToInt());
            int tjt    = jt.TedadejavabeTamrin(id.ToInt());

            if (cnt == 0 || stucnt == 0)
            {
                lblanswer.InnerText = "0";
            }
            else
            {
                lblanswer.InnerText = (((Convert.ToDouble(tjt) /
                                         (stucnt * cnt) * 100))).ToString();
            }

            vLessonGroupRepository lg = new vLessonGroupRepository();
            List <string>          St = or.FindStudentCodeByLGID(id.ToInt());

            lblStuCount.InnerText = St.Count.ToString();
            vLessonGroup lgg = lg.FindByLGID(id.ToInt());

            lblTeacharName.InnerText = lgg.FirstName + " " + lgg.LastName;
            lblClassNum.InnerText    = lgg.Class;
            lblLessonTitle.InnerText = lgg.LessonTitle;

            SessionRepository sr = new SessionRepository();

            lblSessionCount.InnerText = sr.countSessionsByLGID(id.ToInt()).ToString();
        }
Пример #2
0
        public void LoadSelectedStudents()
        {
            string         id = Session["LGIDForClassMembers"].ToString();
            List <vOzviat> vs = new List <vOzviat>();
            List <string>  St = or.FindStudentCodeByLGID(id.ToInt());

            for (int i = 0; i < St.Count; i++)
            {
                vs.Add(or.FindStudentinOzviat(St[i]));
            }
            gvSelectedStudents.DataSource = OnlineTools.ToDataTable(vs);;
            gvSelectedStudents.DataBind();
            lblStudentsCount.InnerText = St.Count.ToString();
            vLessonGroup lgg = lg.FindByLGID(id.ToInt());

            lblTeacherName.InnerText = lgg.FirstName + " " + lgg.LastName;
            lblClass.InnerText       = lgg.Class;
            lblLesson.InnerText      = lgg.LessonTitle;
        }