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 void DeleteType(Stage SelectedStage) { try { DbParameter paramName = Database.AddParameter("@Name", SelectedStage.Name); Database.ModifyData("DELETE FROM Stages WHERE Name = @Name", paramName); } catch (Exception e) { throw e; } }
public static void AddType(Stage SelectedStage) { try { DbParameter paramName = Database.AddParameter("@Name", SelectedStage.Name); Database.ModifyData("INSERT INTO Stages (Name) values (@Name)", paramName); } catch (Exception e) { Console.WriteLine(e.Message); } }