Torna al Thread
public void doInsert(object sender, DataGridCommandEventArgs e)
{
string brandCode;
string brandGepex;
string brandDes;
TextBox txtCode;
TextBox txtGepex;
TextBox txtDes;
txtCode = (TextBox)e.Item.FindControl("add_BrandCode");
brandCode = txtCode.Text;
txtGepex = (TextBox)e.Item.FindControl("add_BrandGepex");
brandGepex = txtGepex.Text;
txtDes = (TextBox)e.Item.FindControl("add_BrandDes");
brandDes = txtDes.Text;
//aggiungo
string query = "Insert INTO Bra SET (BraCod,BraGpx,BraDes) VALUES ('"+brandCode+"','"+brandGepex+"','"+brandDes+"')";
MySqlCommand cmd_del = new MySqlCommand(query, cnn);
cnn.Open();
cmd_del.ExecuteNonQuery();
cnn.Close();
brandDataGrid.EditItemIndex = -1;
BindGrid();
}