public void updateAlarmPublisher(int id, string pacientName, string condition, string location, string password)
 {
     if (System.Threading.Monitor.TryEnter(obj4, 10000))
     {
         try
         {
             AlarmPublisherControl.updateAlarmPublisher(id, pacientName, condition, location, password);
         }
         finally
         {
             System.Threading.Monitor.Exit(obj4);
         }
     }
 }
 public void createAlarmPublisher(string pacientName, string condition, string location, string password)
 {
     if (System.Threading.Monitor.TryEnter(obj1, 10000))
     {
         try
         {
             AlarmPublisherControl.createAlarmPublisher(pacientName, condition, location, password);
         }
         catch (NullReferenceException)
         {
         }
         finally
         {
             System.Threading.Monitor.Exit(obj1);
         }
     }
 }
        public List <AlarmPublisher> getAllAlarmPublishers()
        {
            List <AlarmPublisher> publishers = new List <AlarmPublisher>();

            if (System.Threading.Monitor.TryEnter(obj3, 10000))
            {
                try
                {
                    List <HealthCareModel.Object_Models.AlarmPublisher> returnList = AlarmPublisherControl.getAllAlarmPublishers();

                    if (returnList.Count != 0)
                    {
                        foreach (HealthCareModel.Object_Models.AlarmPublisher hostPublisher in returnList)
                        {
                            AlarmPublisher servicePublisher = new HealthCareWCFServices.AlarmPublisher();

                            servicePublisher.Id          = hostPublisher.id;
                            servicePublisher.PacientName = hostPublisher.pacient_name;
                            servicePublisher.Location    = hostPublisher.location;
                            servicePublisher.Condition   = hostPublisher.condition;
                            servicePublisher.Password    = hostPublisher.password;

                            publishers.Add(servicePublisher);
                        }
                    }
                }
                catch (NullReferenceException)
                {
                }
                finally
                {
                    System.Threading.Monitor.Exit(obj3);
                }
            }

            return(publishers);
        }
        public AlarmPublisher getAlarmPublisher(int id)
        {
            AlarmPublisher servicePublisher = new HealthCareWCFServices.AlarmPublisher();

            if (System.Threading.Monitor.TryEnter(obj2, 10000))
            {
                try
                {
                    servicePublisher.Id          = id;
                    servicePublisher.PacientName = AlarmPublisherControl.getAlarmPublisher(id).pacient_name;
                    servicePublisher.Location    = AlarmPublisherControl.getAlarmPublisher(id).location;
                    servicePublisher.Condition   = AlarmPublisherControl.getAlarmPublisher(id).condition;
                    servicePublisher.Password    = AlarmPublisherControl.getAlarmPublisher(id).password;
                }
                catch (NullReferenceException)
                {
                }
                finally
                {
                    System.Threading.Monitor.Exit(obj2);
                }
            }
            return(servicePublisher);
        }