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]))); }
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()); }
public object Post(Object json) { List <Object> data = JsonConvert.DeserializeObject <List <Object> >(json.ToString()); return(TodolistHelper.ExecuteNonQuery("delete from todolist where id=" + data[0])); }