Example #1
0
        public static int Add(Vote_Channel vote_channel)
        {
            const string query = "INSERT INTO vote_channel(aktiv, vote, channel) VALUES(@aktiv, @vote, @channel)";

            var args = new Dictionary <string, object>
            {
                { "@aktiv", vote_channel.aktiv },
                { "@vote", vote_channel.vote },
                { "@channel", vote_channel.channel }
            };

            return(Data.ExecuteWrite(query, args));
        }
Example #2
0
        public static int Edit(Vote_Channel vote_channel)
        {
            const string query = "UPDATE vote_channel SET aktiv = @aktiv, vote = @vote, channel = @channel WHERE id = @id";

            var args = new Dictionary <string, object>
            {
                { "@id", vote_channel.id },
                { "@aktiv", vote_channel.aktiv },
                { "@vote", vote_channel.vote },
                { "@channel", vote_channel.channel }
            };

            return(Data.ExecuteWrite(query, args));
        }