public static bool GetTableRowDataForImportLabDictionaryErrors(List <ImportLabDictErrorData> errorData)
        {
            BrowserUtilities.DS_SwitchToFrame();
            try
            {
                foreach (ImportLabDictErrorData data in errorData)

                {
                    WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
                    list.AddSearchItem(new WebTable_SearchCriteriaItem(0, data.WorkSheet, TableColumnContentType.Text));
                    list.AddSearchItem(new WebTable_SearchCriteriaItem(1, data.Row, TableColumnContentType.Text));
                    list.AddSearchItem(new WebTable_SearchCriteriaItem(2, data.Column, TableColumnContentType.Text));
                    list.AddSearchItem(new WebTable_SearchCriteriaItem(3, data.Error, TableColumnContentType.Text));
                    if (list.List.Count > 0)
                    {
                        IControl tableRow = WebTableUtilities.Table_FindRow(ImportLabDictionaryPage.ErrorTable, list);
                        if (Control_PropertyUtilities.IsControlNull(tableRow))
                        {
                            Utilities.BrowserUtilities.SwitchToWindow();
                            return(false);
                        }
                    }
                }
                BrowserUtilities.SwitchToWindow();
                return(true);
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            return(false);
        }
 public static bool GetTableRowData(List <ImportLabDictErrorData> errorData)
 {
     BrowserUtilities.DS_SwitchToFrame();
     try
     {
         WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
         foreach (ImportLabDictErrorData data in errorData)
         {
             list.AddSearchItem(new WebTable_SearchCriteriaItem(0, data.WorkSheet, TableColumnContentType.Text));
             list.AddSearchItem(new WebTable_SearchCriteriaItem(1, data.Row, TableColumnContentType.Text));
             list.AddSearchItem(new WebTable_SearchCriteriaItem(2, data.Column, TableColumnContentType.Text));
             list.AddSearchItem(new WebTable_SearchCriteriaItem(3, data.Error, TableColumnContentType.Text));
             IControl processRow = WebTableUtilities.Table_FindRow(ImportLabDictionaryPage.ImportLabDictErrorTable, list);
             if (!Control_PropertyUtilities.IsControlNull(processRow))
             {
                 Control_ActionUtilities.Click(ImportLabDictionaryPage.ImportLabDictErrorTableOkButton, String.Empty);
                 BrowserUtilities.SwitchToWindow();
                 return(true);
             }
         }
         Control_ActionUtilities.Click(ImportLabDictionaryPage.ImportLabDictErrorTableOkButton, String.Empty);
         BrowserUtilities.SwitchToWindow();
     }
     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);
        }
