コード例 #1
0
ファイル: manager_list.aspx.cs プロジェクト: zklve/WxMall
    public string getrolename(string role_type)
    {
        string result = "";

        Cms.BLL.C_admin_role blladmin_role = new Cms.BLL.C_admin_role();
        DataSet ds = blladmin_role.GetList("id=" + Convert.ToInt32(role_type));

        if (ds != null && ds.Tables[0].Rows.Count > 0)
        {
            result = ds.Tables[0].Rows[0]["role_name"].ToString();
        }
        return(result);
    }
コード例 #2
0
    public void DropList_Bind()
    {
        ddlRoleId.Items.Clear();

        Cms.BLL.C_admin_role blladmin_role = new Cms.BLL.C_admin_role();
        Cms.Model.C_Column   modelcolumn   = new Cms.Model.C_Column();
        DataSet ds = blladmin_role.GetList("");

        if (ds.Tables[0].Rows.Count > 0)
        {
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                DataRow dr = ds.Tables[0].Rows[i];
                if (Convert.ToInt32(dr["role_type"]) >= Convert.ToInt32(Application["adminType"]))
                {
                    ListItem item = new ListItem();
                    item.Text  = "" + dr["role_name"].ToString();
                    item.Value = dr["id"].ToString();
                    ddlRoleId.Items.Add(item);
                }
            }
        }
    }