dataset 에 여러 개의 표 가 있 습 니 다. XML 문자열 설정 주종 관 계 를 되 돌려 줍 니 다.

8114 단어 Data
<?xml version="1.0" encoding="utf-8" ?>

<string xmlns="http://tempuri.org/">

  <Getstore>

    <Goods>

      <product_no>FB22S58613</product_no>

      <product_class>  </product_class>

      <SKU>

        <product_no>FB22S58613</product_no>

        <color>46</color>

        <product_size>39</product_size>

        <color1>46</color1>

        <product_class>  </product_class>

        <number3>3</number3>

        <number7>0</number7>

        <number8>0</number8>

        <number>50</number>

        <number9>0</number9>

      </SKU>

      <SKU>

        <product_no>FB22S58613</product_no>

        <color>36</color>

        <product_size>39</product_size>

        <color1>36</color1>

        <product_class>  </product_class>

        <number3>2</number3>

        <number7>0</number7>

        <number8>0</number8>

        <number>50</number>

        <number9>0</number9>

      </SKU>

    </Goods>

  </Getstore>

</string>

 
DataSet ds = api.get_xmlstore(productno,color,productsize,users,user_key);

             ds.Tables[0].TableName = "Goods";

             ds.Tables[1].TableName = "SKU";

             DataRelation relation = new DataRelation("SKU",

             ds.Tables [0].Columns["product_no"],

             ds.Tables[1].Columns["product_no"]);

             relation.Nested = true; 

             ds.Relations.Add(relation);

             ds.DataSetName = "Getstore";

             XmlDataDocument xda = new XmlDataDocument(ds);


좋은 웹페이지 즐겨찾기