Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (comboBox1.Text != String.Empty)
            {
                if (MessageBox.Show(":האם לעדכן את הקורס \n\n" + comboBox1.Text, "מחיקת קורס", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    DBC      New_Connection = new DBC();
                    String   Course_id      = comboBox1.Text;
                    String[] seperrator     = { " " };
                    //splited by " " first word is the course id
                    String[] Words = Course_id.Split(seperrator, StringSplitOptions.RemoveEmptyEntries);

                    Update_course_details update_form = new Update_course_details(New_Connection.Get_Course_By_Id(Words[0]));
                    update_form.ShowDialog(this);

                    this.Close();
                }
            }
            else
            {
                MessageBox.Show("נא לבחור קורס קודם", "מחיקת קורס", MessageBoxButtons.OK);
            }
        }