private static Stage CreateStage(DbDataReader rij) { Stage stage = new Stage(); stage.ID = Int32.Parse(rij["ID"].ToString()); stage.Name = Convert.ToString(rij["Name"]); //stage.Bands = LineUpRepository.GetBandsByLineUpID(Convert.ToInt32(rij["ID"])); stage.Bands = LineUpRepository.GetBandsByLineUpID(Convert.ToInt32(rij["ID"])); return stage; }
private static Stage CreateStageWithDate(DbDataReader reader, DateTime date) { Stage stage = new Stage(); stage.ID = Int32.Parse(reader["ID"].ToString()); stage.Name = Convert.ToString(reader["Name"]); stage.Bands = LineUpRepository.GetBandsByLineUpIDAndDate(Convert.ToInt32(reader["ID"]), date); stage.datum = date; return stage; }
public static Stage VerwerkRij(IDataRecord rij) { Stage type = new Stage(); type.ID = Convert.ToInt32(rij["ID"].ToString()); type.Name = rij["Name"].ToString(); return type; }
public static Stage GetStageByID(int id) { Stage gevondenStage = new Stage(); DbParameter par1 = Database.AddParameter("@id", id); DbDataReader reader = Database.GetData("SELECT * FROM stages WHERE ID = @id", par1); while (reader.Read()) { gevondenStage.Name = reader["Name"].ToString(); } return gevondenStage; }