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.SystemModule;
public partial class CIlgharCMS : IlgharCMS.Lib.AdminPageBase
{
public CIlgharCMS()
: base("IlgharCMS.SystemModule/channel/list.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 t2211IDRecordCount
                        {
                            get
                            {
                                int instanceID;
instanceID = InstanceID;
                                using (IlgharCMS.SystemModule.IChannel bll = (IlgharCMS.SystemModule.IChannel)Manager.CreateObject("Channel", instanceID, ContentLang, true))
                                {
                                    string condition = null;


                                    return bll.GetRecordCount(condition);
                                }
                            }
                        }
                        
                            protected int t2211IDCounter = 0;
                            protected object t2211IDRecord = null;
                        
                            private DataTable t2211ID;
                            private DataTable t2211ID_
                            {
                                get
                                {
                                    string condition = null;


                                    string sort = null;

                                    int instanceID;
instanceID = InstanceID;

                                    using (IlgharCMS.SystemModule.IChannel bll = (IlgharCMS.SystemModule.IChannel)Manager.CreateObject("Channel", instanceID, ContentLang, true))
                                    {
                                        t2211ID = bll.List(-1, -1, condition, sort);
                                    }

                                    return t2211ID;
                                }
                            }
                        
                            protected string t2211
                            {
                                get
                                {
                                    XmlNode node = _xmlTemplate.SelectSingleNode("//t2211");
                                    Dictionary<string, object> replacementPair = new Dictionary<string, object>();
                                    
                                        replacementPair["{#t3636#}"] = new CustomBuildTree(
                                                                        delegate(TreeNode record, int index)
                                                                        {string t3636 = String.Empty;
if (Convert.IsDBNull((t2211IDRecord as TreeNode).Row[IlgharCMS.SystemModule.Alias.Channel.TemplatePath]))
{t3636 = _xmlTemplate.SelectSingleNode("/" + "/t3636/If").InnerText;}
else if ((Convert.ToString((t2211IDRecord as TreeNode).Row[IlgharCMS.SystemModule.Alias.Channel.Domain])!=String.Empty))
{t3636 = _xmlTemplate.SelectSingleNode("/" + "/t3636/ElseIf0").InnerText;}
else
{t3636 = _xmlTemplate.SelectSingleNode("/" + "/t3636/Else").InnerText;object t3964 = WebPath;
t3636 = t3636.Replace("{#t3964#}",t3964 == null ? "" : t3964.ToString());
object t4037 = WebPath;
t3636 = t3636.Replace("{#t4037#}",t4037 == null ? "" : t4037.ToString());
}

                                                                            return t3636;
                                                                        }
                                                                        );
                                                
                                        replacementPair["{#t4260#}"] = new CustomBuildTree(
                                                                        delegate(TreeNode record, int index)
                                                                        {string t4260 = String.Empty;
if ((!Convert.IsDBNull((t2211IDRecord as TreeNode).Row[IlgharCMS.SystemModule.Alias.Channel.TemplatePath])))
{t4260 = _xmlTemplate.SelectSingleNode("/" + "/t4260/If").InnerText;object t4343 = ContentLang;
t4260 = t4260.Replace("{#t4343#}",t4343 == null ? "" : t4343.ToString());
}

                                                                            return t4260;
                                                                        }
                                                                        );
                                                
                                        replacementPair["{#t4445#}"] = new CustomBuildTree(
                                                                        delegate(TreeNode record, int index)
                                                                        {string t4445 = String.Empty;
if ((Convert.ToInt32((t2211IDRecord as TreeNode).Row[IlgharCMS.SystemModule.Alias.Channel.InnerID])!=1))
{t4445 = _xmlTemplate.SelectSingleNode("/" + "/t4445/If").InnerText;}

                                                                            return t4445;
                                                                        }
                                                                        );
                                                replacementPair["{#Control#}"] = null;replacementPair["{#ChildRecords#}"] = null;
                                        replacementPair[@"{#ImagePath#}"] = new CustomBuildTree(
                                                                        delegate(TreeNode record, int index)
                                                                        {
                                                                            object t3373 = ImagePath;
                                                                            if (t3373 != null)
                                                                                return t3373.ToString();
                                                                            else
                                                                                return String.Empty;
                                                                        }
                                                                        );
                                                
                                        replacementPair[@"{#ContentLang#}"] = new CustomBuildTree(
                                                                        delegate(TreeNode record, int index)
                                                                        {
                                                                            object t3491 = ContentLang;
                                                                            if (t3491 != null)
                                                                                return t3491.ToString();
                                                                            else
                                                                                return String.Empty;
                                                                        }
                                                                        );
                                                replacementPair["{#InnerID#}"] = IlgharCMS.SystemModule.Alias.Channel.InnerID;replacementPair["{#ParentInnerID#}"] = IlgharCMS.SystemModule.Alias.Channel.InnerID;replacementPair["{#Name#}"] = IlgharCMS.SystemModule.Alias.Channel.Name;replacementPair["{#Path#}"] = IlgharCMS.SystemModule.Alias.Channel.Path;replacementPair["{#Domain#}"] = IlgharCMS.SystemModule.Alias.Channel.Domain;replacementPair["{#DefaultDocument#}"] = IlgharCMS.SystemModule.Alias.Channel.DefaultDocument;replacementPair["{#Extension#}"] = IlgharCMS.SystemModule.Alias.Channel.Extension;replacementPair["{#SkinPath#}"] = IlgharCMS.SystemModule.Alias.Channel.SkinPath;
                                    StringBuilder all = Manager.BuildTree(node, t2211ID_, replacementPair, IlgharCMS.SystemModule.Alias.Channel.ParentID, IlgharCMS.SystemModule.Alias.Channel.ID, ref t2211IDRecord, ref t2211IDCounter);
                                    
                                    
                                    
                                    return all.ToString();
                                }
                            }
                          }
