Example #1
0
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridViewRow dr = dataGridView1.SelectedRows[0];

            title   = dr.Cells[0].Value.ToString();
            content = dr.Cells[1].Value.ToString();
            date    = dr.Cells[2].Value.ToString();
            id      = dr.Cells[3].Value.ToString();
            Hide();
            InformationClick click = new InformationClick();

            click.ShowDialog();
            Close();
        }
Example #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            GetConnection();
            string       id      = Login.id;
            string       name    = "정보게시판";
            string       content = Information.content;
            string       sql     = "insert into comment(id,boardname,title,content,comment) values ('" + id + "','" + name + "','" + titletxt.Text + "','" + content + "','" + commenttxt.Text + "')";
            MySqlCommand cmd     = new MySqlCommand(sql, conn);

            conn.Open();
            cmd.ExecuteNonQuery();
            conn.Close();
            this.Hide();
            InformationClick info = new InformationClick();

            info.ShowDialog();
            this.Close();
        }