protected void Page_Load(object sender, EventArgs e) { xc.CheckAdminLogin("|" + typeClss + "|"); if (!IsPostBack) { XabaraClass xClass = new XabaraClass(); xClass.NewsTypeData(typeClss, DropDownListClass); if (!string.IsNullOrEmpty(Session[typeClss] as string)) { this.DropDownListClass.Items.FindByValue(Session[typeClss].ToString().Trim()).Selected = true; } else { this.DropDownListClass.Items.FindByText("== 新增根分类 ==").Selected = true; } xClass.getTreeList(typeClss, treeList, string.Empty, "top", false, true, false); FormCheck fCheck = new FormCheck(); classListRegExpre.ValidationExpression = fCheck.RegExpressionValidator("number", 0, 0, false); classListRegExpre.ErrorMessage = fCheck.RegExpressionValidator("number", 0, 0, true); classUrlRegExpre.ValidationExpression = fCheck.RegExpressionValidator("urlHttp", 0, 0, false); classUrlRegExpre.ErrorMessage = fCheck.RegExpressionValidator("urlHttp", 0, 0, true); titleClass.Text = Server.UrlDecode(xc.SafeSql(Request["title"])); } }
protected void Page_Load(object sender, EventArgs e) { xc.CheckAdminLogin("|" + typeClss + "|"); if (!IsPostBack) { xClass.NewsTypeData(typeClss, DropDownListClass); classListName.Visible = true; classListName.Text = "如需排序,请选择带有子级分类的父分类并点击 显示所选分类排序 按钮!"; xClass.getTreeList(typeClss, treeList, string.Empty, "top", false, true, false); titleClass.Text = Server.UrlDecode(titleTemp); DataTable dt = db.getDataTable("select Tid from newsTree where treeNameTxt is null"); for (int i = 0; i < dt.Rows.Count; i++) { long cid = xc.SafeNum(dt.Rows[i]["Tid"].ToString().Trim()); xClass.treeNameUpdate(cid); xClass.updateIDs(typeClss, cid); } dt.Dispose(); FormCheck fCheck = new FormCheck(); classUrlRegExpre.ValidationExpression = fCheck.RegExpressionValidator("urlHttp", 0, 0, false); classUrlRegExpre.ErrorMessage = fCheck.RegExpressionValidator("urlHttp", 0, 0, true); } }