using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace Nano_System
{
    class clsGrideview
    {
        public DataTable dbConnection(string sql)
        {
            SqlConnection con = new SqlConnection();
            SqlDataAdapter da;


            con.ConnectionString = "server = (local); Database = Nano; trusted_connection = yes;";
            SqlCommand cmd = new SqlCommand();
            DataTable dtb = new DataTable();
            da = new SqlDataAdapter(cmd);
            cmd.Connection = con;
            cmd.CommandText = sql;
            con.Open();
            da.Fill(dtb);
            return dtb;
        }
    }
}
