//test private void btnProductSave_Click(object sender, EventArgs e) { bool x = SqlGetData.InsertData("Insert into tblproduct values( '" + txtProductName.Text + "','" + txtUnitPrice.Text + "')"); if (x == true) { MessageBox.Show("Data Successfully inserted."); txtProductName.Text = null; txtUnitPrice.Text = null; } else { MessageBox.Show("Error occurred while inserting data."); } }
//hello world!! private void btnSave_Click(object sender, EventArgs e) { bool x = SqlGetData.InsertData("Insert into tblcustomer values( '" + Nametxt.Text + "','" + Addresstxt.Text + "','" + Phonetxt + "')"); if (x == true) { MessageBox.Show("Data Successfully inserted."); Nametxt.Text = null; Addresstxt.Text = null; Phonetxt.Text = null; } else { MessageBox.Show("Error occurred while inserting data."); } }
private void btnOrderSave_Click(object sender, EventArgs e) { bool x; x = SqlGetData.InsertData("Insert into tblorder values('" + textBoxTotalAmount.Text + "','" + comboBoxCustomer.SelectedItem + "','" + comboBoxProduct.SelectedItem + "')"); if (x == true) { MessageBox.Show("Data Successfully inserted."); comboBoxCustomer.SelectedItem = null; comboBoxProduct.SelectedItem = null; textBoxProductName.Text = null; textBoxCustomerName.Text = null; /* textBoxUnitPrice.Text = null; * textBoxQuantity.Text = null; * textBoxTotalAmount.Text = null; */ } else { MessageBox.Show("Error occurred while inserting data."); } }