public static Boolean VerifyAddLabPageInEditMode()
 {
     try
     {
         foreach (IControl c in DL_AddLabPage.FieldsOnLabPage)
         {
             if (!Control_PropertyUtilities.IsEnabled(c))
             {
                 return(false);
             }
         }
         if (!Control_PropertyUtilities.IsEnabled(DL_AddLabPage.SaveAndAddAnotherButton))
         {
             return(false);
         }
         if (!Control_PropertyUtilities.IsEnabled(DL_AddLabPage.SaveButton))
         {
             return(false);
         }
         if (!Control_PropertyUtilities.IsEnabled(DL_AddLabPage.CancelButton))
         {
             return(false);
         }
         if (!Control_PropertyUtilities.IsEnabled(DL_AddLabPage.SaveAndAssociateSiteButton))
         {
             return(false);
         }
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(true);
 }
        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);
        }
Beispiel #3
0
 public static bool EditMode()
 {
     try
     {
         return(Control_PropertyUtilities.IsEnabled(DL_Lab_MRR_Table.AddNewRecord) &&
                Control_PropertyUtilities.IsEnabled(DL_Lab_MRR_Table.DeleteButton));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
         return(false);
     }
 }
 public static Boolean VerifyNormalizeLabDataPageInViewMode()
 {
     try
     {
         if (!Control_PropertyUtilities.IsEnabled(DL_NormalizeLabDataPage.RunButton))
         {
             return(false);
         }
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(true);
 }
Beispiel #5
0
 public static bool VerifyTheActionButtonInChangeHistoryWindow(string button)
 {
     Utilities.BrowserUtilities.SwitchToFrame();
     try
     {
         if (button.Equals("Print"))
         {
             return(Control_PropertyUtilities.IsEnabled(DL_Lab_Mrr_AuditHistory.PrintButtonInChangeHistoryWindow));
         }
         else if (button.Equals("Close"))
         {
             return(Control_PropertyUtilities.IsEnabled(DL_Lab_Mrr_AuditHistory.CloseButtonInChangeHistoryWindow));
         }
     }
     catch (Exception e)
     {
         new Reports.DebugLog.DebugLogGenerator().WriteException(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     //Utilities.BrowserUtilities.SwitchToWindow();
     return(false);
 }
Beispiel #6
0
 public static bool LabsDropDownStatus(String dropdownStatus)
 {
     try
     {
         if (dropdownStatus.Equals("Enabled"))
         {
             bool status = Control_PropertyUtilities.IsEnabled(DS_StudyProperties.LabDropDown);
             return(status);
         }
         else if (dropdownStatus.Equals("Disabled"))
         {
             bool status = Control_PropertyUtilities.IsControlDisabled(DS_StudyProperties.LabDropDown);
             return(status);
         }
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
Beispiel #7
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 IsAssociateLabsToSiteInViewMode()
        {
            return(!Control_PropertyUtilities.IsEnabled(DL_Site_AssociateLabsPage.AvailableLabs) &&
                   !Control_PropertyUtilities.IsEnabled(DL_Site_AssociateLabsPage.AssociatedLabs) &&
                   !Control_PropertyUtilities.IsEnabled(DL_Site_AssociateLabsPage.AddButton) &&
                   !Control_PropertyUtilities.IsEnabled(DL_Site_AssociateLabsPage.RemoveButton) &&
                   !Control_PropertyUtilities.IsEnabled(DL_Site_AssociateLabsPage.SaveButton));

            //String disableAttribute = "disabled";
            //String disableAttributeValue = "true";
            //bool found = false;
            //String value1 = Control_PropertyUtilities.GetAttributeValue(DL_Site_AssociateLabsPage.AvailableLabs, disableAttribute, out found);
            //String value2 = Control_PropertyUtilities.GetAttributeValue(DL_Site_AssociateLabsPage.AssociatedLabs, disableAttribute, out found);
            //String value3 = Control_PropertyUtilities.GetAttributeValue(DL_Site_AssociateLabsPage.AddButton, disableAttribute, out found);
            //String value4 = Control_PropertyUtilities.GetAttributeValue(DL_Site_AssociateLabsPage.RemoveButton, disableAttribute, out found);
            //String value5 = Control_PropertyUtilities.GetAttributeValue(DL_Site_AssociateLabsPage.SaveButton, disableAttribute, out found);


            //return !String.IsNullOrEmpty(value1) && value1.Equals(disableAttributeValue, StringComparison.InvariantCultureIgnoreCase) &&
            //    !String.IsNullOrEmpty(value2) && value2.Equals(disableAttributeValue, StringComparison.InvariantCultureIgnoreCase) &&
            //    !String.IsNullOrEmpty(value3) && value3.Equals(disableAttributeValue, StringComparison.InvariantCultureIgnoreCase) &&
            //    !String.IsNullOrEmpty(value4) && value4.Equals(disableAttributeValue, StringComparison.InvariantCultureIgnoreCase) &&
            //    !String.IsNullOrEmpty(value5) && value5.Equals(disableAttributeValue, StringComparison.InvariantCultureIgnoreCase);
        }