public static List <DayCarePL.ChildDataProperties> GetAllChildListForImport(Guid CurrentSchoolYearId, Guid PreSchoolYearId, Guid SchoolId) { DayCarePL.Logger.Write(DayCarePL.LogType.INFO, DayCarePL.ModuleToLog.clChildSchoolYear, "GetAllChildListForImport", "Execute GetAllChildListForImport Method", DayCarePL.Common.GUID_DEFAULT); clConnection.DoConnection(); DayCareDataContext db = new DayCareDataContext(); try { DayCarePL.Logger.Write(DayCarePL.LogType.DEBUG, DayCarePL.ModuleToLog.clChildSchoolYear, "GetAllChildListForImport", "Debug GetAllChildListForImport Method", DayCarePL.Common.GUID_DEFAULT); var Data = db.spGetAllChildListForImport(CurrentSchoolYearId, PreSchoolYearId, SchoolId); DayCarePL.ChildDataProperties objChildData; List <DayCarePL.ChildDataProperties> lstChildData = new List <DayCarePL.ChildDataProperties>(); foreach (var d in Data) { objChildData = new DayCarePL.ChildDataProperties(); objChildData.ChildDataId = d.ChildDataId; objChildData.FullName = d.FullName; objChildData.FamilyName = d.FamilyName; objChildData.ChildFamilyId = d.ChildFamilyId; objChildData.Active = d.Active == null ? false : d.Active.Value; objChildData.ImportedCount = d.ImportedCount == null ? 0 : d.ImportedCount.Value; lstChildData.Add(objChildData); } return(lstChildData);; } catch (Exception ex) { DayCarePL.Logger.Write(DayCarePL.LogType.EXCEPTION, DayCarePL.ModuleToLog.clChildSchoolYear, "GetAllChildListForImport", ex.Message.ToString(), DayCarePL.Common.GUID_DEFAULT); return(new List <DayCarePL.ChildDataProperties>()); } }