예제 #1
0
    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);
        }
    }