Example #1
0
    private void addListBind()
    {
        Role rl = new Role();

        this.ddlRose.DataSource = rl.GetDataTable();
        this.ddlRose.DataTextField = "UR_Name";
        this.ddlRose.DataValueField = "UR_ID";
        this.ddlRose.DataBind();
        this.ddlRose.Items.Insert(0, new ListItem("----请选择角色----", "-1"));

        this.ddlUpdate.DataSource = rl.GetDataTable();
        this.ddlUpdate.DataTextField = "UR_Name";
        this.ddlUpdate.DataValueField = "UR_ID";
        this.ddlUpdate.DataBind();
        this.ddlUpdate.Items.Insert(0, new ListItem("----请选择角色----", "-1"));
    }
Example #2
0
 private void getrlelist()
 {
     XYECOM.Business.Role rl = new Role();
     this.ddlpogroem.DataSource = rl.GetDataTable();
     this.ddlpogroem.DataTextField = "UR_Name";
     this.ddlpogroem.DataValueField = "UR_ID";
     this .ddlpogroem .DataBind ();
 }