以下是引用片段:
//cdepartmentinfo 類別實體類 
//sjid :與大類別關聯id 
//space:只是一個標記 
//stropinion用來存放類名 
string sjid = "0"; 
string space = "+"; 
string stropinion = ""; 
string paths = @"e:/test"; 
string file_name = paths + "http://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( "</dstree" + aa.bm_categorylxpm.trim() + ">" ); } | 
新聞熱點
疑難解答
圖片精選