Beispiel #1
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            int curRow = int.Parse(e.RowIndex.ToString());
            string currentrow;
            currentrow = dataGridView1.Rows[curRow].Cells[1].Value.ToString();

            SqlConnection con = new SqlConnection(constring);
            con.Open();

            SqlCommand cmd = new SqlCommand("Update ComposeRequest set CView='" + p1 + "' where CID='" + currentrow + "'", con);
            cmd.ExecuteNonQuery();

            ViewAdminRequests var = new ViewAdminRequests();
            var.ShowDialog();
        }
Beispiel #2
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            int    curRow = int.Parse(e.RowIndex.ToString());
            string currentrow;

            currentrow = dataGridView1.Rows[curRow].Cells[1].Value.ToString();

            SqlConnection con = new SqlConnection(constring);

            con.Open();

            SqlCommand cmd = new SqlCommand("Update ComposeRequest set CView='" + p1 + "' where CID='" + currentrow + "'", con);

            cmd.ExecuteNonQuery();

            ViewAdminRequests var = new ViewAdminRequests();

            var.ShowDialog();
        }