Exemple #1
0
        public IHttpActionResult put(Task item)
        {
            TaskBAL ts = new TaskBAL();

            ts.UpdateTask(item);
            return(Ok("Record Updated"));
        }
Exemple #2
0
        public void updateTask()
        {
            TaskBAL     obj         = new TaskBAL();
            List <Task> Ts          = obj.GetTask();
            Task        Taskgetbyid = obj.GetTaskbyId(Ts[0].TaskId);
            int         count       = obj.GetTask().Count();
            Task        T           = (new Task {
                TaskId = Taskgetbyid.TaskId, ParentName = "ParentTaskstest", TaskName = "Testtaskname", Priority = 15, SDate = DateTime.Now, EDate = DateTime.Now
            });

            obj.UpdateTask(T);
            int         count1 = obj.GetTask().Count();
            List <Task> TS1    = obj.GetTask();

            Assert.AreEqual(T.TaskName, TS1[0].TaskName);
        }