using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Fm.Bussiness;

public partial class admin_user_sys_role_set : BasePage
{
    
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Bind();
        }
    }
    //页面跳转
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        public_select ps = new public_select();
        DataView dv = ps.Getps("Fm_role_view", "g_name", "r_id=" + int.Parse(Drop_role.SelectedValue) + "");
        if (dv[0]["g_name"].ToString() == "会员组")
        {
            Response.Redirect("sys_role_member.aspx?r_id=" + int.Parse(Drop_role.SelectedValue) + "", false);
        }
        else
        {
            Response.Redirect("sys_role_admin.aspx?r_id=" + int.Parse(Drop_role.SelectedValue) + "", false);
        }
    }
    protected void Radio_group_SelectedIndexChanged(object sender, EventArgs e)
    {
        Bind();
    }
    void Bind()
    {
        public_select ps = new public_select();
        Drop_role.DataSource = ps.Getps("Fm_role_view", "*", "g_id=" + int.Parse(Radio_group.SelectedValue) + "");
        Drop_role.DataTextField = "r_name";
        Drop_role.DataValueField = "r_id";
        Drop_role.DataBind();
    }
}
