Beispiel #1
0
        private DataTable GetData()
        {
            DataTable      dt      = new DataTable();
            SqlConnection  conn    = new SqlConnection(ConfigurationClass.ConfigurationMethod());
            SqlDataAdapter adapter = new SqlDataAdapter("select * from  emptbl", conn);

            adapter.Fill(dt);
            return(dt);
        }
Beispiel #2
0
        private DataTable GetData()
        {
            DataTable     dt    = new DataTable();
            string        query = "select * from emptbl";
            SqlConnection conn  = new SqlConnection(ConfigurationClass.ConfigurationMethod());

            SqlDataAdapter adp = new SqlDataAdapter(query, conn);

            adp.Fill(dt);

            return(dt);
        }