public Sum_StudyFactDateCycle GetByStudentDate(int studentId, int classId, DateTime asOfDate, DateCycleTypeEnum cycle) { string sql = "select * from Sum_StudyFactDateCycle where Sdc_Date=@Date and Sdc_StudentId=@StudentId and Sdc_ClassId=@ClassId and Sdc_CycleType=@CycleType"; Sum_StudyFactDateCycle entity = Query(sql, new { StudentId = studentId, Date = asOfDate, ClassId = classId, CycleType = cycle }).FirstOrDefault(); if (entity != null) { entity.EnableAudit(); } return(entity); }
public Sum_StudyFactDateCycle GetCycleData(int studentId, int classId, DateTime asOfDate, DateCycleTypeEnum cycle) { Sum_StudyFactDateCycle daily = DateCycleRepository.GetByStudentDate(studentId, classId, asOfDate, cycle); return(daily); }