Exemplo n.º 1
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;

        }
Exemplo n.º 2
0
        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;
            }
        }
Exemplo n.º 3
0
        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);
            }

        }