Esempio n. 1
0
        private void BindRoles()
        {
            BLL.Base_Role roles = new BLL.Base_Role();
            DataTable     dt    = new DataTable();

            dt = roles.GetAllList().Tables[0];
            this.rdoRoles.Items.Clear();
            foreach (DataRow r in dt.Rows)
            {
                rdoRoles.Items.Add(new ListItem(r["RoleName"].ToString(), r["RoleId"].ToString()));
            }
            if (rdoRoles.Items.Count != 0)
            {
                rdoRoles.SelectedIndex = 0;
            }
        }