public   Hashtable   BomCompute(string   root,Decimal   qty)   
  {   
  DataRow[]   row   =   dtBom.Select("father='"   +   root   +   "'"   );   
  foreach(DataRow   r   in   row)   
  {   
                      if(dtBom.Select("father='"   +   r["child"].ToString()+   "'").Length   >   0   ) {   
  BomCompute(r["child"].ToString(),qty   *   Convert.ToDecimal(r["qty"]));   
  }   
  else   
  {   
  this.AddToht(ht,r["child"].ToString(),qty   *   Convert.ToDecimal(r["qty"]));   
  }   
  }   
  return   ht;   
  }   
  //   加入HashTable   
  private   void   AddToht(Hashtable   ht   ,   Object   Key,Object   Value)   
  {   
  if(   !   ht.ContainsKey(Key))   
  {   
  ht.Add(Key,Value);   
  }   
  }