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() { 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(); }