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.ShopModule;
public partial class CIlgharCMS : IlgharCMS.Lib.AdminPageBase
{
public CIlgharCMS()
: base("IlgharCMS.ShopModule/goods_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 t2662IDRecordCount
                        {
                            get
                            {
                                int instanceID;
instanceID = InstanceID;
                                using (IlgharCMS.ShopModule.IGoodsCategory bll = (IlgharCMS.ShopModule.IGoodsCategory)Manager.CreateObject("GoodsCategory", instanceID, ContentLang, false))
                                {
                                    string condition = null;


                                    return bll.GetRecordCount(condition);
                                }
                            }
                        }
                        
                            protected int t2662IDCounter = 0;
                            protected object t2662IDRecord = null;
                        
                            private DataTable t2662ID;
                            private DataTable t2662ID_
                            {
                                get
                                {
                                    string condition = null;


                                    string sort = null;

                                    int instanceID;
instanceID = InstanceID;

                                    using (IlgharCMS.ShopModule.IGoodsCategory bll = (IlgharCMS.ShopModule.IGoodsCategory)Manager.CreateObject("GoodsCategory", instanceID, ContentLang, false))
                                    {
                                        t2662ID = bll.List(-1, -1, condition, sort);
                                    }

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

                                                                            return t3148;
                                                                        }
                                                                        );
                                                replacementPair["{#Control#}"] = null;replacementPair["{#ChildRecords#}"] = null;replacementPair["{#ID#}"] = IlgharCMS.ShopModule.Alias.GoodsCategory.ID;replacementPair["{#Name#}"] = IlgharCMS.ShopModule.Alias.GoodsCategory.Name;
                                    StringBuilder all = Manager.BuildTree(node, t2662ID_, replacementPair, IlgharCMS.ShopModule.Alias.GoodsCategory.ParentID, IlgharCMS.ShopModule.Alias.GoodsCategory.ID, ref t2662IDRecord, ref t2662IDCounter);
                                    
                                    
                                    
                                    return all.ToString();
                                }
                            }
                          }
