Example #1
0
 private void BindCate()
 {
     this.DropDownList2.DataSource     = SettingCategory.GetCacheSettingCategoryList();
     this.DropDownList2.DataTextField  = "CateDesc";
     this.DropDownList2.DataValueField = "AutoID";
     this.DropDownList2.DataBind();
     if (this.cate != null)
     {
         ListItem listItem = this.DropDownList2.Items.FindByValue(this.cate.AutoID.ToString());
         if (listItem != null)
         {
             listItem.Selected          = true;
             this.DropDownList2.Enabled = false;
         }
     }
 }
Example #2
0
 private void GetCustomSettingCateXML()
 {
     System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
     System.Collections.Generic.IList <SettingCategoryInfo> cacheSettingCategoryList = SettingCategory.GetCacheSettingCategoryList();
     if (cacheSettingCategoryList != null && cacheSettingCategoryList.Count > 0)
     {
         foreach (SettingCategoryInfo current in cacheSettingCategoryList)
         {
             stringBuilder.Append(string.Concat(new object[]
             {
                 "{id:'",
                 current.AutoID.ToString(),
                 "',name:'",
                 current.CateDesc,
                 "',isParent:false,'iconSkin':'leaf','click':\"AppendVal(",
                 current.AutoID,
                 ",'",
                 current.CateName,
                 "')\"},"
             }));
         }
     }
     base.Response.Write("[" + stringBuilder.ToString().TrimEnd(new char[]
     {
         ','
     }) + "]");
 }