using System;
using System.Data;
using System.Xml;
using System.Collections.Generic;
using System.Collections;
using System.Text;
using System.Web;
using IlgharCMS;
using IlgharCMS.ArticleModule;
public partial class CIlgharCMS : IlgharCMS.Lib.AdminPageBase
{
public CIlgharCMS()
: base("IlgharCMS.ArticleModule/article/add.dwt.aspx")
{}
protected XmlDocument _xmlTemplate;
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
_xmlTemplate = XmlData.GetXmlDocument();
if (!String.IsNullOrEmpty(Request.QueryString["GetPageCount"]))
                            {
                                Response.Write(1);
                                Response.End();
                            }
                        
}

                            protected System.Collections.Generic.Dictionary<System.String,System.String> Config
                            {
                                get
                                {
                                    object id = null;
                                    
                                    if (_ConfigID != null && _ConfigID == id)
                                        return _Config;

                                    int instanceID;
instanceID = InstanceID;

                                    using (IlgharCMS.ArticleModule.IInstanceConfig bll = (IlgharCMS.ArticleModule.IInstanceConfig)Manager.CreateObject("InstanceConfig", instanceID, ContentLang, false))
                                    {
                                        _ConfigID = id;
                                        _Config = bll.GetBasicSettings();
                                    }

                                    return _Config;
                                }
                            }
                            private System.Collections.Generic.Dictionary<System.String,System.String> _Config;
                            private object _ConfigID;
                            
                        protected int t3857IDRecordCount
                        {
                            get
                            {
                                int instanceID;
instanceID = InstanceID;
                                using (IlgharCMS.ArticleModule.IArticleCategory bll = (IlgharCMS.ArticleModule.IArticleCategory)Manager.CreateObject("ArticleCategory", instanceID, ContentLang, false))
                                {
                                    string condition = null;


                                    return bll.GetRecordCount(condition);
                                }
                            }
                        }
                        
                            protected int t3857IDCounter = 0;
                            protected object t3857IDRecord = null;
                        
                            private DataTable t3857ID;
                            private DataTable t3857ID_
                            {
                                get
                                {
                                    string condition = null;


                                    string sort = null;

                                    int instanceID;
instanceID = InstanceID;

                                    using (IlgharCMS.ArticleModule.IArticleCategory bll = (IlgharCMS.ArticleModule.IArticleCategory)Manager.CreateObject("ArticleCategory", instanceID, ContentLang, false))
                                    {
                                        t3857ID = bll.List(-1, -1, condition, sort);
                                    }

                                    return t3857ID;
                                }
                            }
                        
                            protected string t3857
                            {
                                get
                                {
                                    XmlNode node = _xmlTemplate.SelectSingleNode("//t3857");
                                    Dictionary<string, object> replacementPair = new Dictionary<string, object>();
                                    replacementPair["{#Control#}"] = null;replacementPair["{#ChildRecords#}"] = null;replacementPair["{#ID#}"] = IlgharCMS.ArticleModule.Alias.ArticleCategory.ID;replacementPair["{#Name#}"] = IlgharCMS.ArticleModule.Alias.ArticleCategory.Name;replacementPair["{#PageGenerate#}"] = IlgharCMS.ArticleModule.Alias.ArticleCategory.PageGenerate;replacementPair["{#PageTemplate#}"] = IlgharCMS.ArticleModule.Alias.ArticleCategory.PageTemplate;replacementPair["{#PageID#}"] = IlgharCMS.ArticleModule.Alias.ArticleCategory.PageID;replacementPair["{#PageExtension#}"] = IlgharCMS.ArticleModule.Alias.ArticleCategory.PageExtension;
                                    StringBuilder all = Manager.BuildTree(node, t3857ID_, replacementPair, IlgharCMS.ArticleModule.Alias.ArticleCategory.ParentID, IlgharCMS.ArticleModule.Alias.ArticleCategory.ID, ref t3857IDRecord, ref t3857IDCounter);
                                    
                                    
                                    
                                    return all.ToString();
                                }
                            }
                          
                        protected int t6986IDRecordCount
                        {
                            get
                            {
                                int instanceID;
instanceID = (int)SystemChannel[IlgharCMS.SystemModule.Alias.Instance.InnerID];
                                using (IlgharCMS.SystemModule.IPlayer bll = (IlgharCMS.SystemModule.IPlayer)Manager.CreateObject("Player", instanceID, ContentLang, false))
                                {
                                    string condition = null;


                                    return bll.GetRecordCount(condition);
                                }
                            }
                        }
                        
                            protected int t6986IDCounter = 0;
                            protected object t6986IDRecord = null;
                            private DataTable t6986IDData;
                            protected DataTable t6986ID
                            {
                                get
                                {
                                    if (t6986IDData != null)
                                        return t6986IDData;

                                    t6986IDData = t6986ID_;
                                    return t6986IDData;
                                }
                            }
                        
                                private DataTable t6986ID_
                                {
                                    get
                                    {
                                        string condition = null;


                                        string sort = null;

                                        int instanceID;
instanceID = (int)SystemChannel[IlgharCMS.SystemModule.Alias.Instance.InnerID];

                                        using (IlgharCMS.SystemModule.IPlayer bll = (IlgharCMS.SystemModule.IPlayer)Manager.CreateObject("Player", instanceID, ContentLang, false))
                                        {
                                            t6986IDData = bll.List(-1, -1, condition, sort);
                                        }

                                        return t6986IDData;
                                    }
                                }
                            
                            protected string t6986
                            {
                                get
                                {
                                    XmlNode node = _xmlTemplate.SelectSingleNode("//t6986");
                                    Dictionary<string, object> replacementPair = new Dictionary<string, object>();
                                    replacementPair["{#ID#}"] = IlgharCMS.SystemModule.Alias.Player.ID;replacementPair["{#Name#}"] = IlgharCMS.SystemModule.Alias.Player.Name;
                                    StringBuilder all = Manager.Build(node, t6986ID_, replacementPair, ref t6986IDRecord, ref t6986IDCounter);
                                    
                                    
                                    
                                    return all.ToString();
                                }
                            }
                          }
