public void InvoiceRelationShipsSearch()
        {
            var datarows = Initialize();

            foreach (var datarow in datarows.Where(datarow => datarow.ItemArray[4].ToString().Equals("IRelationShips")))
            {
                Console.WriteLine(datarow.ItemArray[3]);
                SearchWindow.SelectSearchElements(datarow.ItemArray[5].ToString(), "IRelationShips2",
                                                  SearchWindow.SearchTypeConstants.Simple);
                Factory.AssertIsTrue(SimpleSearchWindow.VerifySearchResultsWindowDisplayed(), "Results are displayed for the search criteria");
                SimpleSearchWindow.CloseResultsWindow();
            }
            Cleanup();
        }
        public void BillingLineItemSearch()
        {
            var datarows = Initialize();

            foreach (var datarow in datarows.Where(datarow => datarow.ItemArray[4].ToString().Equals("BillingLineItem")))
            {
                Console.WriteLine(datarow.ItemArray[3]);
                SearchWindow.SelectSearchElements(datarow.ItemArray[5].ToString(), "BillingLineItem",
                                                  SearchWindow.SearchTypeConstants.Simple);
                Playback.Wait(3000);

                Factory.AssertIsTrue(SimpleSearchWindow.VerifySearchResultsWindowDisplayed(), "Search results window is not displayed for the search criteria");
                SimpleSearchWindow.CloseResultsWindow();
            }
            Cleanup();
        }
        public void DispatchSearch()
        {
            var datarows = Initialize();

            foreach (var datarow in datarows.Where(datarow => datarow.ItemArray[4].ToString().Equals("Dispatch")))
            {
                Console.WriteLine(datarow.ItemArray[3]);
                SearchWindow.SelectSearchElements(datarow.ItemArray[5].ToString(), "Dispatch",
                                                  SearchWindow.SearchTypeConstants.Simple);
                SearchWindow.SelectJobOrderFromResults();

                Factory.AssertIsTrue(JobOrderWindow.VerifyDispatchStatusDisplayed(), "Dispatch status is not displayed for selected job order");
                JobOrderWindow.CloseJobOrderProfileWindow();
                SimpleSearchWindow.CloseResultsWindow();
            }
            Cleanup();
        }
        public void CreditCardSearch()
        {
            try
            {
                var datarows = Initialize();
                foreach (var datarow in datarows.Where(datarow => datarow.ItemArray[4].ToString().Equals("CreditCard")))
                {
                    Debug.WriteLine(datarow.ItemArray[3]);
                    SearchWindow.SelectSearchElements(datarow.ItemArray[5].ToString(), "CreditCard",
                                                      SearchWindow.SearchTypeConstants.Simple);
                    SearchWindow.SelectCardFromResults();

                    Factory.AssertIsTrue(SimpleSearchWindow.VerifyViewCreditCardPaymentWindowDisplayed(datarow.ItemArray[5].ToString()),
                                         "View Credit card payment window is not displayed for the search criteria");

                    TitlebarActions.ClickClose((WinWindow)SimpleSearchWindow.GetViewCreditCardPaymentWindowProperties());
                    SimpleSearchWindow.CloseResultsWindow();
                }
            }
            finally
            {
                Cleanup();
            }
        }