public bool RemoveContent(string fld_ID) { ToDoListDAL toDoListDAL = new ToDoListDAL(); bool isSuccess = toDoListDAL.DeleteContent(fld_ID); return(isSuccess); }
public bool AddContent(string fld_content) { ToDoListDAL toDoListDAL = new ToDoListDAL(); bool isSuccess = toDoListDAL.InsertContent(fld_content); return(isSuccess); }
public void DeleteContentTest() { ToDoListDAL todoDll = new ToDoListDAL(); bool result = todoDll.DeleteContent("40574714"); Assert.AreEqual(result, true); }
public List <ContentEntity> GetListContentEntity() { ToDoListDAL toDoListDAL = new ToDoListDAL(); List <ContentEntity> entity = toDoListDAL.ReadAllContentEntity(); return(entity); }
public void InsertContentTest() { ToDoListDAL todoDll = new ToDoListDAL(); bool result = todoDll.InsertContent("代辦1"); Assert.AreEqual(result, true); }
public bool UpdateContentStatus(string fld_ID) { ToDoListDAL toDoListDAL = new ToDoListDAL(); ContentEntity entity = toDoListDAL.ReadEntity(fld_ID); bool fld_status = entity.fld_status ? false : true; bool isSuccess = toDoListDAL.UpdateContent(fld_ID, fld_status); return(isSuccess); }
public JsonResult Post(Lista list) { string added = new ToDoListDAL(_configuration).Added(list); return(new JsonResult(added)); }
public JsonResult Get() { DataTable dt = new ToDoListDAL(_configuration).GetData(); return(new JsonResult(dt)); }
public JsonResult Delete(int id) { string deleted = new ToDoListDAL(_configuration).Delete(id); return(new JsonResult(deleted)); }
public JsonResult Put(Lista list) { string updated = new ToDoListDAL(_configuration).Updated(list); return(new JsonResult(updated)); }
public void ReadEntityTest() { ToDoListDAL todoDll = new ToDoListDAL(); ContentEntity entity = todoDll.ReadEntity("20166498"); }
public void ReadAllContentEntityTest() { ToDoListDAL todoDll = new ToDoListDAL(); List <ContentEntity> list = todoDll.ReadAllContentEntity(); }