public static bool VeifyTheIconsForTheDeletedRecords(string refID, string action)
        {
            try
            {
                DL_Lab_MRR_Table.NavigateToFirstPage(DL_Lab_MRR_Table.Pager);
                do
                {
                    WebTable_SearchCriteriaItemList searchList = new WebTable_SearchCriteriaItemList();
                    searchList.AddSearchItem(new WebTable_SearchCriteriaItem(1, refID, TableColumnContentType.Text));
                    IControl row = WebTableUtilities.Table_FindRow(DL_Lab_MRR_Table.MrrTable, searchList, 0);
                    if (!Control_PropertyUtilities.IsControlNull(row))
                    {
                        IControl actionsCell = WebTableUtilities.GetCell(row, 13);
                        IControl icon        = DL_Lab_MRR_Table.GetActionIcon(actionsCell, action);
                        if (action.Equals("Edit") || action.Equals("Delete"))
                        {
                            return(Control_PropertyUtilities.IsControlNull(icon));
                        }
                        else if (action.Equals("History") || action.Equals("Copy"))
                        {
                            return(Control_PropertyUtilities.IsEnabled(icon));
                        }
                    }
                }while (DL_Lab_MRR_Table.NavigateToNextPage(DL_Lab_MRR_Table.Pager));
            }

            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            return(false);
        }
 public static bool IsStudyAvailableinHomePage(IEnumerable <StudyData> studies)
 {
     try
     {
         bool     isClicked           = false;
         String   notificationMessage = "Study has been successfully deleted";
         IControl StudiesTable        = DS_HomePage.StudiesTable;
         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(DS_HomePage.StudiesTable, searchList, 0);
             if (!Control_PropertyUtilities.IsControlNull(row))
             {
                 IControl cell = WebTableUtilities.GetCell(row, 9);
                 if ((Control_ActionUtilities.MouseClick(cell, String.Empty)))
                 {
                     if (Control_ActionUtilities.ClickModalButton(DS_ConfirmationPopup.DeleteJobsContinue))
                     {
                         isClicked = DS_BP_NotificationUtilities.VerifyNotificationForDict(notificationMessage);
                     }
                 }
             }
         }
         return(isClicked);
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
 public static bool ExpandEvent(String eventName, out String identifier)
 {
     identifier = String.Empty;
     try
     {
         ReadOnlyCollection <IControl> rows = WebTableUtilities.GetRows(DL_CRF_PDEP_EventsPage.EventsTable);
         foreach (IControl row in rows)
         {
             if (Control_PropertyUtilities.IsControlVisible(row))
             {
                 IControl cell = WebTableUtilities.GetCell(row, 0);
                 if (Control_PropertyUtilities.GetText(cell).Equals(eventName, StringComparison.InvariantCultureIgnoreCase))
                 {
                     IControl expandCollapseImage = WebTableUtilities.GetElement(row, String.Empty, 0, TableColumnContentType.Image);
                     bool     found       = false;
                     String   imageSource = Control_PropertyUtilities.GetAttributeValue(expandCollapseImage, "src", out found);
                     if (found)
                     {
                         identifier = Control_PropertyUtilities.GetAttributeValue(row, "identifier", out found);
                         if (imageSource.Contains("menu_expand.gif"))
                         {
                             return(Control_ActionUtilities.Click(expandCollapseImage, String.Empty));
                         }
                         return(imageSource.Contains("menu_collapse.gif"));
                     }
                 }
             }
         }
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
        public static bool VerifyLabAddress(String address, String city, String state, String country)
        {
            try
            {
                WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
                list.AddSearchItem(new WebTable_SearchCriteriaItem(0, address, TableColumnContentType.Text));
                list.AddSearchItem(new WebTable_SearchCriteriaItem(1, city, TableColumnContentType.Text));
                list.AddSearchItem(new WebTable_SearchCriteriaItem(1, state, TableColumnContentType.Text));
                list.AddSearchItem(new WebTable_SearchCriteriaItem(1, country, TableColumnContentType.Text));

                IControl labAddressRow = WebTableUtilities.Table_FindRow(DL_Lab_MRR_Table.MrrTable, list, 0);
                IControl cellText      = WebTableUtilities.GetCell(labAddressRow, 0);
                String   mRR_PageName  = Control_PropertyUtilities.GetText(cellText);

                if ((address.Equals(mRR_PageName, StringComparison.InvariantCultureIgnoreCase)) & (city.Equals(mRR_PageName, StringComparison.InvariantCultureIgnoreCase)) & (state.Equals(mRR_PageName, StringComparison.InvariantCultureIgnoreCase)) & (country.Equals(mRR_PageName, StringComparison.InvariantCultureIgnoreCase)))
                {
                    return(true);
                }
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            return(false);
        }
Пример #5
0
 public static bool SelectSites(List <StudyArchive_SiteData> sites)
 {
     try
     {
         foreach (StudyArchive_SiteData site in sites)
         {
             WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
             list.AddSearchItem(new WebTable_SearchCriteriaItem(1, site.Site, TableColumnContentType.Text));
             IControl tableRow = WebTableUtilities.Table_FindRow(DL_ArchiveExportPage.SitesTable, list);
             if (!Control_PropertyUtilities.IsControlNull(tableRow))
             {
                 IControl tableCell = WebTableUtilities.GetCell(tableRow, 0);
                 IControl checkbox  = WebTableUtilities.GetInputControl(tableCell);
                 if (!Control_ActionUtilities.Click(checkbox, "Unable to click site " + site.Site + "checkbox in ArchiveExportPage"))
                 {
                     return(false);
                 }
             }
         }
         return(true);
     }
     catch (Exception e)
     {
     }
     return(false);
 }
Пример #6
0
        public static bool SelectePatients(List <SiteManagementMigratePatientsData> patients)
        {
            bool isSuccess = false;

            try
            {
                foreach (SiteManagementMigratePatientsData patient in patients)
                {
                    WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
                    list.AddSearchItem(new WebTable_SearchCriteriaItem(0, patient.PatientID, TableColumnContentType.Text));
                    IControl patientRow   = WebTableUtilities.Table_FindRow(DL_MigratePatientsPage.PatientsTable, list, 0);
                    IControl checkboxCell = WebTableUtilities.GetCell(patientRow, 2);
                    IControl checkbox     = WebTableUtilities.GetInputControl(checkboxCell);
                    bool     found        = false;
                    String   propValue    = Control_PropertyUtilities.GetAttributeValue(checkbox, "checked", out found);
                    if (!found)
                    {
                        isSuccess = Control_ActionUtilities.Click(checkbox, String.Empty);
                    }
                }
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            return(isSuccess);
        }
 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);
 }
        public static bool DeleteTheRecordUsingDeleteIcon(string refID, string action)
        {
            try
            {
                DL_Lab_MRR_Table.NavigateToFirstPage(DL_Lab_MRR_Table.Pager);
                do
                {
                    WebTable_SearchCriteriaItemList searchList = new WebTable_SearchCriteriaItemList();
                    searchList.AddSearchItem(new WebTable_SearchCriteriaItem(1, refID, TableColumnContentType.Text));
                    IControl row = WebTableUtilities.Table_FindRow(DL_Lab_MRR_Table.MrrTable, searchList, 0);
                    if (!Control_PropertyUtilities.IsControlNull(row))
                    {
                        IControl actionsCell = WebTableUtilities.GetCell(row, 13);
                        IControl icon        = DL_Lab_MRR_Table.GetActionIcon(actionsCell, action);
                        return(Control_ActionUtilities.Click(icon, String.Empty));
                    }
                }while (DL_Lab_MRR_Table.NavigateToNextPage(DL_Lab_MRR_Table.Pager));
            }

            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            return(false);
        }
 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);
 }
        static IControl GetFormRow(String eventName, String formName, out IControl formCell)
        {
            formCell = null;
            String identifier = String.Empty;

            try
            {
                if (ExpandEvent(eventName, out identifier) && !String.IsNullOrEmpty(identifier))
                {
                    ReadOnlyCollection <IControl> rows = DL_CRF_PDEP_EventsPage.GetRowsEventRows(identifier);
                    foreach (IControl row in rows)
                    {
                        if (Control_PropertyUtilities.IsControlVisible(row))
                        {
                            formCell = WebTableUtilities.GetCell(row, 2);
                            String formText = Control_PropertyUtilities.GetText(formCell);
                            if (formName.Equals(formText, StringComparison.InvariantCultureIgnoreCase))
                            {
                                return(row);
                            }
                        }
                    }
                }
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            return(null);
        }
Пример #11
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));
        }
        static IControl GetEventDateObjectForEvent(String eventName, string EventDate)
        {
            IControl eventRow = GetEventRow(eventName);

            if (eventRow != null)
            {
                IControl eventNameCell = WebTableUtilities.GetCell(eventRow, 0);
                return(SyncUtilities.FindVisibleElement_Parent(eventRow.WebElement, By.XPath(".//a[contains(text(), '" + EventDate + "')]")));
            }
            return(null);
        }
        public static bool FindValueInUnit(String emptyValue)
        {
            IControl unitCell  = WebTableUtilities.GetCell(DL_Lab_MRR_Table.GetFirstRow, 11);
            string   unitValue = Control_PropertyUtilities.GetText(unitCell);

            if (unitValue != null)
            {
                return(true);
            }
            return(true);
        }
        static IControl GetEventExpandCollapseImage(String eventName, out String patientEventKey)
        {
            patientEventKey = String.Empty;
            IControl eventRow = GetEventRow(eventName);

            if (eventRow != null)
            {
                patientEventKey = GetPatientEventKey(eventRow);
                IControl eventNameCell = WebTableUtilities.GetCell(eventRow, 0);
                return(SyncUtilities.FindVisibleElement_Parent(eventNameCell.WebElement, By.TagName("img")));
            }
            return(null);
        }
 static IControl GetStatusCell(String process, String statusText)
 {
     try
     {
         WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
         list.AddSearchItem(new WebTable_SearchCriteriaItem(1, process, TableColumnContentType.Text));
         IControl processRow = WebTableUtilities.Table_FindRow(StudyManagemantJobsPage.StudyJobsTable, list);
         return(WebTableUtilities.GetCell(processRow, 3));
     }
     catch (Exception e)
     {
     }
     return(null);
 }
 public static bool ClickCodeListItemsCheckBox(String Codelistitem)
 {
     try
     {
         WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
         list.AddSearchItem(new WebTable_SearchCriteriaItem(2, Codelistitem, TableColumnContentType.Text));
         IControl processRow  = WebTableUtilities.Table_FindRow(CodeListsPage.CodeListItemsTable, list);
         IControl proecssCell = WebTableUtilities.GetCell(processRow, 0);
         Control_ActionUtilities.Click(proecssCell, "Unable to click find" + Codelistitem);
         return(true);
     }
     catch (Exception e)
     {
     }
     return(false);
 }
 public static bool ClickProcessLink(String process)
 {
     try
     {
         WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
         list.AddSearchItem(new WebTable_SearchCriteriaItem(1, process, TableColumnContentType.Text));
         IControl processRow  = WebTableUtilities.Table_FindRow(DS_Forms.FormsTable, list);
         IControl proecssCell = WebTableUtilities.GetCell(processRow, 1);
         IControl processLink = StudyManagemantJobsPage.GetProcessLink(proecssCell, process);
         return(Control_ActionUtilities.Click(processLink, "Unable to click process link " + process));
     }
     catch (Exception e)
     {
     }
     return(false);
 }
 public static bool ClickCodeListsLink(String process)
 {
     try
     {
         WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
         list.AddSearchItem(new WebTable_SearchCriteriaItem(1, process, TableColumnContentType.Text));
         IControl codeListRow  = WebTableUtilities.Table_FindRow(CodeListsPage.CodeListsTable, list);
         IControl codeListCell = WebTableUtilities.GetCell(codeListRow, 1);
         IControl codeListLink = CodeListsPage.GetCodeListLink(codeListCell, process);
         return(Control_ActionUtilities.Click(codeListLink, "Unable to click process link " + process));
     }
     catch (Exception e)
     {
     }
     return(false);
 }
 public static bool ClickDomainsItemsEditLink(String process)
 {
     try
     {
         WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
         list.AddSearchItem(new WebTable_SearchCriteriaItem(1, process, TableColumnContentType.Text));
         IControl processRow  = WebTableUtilities.Table_FindRow(DS_Forms.DomainItemsListTable, list);
         IControl proecssCell = WebTableUtilities.GetCell(processRow, 14);
         IControl cellImage   = WebTableUtilities.GetInputControl(proecssCell);
         Control_ActionUtilities.Click(cellImage, "Unable to click Image" + process);
         return(true);
     }
     catch (Exception e)
     {
     }
     return(false);
 }
