Dataset1 - method connection
<p>I have got problem with this method:</p>

<pre><code>    public List&lt;int&gt; menu_wid_w_kat()
    {
        DataSet1TableAdapters.menu_widac_wszystkoTableAdapter pk = new DataSet1TableAdapters.menu_widac_wszystkoTableAdapter();
        List&lt;int&gt; lista = new List&lt;int&gt;();
        lista = pk.?
        return lista;
    }
</code></pre>

<p>In dataset1 I have got Fill, GetData (@id) and this is connected with procedure (procedure working correct)</p>

<p>Problem is in this method because I don't know how connect this method with dataset1 (but I don't want to using linq: <code>(lista = (from o in pk.GetData() select o.nazwa).ToList();)</code>) </p>

<p>my idea was but does not work but probably you will understand what I want to do it. Connection with method put (id number) and get data list:</p>

<pre><code>lista = pk.GetData(id)
</code></pre>

<p>I just want to take data from this procedure which exist in dataset1. </p>

<p><img src="http://i.stack.imgur.com/oGKqk.gif" alt="enter image description here">
<img src="http://i.stack.imgur.com/rHurk.gif" alt="enter image description here"></p>

<p>correct but I can`t find method GetIdList()</p>

<p>baza nasza_baza = new baza();
            var da = new DataSet1TableAdapters.menu_widac_wszystkoTableAdapter();
            List productIDs = da. &lt;- I cant`t find method</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace DataSet1TableAdapters 
{
    public partial class menu_widac_wszystkoTableAdapter
    {
        public List&lt;int&gt; GetIdList(int ids)
        {
            List&lt;int&gt; list = new List&lt;int&gt;();
            System.Data.SqlClient.SqlCommand command = this.CommandCollection(ids);
            command.CommandTimeout = command.Connection.ConnectionTimeout;

            System.Data.ConnectionState previousConnectionState = command.Connection.State;
            try
            {
                if (((command.Connection.State &amp; System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open))
                {
                    command.Connection.Open();
                }
                using (System.Data.SqlClient.SqlDataReader reader = command.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        list.Add(reader.GetInt32(0));
                    }
                }
            }
            finally
            {
                if ((previousConnectionState == System.Data.ConnectionState.Closed))
                {
                    command.Connection.Close();
                }
            }

            return list;
        }

        private System.Data.SqlClient.SqlCommand CommandCollection(int p)
        {
            throw new NotImplementedException();
        } 

    }
}
</code></pre>
