示例#1
0
        /// <summary>
        /// GridView 더블클릭이벤트, 더블클릭하게 되면 선택된 열의 정보를 갖고와 뿌려준다.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void gridControl1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            DataRow dr     = gridView1.GetFocusedDataRow();
            String  Seq_Id = dr["Seq_Id"].ToString();
            var     Conn   = new SqlConnection(Constr);

            Conn.Open();
            SqlCommand sc = new SqlCommand();

            sc.Connection  = Conn;
            sc.CommandText = "SELECT * FROM Programming WHERE Seq_Id = '" + Seq_Id + "'"; // ' 필요하다
            sc.CommandType = CommandType.Text;

            SqlDataAdapter sda = new SqlDataAdapter();
            DataSet        ds  = new DataSet();

            sda.SelectCommand = sc;
            sda.Fill(ds);

            Memo_Form memo = new Memo_Form(ds); //memoForm으로 DataSet을 날려준다.

            memo.ShowDialog();
        }
示例#2
0
        /// <summary>
        /// 글쓰기 클릭버튼, 클릭시 새로운 폼이 뜨고 대중소 구분하여 글을 쓴다.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void simpleButton2_Click_1(object sender, EventArgs e)
        {
            Memo_Form memo = new Memo_Form(_Category);

            memo.ShowDialog();
        }