예제 #1
0
        public static List <DayCarePL.ChildDataProperties> GetChildList(Guid SchoolYearId)
        {
            DayCarePL.Logger.Write(DayCarePL.LogType.INFO, DayCarePL.ModuleToLog.clChildList, "LoadChildAttendanceHistoryList", "LoadChildAttendanceHistoryList method called", DayCarePL.Common.GUID_DEFAULT);
            clConnection.DoConnection();
            DayCareDataContext db = new DayCareDataContext();
            List <DayCarePL.ChildDataProperties> lstChildList = new List <DayCarePL.ChildDataProperties>();

            try
            {
                DayCarePL.Logger.Write(DayCarePL.LogType.DEBUG, DayCarePL.ModuleToLog.clFamilyPayment, "LoadChildAttendanceHistoryList", "Debug LoadChildAttendanceHistoryList called", DayCarePL.Common.GUID_DEFAULT);
                DayCarePL.ChildDataProperties objChildList = null;
                var data = db.spGetChildList(SchoolYearId);
                foreach (var c in data)
                {
                    objChildList = new DayCarePL.ChildDataProperties();
                    objChildList.ChildSchoolYearId = c.Id;
                    objChildList.FullName          = c.ChildFullName;
                    objChildList.Photo             = c.Photo;
                    lstChildList.Add(objChildList);
                }
                return(lstChildList);
            }
            catch (Exception ex)
            {
                DayCarePL.Logger.Write(DayCarePL.LogType.EXCEPTION, DayCarePL.ModuleToLog.clChildProgEnrollment, "Save", ex.Message.ToString(), DayCarePL.Common.GUID_DEFAULT);
                return(null);
            }
        }