public static bool TargetStudy()
 {
     try
     {
         IControl CodelistTable             = SyncUtilities.FindVisibleElement(By.Id("LabAttributeReference_0_CodeListMappingsReference_0_CodelistMapping_TT"));
         ReadOnlyCollection <IControl> rows = null;
         if (WebTableUtilities.GetRowCount(CodelistTable, out rows) > 0)
         {
             foreach (IControl row in rows)
             {
                 bool     found;
                 IControl celldata       = WebTableUtilities.GetCell(row, 1);
                 String   attribureValue = Control_PropertyUtilities.GetAttributeValue(celldata, "class", out found);
                 if (found)
                 {
                     if (attribureValue.Contains("modified-cell"))
                     {
                         Control_PropertyUtilities.CompareCSSValue(celldata, "background-color", "#fcdc75");
                     }
                 }
             }
         }
     }
     catch (Exception e)
     {
     }
     return(true);
 }
Esempio n. 2
0
        public static string ReadtheRefID()
        {
            DL_Lab_MRR_Table.NavigateToLastPage(DL_Lab_MRR_Table.Pager);
            System.Collections.ObjectModel.ReadOnlyCollection <IControl> rows = null;
            int    rowCount = WebTableUtilities.GetRowCount(DL_Lab_MRR_Table.MrrTable, out rows);
            string refID    = WebTableUtilities.GetValue(DL_Lab_MRR_Table.MrrTable, rowCount - 1, 1);

            return(refID);
        }
Esempio n. 3
0
        public static IControl GetLabRow(String labId)
        {
            ReadOnlyCollection <IControl> rows = null;

            if (WebTableUtilities.GetRowCount(DL_LabManagementPage.LabsTable, out rows) > 0)
            {
                return(FindLabRow(labId));
            }
            return(null);
        }
        static IControl GetSiteRow(String siteId, String siteName)
        {
            ReadOnlyCollection <IControl> rows = null;

            if (WebTableUtilities.GetRowCount(DL_SiteManagementPage.SitesTable, out rows) > 1)
            {
                return(FindSiteRow(siteId, siteName));
            }
            return(null);
        }
Esempio n. 5
0
        public static IControl GetLabTestRow(String labTestName)
        {
            ReadOnlyCollection <IControl> rows = null;

            if (WebTableUtilities.GetRowCount(DL_Lab_ManageReferenceRanges.LabTestsTable, out rows) > 0)
            {
                return(FindLabTestRow(labTestName));
            }
            return(null);
        }
Esempio n. 6
0
        static int GetNumberOfQueriesFromRowsCount(String dcfSubTabNamme)
        {
            int rowCount = 0;

            try
            {
                BP_CRF_DCF_PagerUtilites.NavigateToFirstPage();
                do
                {
                    ReadOnlyCollection <IControl> rows = null;
                    rowCount += WebTableUtilities.GetRowCount(DL_FormPage.ActiveDCFsSubTabTable, out rows);
                }while (BP_CRF_DCF_PagerUtilites.NavigateToNextPage());
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            return(rowCount);
        }
 public static bool SourceTargetStudy(List <StudyCompareReportData> sourcetargetData)
 {
     try
     {
         foreach (StudyCompareReportData sourcetargetitem in sourcetargetData)
         {
             IControl TargetCodelistTable        = SyncUtilities.FindVisibleElement(By.Id("LabAttributeReference_0_CodeListMappingsReference_0_CodelistMapping_TT"));
             IControl SourceCodelistTable        = SyncUtilities.FindVisibleElement(By.Id("LabAttributeReference_0_CodeListMappingsReference_0_CodelistMapping_ST"));
             ReadOnlyCollection <IControl> srows = null;
             ReadOnlyCollection <IControl> trows = null;
             if (WebTableUtilities.GetRowCount(SourceCodelistTable, out srows) > 0 && WebTableUtilities.GetRowCount(TargetCodelistTable, out trows) > 0)
             {
                 for (int rowIndex = 0; rowIndex < srows.Count; rowIndex++)
                 {
                     bool sfound = false;
                     //WebTable_SearchCriteriaItemList searchList = new WebTable_SearchCriteriaItemList();
                     //searchList.AddSearchItem(new WebTable_SearchCriteriaItem(1, sourcetargetitem.SourceStudy, TableColumnContentType.Text));
                     //IControl row = WebTableUtilities.Table_FindRow(SourceCodelistTable, searchList, 1);
                     IControl sourcecelldata       = WebTableUtilities.GetCell(srows[rowIndex], 1);
                     String   sourceattribureValue = Control_PropertyUtilities.GetAttributeValue(sourcecelldata, "class", out sfound);
                     if (sfound)
                     {
                         ReadOnlyCollection <IControl> targetTablerows = SyncUtilities.FindVisibleElements_Parent(TargetCodelistTable.WebElement, By.TagName("tr"));
                         if (sourceattribureValue.Equals("modified"))
                         {
                             bool     tfound;
                             IControl targetcelldata       = WebTableUtilities.GetCell(targetTablerows[rowIndex], 1);
                             String   targetattribureValue = Control_PropertyUtilities.GetAttributeValue(targetcelldata, "class", out tfound);
                             if (targetattribureValue.Contains("modified-cell"))
                             {
                                 Control_PropertyUtilities.CompareCSSValue(targetcelldata, "background-color", "#fcdc75");
                             }
                         }
                         else if (sourceattribureValue.Equals("deleted"))
                         {
                             bool     tfound;
                             IControl targetcelldata       = WebTableUtilities.GetCell(targetTablerows[rowIndex], 1);
                             String   targetattribureValue = Control_PropertyUtilities.GetAttributeValue(targetcelldata, "class", out tfound);
                             if (targetattribureValue.Equals("removedCell"))
                             {
                                 Control_PropertyUtilities.CompareCSSValue(sourcecelldata, "background-color", "#fcdc75");
                             }
                         }
                     }
                     else if (!sfound)
                     {
                         ReadOnlyCollection <IControl> targetTablerows = SyncUtilities.FindVisibleElements_Parent(TargetCodelistTable.WebElement, By.TagName("tr"));
                         if (sourceattribureValue.Contains("removedCell"))
                         {
                             bool     tfound;
                             IControl targetcelldata       = WebTableUtilities.GetCell(targetTablerows[rowIndex], 1);
                             String   targetattribureValue = Control_PropertyUtilities.GetAttributeValue(targetcelldata, "class", out tfound);
                             if (targetattribureValue.Contains("added"))
                             {
                                 Control_PropertyUtilities.CompareCSSValue(targetcelldata, "background-color", "#fcdc75");
                             }
                         }
                     }
                     else if (!sfound)
                     {
                         ReadOnlyCollection <IControl> targetTablerows = SyncUtilities.FindVisibleElements_Parent(TargetCodelistTable.WebElement, By.TagName("tr"));
                         if (sourceattribureValue.Contains("deleted"))
                         {
                             bool     tfound;
                             IControl targetcelldata       = WebTableUtilities.GetCell(targetTablerows[rowIndex], 1);
                             String   targetattribureValue = Control_PropertyUtilities.GetAttributeValue(targetcelldata, "class", out tfound);
                             if (targetattribureValue.Contains("removedCell"))
                             {
                                 Control_PropertyUtilities.CompareCSSValue(targetcelldata, "background-color", "#fcdc75");
                             }
                         }
                     }
                 }
             }
         }
     }
     catch (Exception e)
     {
     }
     return(false);
 }