public static bool IsStudyAvailable(IEnumerable <StudyData> studies)
 {
     try
     {
         IControl StudiesTable = DS_HomePage.StudiesTableInCreateStudyFromExistingStudyWindow;
         foreach (StudyData study in studies)
         {
             WebTable_SearchCriteriaItemList searchList = new WebTable_SearchCriteriaItemList();
             searchList.AddSearchItem(new WebTable_SearchCriteriaItem(1, study.StudyName, TableColumnContentType.Link));
             IControl row = WebTableUtilities.Table_FindRow(StudiesTable, searchList, 0);
             if (Control_PropertyUtilities.IsControlNull(row))
             {
                 return(false);
             }
             IControl cell = WebTableUtilities.GetCell(row, 1);
             IControl link = WebTableUtilities.GetLink(cell);
             Control_ActionUtilities.Click(link, "linknotfound");
         }
         return(true);
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
Esempio n. 2
0
        public static bool AddEditSecondaryCodelistItems(String primary)
        {
            IControl row         = WebTableUtilities.Table_FindRow(CodeListsGroupPage.PrimarySecondaryCodeListItemsTable, GetSearchItemList(primary), 0);
            IControl proecssCell = WebTableUtilities.GetCell(row, 2);
            IControl link        = WebTableUtilities.GetLink(proecssCell);

            return(Control_ActionUtilities.Click(link, "Unable to find to click" + primary));
        }