public static TMSEvolutionOfAsthenticSensiblePhysicalGrowth Get(System.Int64 egdGrowthId) { DataSet ds; Database db; string sqlCommand; DbCommand dbCommand; TMSEvolutionOfAsthenticSensiblePhysicalGrowth instance; instance = new TMSEvolutionOfAsthenticSensiblePhysicalGrowth(); db = DatabaseFactory.CreateDatabase(); sqlCommand = "[dbo].gspTMSEvolutionOfAsthenticSensiblePhysicalGrowth_SELECT"; dbCommand = db.GetStoredProcCommand(sqlCommand, egdGrowthId); // Get results. ds = db.ExecuteDataSet(dbCommand); // Verification. if (ds == null || ds.Tables[0].Rows.Count == 0) { throw new ApplicationException("Could not get TMSEvolutionOfAsthenticSensiblePhysicalGrowth ID:" + egdGrowthId.ToString() + " from Database."); } // Return results. ds.Tables[0].TableName = TABLE_NAME; instance.MapFrom(ds.Tables[0].Rows[0]); return(instance); }
public static TMSEvolutionOfAsthenticSensiblePhysicalGrowth[] Search(System.Int64?egdGrowthId, System.Int64?egdSchoolId, System.Int64?egdSchoolSubId, System.Int64?egdStudentLoginId, System.String egdMudAndSandPlay, System.String egdSplashPool, System.String egdLikeColourPainting, System.String egdPatternWriting, System.String egdPaperTearingPastingCraftWork, System.String egdInterestArtActivites, System.String egdInterestMusicDramaActivites, System.String egdInterestPhysicalActivites, System.String egdAddedByType, System.Int64?egdAddedByLoginId, System.DateTime?egdDate, System.Int32?egdStatus) { DataSet ds; Database db; string sqlCommand; DbCommand dbCommand; db = DatabaseFactory.CreateDatabase(); sqlCommand = "[dbo].gspTMSEvolutionOfAsthenticSensiblePhysicalGrowth_SEARCH"; dbCommand = db.GetStoredProcCommand(sqlCommand, egdGrowthId, egdSchoolId, egdSchoolSubId, egdStudentLoginId, egdMudAndSandPlay, egdSplashPool, egdLikeColourPainting, egdPatternWriting, egdPaperTearingPastingCraftWork, egdInterestArtActivites, egdInterestMusicDramaActivites, egdInterestPhysicalActivites, egdAddedByType, egdAddedByLoginId, egdDate, egdStatus); ds = db.ExecuteDataSet(dbCommand); ds.Tables[0].TableName = TABLE_NAME; return(TMSEvolutionOfAsthenticSensiblePhysicalGrowth.MapFrom(ds)); }
public static TMSEvolutionOfAsthenticSensiblePhysicalGrowth[] MapFrom(DataSet ds) { List <TMSEvolutionOfAsthenticSensiblePhysicalGrowth> objects; // Initialise Collection. objects = new List <TMSEvolutionOfAsthenticSensiblePhysicalGrowth>(); // Validation. if (ds == null) { throw new ApplicationException("Cannot map to dataset null."); } else if (ds.Tables[TABLE_NAME].Rows.Count == 0) { return(objects.ToArray()); } if (ds.Tables[TABLE_NAME] == null) { throw new ApplicationException("Cannot find table [dbo].[TMS_EvolutionOfAsthenticSensiblePhysicalGrowth] in DataSet."); } if (ds.Tables[TABLE_NAME].Rows.Count < 1) { throw new ApplicationException("Table [dbo].[TMS_EvolutionOfAsthenticSensiblePhysicalGrowth] is empty."); } // Map DataSet to Instance. foreach (DataRow dr in ds.Tables[TABLE_NAME].Rows) { TMSEvolutionOfAsthenticSensiblePhysicalGrowth instance = new TMSEvolutionOfAsthenticSensiblePhysicalGrowth(); instance.MapFrom(dr); objects.Add(instance); } // Return collection. return(objects.ToArray()); }
public static void Update(TMSEvolutionOfAsthenticSensiblePhysicalGrowth tMSEvolutionOfAsthenticSensiblePhysicalGrowth, DbTransaction transaction) { tMSEvolutionOfAsthenticSensiblePhysicalGrowth.Update(transaction); }
public static void Update(TMSEvolutionOfAsthenticSensiblePhysicalGrowth tMSEvolutionOfAsthenticSensiblePhysicalGrowth) { tMSEvolutionOfAsthenticSensiblePhysicalGrowth.Update(); }
public static TMSEvolutionOfAsthenticSensiblePhysicalGrowth[] Search(TMSEvolutionOfAsthenticSensiblePhysicalGrowth searchObject) { return Search ( searchObject.EGDGrowthId, searchObject.EGDSchoolId, searchObject.EGDSchoolSubId, searchObject.EGDStudentLoginId, searchObject.EGDMudAndSandPlay, searchObject.EGDSplashPool, searchObject.EGDLikeColourPainting, searchObject.EGDPatternWriting, searchObject.EGDPaperTearingPastingCraftWork, searchObject.EGDInterestArtActivites, searchObject.EGDInterestMusicDramaActivites, searchObject.EGDInterestPhysicalActivites, searchObject.EGDAddedByType, searchObject.EGDAddedByLoginId, searchObject.EGDDate, searchObject.EGDStatus); }
public static TMSEvolutionOfAsthenticSensiblePhysicalGrowth[] MapFrom(DataSet ds) { List<TMSEvolutionOfAsthenticSensiblePhysicalGrowth> objects; // Initialise Collection. objects = new List<TMSEvolutionOfAsthenticSensiblePhysicalGrowth>(); // Validation. if (ds == null) throw new ApplicationException("Cannot map to dataset null."); else if (ds.Tables[TABLE_NAME].Rows.Count == 0) return objects.ToArray(); if (ds.Tables[TABLE_NAME] == null) throw new ApplicationException("Cannot find table [dbo].[TMS_EvolutionOfAsthenticSensiblePhysicalGrowth] in DataSet."); if (ds.Tables[TABLE_NAME].Rows.Count < 1) throw new ApplicationException("Table [dbo].[TMS_EvolutionOfAsthenticSensiblePhysicalGrowth] is empty."); // Map DataSet to Instance. foreach (DataRow dr in ds.Tables[TABLE_NAME].Rows) { TMSEvolutionOfAsthenticSensiblePhysicalGrowth instance = new TMSEvolutionOfAsthenticSensiblePhysicalGrowth(); instance.MapFrom(dr); objects.Add(instance); } // Return collection. return objects.ToArray(); }
public static TMSEvolutionOfAsthenticSensiblePhysicalGrowth Get(System.Int64 egdGrowthId) { DataSet ds; Database db; string sqlCommand; DbCommand dbCommand; TMSEvolutionOfAsthenticSensiblePhysicalGrowth instance; instance = new TMSEvolutionOfAsthenticSensiblePhysicalGrowth(); db = DatabaseFactory.CreateDatabase(); sqlCommand = "[dbo].gspTMSEvolutionOfAsthenticSensiblePhysicalGrowth_SELECT"; dbCommand = db.GetStoredProcCommand(sqlCommand, egdGrowthId); // Get results. ds = db.ExecuteDataSet(dbCommand); // Verification. if (ds == null || ds.Tables[0].Rows.Count == 0) throw new ApplicationException("Could not get TMSEvolutionOfAsthenticSensiblePhysicalGrowth ID:" + egdGrowthId.ToString()+ " from Database."); // Return results. ds.Tables[0].TableName = TABLE_NAME; instance.MapFrom( ds.Tables[0].Rows[0] ); return instance; }
public static TMSEvolutionOfAsthenticSensiblePhysicalGrowth[] Search(TMSEvolutionOfAsthenticSensiblePhysicalGrowth searchObject) { return(Search(searchObject.EGDGrowthId, searchObject.EGDSchoolId, searchObject.EGDSchoolSubId, searchObject.EGDStudentLoginId, searchObject.EGDMudAndSandPlay, searchObject.EGDSplashPool, searchObject.EGDLikeColourPainting, searchObject.EGDPatternWriting, searchObject.EGDPaperTearingPastingCraftWork, searchObject.EGDInterestArtActivites, searchObject.EGDInterestMusicDramaActivites, searchObject.EGDInterestPhysicalActivites, searchObject.EGDAddedByType, searchObject.EGDAddedByLoginId, searchObject.EGDDate, searchObject.EGDStatus)); }