public bool UpdateTask(TaskDs taskDs)
        {
            bool returnvalue = false;

            DynamicParameters param = new DynamicParameters();

            param.Add("@TaskId", taskDs.TaskId);
            param.Add("@TaskName", taskDs.TaskName);
            param.Add("@TaskDescription", taskDs.TaskDescription);
            param.Add("@TaskDuration", taskDs.TaskDuration);
            param.Add("@UniversityId", taskDs.UniversityId);
            param.Add("@Active", 1);
            param.Add("@lastupdateddt", DateTime.UtcNow);
            param.Add("@lastupdatedby", 1);

            _db.Open();
            var val = _db.Execute("YSP_UpdateTask", param, commandType: CommandType.StoredProcedure);

            if (val > 0)
            {
                returnvalue = true;
            }

            _db.Close();
            return(returnvalue);
        }
Beispiel #2
0
        public IHttpActionResult UpdateTask(TaskDs taskDs)
        {
            var isupdate = _taskRepository.UpdateTask(taskDs);

            if (isupdate == true)
            {
                return(Ok(isupdate));
            }
            return(BadRequest());
        }