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/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 t3664IDRecordCount
                        {
                            get
                            {
                                int instanceID;
instanceID = InstanceID;
                                using (IlgharCMS.SystemModule.IInstance bll = (IlgharCMS.SystemModule.IInstance)Manager.CreateObject("Instance", instanceID, ContentLang, false))
                                {
                                    string condition = null;


                                    return bll.GetRecordCount(condition);
                                }
                            }
                        }
                        
                            protected int t3664IDCounter = 0;
                            protected object t3664IDRecord = null;
                            private DataTable t3664IDData;
                            protected DataTable t3664ID
                            {
                                get
                                {
                                    if (t3664IDData != null)
                                        return t3664IDData;

                                    t3664IDData = t3664ID_;
                                    return t3664IDData;
                                }
                            }
                        
                                private DataTable t3664ID_
                                {
                                    get
                                    {
                                        string condition = null;


                                        string sort = null;sort = "P2131_3_56 DESC";

                                        int instanceID;
instanceID = InstanceID;

                                        using (IlgharCMS.SystemModule.IInstance bll = (IlgharCMS.SystemModule.IInstance)Manager.CreateObject("Instance", instanceID, ContentLang, false))
                                        {
                                            t3664IDData = bll.List(-1, -1, condition, sort);
                                        }

                                        return t3664IDData;
                                    }
                                }
                            
                            protected string t3664
                            {
                                get
                                {
                                    XmlNode node = _xmlTemplate.SelectSingleNode("//t3664");
                                    Dictionary<string, object> replacementPair = new Dictionary<string, object>();
                                    replacementPair["{#ID#}"] = IlgharCMS.SystemModule.Alias.Instance.ID;replacementPair["{#ModuleID#}"] = IlgharCMS.SystemModule.Alias.Instance.ModuleID;replacementPair["{#Name#}"] = IlgharCMS.SystemModule.Alias.Instance.Name;
                                    StringBuilder all = Manager.Build(node, t3664ID_, replacementPair, ref t3664IDRecord, ref t3664IDCounter);
                                    
                                    
                                    object t3757 = ContentLang;
all.Replace("{#t3757#}",t3757 == null ? "" : t3757.ToString());

                                    return all.ToString();
                                }
                            }
                          }
