示例#1
0
        public bool RemoveContent(string fld_ID)
        {
            ToDoListDAL toDoListDAL = new ToDoListDAL();
            bool        isSuccess   = toDoListDAL.DeleteContent(fld_ID);

            return(isSuccess);
        }
示例#2
0
        public bool AddContent(string fld_content)
        {
            ToDoListDAL toDoListDAL = new ToDoListDAL();
            bool        isSuccess   = toDoListDAL.InsertContent(fld_content);

            return(isSuccess);
        }
示例#3
0
        public void DeleteContentTest()
        {
            ToDoListDAL todoDll = new ToDoListDAL();
            bool        result  = todoDll.DeleteContent("40574714");

            Assert.AreEqual(result, true);
        }
示例#4
0
        public List <ContentEntity> GetListContentEntity()
        {
            ToDoListDAL          toDoListDAL = new ToDoListDAL();
            List <ContentEntity> entity      = toDoListDAL.ReadAllContentEntity();

            return(entity);
        }
示例#5
0
        public void InsertContentTest()
        {
            ToDoListDAL todoDll = new ToDoListDAL();
            bool        result  = todoDll.InsertContent("代辦1");

            Assert.AreEqual(result, true);
        }
示例#6
0
        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);
        }
示例#7
0
        public JsonResult Post(Lista list)
        {
            string added = new ToDoListDAL(_configuration).Added(list);

            return(new JsonResult(added));
        }
示例#8
0
        public JsonResult Get()
        {
            DataTable dt = new ToDoListDAL(_configuration).GetData();

            return(new JsonResult(dt));
        }
示例#9
0
        public JsonResult Delete(int id)
        {
            string deleted = new ToDoListDAL(_configuration).Delete(id);

            return(new JsonResult(deleted));
        }
示例#10
0
        public JsonResult Put(Lista list)
        {
            string updated = new ToDoListDAL(_configuration).Updated(list);

            return(new JsonResult(updated));
        }
示例#11
0
 public void ReadEntityTest()
 {
     ToDoListDAL   todoDll = new ToDoListDAL();
     ContentEntity entity  = todoDll.ReadEntity("20166498");
 }
示例#12
0
 public void ReadAllContentEntityTest()
 {
     ToDoListDAL          todoDll = new ToDoListDAL();
     List <ContentEntity> list    = todoDll.ReadAllContentEntity();
 }