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 void WhenIOpenTheLabWithTheFollowingDetailsInManageReferenceRangesPage(Table table)
        {
            ManageReferenceLabGridRowData labGridRowData = table.CreateInstance <ManageReferenceLabGridRowData>();

            if (!BP_ManageReferenceRange_MRRUtilities.OpenLab(labGridRowData))
            {
                ScenarioContext.Current["ActResult"] = "Failed";
            }
        }