示例#1
0
        private static Joke jokeByIDRepackage(DataRow myRow)
        {
            Joke joke = new Joke();

            joke.id          = Convert.ToInt32(myRow["id"]);
            joke.title       = myRow["title"].ToString();
            joke.teaser      = myRow["teaser"].ToString();
            joke.joke_text   = myRow["joke_text"].ToString();
            joke.created_at  = Convert.ToDateTime(myRow["created_at"]);
            joke.user_id     = Convert.ToInt32(myRow["user_id"]);
            joke.category_id = Convert.ToInt32(myRow["category_id"]);
            joke.featured    = Convert.ToBoolean(myRow["featured"]);

            return(joke);
        }
示例#2
0
        // UPDATE JOKE
        public static bool UpdateJoke(Joke joke)
        {
            bool returned = SQL.JokesSQL.UpdateJoke(joke);

            return(returned);
        }
示例#3
0
        // ADD JOKE
        public static bool AddJoke(Joke joke)
        {
            bool returned = SQL.JokesSQL.CreateJoke(joke);

            return(returned);
        }