Example #1
0
        private void Stu_Click(object sender, EventArgs e)
        {
            Stu_sel apt = new Stu_sel();

            this.Close();
            apt.Show();
        }
Example #2
0
        private void updateQuery()
        {
            set_value();
            string sql = "UPDATE TATM_STU SET ";

            sql += "STU_STUNO   ='" + StudentNumber + "',";
            sql += "STU_NAME    ='" + StudentName + "',";
            sql += "STU_BIRTH   ='" + StudentRrn1 + "-" + StudentRrn2 + "',";
            sql += "STU_PASS    ='******',";
            sql += "STU_SEX     ='" + StudentSex + "',";
            sql += "STU_PHONE   ='" + StudentCall1 + StudentCall2 + StudentCall3 + "',";
            sql += "STU_MAIL    ='" + StudentEmail1 + "@" + StudentEmail2 + "',";
            sql += "STU_POST    ='" + StudentAdress1 + "',";
            sql += "STU_ADR     ='" + StudentAdress2 + "',";
            sql += "STU_ADDR    ='" + StudentAdress3 + "',";
            sql += "STU_ACC_BANK='" + StudentBnkName + "',";
            sql += "STU_ACC_NAME='" + StudentBnkSName + "',";
            sql += "STU_ACC_NO  ='" + StudentBnkNumber + "',";
            sql += "STU_IMAGE   ='" + StudentImg + "'";
            sql += "WHERE STU_STUNO ='" + PKStudentNumber + "'";
            Console.Write(sql);
            if (MessageBox.Show("선택하신 정보를 수정하시겠습니까", "YesOrNo", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                try
                {
                    cmd    = new MySqlCommand(sql, conn);
                    reader = cmd.ExecuteReader();
                    MessageBox.Show("수정되었습니다");
                }
                catch (Exception e1)
                {
                    MessageBox.Show(e1.ToString());
                }
                finally
                {
                    reader.Close();
                    Stu_sel s1 = new Stu_sel();
                    s1.ShowDialog();
                    this.Close();
                }
            }
            else
            {
                MessageBox.Show("수정 취소 되었습니다");
            }
        }