private void setGrid()
        {
            vReportExamsRepository vr = new vReportExamsRepository();

            gvClasses.DataSource = vr.topClassesByGradeID(id.ToInt());
            gvClasses.DataBind();
        }
示例#2
0
        private void setGrid()
        {
            vReportExamsRepository v = new vReportExamsRepository();

            gvStudents.DataSource = v.getRizNomaratOfstudentOfLessonGroup(stuID, lgid);
            gvStudents.DataBind();

            foreach (GridViewRow row in gvStudents.Rows)
            {
                switch (row.Cells[4].Text)
                {
                case "0":
                    row.Cells[4].Text = "کتبی";
                    break;

                case "1":
                    row.Cells[4].Text = "شفاهی";
                    break;
                }
                string s = row.Cells[2].Text;
                s = s.Substring(0, 4) + '/' + s.Substring(4, 2) + '/' + s.Substring(6, 2);

                row.Cells[2].Text = s;
            }
        }
        private void setGridView()
        {
            vReportExamsRepository rep = new vReportExamsRepository();

            gvStudents.DataSource = rep.fieldsAverage(fid, gid);
            gvStudents.DataBind();
        }
        private void setGridView()
        {
            vReportExamsRepository vre = new vReportExamsRepository();

            gvStudents.DataSource = vre.topStudentsAverageByLGID(id.ToInt());
            gvStudents.DataBind();
        }
示例#5
0
        private void setGridView()
        {
            string id = Request.QueryString["LGID"];
            vReportExamsRepository vre = new vReportExamsRepository();

            gvStudents.DataSource = vre.topStudentsAverageByLGID(id.ToInt());
            gvStudents.DataBind();
        }
        private void setLabels()
        {
            GradesRepository gr = new GradesRepository();

            lblMaghta.InnerText = gr.getGradeTitleByID(id.ToInt());

            StudentRepository s = new StudentRepository();

            lblStudentCount.InnerText = s.studentCountbyGradeID(id.ToInt()).ToString();

            vReportExamsRepository vre = new vReportExamsRepository();

            lblmianginkatbi.InnerText   = Convert.ToDouble(vre.getAverageGrade(id.ToInt(), 0)).ToString();
            lblmianginshafahi.InnerText = Convert.ToDouble(vre.getAverageGrade(id.ToInt(), 1)).ToString();
        }
示例#7
0
        private void setLabels()
        {
            vReportExamsRepository r = new vReportExamsRepository();

            lblMiabginKatbi.InnerText   = r.getStudentAverageOfLessonGorup(stuID, lgid, 0).ToString();
            lblMianginShafahi.InnerText = r.getStudentAverageOfLessonGorup(stuID, lgid, 1).ToString();

            TamrinRepository t = new TamrinRepository();

            lblTamrinCount.InnerText = t.countTamrinByid(lgid).ToString();

            vJavabeTamrinRepository v = new vJavabeTamrinRepository();

            lblAnswer.InnerText = v.countJavabeTamrinByStuCode_Lgid(stuID, lgid).ToString();
        }
        public void setLabel()
        {
            GradesRepository gr = new GradesRepository();

            lblMaghta.InnerText = gr.getGradeTitleByID(gid);
            FieldsRepository fr = new FieldsRepository();

            lblReshte.InnerText = fr.getFieldTitleByID(fid);

            StudentRepository sr = new StudentRepository();

            lblStudentsCount.InnerText = sr.countStudentsByFieldID_GradeID(fid, gid).ToString();

            vReportExamsRepository rep = new vReportExamsRepository();

            lblmianginkatbi.InnerText   = rep.getAverageOfFieldOfgrade(fid, gid, 0).ToString();
            lblmianginshafahi.InnerText = rep.getAverageOfFieldOfgrade(fid, gid, 1).ToString();
        }
示例#9
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();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            vReportExamsRepository rep = new vReportExamsRepository();
            vLessonGroupRepository lgr = new vLessonGroupRepository();

            List <List <decimal?> > datalist = new List <List <decimal?> >();
            List <decimal?>         ll;
            List <string>           studentsList  = new List <string>();
            List <string>           studentsNames = new List <string>();

            // string year = lgr.GetLastestYear();
            studentsList  = lgr.GetStudentCodeOfLessonGroup(lgid);
            studentsNames = lgr.GetStudentNameOfLessonGroup(lgid);
            int studentCount = studentsList.Count;

            List <string> s = new List <string>()
            {
                "مهر", "آبان", "آذر", "دی", "بهمن", "اسفند", "فروردین", "اردیبهشت", "خرداد"
            };

            //.ConvertAll(new Converter<decimal?, decimal>())

            for (int i = 0; i < studentCount; i++)
            {
                ll = new List <decimal?>();
                ll = rep.GetAvgOfStudentPerMonth(studentsList[i]);
                datalist.Add(ll);
            }
            List <decimal?> l;
            List <List <LineSeriesData> > liststudentdata = new List <List <LineSeriesData> >();
            List <LineSeriesData>         studentData;

            for (int i = 0; i < datalist.Count; i++)
            {
                l           = new List <decimal?>();
                l           = datalist[i];
                studentData = new List <LineSeriesData>();
                l.ForEach(p => studentData.Add(new LineSeriesData {
                    Y = (double)p
                }));
                liststudentdata.Add(studentData);
            }

            LineSeries ss;

            List <Series> ser = new List <Series>();

            for (int i = 0; i < datalist.Count; i++)
            {
                ss      = new LineSeries();
                ss.Name = studentsNames[i];
                ss.Data = liststudentdata[i];

                ser.Add(ss);
            }

            Highcharts higcharts = new Highcharts
            {
                Title = new Title
                {
                    Text = "نمودار پیشرفت",
                    X    = -20
                },
                Subtitle = new Subtitle
                {
                    Text = "میانگین نمرات ماهانه کلاس",
                    X    = -20
                },
                XAxis = new List <XAxis>
                {
                    new XAxis
                    {
                        Categories = s
                    }
                },
                YAxis = new List <YAxis>
                {
                    new YAxis
                    {
                        Title = new YAxisTitle
                        {
                            Text = "نمره"
                        },
                        PlotLines = new List <YAxisPlotLines>                    {
                            new YAxisPlotLines
                            {
                                Value = 0,
                                Width = 1,
                                Color = "#808080"
                            }
                        }
                    }
                },
                Tooltip = new Tooltip
                {
                    ValueSuffix = ""
                },
                Legend = new Legend
                {
                    Layout        = LegendLayout.Vertical,
                    Align         = LegendAlign.Right,
                    VerticalAlign = LegendVerticalAlign.Middle,
                    BorderWidth   = 0
                },
                Series = ser
            };

            //Title t = new Title();
            //t.Text = "Monthly Average Temperature";
            //t.X = -20;
            //higcharts.Title = t;

            //Subtitle sub = new Subtitle();
            //sub.Text = "Source: WorldClimate.com";
            //sub.X = -20;

            HighsoftNamespace Highsoft = new HighsoftNamespace();

            //string result = Highsoft.Highcharts(higcharts, "chart").ToHtmlString(); //For version 5.0.6326 or older
            string result = Highsoft.GetHighcharts(higcharts, "chart").ToHtmlString(); //For version 5.0.6327 or newer

            Response.Write(result);
        }