private void Button1_Click(object sender, EventArgs e) { string password = StringCipher.Encrypt(name, pass); string insertQuery = "insert into Login(UserName,Password) Values('" + name + "','" + password + "');"; if (db.InsertData(insertQuery) > 0) { MessageBox.Show("New User Added Successful", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); new Login().Show(); this.Hide(); } else { MessageBox.Show("New User Adding FAiled", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void Button1_Click(object sender, EventArgs e) { string insertQuery = "insert into Treatment(Patient_ID,Patient_Name,Disease,Prescription,Date,Rs) Values('" + pid + "','" + name + "','" + disease + "' ,'" + prescription + "' ,'" + date + "','" + rs + "');"; if (db.InsertData(insertQuery) > 0) { MessageBox.Show("Treatment Details Inserted Successful", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Treatment Details Inserting Failed", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } txtdisease.Clear(); txtpid.Clear(); txtprescription.Clear(); txtrs.Clear(); count = count + 1; txttid.Text = count.ToString(); }