To: love_tu(万里尖峰) 我指的是无限级别的!最好是以上个表的形式
生产部门  
   生产一部
   生产二部
       (可能有生产二部分部1)
        生产二部分部2
业务部门
  业务部门1    
  业务部门2
  业务部门3
...........................

解决方案 »

  1.   


    阿信的树:<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title> TreeView Class ====[Author : fason , Email : [email protected]] </title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <meta name="Generator" content="EditPlus">
    <meta name="Author" content="fason,阿信">
    <meta name="Keywords" content="fason,阿信">
    <meta name="Description" content="ASP TreeView">
    <link rel ="stylesheet" type="text/css" href="css/tv.css">
    <script language="JavaScript" src="js/tv.js"></script>
    <style>
    body{ font:12px Arial;color:#000000;text-decoration:none;padding:10px}
    </style>
    </head>
    <body>
    <script language="JavaScript">
    <!--
    var demo = new TreeView();
    demo.setImagePath("images/");
    demo.add(1,0,"阿信站点","javascript:void(0)",null,Icon.root.src);
    demo.add(2,1,"Web开发技术","javascript:void(0)",null,null);
    demo.add(3,1,"数据库","javascript:void(0)",null,null);
    demo.add(4,1,"联系阿信","http://www.sina.com","_self",null);demo.add(5,2,"JavaScript","javascript:void(0)",null,null);
    demo.add(6,2,"XML","javascript:void(0)",null,null);
    demo.add(7,5,"树型结构","javascript:void(0)",null,null);
    demo.add(8,5,"Netscape and Mozilla","javascript:void(0)",null,null);
    demo.add(9,6,"XMLHttpRequest","javascript:void(0)",null,null);
    demo.add(10,6,"DomDocument","javascript:void(0)",null,null);
    demo.add(11,6,"XSLT","javascript:void(0)",null,null);
    demo.add(12,3,"MS SQLServer","javascript:void(0)",null,null);
    demo.add(13,3,"Oracle","javascript:void(0)",null,null);
    demo.add(14,12,"数据库开发","javascript:void(0)",null,null);
    demo.add(15,12,"数据库管理","javascript:void(0)",null,null);
    demo.add(16,13,"高级技术","javascript:void(0)",null,null);
    demo.add(17,13,"认证与考试","javascript:void(0)",null,null);
    demo.add(18,7,"层次不限","javascript:void(0)",null,null);
    demo.add(19,7,"支持图标","javascript:void(0)",null,null);
    demo.add(20,7,"同层次只展开一节点","javascript:void(0)",null,null);
    demo.add(21,7,"IE5.x,NS6+,Moz1.6通过","javascript:void(0)",null,null);
    demo.setShowAll(false);
    demo.setup();
    //-->
    </script>
    <hr color="#3366cc" size=2>
    <center>
    <a href="http://fason.nease.net" style="font:12px Arial;text-decoration:none;color:#3366cc">【欢迎光临阿信的站点】</a>
    </center>
    </body>
    </html>表结构
             id        name             ibz
    001 总裁 1   
    001001 副总裁
    001001001 副总裁11
    001002 副总裁2
    002 总经理 1   
    003 研发部 1   
    003001 研发一部
    005 市场部 1   
    005001 华东市场部门
    005001001 华东1
    005001001001 asdfasdfasdf
    005004 华南市场部门
    005005 华北市场部门
    005005001 华北市场部门 
    006 企业管理规划 1   
    006001 企业管理规划1
    006001001 fdfdg
    006001001001 asdfasdfasd
    009 信息发展部门 1   
    009001 信息发展部门1
    备注:ibz=1编号长度为3的标记
      

  2.   

    哥们。。给我也发一个[email protected] 谢谢啊!!
      

  3.   

    本人自己解决:根据阿信的树和表结构合起来形成一个树!所以,本贴分数算累加分数100分有能力的人
    请解决
    http://community.csdn.net/Expert/topic/3284/3284891.xml?temp=.6648981
    问题;现在200分了
      

  4.   

    if ((temp = part.getFileName()) != null)
            {
             
                 String filename= temp.substring(temp.indexOf("?B?") + 3, temp.lastIndexOf("=?="));
            try {
                filename = new String(new sun.misc.BASE64Decoder().decodeBuffer(filename));
                filename = new String(filename.getBytes(temp.substring(temp.indexOf("=?") + 2, temp.indexOf("?B?"))));
            }
            catch (Exception e) {
                e.printStackTrace();
            }
                 savePart(part,filename);//
                 s2= "<b>附件:</b><a href=fujian/"+filename+"> " + filename + "</a><br>";
            }
      

  5.   

    if ((temp = part.getFileName()) != null)
            {
             
                 String filename= decodeSubject(temp);
                 savePart(part,filename);//
                 s2= "<b>附件:</b><a href=fujian/"+filename+"> " + filename + "</a><br>";
            }
    public static String decodeSubject(String str) {
            if (!str.startsWith("=?") || !str.endsWith("?=") || str.indexOf("?B?") <= 0)
                return str;
            String code = str.substring(2, str.indexOf("?B?"));
            str = str.substring(code.length() + 5, str.length() - 2);
            sun.misc.BASE64Decoder decoder = new sun.misc.BASE64Decoder();
            try {
                return new String(decoder.decodeBuffer(str), code);
            }
            catch (Exception e) {
                e.printStackTrace();
                return null;
            }
        }
      

  6.   

    if (!str.startsWith("=?") || !str.endsWith("?=") || str.indexOf("?B?") <= 0)
                return str;程序执行到此就返回,所以还是和原来一样的执行效果!!
      

  7.   

    b1,b2,b3是是否有附件内容
    sFile1,sFile2,sFile3指附件的路径
        if(bf1==true)
             {
    /*
    b2.setFileName();
    */
               FileDataSource fds=new FileDataSource(sFile1);
                b2.setDataHandler(new DataHandler(fds));
                b2.setFileName(fds.getName());
             }
             if(bf2==true)
             {
               FileDataSource fds=new FileDataSource(sFile2);
               b3.setDataHandler(new DataHandler(fds));
               b3.setFileName(fds.getName());
             }
             if(bf3==true)
             {
               FileDataSource fds=new FileDataSource(sFile3);
               b4.setDataHandler(new DataHandler(fds));
               b4.setFileName(fds.getName());
             }        MimeMultipart mp=new MimeMultipart();
            mp.addBodyPart(b1);       if(bf1==true) mp.addBodyPart(b2);
           if(bf2==true) mp.addBodyPart(b3);
           if(bf3==true) mp.addBodyPart(b4);
      

  8.   

    将b2.setFileName(fds.getName());等改成
    b2.setFileName(MimeUtility.encodeWord(fds.getNam(),"GB2312",null)));
    或者象下面那样if(bf1==true)
             {
    /*
    b2.setFileName();
    */
               FileDataSource fds=new FileDataSource(sFile1);
                b2.setDataHandler(new DataHandler(fds));
                b2.setFileName(encode(fds.getName()));
             }
             if(bf2==true)
             {
               FileDataSource fds=new FileDataSource(sFile2);
               b3.setDataHandler(new DataHandler(fds));
               b3.setFileName(encode(fds.getName()));
             }
             if(bf3==true)
             {
               FileDataSource fds=new FileDataSource(sFile3);
               b4.setDataHandler(new DataHandler(fds));
               b4.setFileName(encode(fds.getName()));
             }private String encode(String str) {
      try {
         return new String(str.getBytes("GB2312"));
      }
      catch (Exception e) {
        System.out.println(e.getMessage);
        return str;
      }
    }