static void Main(string[] args)
 {
     Console.WriteLine("Insertion of alarm attendant via controller");
     Console.ReadLine();
     ExtendedControl.createAlarmAttendance("cacat", "shortie");
     Console.ReadLine();
 }
        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);
        }
 public void createAlarmCount(string alarmName)
 {
     if (System.Threading.Monitor.TryEnter(obj4, 10000))
     {
         try
         {
             ExtendedControl.createAlarmCount(alarmName);
         }
         finally
         {
             System.Threading.Monitor.Exit(obj4);
         }
     }
 }
 public void deleteAlarmAttendance(string alarmName, string userName)
 {
     if (System.Threading.Monitor.TryEnter(obj2, 10000))
     {
         try
         {
             ExtendedControl.deleteAlarmAttendance(alarmName, userName);
         }
         finally
         {
             System.Threading.Monitor.Exit(obj2);
         }
     }
 }
 public void incrementAlarmCount(int alarmId)
 {
     if (System.Threading.Monitor.TryEnter(obj12, 10000))
     {
         try
         {
             ExtendedControl.incrementAlarmCount(alarmId);
         }
         finally
         {
             System.Threading.Monitor.Exit(obj12);
         }
     }
 }
 public void createPublishedAlarm(int alarmId, int publisherId)
 {
     if (System.Threading.Monitor.TryEnter(obj10, 10000))
     {
         try
         {
             ExtendedControl.createPublishedAlarm(alarmId, publisherId);
         }
         finally
         {
             System.Threading.Monitor.Exit(obj10);
         }
     }
 }
 public void deleteAssignedTask(string taskName, string username)
 {
     if (System.Threading.Monitor.TryEnter(obj9, 10000))
     {
         try
         {
             ExtendedControl.deleteAssignedTask(taskName, username);
         }
         finally
         {
             System.Threading.Monitor.Exit(obj9);
         }
     }
 }
        public int getPublisherId(int alarmId)
        {
            int returnId = 0;

            if (System.Threading.Monitor.TryEnter(obj11, 10000))
            {
                try
                {
                    returnId = ExtendedControl.getPublisherId(alarmId);
                }
                catch (NullReferenceException)
                {
                }
                finally
                {
                    System.Threading.Monitor.Exit(obj11);
                }
            }

            return(returnId);
        }
        // public void deleteAlarmCount(int alarmId){    } - no practical implementation yet?

        public int getAlarmCount(int alarmId)
        {
            int counts = 0;

            //ServiceAlarmCount serviceCount = new ServiceAlarmCount();
            if (System.Threading.Monitor.TryEnter(obj5, 10000))
            {
                try
                {
                    //serviceCount.AlarmId = ExtendedControl.getAlarmCount(alarmId).alarmId;
                    //serviceCount.Count = ExtendedControl.getAlarmCount(alarmId).count;
                    counts = ExtendedControl.getAlarmCount(alarmId).count;
                }
                catch (NullReferenceException)
                {
                }
                finally
                {
                    System.Threading.Monitor.Exit(obj5);
                }
            }
            return(counts);
        }
        public List <User> getAllarmAttendants(string alarmName)
        {
            List <User> alarmAttendants = new List <User>();

            if (System.Threading.Monitor.TryEnter(obj3, 10000))
            {
                try
                {
                    List <HealthCareModel.Object_Models.User> returnList = ExtendedControl.getAllarmAttendants(alarmName);

                    if (returnList.Count != 0)
                    {
                        foreach (HealthCareModel.Object_Models.User attendantHome in returnList)
                        {
                            User srvUser = new User();

                            srvUser.FirstName = attendantHome.firstName;
                            srvUser.LastName  = attendantHome.lastName;
                            srvUser.UserName  = attendantHome.userName;
                            srvUser.Role      = attendantHome.role;

                            alarmAttendants.Add(srvUser);
                        }
                    }
                }
                catch (NullReferenceException)
                {
                }
                finally
                {
                    System.Threading.Monitor.Exit(obj3);
                }
            }

            return(alarmAttendants);
        }
        //  public void incrementAlarmCount(int alarmId) { } - no practical implementation yet

        public List <User> getTaskUsers(string taskName)
        {
            List <User> srvTaskUsers = new List <User>();

            if (System.Threading.Monitor.TryEnter(obj6, 10000))
            {
                try
                {
                    List <HealthCareModel.Object_Models.User> returnList = ExtendedControl.getTaskUsers(taskName);

                    if (returnList.Count != 0)
                    {
                        foreach (HealthCareModel.Object_Models.User userHost in returnList)
                        {
                            User srvUser = new User();

                            srvUser.FirstName = userHost.firstName;
                            srvUser.LastName  = userHost.lastName;
                            srvUser.UserName  = userHost.userName;
                            srvUser.Role      = userHost.role;

                            srvTaskUsers.Add(srvUser);
                        }
                    }
                }
                catch (NullReferenceException)
                {
                }
                finally
                {
                    System.Threading.Monitor.Exit(obj6);
                }
            }

            return(srvTaskUsers);
        }
Exemple #12
0
 private void EventHandler(object sender, EventArgs e)
 {
     ExtendedControl.GetBindingExpression(ContentControl.ContentProperty).UpdateTarget();
 }
Exemple #13
0
 private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     HelpText.GetBindingExpression(TextBox.TextProperty).UpdateTarget();
     ExtendedControl.GetBindingExpression(ContentControl.ContentProperty).UpdateTarget();
 }
Exemple #14
0
 /// <summary>
 /// Creates a new control with the current View as parent.
 /// </summary>
 /// <param name="enterOnInitialize">if set to <c>true</c>, the Enter Action will be triggered automatically. Default is true.</param>
 /// <typeparam name="TControlView">The type of the page view.</typeparam>
 /// <typeparam name="TControlViewModel">The type of the page view model.</typeparam>
 public TControlView CreateControl <TControlView, TControlViewModel>(bool enterOnInitialize = true)
     where TControlViewModel : ViewModel <TControlView, TControlViewModel>, new()
     where TControlView : ExtendedControl <TControlView, TControlViewModel>, new()
 {
     return(ExtendedControl <TControlView, TControlViewModel> .Create(View, _actionQueueManager, enterOnInitialize));
 }