public static bool UploadAndPublishStudy(String studyFileName, String studyLabel)
 {
     try
     {
         BP_ActionPaletteUtilities.InvokeActionPaletteLink("Manage Versions", "StudyResetAction");
         if (!BP_StudyVersionManagementUtilities.IsStudyAvailable())
         {
             BP_ActionPaletteUtilities.InvokeActionPaletteLink("Upload Study File", "StudyVersionMgmtListActions");
             //BP_UploadStudyFileUtilities.ClickFileBrowseButton();
             BP_UploadStudyFileUtilities.UploadStudyOnBrowseField(studyFileName, studyLabel);
             BP_StudyVersionManagementUtilities.InvokeStudyRow("Uploaded");
             BP_ActionPaletteUtilities.InvokeActionPaletteLink("Stage", "StudyVersionPropertiesActions");
             BP_StudyVersionManagementUtilities.InvokeStudyRow("Staged");
             BP_ActionPaletteUtilities.InvokeActionPaletteLink("Publish", "StudyVersionPropertiesActions");
             BP_MainNavigationUtilities.SelectPrimaryTabOnMenu("Inbox");
             String jobText = "Publishing of Study file (" + studyLabel + ") - complete.";
             return(BP_InboxUtilities.CheckInbox_Subject_FromTop("Jobs", new List <String> {
                 jobText
             }));
         }
         return(false);
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
         return(false);
     }
 }
 public static bool UploadAStudy(String studyFileName, String studyLabel)
 {
     try
     {
         BP_ActionPaletteUtilities.InvokeActionPaletteLink("Manage Versions", "StudyResetAction");
         if (!BP_StudyVersionManagementUtilities.IsStudyAvailable())
         {
             BP_ActionPaletteUtilities.InvokeActionPaletteLink("Upload Study File", "StudyVersionMgmtListActions");
             BP_UploadStudyFileUtilities.ClickFileBrowseButton();
             BP_UploadStudyFileUtilities.UploadStudy(studyFileName, studyLabel);
             return(true);
         }
         return(false);
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
         return(false);
     }
 }