Ejemplo n.º 1
0
        private void button6_Click(object sender, EventArgs e)
        {
            Form18 frm11 = new Form18();

            this.Hide();
            frm11.Show();
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            string        Query         = "insert into Assessment(Title ,DateCreated,TotalMarks,TotalWeightage) values('" + txtTitle.Text.ToString() + "','" + dtDateCreated.Value.Date + "','" + txtTotalMarks.Text.ToString() + "','" + txtTotalWeightage.Text.ToString() + "')";
            SqlConnection myconnection2 = new SqlConnection(conn);
            SqlCommand    MyCommand2    = new SqlCommand(Query, myconnection2);
            SqlDataReader MyReader2;

            myconnection2.Open();
            MyReader2 = MyCommand2.ExecuteReader();
            MessageBox.Show("Data inserted Successfully!");
            Form18 frm5 = new Form18();

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