public ActionResult getEvent() { using (MyDB mydb = new MyDB()) { EntityObjectLib.Event p = mydb.Events.Find(Request.Params["ID"]); return(Json(new { p.ID, p.Name, p.Content, p.Type })); } }
public ActionResult getMemo() { string id = Request.Params["id"]; using (MyDB mydb = new MyDB()) { EntityObjectLib.Event p = mydb.Events.Find(id); return(Json(new { success = true, data = new { p.ID, p.Name, p.Content, p.Type, p.CreateTime } })); } }