public List <StAttendance> GetAttendance() { var AttendanceCharge = SchoolDB.StAttendances.Where(x => x.Session == SchoolSession).OrderByDescending(x => x.ID).ToList(); AttendanceCharge.ForEach(x => x.StClass = _class.GetClassName(x.StClass)); return(AttendanceCharge); }
public string GetClassName(string ClassID) { string ClassName = string.Empty; if (!string.IsNullOrEmpty(ClassID)) { int ID = Convert.ToInt32(ClassID); ClassName = _class.GetClassName(ClassID); } return(ClassName); }
public List <tbl_homework> GetHomeworks() { ClassData _class = new ClassData(ConnectionName); var Homeworks = unitOfWork.HomeworkRepository.Get(orderBy: q => q.OrderBy(s => s.id)); Homeworks.ForEach(cc => cc.@class = _class.GetClassName(cc.@class)); return(Homeworks); }
// GET api/school/5 public List <ChartData> GetTotalClassStudent() { List <ChartData> objList = new List <ChartData>(); objList = SchoolDB.AdmissionForms.Where(x => x.ESession.Contains(SchoolSession)).ToList() .GroupBy(n => n.Class) .Select(n => new ChartData { Label = n.Key.ToString(), Data = n.Count().ToString() } ).ToList(); objList.ToList().ForEach(x => x.Label = _class.GetClassName(x.Label)); return(objList); }
// GET api/school/5 public List <StudentFeeDetail> GetStudentFeeDetail(string AdmNo, string Session = "") { string admissionNo = AdmNo.ToString(); var StFeeDetail = (from x in SchoolDB.StudentFeeDetails where x.AdmissionNo.Equals(admissionNo) && x.Session.Equals(SchoolSession) orderby x.Id descending select x); var StFeeDetails = StFeeDetail.ToList(); StFeeDetails.ForEach(x => x.Class = _class.GetClassName(x.Class)); return(StFeeDetails); }