日期:2011-10-14 浏览次数:20500 次
以下是引用片段:
//CDepartmentInfo 类别实体类 
//sjid :与大类别关联ID 
//space:只是一个标记 
//strOpinion用来存放类名 
string sjid = "0"; 
string space = "+"; 
string strOpinion = ""; 
string paths = @"E:\test"; 
string FILE_NAME = paths + "\\BMCategory.XML"; 
        flag = true; 
        StreamWriter sr = File.CreateText( "BMCategory" ); 
        sr.Close(); 
        StreamWriter x = new StreamWriter( FILE_NAME, true, System.Text.Encoding.Default ); 
        
        x.Write( "<R>"); 
        Display( sjid, space, ref iCount,x ); 
        x.Write( "</R>" ); 
        x.Close();       
 | 以下是引用片段: public void Display( string sjid, string space, ref int iCount,StreamWriter x ) { List<CDepartmentInfo> DepartmentList = new List<CDepartmentInfo>(); DepartmentList = OrganizationRule.GetList( sjid );//读取一个列表类,这里是LIST foreach ( CDepartmentInfo aa in DepartmentList ) { strOpinion = aa.BM_CategoryName.Trim().ToString(); x.Write( "<DSTree"+aa.BM_Categorylxpm.Trim()+" text=\"" + aa.BM_CategoryName.Trim() + "\" treeId=\"" + aa.BM_Categorylxpm.Trim() + "\" mspace=\"栏目管理\">"+ strOpinion ); x.Write( "\r\n" ); Display( aa.BM_Categorylxpm.ToString().Trim(), Text + space, ref iCount,x ); x.Write(  
                        免责声明: 本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
                     
                    
                
                
            
            
            
    
        
   
 |