Пример #20
0
 public static bool GetFirstRowFromTableAndClickOnAction(string action)
 {
     try
     {
         if (DL_Lab_MRR_Table.IsInReferenceRangePage())
         {
             IControl actionsCell = WebTableUtilities.GetCell(DL_Lab_MRR_Table.GetFirstRow, 13);
             IControl icon        = DL_Lab_MRR_Table.GetActionIcon(actionsCell, action);
             return(Control_ActionUtilities.Click(icon, String.Empty));
         }
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
 public static bool SelectForm(String formName)
 {
     try
     {
         WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
         list.AddSearchItem(new WebTable_SearchCriteriaItem(0, formName, TableColumnContentType.Text));
         IControl row      = WebTableUtilities.Table_FindRow(DL_SubmitCRFsPage.FormsTable, list, 1);
         IControl cell     = WebTableUtilities.GetCell(row, 1);
         IControl checkbox = WebTableUtilities.GetInputControl(cell);
         return(Control_ActionUtilities.Click(checkbox, String.Empty));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
        //DL_QueryRunWizardSitesPage
        public static bool SelectSite(string site)
        {
            try
            {
                WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
                list.AddSearchItem(new WebTable_SearchCriteriaItem(2, site, TableColumnContentType.Text));

                IControl siteRow      = WebTableUtilities.Table_FindRow(DL_QueryRunWizardSitesPage.SitesTable, list, 0);
                IControl checkboxCell = WebTableUtilities.GetCell(siteRow, 0);
                return(Control_ActionUtilities.Click(WebTableUtilities.GetInputControl(checkboxCell), String.Empty));
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            return(false);
        }
 public static bool ClickTargetStudyVersion(String studyName)
 {
     BrowserUtilities.DS_SwitchToConfirmationFrame();
     try
     {
         WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
         list.AddSearchItem(new WebTable_SearchCriteriaItem(1, studyName, TableColumnContentType.Text));
         IControl processRow    = WebTableUtilities.Table_FindRow(CompareStudyPopup.TargetStudyTable, list);
         IControl StudyNamecell = WebTableUtilities.GetCell(processRow, 0);
         IControl cellImage     = WebTableUtilities.GetInputControl(StudyNamecell);
         Control_ActionUtilities.Click(cellImage, "Unable to click the radio button of study" + studyName);
     }
     catch (Exception e)
     {
     }
     BrowserUtilities.SwitchToWindow();
     return(true);
 }
 public static bool ClickLabDict(String process)
 {
     try
     {
         WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
         list.AddSearchItem(new WebTable_SearchCriteriaItem(1, process, TableColumnContentType.Text));
         IControl processRow  = WebTableUtilities.Table_FindRow(ManageLabsPage.LabDictionaryTable, list);
         IControl proecssCell = WebTableUtilities.GetCell(processRow, 1);
         IControl processLink = ManageLabsUtilities.GetProcessLink(proecssCell, process);
         Thread.Sleep(5000);
         return(Control_ActionUtilities.Click(processLink, "Unable to click process link " + process));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
 public static bool VerifyFormIcons(String eventName, String formName, List <PDEP_FormIconsData> dataList)
 {
     try
     {
         foreach (PDEP_FormIconsData data in dataList)
         {
             IControl formCell = null;
             IControl formRow  = GetFormRow(eventName, formName, out formCell);
             if (!Control_PropertyUtilities.IsControlNull(formRow))
             {
                 if (!String.IsNullOrEmpty(data.Received))
                 {
                     IControl cell = WebTableUtilities.GetCell(formRow, 3);
                     if (!IsIconAvailable(cell, data.Received))
                     {
                         return(false);
                     }
                 }
                 if (!String.IsNullOrEmpty(data.FirstPass))
                 {
                     IControl cell = WebTableUtilities.GetCell(formRow, 4);
                     if (!IsIconAvailable(cell, data.FirstPass))
                     {
                         return(false);
                     }
                 }
                 if (!String.IsNullOrEmpty(data.SecondPass))
                 {
                     IControl cell = WebTableUtilities.GetCell(formRow, 5);
                     if (!IsIconAvailable(cell, data.SecondPass))
                     {
                         return(false);
                     }
                 }
                 return(true);
             }
         }
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
 public static bool LabTestsinTable(List <LabDictData> labtests)
 {
     try
     {
         WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
         foreach (LabDictData labtestname in labtests)
         {
             list.AddSearchItem(new WebTable_SearchCriteriaItem(0, labtestname.LabTestName, TableColumnContentType.Text));
             IControl processRow  = WebTableUtilities.Table_FindRow(ManageLabsPage.ImportLabDictionaryTable, list);
             IControl proecssCell = WebTableUtilities.GetCell(processRow, 0);
             if (!Control_PropertyUtilities.Equals(proecssCell, labtestname.LabTestName))
             {
                 return(true);
             }
         }
     }
     catch (Exception e)
     {
     }
     return(false);
 }
Пример #27
0
 public static bool ActionIconsInViewMode(string action)
 {
     try
     {
         IControl actionsCell = WebTableUtilities.GetCell(DL_Lab_MRR_Table.GetFirstRow, 13);
         IControl icon        = DL_Lab_MRR_Table.GetActionIcon(actionsCell, action);
         if (action.Equals("Edit") || action.Equals("Copy") || action.Equals("Delete"))
         {
             return(Control_PropertyUtilities.IsControlNull(icon));
         }
         else if (action.Equals("History"))
         {
             return(Control_PropertyUtilities.IsEnabled(icon));
         }
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
        public static bool VerifyLabAddress(String address, String city, String state, String country)
        {
            try
            {
                WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
                list.AddSearchItem(new WebTable_SearchCriteriaItem(0, address, TableColumnContentType.Text));
                list.AddSearchItem(new WebTable_SearchCriteriaItem(1, city, TableColumnContentType.Text));
                list.AddSearchItem(new WebTable_SearchCriteriaItem(1, state, TableColumnContentType.Text));
                list.AddSearchItem(new WebTable_SearchCriteriaItem(1, country, TableColumnContentType.Text));

                IControl labAddressRow = WebTableUtilities.Table_FindRow(DL_Lab_ManageReferenceRanges.LabsTable, list, 0);
                IControl cellText      = WebTableUtilities.GetCell(labAddressRow, 0);
                String   mRR_PageName  = Control_PropertyUtilities.GetText(cellText);

                if ((address.Equals(mRR_PageName, StringComparison.InvariantCultureIgnoreCase)) & (city.Equals(mRR_PageName, StringComparison.InvariantCultureIgnoreCase)) & (state.Equals(mRR_PageName, StringComparison.InvariantCultureIgnoreCase)) & (country.Equals(mRR_PageName, StringComparison.InvariantCultureIgnoreCase)))
                {
                    return(true);
                }
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            return(false);

            //try
            //{
            //    string str = "Address: " + address + "City: " + city + "State: " + state + "Country: " + country;
            //    IControl testname = DL_Lab_ManageReferenceRanges.LabTestAddress;
            //    String mRR_PageName = Control_PropertyUtilities.GetText(testname);
            //    return str.Equals(mRR_PageName, StringComparison.InvariantCultureIgnoreCase);
            //}
            //catch (Exception e)
            //{
            //    new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            //}
            //return false;
        }
 public static List <String> GetTheRefIDS(List <RowIndex> rows)
 {
     try
     {
         List <string> refIds = new List <string>();
         foreach (RowIndex rowindex in rows)
         {
             int      rowindexinint = int.Parse(rowindex.Row);
             IControl row           = WebTableUtilities.GetRowByRowIndex(DL_Lab_MRR_Table.MrrTable, rowindexinint);
             if (!Control_PropertyUtilities.IsControlNull(row))
             {
                 IControl refId = WebTableUtilities.GetCell(row, 1);
                 refIds.Add(Control_PropertyUtilities.GetText(refId));
             }
         }
         return(refIds);
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(null);
 }
Пример #30
0
 public static bool ClickLabTestEditLink(String labTest)
 {
     try
     {
         Control_ActionUtilities.Click(DS_PagerControl.FirstPageImage, "Unable to click the link");
         do
         {
             WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
             list.AddSearchItem(new WebTable_SearchCriteriaItem(1, labTest, TableColumnContentType.Text));
             IControl processRow = WebTableUtilities.Table_FindRow(MapLabDictionary.LabTestsListTable, list);
             if (!Control_PropertyUtilities.IsControlNull(processRow))
             {
                 IControl proecssCell = WebTableUtilities.GetCell(processRow, 8);
                 IControl cellImage   = WebTableUtilities.GetInputControl(proecssCell);
                 return(Control_ActionUtilities.Click(cellImage, "Unable to click Image" + labTest));
             }
         }while (Control_ActionUtilities.Click(DS_PagerControl.NextPageImage, String.Empty));
     }
     catch (Exception e)
     {
     }
     return(false);
 }