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 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 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);
 }
Esempio n. 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);
 }
        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 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);
        }
        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 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);
        }
Esempio n. 12
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);
        }
 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 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);
 }
Esempio n. 16
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 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);
        }
Esempio n. 18
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));
        }
Esempio n. 19
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));
        }
        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));
        }
Esempio n. 21
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));
        }
Esempio n. 22
0
 static bool SetStudyFieldData_Text(IControl StudyTable, String searchText, String valueToSet)
 {
     if (valueToSet != null)
     {
         IControl row     = WebTableUtilities.Table_FindRow(StudyTable, GetSearchItemList(searchText));
         IControl textbox = WebTableUtilities.GetElement(row, String.Empty, 1, TableColumnContentType.Textbox);
         return(Control_ActionUtilities.Textbox_SetText(textbox, valueToSet, String.Empty));
     }
     return(false);
 }
Esempio n. 23
0
 static bool SetStudyFieldData_Dropdown(IControl StudyTable, String searchText, String valueToSet)
 {
     if (valueToSet != null)
     {
         IControl row      = WebTableUtilities.Table_FindRow(StudyTable, GetSearchItemList(searchText));
         IControl dropdown = WebTableUtilities.GetElement(row, String.Empty, 1, TableColumnContentType.Dropdown);
         return(Control_ActionUtilities.Dropdown_SelectItem(dropdown, valueToSet, String.Empty));
     }
     return(false);
 }
Esempio n. 24
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 String GetErrorString(String columnName)
        {
            IControl statusRow = WebTableUtilities.Table_FindRow(DL_AddLabPage.AddLabTable, GetSearchItemList(columnName));
            IControl span      = WebTableUtilities.GetElement(statusRow, String.Empty, 1, TableColumnContentType.Span);

            if (Control_PropertyUtilities.IsControlVisible(span))
            {
                return(Control_PropertyUtilities.GetText(span));
            }
            return(String.Empty);
        }
Esempio n. 26
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));
        }
Esempio n. 27
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);
        }
Esempio n. 28
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);
        }
        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);
        }