Example #1
0
        public object Post(Object json)
        {
            List <Object> data = JsonConvert.DeserializeObject <List <Object> >(json.ToString());

            return(TodolistHelper.ExecuteNonQuery("UPDATE TODOLIST SET COMPLETE=:complete,TITLE=:title WHERE ID=:id",
                                                  new OracleParameter("id", data[0]), new OracleParameter("title", data[1]), new OracleParameter("complete", data[2])));
        }
Example #2
0
        public int Post(Object json)
        {
            List <Object> data = JsonConvert.DeserializeObject <List <Object> >(json.ToString());

            TodolistHelper.ExecuteNonQuery("insert into todolist(title,complete) values('" + data[0] + "',0)");
            return(TodolistHelper.ExecuteScalar("select increment_sequence.currval from dual").ToString().AsInt());
        }
Example #3
0
        public object Post(Object json)
        {
            List <Object> data = JsonConvert.DeserializeObject <List <Object> >(json.ToString());

            return(TodolistHelper.ExecuteNonQuery("delete from todolist where id=" + data[0]));
        }