Пример #1
0
        void ReleaseDesignerOutlets()
        {
            if (CameraButton != null)
            {
                CameraButton.Dispose();
                CameraButton = null;
            }

            if (CancelUserButton != null)
            {
                CancelUserButton.Dispose();
                CancelUserButton = null;
            }

            if (cnsButtomScroll != null)
            {
                cnsButtomScroll.Dispose();
                cnsButtomScroll = null;
            }

            if (LogOutButton != null)
            {
                LogOutButton.Dispose();
                LogOutButton = null;
            }

            if (MainScroll != null)
            {
                MainScroll.Dispose();
                MainScroll = null;
            }

            if (SaveUserButton != null)
            {
                SaveUserButton.Dispose();
                SaveUserButton = null;
            }

            if (UserImg != null)
            {
                UserImg.Dispose();
                UserImg = null;
            }

            if (UserName != null)
            {
                UserName.Dispose();
                UserName = null;
            }

            if (UserSurname != null)
            {
                UserSurname.Dispose();
                UserSurname = null;
            }
        }
Пример #2
0
 /// <summary>
 /// Disables the user.
 /// </summary>
 public void DisableTheUser()
 {
     try
     {
         if (AccountEnabled.GetAttribute("checked").Contains("false"))
         {
             return;
         }
         EditButton.Click();
         UserEnabled.Click();
         SaveUserButton.Click();
         BackToListButton.Click();
     }
     catch (Exception)
     {
         EditButton.Click();
         UserEnabled.Click();
         SaveUserButton.Click();
         BackToListButton.Click();
     }
 }
Пример #3
0
        /// <summary>
        /// Search and edit the created user.
        /// </summary>
        /// <param name="fromUser">From user.</param>
        /// <param name="toUser">To user.</param>
        /// <param name="editedEmail">The edited email.</param>
        public void SearchAndEditTheCreatedUser(string fromUser, string toUser, string editedEmail)
        {
            UserSearch.SendKeys(uName);
            EditButton.Click();
            EmailAddress.Clear();
            EmailAddress.SendKeys(editedEmail);

            if (fromUser.ToLower().Contains("ctu"))
            {
                ClinicalTrialUnitUser.Click();
            }
            else if (fromUser.ToLower().Contains("admin"))
            {
                ClinicalTrialAdminUser.Click();
            }
            else if (fromUser.ToLower().Contains("lhd"))
            {
                LocalHealthDistrictUser.Click();
            }

            if (toUser.ToLower().Contains("ctu"))
            {
                ClinicalTrialUnitUser.Click();
                PageHelper.PickAllValuesFromDropdown(CT_Units);
            }
            else if (toUser.ToLower().Contains("admin"))
            {
                ClinicalTrialAdminUser.Click();
            }
            else if (toUser.ToLower().Contains("lhd"))
            {
                LocalHealthDistrictUser.Click();
                PageHelper.PickAllValuesFromDropdown(LH_Districts);
            }
            SaveUserButton.Click();
            BackToListButton.Click();
        }