public static TMSEvolutionOfCompetitiveness Get(System.Int64 ecdCompetitiveId) { DataSet ds; Database db; string sqlCommand; DbCommand dbCommand; TMSEvolutionOfCompetitiveness instance; instance = new TMSEvolutionOfCompetitiveness(); db = DatabaseFactory.CreateDatabase(); sqlCommand = "[dbo].gspTMSEvolutionOfCompetitiveness_SELECT"; dbCommand = db.GetStoredProcCommand(sqlCommand, ecdCompetitiveId); // Get results. ds = db.ExecuteDataSet(dbCommand); // Verification. if (ds == null || ds.Tables[0].Rows.Count == 0) { throw new ApplicationException("Could not get TMSEvolutionOfCompetitiveness ID:" + ecdCompetitiveId.ToString() + " from Database."); } // Return results. ds.Tables[0].TableName = TABLE_NAME; instance.MapFrom(ds.Tables[0].Rows[0]); return(instance); }
public static TMSEvolutionOfCompetitiveness[] Search(System.Int64?ecdCompetitiveId, System.Int64?ecdSchoolId, System.Int64?ecdSchoolSubId, System.Int64?ecdStudentLoginId, System.String ecdSelfIntroduction, System.String ecdRhymesRecitation, System.String ecdFancyDress, System.String ecdSongAndDance, System.String ecdColouring, System.String ecdArtAndCraft, System.String ecdAnnualDay, System.String ecdSportsDay, System.String ecdOtherEvents, System.String ecdAddedByType, System.Int64?ecdAddedByLoginId, System.DateTime?ecdDate, System.Int32?ecdStatus) { DataSet ds; Database db; string sqlCommand; DbCommand dbCommand; db = DatabaseFactory.CreateDatabase(); sqlCommand = "[dbo].gspTMSEvolutionOfCompetitiveness_SEARCH"; dbCommand = db.GetStoredProcCommand(sqlCommand, ecdCompetitiveId, ecdSchoolId, ecdSchoolSubId, ecdStudentLoginId, ecdSelfIntroduction, ecdRhymesRecitation, ecdFancyDress, ecdSongAndDance, ecdColouring, ecdArtAndCraft, ecdAnnualDay, ecdSportsDay, ecdOtherEvents, ecdAddedByType, ecdAddedByLoginId, ecdDate, ecdStatus); ds = db.ExecuteDataSet(dbCommand); ds.Tables[0].TableName = TABLE_NAME; return(TMSEvolutionOfCompetitiveness.MapFrom(ds)); }
public static TMSEvolutionOfCompetitiveness[] MapFrom(DataSet ds) { List <TMSEvolutionOfCompetitiveness> objects; // Initialise Collection. objects = new List <TMSEvolutionOfCompetitiveness>(); // 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_EvolutionOfCompetitiveness] in DataSet."); } if (ds.Tables[TABLE_NAME].Rows.Count < 1) { throw new ApplicationException("Table [dbo].[TMS_EvolutionOfCompetitiveness] is empty."); } // Map DataSet to Instance. foreach (DataRow dr in ds.Tables[TABLE_NAME].Rows) { TMSEvolutionOfCompetitiveness instance = new TMSEvolutionOfCompetitiveness(); instance.MapFrom(dr); objects.Add(instance); } // Return collection. return(objects.ToArray()); }
public static DataSet GetSearch(TMSEvolutionOfCompetitiveness searchObject) { return(GetSearch(searchObject.ECDCompetitiveId, searchObject.ECDSchoolId, searchObject.ECDSchoolSubId, searchObject.ECDStudentLoginId, searchObject.ECDSelfIntroduction, searchObject.ECDRhymesRecitation, searchObject.ECDFancyDress, searchObject.ECDSongAndDance, searchObject.ECDColouring, searchObject.ECDArtAndCraft, searchObject.ECDAnnualDay, searchObject.ECDSportsDay, searchObject.ECDOtherEvents, searchObject.ECDAddedByType, searchObject.ECDAddedByLoginId, searchObject.ECDDate, searchObject.ECDStatus)); }
public static DataSet GetSearch(TMSEvolutionOfCompetitiveness searchObject) { return GetSearch(searchObject.ECDCompetitiveId, searchObject.ECDSchoolId, searchObject.ECDSchoolSubId, searchObject.ECDStudentLoginId, searchObject.ECDSelfIntroduction, searchObject.ECDRhymesRecitation, searchObject.ECDFancyDress, searchObject.ECDSongAndDance, searchObject.ECDColouring, searchObject.ECDArtAndCraft, searchObject.ECDAnnualDay, searchObject.ECDSportsDay, searchObject.ECDOtherEvents, searchObject.ECDAddedByType, searchObject.ECDAddedByLoginId, searchObject.ECDDate, searchObject.ECDStatus); }
public static void Update(TMSEvolutionOfCompetitiveness tMSEvolutionOfCompetitiveness, DbTransaction transaction) { tMSEvolutionOfCompetitiveness.Update(transaction); }
public static void Update(TMSEvolutionOfCompetitiveness tMSEvolutionOfCompetitiveness) { tMSEvolutionOfCompetitiveness.Update(); }
public static TMSEvolutionOfCompetitiveness[] MapFrom(DataSet ds) { List<TMSEvolutionOfCompetitiveness> objects; // Initialise Collection. objects = new List<TMSEvolutionOfCompetitiveness>(); // 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_EvolutionOfCompetitiveness] in DataSet."); if (ds.Tables[TABLE_NAME].Rows.Count < 1) throw new ApplicationException("Table [dbo].[TMS_EvolutionOfCompetitiveness] is empty."); // Map DataSet to Instance. foreach (DataRow dr in ds.Tables[TABLE_NAME].Rows) { TMSEvolutionOfCompetitiveness instance = new TMSEvolutionOfCompetitiveness(); instance.MapFrom(dr); objects.Add(instance); } // Return collection. return objects.ToArray(); }
public static TMSEvolutionOfCompetitiveness Get(System.Int64 ecdCompetitiveId) { DataSet ds; Database db; string sqlCommand; DbCommand dbCommand; TMSEvolutionOfCompetitiveness instance; instance = new TMSEvolutionOfCompetitiveness(); db = DatabaseFactory.CreateDatabase(); sqlCommand = "[dbo].gspTMSEvolutionOfCompetitiveness_SELECT"; dbCommand = db.GetStoredProcCommand(sqlCommand, ecdCompetitiveId); // Get results. ds = db.ExecuteDataSet(dbCommand); // Verification. if (ds == null || ds.Tables[0].Rows.Count == 0) throw new ApplicationException("Could not get TMSEvolutionOfCompetitiveness ID:" + ecdCompetitiveId.ToString()+ " from Database."); // Return results. ds.Tables[0].TableName = TABLE_NAME; instance.MapFrom( ds.Tables[0].Rows[0] ); return instance; }
public static void Update(TMSEvolutionOfCompetitiveness tMSEvolutionOfCompetitiveness, DbTransaction transaction) { tMSEvolutionOfCompetitiveness.Update(transaction); }
public static void Update(TMSEvolutionOfCompetitiveness tMSEvolutionOfCompetitiveness) { tMSEvolutionOfCompetitiveness.Update(); }