Exemple #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();
            FreeClick click = new FreeClick();

            click.ShowDialog();
            Close();
        }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            GetConnection();
            string       id      = Login.id;
            string       name    = "자유게시판";
            string       content = Free.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();
            FreeClick free = new FreeClick();

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