Пример #1
0
 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;
 }
Пример #2
0
 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;
 }
Пример #3
0
        public static Stage VerwerkRij(IDataRecord rij)
        {
            Stage type = new Stage();

            type.ID = Convert.ToInt32(rij["ID"].ToString());
            type.Name = rij["Name"].ToString();

            return type;

        }
Пример #4
0
 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;
 }