Beispiel #1
0
        //绑定类别列表
        private void DoInitialDataBind()
        {
            currentRole          = new Role(Convert.ToInt32(Request["RoleID"]));
            RoleLabel.Text       = "当前角色: " + currentRole.Description;
            this.TxtNewname.Text = currentRole.Description;

            DataSet allCategories = AccountsTool.GetAllCategories();

            CategoryDownList.DataSource     = allCategories.Tables[0];
            CategoryDownList.DataTextField  = "Description";
            CategoryDownList.DataValueField = "CategoryID";
            CategoryDownList.DataBind();
        }
Beispiel #2
0
        //绑定类别列表
        private void DoInitialDataBind()
        {
            currentRole          = new Role(Convert.ToInt32(lblRoleID.Text));
            RoleLabel.Text       = currentRole.Description;
            this.TxtNewname.Text = currentRole.Description;

            DataSet allCategories = AccountsTool.GetAllCategories();

            if (!DataSetTools.DataSetIsNull(allCategories))
            {
                CategoryDownList.DataSource     = allCategories.Tables[0];
                CategoryDownList.DataTextField  = "Description";
                CategoryDownList.DataValueField = "CategoryID";
                CategoryDownList.DataBind();
            }
        }