示例#1
0
        private void button6_Click(object sender, EventArgs e)
        {
            Form19 form = new Form19();

            this.Hide();
            form.Show();
        }
示例#2
0
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Form19 form = new Form19();

            this.Hide();
            form.Show();
        }
示例#3
0
        private void button2_Click(object sender, EventArgs e)
        {
            SqlConnection con = new SqlConnection(ConnectionString);

            con.Open();

            SqlCommand exe = new SqlCommand("INSERT INTO AssessmentComponent(Name,RubricId,TotalMarks,DateCreated,DateUpdated,AssessmentId) values('" + txtname.Text + "','" + txtrubricId.Text.ToString() + "','" + txtTotalMarks.Text + "','" + DateTime.Now + "','" + DateTime.Now + "','" + cmbassessmentId.Text.ToString() + "')", con);

            exe.ExecuteNonQuery();
            MessageBox.Show("Added!");

            Form19 frm = new Form19();

            this.Hide();
            frm.Show();
        }
示例#4
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            SqlConnection con = new SqlConnection(ConnectionString);

            con.Open();



            SqlCommand exe = new SqlCommand("UPDATE AssessmentComponent SET Name = '" + txtname.Text.ToString() + "', RubricId = '" + txtrubricId.Text.ToString() + "', TotalMarks = '" + txtTotalMarks.Text.ToString() + "',AssessmentId='" + cmbassessmentId.Text.ToString() + "' WHERE Id = '" + ID + "' ", con);

            exe.ExecuteNonQuery();

            MessageBox.Show("Edit Successfully!");

            Form19 frm = new Form19();

            this.Hide();
            frm.Show();
        }