Example #4
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);
 }
 public static bool FormQuestion(IEnumerable <FormQuestion> Questions)
 {
     try
     {
         IControl QuestionsTable = DS_Forms.QuestionsTable;
         foreach (FormQuestion question in Questions)
         {
             WebTable_SearchCriteriaItemList searchList = new WebTable_SearchCriteriaItemList();
             searchList.AddSearchItem(new WebTable_SearchCriteriaItem(1, question.Question, TableColumnContentType.Link));
             IControl row = WebTableUtilities.Table_FindRow(QuestionsTable, searchList, 2);
             if (!Control_PropertyUtilities.IsControlNull(row))
             {
                 Control_ActionUtilities.Click(row, "Question not visible");
                 string domainItem = Control_PropertyUtilities.GetText(DS_Forms.LabMappingFormItemName);
                 if (!domainItem.Equals(question.DomainItem))
                 {
                     return(false);
                 }
             }
         }
         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 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 OpenLab(ManageReferenceLabGridRowData labGridRowData)
 {
     try
     {
         WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
         list.AddSearchItem(new WebTable_SearchCriteriaItem(0, labGridRowData.labId, TableColumnContentType.Text));
         list.AddSearchItem(new WebTable_SearchCriteriaItem(1, labGridRowData.laboratoryName, TableColumnContentType.Text));
         list.AddSearchItem(new WebTable_SearchCriteriaItem(2, labGridRowData.Company, TableColumnContentType.Text));
         list.AddSearchItem(new WebTable_SearchCriteriaItem(3, labGridRowData.Department, TableColumnContentType.Text));
         list.AddSearchItem(new WebTable_SearchCriteriaItem(4, labGridRowData.Address, TableColumnContentType.Text));
         list.AddSearchItem(new WebTable_SearchCriteriaItem(5, labGridRowData.City, TableColumnContentType.Text));
         list.AddSearchItem(new WebTable_SearchCriteriaItem(6, labGridRowData.State, TableColumnContentType.Text));
         list.AddSearchItem(new WebTable_SearchCriteriaItem(7, labGridRowData.Country, TableColumnContentType.Text));
         list.AddSearchItem(new WebTable_SearchCriteriaItem(8, labGridRowData.Lab_Status, TableColumnContentType.Text));
         IControl labRow = WebTableUtilities.Table_FindRow(DL_Lab_ManageReferenceRanges.LabsTable, list);
         if (labRow != null)
         {
             IControl labIdLink = WebTableUtilities.GetElement(labRow, labGridRowData.labId, 0, TableColumnContentType.Link);
             return(Control_ActionUtilities.Click(labIdLink, String.Empty));
         }
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
        public static bool AreSitesAvailable(IEnumerable <String> sites)
        {
            bool retval = false;

            try
            {
                BrowserUtilities.SwitchToFrame();
                List <String> siteList = (List <String>)sites;
                foreach (String site in siteList)
                {
                    WebTable_SearchCriteriaItemList searchList = new WebTable_SearchCriteriaItemList();
                    searchList.AddSearchItem(new WebTable_SearchCriteriaItem(0, site, TableColumnContentType.CheckboxAndText));
                    IControl row = WebTableUtilities.Table_FindRow(DL_AdvancedSearchWindow.SitesTable, searchList, 1);
                    if (Control_PropertyUtilities.IsControlNull(row))
                    {
                        retval = false;
                    }
                }
                retval = true;
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            BrowserUtilities.SwitchToWindow();
            return(retval);
        }
        public static bool VeifyTheStrikeThroughRecords(string refID)
        {
            try
            {
                bool recordFoundInStrikeThroughMode = false;

                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 strikedRow = DL_Lab_Mrr_Delete.StrikeThroughRow;
                        IControl checkboxForDeletedRecord = DL_Lab_Mrr_Delete.Checkbox(row);

                        if (Control_PropertyUtilities.IsControlNull(strikedRow) && Control_PropertyUtilities.IsControlNull(checkboxForDeletedRecord))
                        {
                            recordFoundInStrikeThroughMode = true;
                        }
                    }
                }while (DL_Lab_MRR_Table.NavigateToNextPage(DL_Lab_MRR_Table.Pager));
                return(recordFoundInStrikeThroughMode);
            }

            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            return(false);
        }
 public static bool IsLabExistInLabsTableOfSite(LabData labData)
 {
     try
     {
         WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
         list.AddSearchItem(new WebTable_SearchCriteriaItem(0, labData.LabId, TableColumnContentType.Text));
         IControl siteRow = WebTableUtilities.Table_FindRow(DL_AddSitePage.ActiveSubTabTable, list, 1);
         if (siteRow != null)
         {
             bool isLabNameExist    = WebTableUtilities.HasText(siteRow, 1, labData.LaboratoryName);
             bool isCompanyExist    = WebTableUtilities.HasText(siteRow, 2, labData.Company);
             bool isdepartmentExist = WebTableUtilities.HasText(siteRow, 3, labData.Department);
             bool isStatusExist     = WebTableUtilities.HasText(siteRow, 6, labData.LaboratoryStatus);
             new DebugLogGenerator().WriteLog(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name,
                                              "Lab Name Exists - " + isLabNameExist.ToString()
                                              + ",Company Exists - " + isCompanyExist.ToString()
                                              + ",Department Exists - " + isdepartmentExist.ToString()
                                              + ",Status Exists - " + isStatusExist.ToString());
             return(isLabNameExist && isCompanyExist && isdepartmentExist && isStatusExist);
         }
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
Example #12
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 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);
 }
Example #14
0
        static WebTable_SearchCriteriaItemList GetSearchList(CRF_CommentsData data)
        {
            WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();

            if (!String.IsNullOrEmpty(data.QuestionNumberOrForm))
            {
                list.AddSearchItem(new WebTable_SearchCriteriaItem(0, data.QuestionNumberOrForm, TableColumnContentType.Text));
            }
            if (!String.IsNullOrEmpty(data.Question))
            {
                list.AddSearchItem(new WebTable_SearchCriteriaItem(1, data.Question, TableColumnContentType.Text));
            }
            if (!String.IsNullOrEmpty(data.Value))
            {
                list.AddSearchItem(new WebTable_SearchCriteriaItem(2, data.Value, TableColumnContentType.Text));
            }
            if (!String.IsNullOrEmpty(data.Comment))
            {
                list.AddSearchItem(new WebTable_SearchCriteriaItem(3, data.Comment, TableColumnContentType.Text));
            }
            if (!String.IsNullOrEmpty(data.DateTime))
            {
                list.AddSearchItem(new WebTable_SearchCriteriaItem(4, data.DateTime, TableColumnContentType.Text_Partial));
            }
            return(list);
        }
 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 DeleteGroup(String groupName)
 {
     try
     {
         IControl groupsTable = DL_DeleteGroupsPage.GroupsTable;
         WebTable_SearchCriteriaItem     searchCreteriaItem = new WebTable_SearchCriteriaItem(0, groupName, TableColumnContentType.CheckboxAndText);
         WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
         list.AddSearchItem(searchCreteriaItem);
         IControl tableRow = WebTableUtilities.Table_FindRow(groupsTable, list);
         if (tableRow != null)
         {
             IControl checkbox = WebTableUtilities.GetElement(tableRow, String.Empty, 0, TableColumnContentType.CheckboxAndText);
             Control_ActionUtilities.Click(checkbox, String.Empty);
             return(Control_ActionUtilities.Click_PerssEnterKey(DL_DeleteGroupsPage.DeleteButton, String.Empty));
         }
         else
         {
             return(Control_ActionUtilities.Click_PerssEnterKey(DL_DeleteGroupsPage.CancelButton, String.Empty));
         }
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
        public static bool RecordsVerificationForCancel(string refID)
        {
            try
            {
                bool recordFound = false;

                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))
                    {
                        recordFound = true;
                    }
                }while (DL_Lab_MRR_Table.NavigateToNextPage(DL_Lab_MRR_Table.Pager));
                return(recordFound);
            }

            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            return(false);
        }
Example #18
0
        public static IControl Table_FindRow(IControl webTable, WebTable_SearchCriteriaItemList searchCreteriaItemList, int startRowIndex = 0)
        {
            IControl tableBody;

            if (webTable != null && webTable.WebElement != null)
            {
                if (webTable.WebElement.TagName == "tbody")
                {
                    tableBody = webTable;
                }
                else
                {
                    tableBody = SyncUtilities.FindElement_Parent(webTable.WebElement, By.XPath("./tbody"));
                }
                ReadOnlyCollection <IControl> rows = SyncUtilities.FindElements_Parent(tableBody.WebElement, By.TagName("tr"));
                for (int rowIndex = 0; rowIndex < rows.Count; ++rowIndex)
                {
                    IControl row = rows[rowIndex];
                    if (rowIndex >= startRowIndex)
                    {
                        if (HasRowContainsSearchContent(row.WebElement, searchCreteriaItemList))
                        {
                            return(row);
                        }
                    }
                }
            }
            return(null);
        }
Example #19
0
        static IControl GetRow(Site_ManageVersionsData data)
        {
            try
            {
                WebTable_SearchCriteriaItemList searchList = new WebTable_SearchCriteriaItemList();

                if (!String.IsNullOrEmpty(data.Version))
                {
                    WebTable_SearchCriteriaItem searchItem = new WebTable_SearchCriteriaItem(0, data.Version, TableColumnContentType.Text);
                    searchList.AddSearchItem(searchItem);
                }
                if (!String.IsNullOrEmpty(data.Patients))
                {
                    WebTable_SearchCriteriaItem searchItem = new WebTable_SearchCriteriaItem(3, data.Patients, TableColumnContentType.Text);
                    searchList.AddSearchItem(searchItem);
                }
                if (!String.IsNullOrEmpty(data.PublishedDateTime))
                {
                    WebTable_SearchCriteriaItem searchItem = new WebTable_SearchCriteriaItem(4, data.PublishedDateTime, TableColumnContentType.Text_Partial);
                    searchList.AddSearchItem(searchItem);
                }
                if (!String.IsNullOrEmpty(data.Status))
                {
                    WebTable_SearchCriteriaItem searchItem = new WebTable_SearchCriteriaItem(5, data.Status, TableColumnContentType.Text);
                    searchList.AddSearchItem(searchItem);
                }
                return(WebTableUtilities.Table_FindRow(DL_Site_ManageVersionsPage.VersionsTable, searchList));
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            return(null);
        }
Example #20
0
        static WebTable_SearchCriteriaItemList GetSearchItemList(String cellText)
        {
            WebTable_SearchCriteriaItem     item = new WebTable_SearchCriteriaItem(0, cellText, TableColumnContentType.Text);
            WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();

            list.AddSearchItem(item);
            return(list);
        }
Example #21
0
        public static IControl GetPatientRowFromPatientsTable(string PatientID)
        {
            WebTable_SearchCriteriaItem     Item       = new WebTable_SearchCriteriaItem(0, PatientID, TableColumnContentType.Link);
            WebTable_SearchCriteriaItemList SearchList = new WebTable_SearchCriteriaItemList();

            SearchList.AddSearchItem(Item);
            return(WebTableUtilities.Table_FindRow(DL_PatientsPage.PatientsTable, SearchList));
        }
Example #22
0
        public static IControl GetPatientRowFromPatientsTable(string PatientID, string Status)
        {
            WebTable_SearchCriteriaItemList SList   = new WebTable_SearchCriteriaItemList();
            WebTable_SearchCriteriaItem     PID     = new WebTable_SearchCriteriaItem(0, PatientID, TableColumnContentType.Link);
            WebTable_SearchCriteriaItem     PStatus = new WebTable_SearchCriteriaItem(1, Status, TableColumnContentType.Text);

            SList.AddSearchItem(PID);
            SList.AddSearchItem(PStatus);
            return(WebTableUtilities.Table_FindRow(DL_PatientsPage.PatientsTable, SList));
        }
Example #23
0
        public void WhenIClickGroupNameInGroupManagementPage(string groupName)
        {
            WebTable_SearchCriteriaItemList searchCreteriaList = new WebTable_SearchCriteriaItemList();

            searchCreteriaList.AddSearchItem(new WebTable_SearchCriteriaItem(0, groupName, TableColumnContentType.Link));
            IControl tableRow      = WebTableUtilities.Table_FindRow(DL_GroupManagementPage.GroupsTable, searchCreteriaList);
            IControl groupNameLink = WebTableUtilities.GetElement(tableRow, groupName, 0, TableColumnContentType.Link);

            Control_ActionUtilities.Click_PerssEnterKey(groupNameLink, string.Empty);
        }
        public static IControl GetQueryRowFromQueryRunQizard(string QueryName, string Version)
        {
            WebTable_SearchCriteriaItem     Item       = new WebTable_SearchCriteriaItem(3, QueryName, TableColumnContentType.Text);
            WebTable_SearchCriteriaItem     Item2      = new WebTable_SearchCriteriaItem(6, Version, TableColumnContentType.Text);
            WebTable_SearchCriteriaItemList SearchList = new WebTable_SearchCriteriaItemList();

            SearchList.AddSearchItem(Item);
            SearchList.AddSearchItem(Item2);
            return(WebTableUtilities.Table_FindRow(DL_QueryRunWizardPage.QueriesTblOnRunWizard, SearchList));
        }
Example #25
0
        static bool IsPatiensTable(IControl table)
        {
            WebTable_SearchCriteriaItemList searchList = new WebTable_SearchCriteriaItemList();

            searchList.AddSearchItem(new WebTable_SearchCriteriaItem(0, "Site", TableColumnContentType.Text));
            searchList.AddSearchItem(new WebTable_SearchCriteriaItem(1, "Patient ID", TableColumnContentType.Text));
            searchList.AddSearchItem(new WebTable_SearchCriteriaItem(2, "Status", TableColumnContentType.Text));
            searchList.AddSearchItem(new WebTable_SearchCriteriaItem(3, "Last Event", TableColumnContentType.Text));
            IControl row = WebTableUtilities.Table_FindRow(table, searchList);

            return(!Control_PropertyUtilities.IsControlNull(row));
        }
Example #26
0
        static IControl FindRow(String labTestName)
        {
            WebTable_SearchCriteriaItemList searchList = new WebTable_SearchCriteriaItemList();

            searchList.AddSearchItem(new WebTable_SearchCriteriaItem(0, labTestName, TableColumnContentType.Link));
            IControl labTestRow = WebTableUtilities.Table_FindRow(DL_Lab_ManageReferenceRanges.LabTestsTable, searchList);

            if (labTestRow != null)
            {
                return(labTestRow);
            }
            return(null);
        }
        static IControl FindSite(String siteId, String siteName)
        {
            WebTable_SearchCriteriaItemList searchList = new WebTable_SearchCriteriaItemList();

            searchList.AddSearchItem(new WebTable_SearchCriteriaItem(0, siteId + "-" + siteName, TableColumnContentType.Link));
            IControl labRow = WebTableUtilities.Table_FindRow(DL_SiteManagementPage.SitesTable, searchList);

            if (labRow != null)
            {
                return(labRow);
            }
            return(null);
        }
Example #28
0
        static IControl FindRow(String labId)
        {
            WebTable_SearchCriteriaItemList searchList = new WebTable_SearchCriteriaItemList();

            searchList.AddSearchItem(new WebTable_SearchCriteriaItem(0, labId, TableColumnContentType.Link));
            IControl labRow = WebTableUtilities.Table_FindRow(DL_LabManagementPage.LabsTable, searchList);

            if (labRow != null)
            {
                return(labRow);
            }
            return(null);
        }
        public static bool VerifyTableChangeHistoryInOrder(String tableName, List <CRF_TableHistoryData> dataList)
        {
            Utilities.BrowserUtilities.SwitchToFrame();
            try
            {
                int i = 0;
                foreach (CRF_TableHistoryData data in dataList)
                {
                    WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
                    if (!String.IsNullOrEmpty(data.Name))
                    {
                        list.AddSearchItem(new WebTable_SearchCriteriaItem(0, data.Name, TableColumnContentType.Text));
                    }
                    if (!String.IsNullOrEmpty(data.ServerTime))
                    {
                        list.AddSearchItem(new WebTable_SearchCriteriaItem(1, data.ServerTime, TableColumnContentType.Text_Partial));
                    }
                    if (!String.IsNullOrEmpty(data.Action))
                    {
                        list.AddSearchItem(new WebTable_SearchCriteriaItem(2, data.Action, TableColumnContentType.Text));
                    }
                    if (!String.IsNullOrEmpty(data.Reason))
                    {
                        //String s = data.ReasonNotes.Replace("\\r", "\r");
                        list.AddSearchItem(new WebTable_SearchCriteriaItem(3, data.Reason, TableColumnContentType.Text));
                    }
                    if (!String.IsNullOrEmpty(data.AdditionalNotes))
                    {
                        list.AddSearchItem(new WebTable_SearchCriteriaItem(4, data.AdditionalNotes, TableColumnContentType.Text));
                    }

                    if (list.List.Count > 0)
                    {
                        IControl tableRow = WebTableUtilities.Table_FindRow(DL_ModalWindow_TableChangeHistory.HistoryTable, list, ++i);
                        if (Control_PropertyUtilities.IsControlNull(tableRow))
                        {
                            Utilities.BrowserUtilities.SwitchToWindow();
                            return(false);
                        }
                    }
                }
                Utilities.BrowserUtilities.SwitchToWindow();
                return(true);
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            Utilities.BrowserUtilities.SwitchToWindow();
            return(false);
        }
 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);
 }