Example #1
0
        private void button6_Click(object sender, EventArgs e)
        {
            List <personal_connections.Search> searches;
            String name;
            int    a;

            a    = Convert.ToInt32(textBox5.Text);
            name = textBox6.Text;

            //전역변수에 값을 넣어줌. 이유는 내용을 추가 시 번호필요.
            people_no   = a;
            people_name = name;

            DB_code db = new DB_code();

            searches = db.Select_content(people_no, people_name);

            textBox2.Clear();
            foreach (Search aSearch in searches)
            {
                String sentence;
                String content = aSearch.content;
                int    pn_no   = aSearch.pn_no;
                int    no      = aSearch.no;

                sentence = content;
                textBox2.AppendText(sentence);
            }
        }
Example #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            String content;

            content = textBox2.Text;

            DB_code db = new DB_code();

            db.Update_content(people_name, content, people_no);
        }
Example #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            String name;

            name = textBox4.Text;

            DB_code db = new DB_code();

            db.Insert_people(name);
            textBox4.Clear();
            button5.PerformClick();
        }
Example #4
0
        private void button2_Click(object sender, EventArgs e)
        {
            int no;

            no = Convert.ToInt32(textBox8.Text);

            DB_code db = new DB_code();

            db.Delete_people(no);
            db.Delete_content(no);//내용을 삭제하는 이유는 쓰레기값 남기기 싫어서임
            textBox8.Clear();
            button5.PerformClick();
        }
Example #5
0
        private void button5_Click(object sender, EventArgs e)
        {
            List <personal_connections.Part> parts;

            textBox1.Clear();

            DB_code db = new DB_code();

            parts = db.Select_people();

            foreach (Part aPart in parts)
            {
                String sentence;

                sentence = Convert.ToString(aPart.Partno) + "." + aPart.PartName + "\r\n";

                textBox1.AppendText(sentence);
            }
        }