/* Public Methods */ public void save() { DBHelper dbhelper = new DBHelper(); string insertstr = buildStringForInsert(); dbhelper.ExecuteNonQuery(insertstr); dbhelper.close(); }
private void OK_Click_1(object sender, EventArgs e) { DBHelper dbhelper = new DBHelper(); string string1 = "insert into UserRole(UserRole) values('" + UserRole.Text + "')"; dbhelper.ExecuteNonQuery(string1); dbhelper.close(); this.Close(); }
/* Public Methods */ public void save() { // Create DBHelper's Instance DBHelper dbhelper = new DBHelper(); // Get insert string string insertstr = buildStringForInsert(); // Insert into DB dbhelper.ExecuteNonQuery(insertstr); // Close DB Helper dbhelper.close(); }