private void button4_Click(object sender, EventArgs e) { SqlConnection c = new SqlConnection(string_con); c.Open(); SqlCommand cmd = new SqlCommand("insert into dbo.AssessmentComponent(Name,RubricId,TotalMarks,DateCreated,DateUpdated,AssessmentId) values('" + Name.Text + "','" + RubricId.Text + "', '" + Tmarks.Text + "', '" + DateTime.Now + "', '" + DateTime.Now + "', '" + AssId.Text + "')", c); cmd.ExecuteNonQuery(); MessageBox.Show("Assessment Component Added!"); Form14 newForm = new Form14(); newForm.Show(); }
private void button2_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(CString); con.Open(); SqlCommand exe = new SqlCommand("INSERT INTO AssessmentComponent(Name,RubricId,TotalMarks,DateCreated,DateUpdated,AssessmentId) values('" + Name.Text + "','" + Convert.ToInt32(rubricId.SelectedValue) + "','" + totalmarks.Text + "','" + DateTime.Now + "','" + DateTime.Now + "','" + Convert.ToInt32(assessmentId.SelectedValue) + "')", con); exe.ExecuteNonQuery(); MessageBox.Show("Added!"); this.Hide(); Form14 frm = new Form14(); frm.Show(); }
private void button9_Click(object sender, EventArgs e) { Form14 newFORM = new Form14(); newFORM.Show(); }