Esempio n. 1
0
        private void DoArticleEdit(MainDataSet.ArticleRow articleRow)
        {
            ShowArticleEdit();
            TreeViewParentArticle.Nodes.Clear();
            TreeViewParentArticle.Nodes.Add(new Telerik.Web.UI.RadTreeNode("                                                                                                                                                                                                          ", string.Empty));
            TreeViewParentArticle.DataBind();

            CustomLinksDataBind(UserContext.Current.SelectedInstance.InstanceId);

            if (articleRow != null)
            {
                HtmlEditorBody.ImageManager.ViewPaths = new string[] { articleRow.ArticleGuid.ToString("N") };
                HtmlEditorBody.ImageManager.ContentProviderTypeName = typeof(Micajah.FileService.Providers.ImageDBContentProvider).AssemblyQualifiedName;
                HtmlEditorBody.MediaManager.ViewPaths = new string[] { articleRow.ArticleGuid.ToString("N") };
                HtmlEditorBody.MediaManager.ContentProviderTypeName = typeof(Micajah.FileService.Providers.VideoDBContentProvider).AssemblyQualifiedName;
                HtmlEditorBody.FlashManager.ViewPaths = new string[] { articleRow.ArticleGuid.ToString("N") };
                HtmlEditorBody.FlashManager.ContentProviderTypeName    = typeof(Micajah.FileService.Providers.FlashDBContentProvider).AssemblyQualifiedName;
                HtmlEditorBody.DocumentManager.ViewPaths               = new string[] { articleRow.ArticleGuid.ToString("N") };
                HtmlEditorBody.DocumentManager.ContentProviderTypeName = typeof(Micajah.FileService.Providers.FileDBContentProvider).AssemblyQualifiedName;
                HtmlEditorBody.Content = this.ArticleTableAdapter.GetBody(articleRow.ArticleGuid);

                ImageAdminListCtrl.ArticleGuid = articleRow.ArticleGuid;
                FileAdminListCtrl.ArticleGuid  = articleRow.ArticleGuid;
                ImageAdminListCtrl.DataBind();
                FileAdminListCtrl.DataBind();

                Master.CustomName             = articleRow.Subject;
                TextBoxSubject.Text           = articleRow.Subject;
                SearchDescriptionTextBox.Text = articleRow.SearchDesc;
                if (!articleRow.IsParentArticleGuidNull())
                {
                    Telerik.Web.UI.RadTreeNode node = TreeViewParentArticle.FindNodeByValue(articleRow.ParentArticleGuid.ToString());
                    if (node != null)
                    {
                        node.Selected = true;
                        node.ExpandParentNodes();
                    }
                }
                if (articleRow.Type == ArticleType.Request.ToString())
                {
                    TextBoxAlternateIds.Text = articleRow.Subject;
                }
                else
                {
                    using (MainDataSetTableAdapters.AlternateIdTableAdapter altAdapter = new MainDataSetTableAdapters.AlternateIdTableAdapter())
                    {
                        TextBoxAlternateIds.Text = string.Empty;
                        MainDataSet.AlternateIdDataTable dtAlt = altAdapter.GetDataByArticleGuid(articleRow.ArticleGuid);
                        foreach (MainDataSet.AlternateIdRow row in dtAlt)
                        {
                            TextBoxAlternateIds.Text += row.AlternateId + Environment.NewLine;
                        }
                    }
                }
            }
            else
            {
                Master.CustomName = (string)this.GetLocalResourceObject("AddNewArticle");
            }
        }
Esempio n. 2
0
 private void DoUploadFile(Guid articleGuid)
 {
     UploadControl.LocalObjectId = articleGuid.ToString("N");
     UploadControl.AcceptChanges();
     ImageAdminListCtrl.ArticleGuid = articleGuid;
     ImageAdminListCtrl.DataBind();
     FileAdminListCtrl.ArticleGuid = articleGuid;
     FileAdminListCtrl.DataBind();
 }