public int GetClassID(string SelectedClass) { int ClassID = 0; ClassID = _class.GetClassID(SelectedClass); return(ClassID); }
public List <NewFeeHeading> GetNewFeeHeading(string SelectedClass) { string Selected = _class.GetClassID(SelectedClass).ToString(); var classFeeDetail = (from x in SchoolDB.NewFeeHeadings where x.Class.Equals(Selected) select x); var classFeeDetails = classFeeDetail.ToList(); return(classFeeDetails); }
public bool IsAttendanceMarked(List <StAttendance> Attendance) { Attendance.ForEach(x => x.StClass = _class.GetClassID(x.StClass).ToString()); var SelectedClass = Attendance.GroupBy( p => p.StClass, (key, g) => new { stClass = key }).FirstOrDefault(); var list = SchoolDB.StAttendances.ToList().Where(x => x.StClass == SelectedClass.stClass && x.Session == SchoolSession && x.Date.Value.ToString("MM-dd-yyyy") == DateTime.Now.ToString("MM-dd-yyyy")).ToList(); return(list.Any()); }