// GET: ToDoList public ActionResult Index() { ToDoListBLL todoListBLL = new ToDoListBLL(); List <ContentEntity> contentList = todoListBLL.GetListContentEntity(); ToDoListModel model = new ToDoListModel(); model.entityList = contentList; return(View(model)); }
public ActionResult Update(string fld_id, bool fld_status) { string response = string.Empty; ToDoListBLL todoListBLL = new ToDoListBLL(); bool isSuccess = todoListBLL.UpdateContentStatus(fld_id); if (isSuccess) { return(Json(new { success = true, responseText = "UpdateSuccess" }, JsonRequestBehavior.DenyGet));; } else { return(Json(new { success = false, responseText = "UpdateFalse" }, JsonRequestBehavior.DenyGet));; } }
public ActionResult Insert(string content) { string response = string.Empty; ToDoListBLL todoListBLL = new ToDoListBLL(); bool isSuccess = todoListBLL.AddContent(content); if (isSuccess) { return(Json(new { success = true, responseText = "InsertSuccess" }, JsonRequestBehavior.DenyGet));; } else { return(Json(new { success = false, responseText = "InsertFalse" }, JsonRequestBehavior.DenyGet));; } }