Esempio n. 1
0
 protected void txtChange(object sender, EventArgs e)
 {
     if (SQLDataClass.checkID(txtID.Text))
     {
         for (int i = 0; i < SQLDataClass.tblProduct.Rows.Count; i++)
         {
             System.Data.DataRow row = SQLDataClass.tblProduct.Rows[i];
             String temp1            = row[0].ToString();
             String temp2            = row[1].ToString();
             String temp3            = row[2].ToString();
             if (txtID.Text.Trim().Equals(row[0].ToString().Trim()))
             {
                 txtID.Text    = row[0].ToString();
                 txtName.Text  = row[1].ToString();
                 txtPrice.Text = row[2].ToString();
             }
         }
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     SQLDataClass.getAllProducts();
     ProductGrid.DataSource = SQLDataClass.tblProduct;
     ProductGrid.DataBind();
 }
Esempio n. 3
0
 void Application_Start(object sender, EventArgs e)
 {
     SQLDataClass.setupProdAdapter();
 }