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_category/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 int t3231IDRecordCount
                        {
                            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 t3231IDCounter = 0;
                            protected object t3231IDRecord = null;
                        
                            private DataTable t3231ID;
                            private DataTable t3231ID_
                            {
                                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))
                                    {
                                        t3231ID = bll.List(-1, -1, condition, sort);
                                    }

                                    return t3231ID;
                                }
                            }
                        
                            protected string t3231
                            {
                                get
                                {
                                    XmlNode node = _xmlTemplate.SelectSingleNode("//t3231");
                                    Dictionary<string, object> replacementPair = new Dictionary<string, object>();
                                    
                                        replacementPair["{#t3719#}"] = new CustomBuildTree(
                                                                        delegate(TreeNode record, int index)
                                                                        {string t3719 = String.Empty;
if ((Convert.ToString((t3231IDRecord as TreeNode).Row[IlgharCMS.ArticleModule.Alias.ArticleCategory.ID])==Request.QueryString["ParentID"]))
{t3719 = _xmlTemplate.SelectSingleNode("/" + "/t3719/If").InnerText;}
else
{t3719 = _xmlTemplate.SelectSingleNode("/" + "/t3719/Else").InnerText;}

                                                                            return t3719;
                                                                        }
                                                                        );
                                                replacementPair["{#Control#}"] = null;replacementPair["{#ChildRecords#}"] = null;replacementPair["{#ID#}"] = IlgharCMS.ArticleModule.Alias.ArticleCategory.ID;replacementPair["{#Name#}"] = IlgharCMS.ArticleModule.Alias.ArticleCategory.Name;
                                    StringBuilder all = Manager.BuildTree(node, t3231ID_, replacementPair, IlgharCMS.ArticleModule.Alias.ArticleCategory.ParentID, IlgharCMS.ArticleModule.Alias.ArticleCategory.ID, ref t3231IDRecord, ref t3231IDCounter);
                                    
                                    
                                    
                                    return all.ToString();
                                }
                            }
                          }
