Пример #1
0
 /// <summary>
 /// Updates whether the document has been signed off or not
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void BtnSignOff_ServerClick(object sender, EventArgs e)
 {
     try
     {
         objCommon = new CommonBLL();
         if (HttpContext.Current.Session[SESSIONWEBPARTPROPERTIES] != null &&
             ((TreeNodeSelection)HttpContext.Current.Session[SESSIONWEBPARTPROPERTIES]).IsTypeIISelected)
         {
             objTreeNode = (TreeNodeSelection)HttpContext.Current.Session[SESSIONWEBPARTPROPERTIES];
             PageID = objTreeNode.PageID;
             ChapterID = objTreeNode.ChapterID;
         }
         else if (HttpContext.Current.Request.QueryString[MODEQUERYSTRING] != null)
         {
             PageID = HttpContext.Current.Request.QueryString[PAGEIDQUERYSTRING];
             ChapterID = HttpContext.Current.Request.QueryString[CHAPTERIDQUERYSTRING];
         }
         LoadMetaData();
         if (string.Equals(btnSignOff.Text, CANCELSIGNOFF))
         {
             objCommon.SignOffPage(strParentSiteURL, CHAPTERPAGESMAPPINGLIST, hidPageId.Value, CHAPTERPAGESMAPPINGAUDITLIST, false);
         }
         else
         {
             objCommon.SignOffPage(strParentSiteURL, CHAPTERPAGESMAPPINGLIST, hidPageId.Value, CHAPTERPAGESMAPPINGAUDITLIST, true);
         }
         LoadMetaData();
     }
     catch (WebException webEx)
     {
         CommonUtility.HandleException(strParentSiteURL, webEx);
         RenderException(webEx.Message);
     }
     catch (Exception ex)
     {
         CommonUtility.HandleException(strParentSiteURL, ex);
     }
 }
Пример #2
0
        /// <summary>
        /// Handles the Click event of the btnSignOff control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        void btnSignOff_Click(object sender, EventArgs e)
        {
            objCommonBLL = new CommonBLL();
            strParentSiteURL = SPContext.Current.Site.Url.ToString();
            TreeNodeSelection objTreeNodeSelection = null;
            objTreeNodeSelection = (TreeNodeSelection)HttpContext.Current.Session[SESSION_WEBPARTPROPERTIES];
            PageID = objTreeNodeSelection.PageID;

            if (string.Equals(btnSignOff.Text, CANCEL_SIGNOFF_TEXT))
            {
                objCommonBLL.SignOffPage(strParentSiteURL, DWBCHAPTERPAGESMAPPINGLIST, PageID, DWBCHAPTERPAGESMAPPINGAUDITLIST, false);
                LoadMetaDataControls();
            }
            else
            {
                objCommonBLL.SignOffPage(strParentSiteURL, DWBCHAPTERPAGESMAPPINGLIST, PageID, DWBCHAPTERPAGESMAPPINGAUDITLIST, true);
                LoadMetaDataControls();
            }
        }