本文整理汇总了C#中IDocumentService.GetDocument方法的典型用法代码示例。如果您正苦于以下问题:C# IDocumentService.GetDocument方法的具体用法?C# IDocumentService.GetDocument怎么用?C# IDocumentService.GetDocument使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDocumentService
的用法示例。
在下文中一共展示了IDocumentService.GetDocument方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
i18n = new i18nHelper();
this.Title = i18n.GetMessage("m261") + " @ " + i18n.GetMessage("m9");
this.forwardSend.Text = i18n.GetMessage("m78");
currentUser = WebUtility.GetCurrentKBUser();
subjectid = currentUser.SubjectId;
documentService = factory.GetDocumentService();
categoryService = factory.GetCategoryService();
ratingService = factory.GetRatingService();
auditTrailService = factory.GetAuditTrailService();
wfService = factory.GetWorkflowService();
hitService = factory.GetHitService();
documentClassService = factory.GetDocumentClassService();
subscribeService = WebUtility.Repository.GetSubscribeService();
docId = WebUtility.GetIntegerParameter("documentId");
folderId = WebUtility.GetIntegerParameter("folderId", -1);
ver = WebUtility.GetIntegerParameter("ver", 0);
latestVersionNumber = buildVersionInfo();
currentUserOutputConfig = WebUtility.GetUserOutputConfig(currentUser.SubjectId);
attachMode = currentUserOutputConfig.AttachMode;
showUsedTags = ConfigurationManager.AppSettings["ShowUsedTags"] != null ? ConfigurationManager.AppSettings["ShowUsedTags"] : "false";
tagsAutoComplete = ConfigurationManager.AppSettings["TagsAutoComplete"] != null ? ConfigurationManager.AppSettings["TagsAutoComplete"] : "false";
tagsSuggestListLen = ConfigurationManager.AppSettings["TagsSuggestListLen"] != null ? ConfigurationManager.AppSettings["TagsSuggestListLen"] : "10";
subscriptionConfirm = Convert.ToBoolean(ConfigurationManager.AppSettings["SubscriptionConfirm"] != null ? ConfigurationManager.AppSettings["SubscriptionConfirm"].ToString() : "true");
autoSubscription = Convert.ToBoolean(ConfigurationManager.AppSettings["AutoSubscription"] != null ? ConfigurationManager.AppSettings["AutoSubscription"].ToString() : "true");
allowSendToNoPrivilegeUser = Convert.ToBoolean(ConfigurationManager.AppSettings["AllowSendToNoPrivilegeUser"] != null ? ConfigurationManager.AppSettings["AllowSendToNoPrivilegeUser"].ToString() : "true");
TagMaxLength = ConfigurationManager.AppSettings["TagMaxLength"] != null ? ConfigurationManager.AppSettings["TagMaxLength"] : "30";
IsSafari = (Request.Browser.Browser.ToLower().Equals("applemac-safari") && !Request.UserAgent.ToLower().Contains("chrome"));
userHadSubscribeResource = subscribeService.UserHadSubscribedResource(currentUser.SubjectId, (int)currentUser.SubjectType, docId, (int)SubscribeRecord.ResourceType.Document);
mailService = WebUtility.Repository.GetMailService();
kbuserService = WebUtility.Repository.GetKBUserService();
folderService = WebUtility.Repository.GetFolderService();
forwardService = WebUtility.Repository.GetForwardService();
if (ver == 0)
{
doc = documentService.GetDocument(currentUser, docId);
ver = latestVersionNumber;
}
else
{
doc = documentService.GetDocument(currentUser, docId, ver);
}
readVersion.Text = ver.ToString();
latestVersion.Text = latestVersionNumber.ToString();
if (ver != latestVersionNumber)
{
Panel1.Visible = false;
}
if (folderId == -1)
{
FolderInfo f = documentService.GetParentFolders(currentUser, docId)[0];
folderId = f.FolderId;
}
buildCategoriesList();
buildDocumentView();
#region For teamKube Xml Render
if (IsACLiteSubjectProvider)
{
renderSpecXml = RenderSpecificXML(currentUser, doc.DocumentId, ver);
}
#endregion
if(!doc.DocumentClass.ClassName.Trim().ToLower().Equals("filesystem"))
{
buildFileList();
}
buildRatingSummary();
buildAuditTrailInfo();
createHitInfo();
buildRelatedTagList(20);
buildRelatedDocumentList();
checkWorkflowInvolved();
isDiffDocClass = IsDiffDocumentClass();
strDiffDocClass = String.Format(i18n.GetMessage("m801"), doc.DocumentClass.ClassName, i18n.GetMessage("m802"), i18n.GetMessage("m803"));
isBuiltinDocumentClass = (doc.DocumentClass.IsBuiltIn == true) ? "true" : "false";
}