private void FrmCustomerList_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'northwindDataSet.Customers' table. You can move, or remove it, as needed.
            //this.customersTableAdapter.Fill(this.northwindDataSet.Customers);
            //Option 1
            SqlHelper.ConnectionString = Settings.Default.ConnectionString;
            SqlHelper.Helper.Fill(CommandType.Text, "Select * from customers", northwindDataSet.Customers);
            //Option 2
            var sql = new SqlProvider(Settings.Default.ConnectionString);

            sql.Fill(CommandType.Text, "select * from customers", northwindDataSet.Customers);
            //Option 3
            var dao = new CustomersDA();

            dao.Fill(northwindDataSet.Customers);
        }
        public DataTable GridViewBind()
        {
            CustomersDA cust = new CustomersDA();

            return(cust.BindGridView());
        }
示例#3
0
 public Customers Get(int id)
 {
     return(CustomersDA.GetCustomer(id));
 }
示例#4
0
 public HttpResponseMessage Put(Customers c)
 {
     CustomersDA.EditCustomer(c);
     return(new HttpResponseMessage(HttpStatusCode.OK));
 }
示例#5
0
 public List <Customers> Get()
 {
     return(CustomersDA.GetCustomers());
 }