Beispiel #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            Hide();
            TimeTableAdmin timetable = new TimeTableAdmin();

            timetable.ShowDialog();
            Close();
        }
Beispiel #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            GetConnection();
            string       sql = "update timetable set part1='" + part1txt.Text + "', major='" + majortxt.Text + "', subject='" + subjecttxt.Text + "', sbno='" + sbnotxt.Text + "', day='" + daytxt.Text + "',time='" + timetxt.Text + "',location='" + locationtxt.Text + "',credit=" + credittxt.Text + ",professor='" + proftxt.Text + "' where sbno='" + sbnotxt.Text + "'";
            MySqlCommand cmd = new MySqlCommand(sql, conn);

            conn.Open();
            cmd.ExecuteNonQuery();
            conn.Close();
            MessageBox.Show(subjecttxt.Text + "이/가 수정되었습니다.");
            Hide();
            TimeTableAdmin timetable = new TimeTableAdmin();

            timetable.ShowDialog();
            Close();
        }
Beispiel #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            GetConnection();
            string       sql = "insert into timetable(part1, major, subject, sbno, day, time, location, credit, professor) values ('" + part1txt.Text + "','" + majortxt.Text + "','" + subjecttxt.Text + "','" + sbnotxt.Text + "','" + daytxt.Text + "','" + timetxt.Text + "','" + locationtxt.Text + "'," + credittxt.Text + ",'" + proftxt.Text + "')";
            MySqlCommand cmd = new MySqlCommand(sql, conn);

            conn.Open();
            cmd.ExecuteNonQuery();
            conn.Close();
            MessageBox.Show(subjecttxt.Text + "이/가 추가되었습니다.");
            Hide();
            TimeTableAdmin timetable = new TimeTableAdmin();

            timetable.ShowDialog();
            Close();
        }
Beispiel #4
0
        private void button4_Click(object sender, EventArgs e)
        {
            GetConnection();
            string       sql = "delete from timetable where sbno='" + sbnotxt.Text + "'";
            MySqlCommand cmd = new MySqlCommand(sql, conn);

            conn.Open();
            cmd.ExecuteNonQuery();
            conn.Close();
            MessageBox.Show(subjecttxt.Text + "이/가 삭제되었습니다.");
            Hide();
            TimeTableAdmin timetable = new TimeTableAdmin();

            timetable.ShowDialog();
            Close();
        }