Exemple #1
0
        private void BindCategorylist()
        {
            DataSet allCategories = AccountsTool.GetAllCategories();

            droplistPermCategories.DataSource     = allCategories.Tables[0];
            droplistPermCategories.DataTextField  = "Description";
            droplistPermCategories.DataValueField = "CategoryID";
            droplistPermCategories.DataBind();
        }
Exemple #2
0
        private void CategoriesDatabind()
        {
            DataSet CategoriesList = AccountsTool.GetAllCategories();

            this.ClassList.DataSource     = CategoriesList;
            this.ClassList.DataTextField  = "Description";
            this.ClassList.DataValueField = "CategoryID";
            this.ClassList.DataBind();
        }
Exemple #3
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();
        }
        public void CategoriesDatabind()
        {
            DataSet CategoriesList = AccountsTool.GetAllCategories();

            ClassList.DataSource     = CategoriesList;
            ClassList.DataTextField  = "Description";
            ClassList.DataValueField = "CategoryID";
            ClassList.DataBind();

            droplistCategories.DataSource     = CategoriesList;
            droplistCategories.DataTextField  = "Description";
            droplistCategories.DataValueField = "CategoryID";
            droplistCategories.DataBind();
            droplistCategories.Items.Insert(0, new ListItem("移动到...", ""));
        }
Exemple #5
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();
            }
        }
Exemple #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            GetUserInfo();
            DataSet   ds   = AccountsTool.GetAllCategories();
            ArrayList list = new ArrayList();

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                DataRow row = ds.Tables[0].Rows[i];

                Hashtable ht = new Hashtable();
                ht.Add("CategoryID", row["CategoryID"]);
                ht.Add("Description", row["Description"]);
                list.Add(ht);
            }
            menuList.DataSource = list;
            menuList.DataBind();
        }