private void button5_Click(object sender, EventArgs e) { Form17 form = new Form17(); this.Hide(); form.Show(); }
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { Form17 form = new Form17(); this.Hide(); form.Show(); }
private void button2_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(ConnectionString); con.Open(); SqlCommand exe = new SqlCommand("INSERT INTO Assessment(Title,DateCreated,TotalMarks,TotalWeightage) values('" + txttitle.Text + "','" + DateTime.Now + "','" + Convert.ToInt32(txtTotalMarks.Text) + "','" + Convert.ToInt32(txtwieght.Text) + "')", con); exe.ExecuteNonQuery(); MessageBox.Show("Added!"); Form17 frm = new Form17(); this.Hide(); frm.Show(); }
private void btnAdd_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(ConnectionString); con.Open(); SqlCommand exe = new SqlCommand("UPDATE Assessment SET Title = '" + txttitle.Text.ToString() + "', TotalMarks = '" + txtTotalMarks.Text.ToString() + "', TotalWeightage = '" + txtwieght.Text.ToString() + "' WHERE Id = '" + ID + "' ", con); exe.ExecuteNonQuery(); MessageBox.Show("Edit Successfully!"); Form17 frm = new Form17(); this.Hide(); frm.Show(); }