public Task getTask(string taskName)
        {
            Task serviceTask = new Task();
            if (System.Threading.Monitor.TryEnter(obj3, 10000))
            {
                try
                {
                    serviceTask.TaskName = TaskControl.getTask(taskName).taskName;
                    serviceTask.Status = TaskControl.getTask(taskName).status;
                    serviceTask.Description = TaskControl.getTask(taskName).description;
                }
                catch (NullReferenceException)
                {

                }
                finally
                {
                    System.Threading.Monitor.Exit(obj3);
                }
            }
            return serviceTask;
        }
        public List<Task> getTasks()
        {
            List<Task> tsk = new List<Task>();

            if (System.Threading.Monitor.TryEnter(obj4, 10000))
            {
                try
                {

                    List<HealthCareModel.Object_Models.Task> returnList = TaskControl.getTasks();

                    if (returnList.Count != 0)
                    {
                        foreach (HealthCareModel.Object_Models.Task tskHost in returnList)
                        {
                            Task serviceTask = new Task();

                            serviceTask.TaskName = tskHost.taskName;
                            serviceTask.Status = tskHost.status;
                            serviceTask.Description = tskHost.description;

                            tsk.Add(serviceTask);
                        }
                    }
                }
                catch (NullReferenceException)
                {
                }
                finally
                {
                    System.Threading.Monitor.Exit(obj4);
                }
            }

            return tsk;
        }
        public List<Task> getUserTasks(string username)
        {
            List<Task> tasks = new List<Task>();

            if (System.Threading.Monitor.TryEnter(obj7, 10000))
            {
                try
                {

                    List<HealthCareModel.Object_Models.Task> returnList = ExtendedControl.getUserTasks(username);

                    if (returnList.Count != 0)
                    {
                        foreach (HealthCareModel.Object_Models.Task tskHost in returnList)
                        {
                            Task srvTask = new Task();

                            srvTask.TaskName = tskHost.taskName;
                            srvTask.Status = tskHost.status;
                            srvTask.Description = tskHost.description;

                            tasks.Add(srvTask);
                        }
                    }
                }
                catch (NullReferenceException)
                {
                }
                finally
                {
                    System.Threading.Monitor.Exit(obj7);
                }
            }

            return tasks;
        }