private void button2_Click(object sender, EventArgs e)
 {
     if (sxolia.comments == 1)
     {
         this.Hide();
         aksiotheata aks = new aksiotheata();
         aks.ShowDialog();
     }
     else if (sxolia.comments == 2)
     {
         this.Hide();
         paralies par = new paralies();
         par.ShowDialog();
     }
     else if (sxolia.comments == 3)
     {
         this.Hide();
         estiatoria est = new estiatoria();
         est.ShowDialog();
     }
     else
     {
         this.Hide();
         ekdiloseis ekd = new ekdiloseis();
         ekd.ShowDialog();
     }
 }
Пример #2
0
        private void button8_Click(object sender, EventArgs e)
        {
            history.ekdiloseis = true;
            sxolia.comments    = 4;
            this.Hide();
            ekdiloseis ekd = new ekdiloseis();

            ekd.ShowDialog();
        }
 private void button2_Click(object sender, EventArgs e)
 {
     if (from == true)
     {
         MessageBox.Show("Η κράτησή σας δεν πραγματοποιήθηκε.");
         textBox1.Clear();
         textBox2.Clear();
         textBox3.Clear();
         this.Hide();
         estiatoria est = new estiatoria();
         est.ShowDialog();
     }
     else
     {
         MessageBox.Show("Η κράτησή σας δεν πραγματοποιήθηκε.");
         textBox1.Clear();
         textBox2.Clear();
         textBox3.Clear();
         this.Hide();
         ekdiloseis ekd = new ekdiloseis();
         ekd.ShowDialog();
     }
 }
 private void button1_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(textBox1.Text) || string.IsNullOrEmpty(textBox2.Text) || string.IsNullOrEmpty(textBox3.Text))
     {
         // At least 1 textbox is empty.
         MessageBox.Show("Παρακαλώ καταχωρήστε τα στοιχεία σας.");
     }
     else
     {
         // All the textboxes are filled in.
         int i;
         if (!int.TryParse(textBox1.Text, out i))
         {
             if (!int.TryParse(textBox2.Text, out i))
             {
                 if ((!int.TryParse(textBox3.Text, out i)) || (!int.TryParse(textBox4.Text, out i)))
                 {
                     MessageBox.Show("Παρακαλώ καταχωρήστε τα στοιχεία σας.");
                     textBox1.Clear();
                     textBox2.Clear();
                     textBox3.Clear();
                     textBox4.Clear();
                 }
                 else
                 {
                     MessageBox.Show("Η κράτηση σας πραγματοποιήθηκε με επιτυχία.\nΕυχαριστούμε πολυ για την επιλογή σας.\n\nΣτοιχεία Κράτησης\nΌνομα: " + textBox1.Text + "\nΕπώνυμο: " + textBox2.Text + "\nΤηλέφωνο: " + textBox3.Text.ToString() + "\nΆτομα: " + textBox4.Text.ToString() + "\nΗμερομηνία: " + dateTimePicker1.Value.ToString("dd-MM-yyyy") + "\nΏρα: " + comboBox1.Text.ToString());
                     textBox1.Clear();
                     textBox2.Clear();
                     textBox3.Clear();
                     textBox4.Clear();
                     if (from == true)
                     {
                         this.Hide();
                         estiatoria est = new estiatoria();
                         est.ShowDialog();
                     }
                     else
                     {
                         this.Hide();
                         ekdiloseis ekd = new ekdiloseis();
                         ekd.ShowDialog();
                     }
                 }
             }
             else
             {
                 MessageBox.Show("Παρακαλώ καταχωρήστε τα στοιχεία σας.");
                 textBox1.Clear();
                 textBox2.Clear();
                 textBox3.Clear();
                 textBox4.Clear();
             }
         }
         else
         {
             MessageBox.Show("Παρακαλώ καταχωρήστε τα στοιχεία σας.");
             textBox1.Clear();
             textBox2.Clear();
             textBox3.Clear();
             textBox4.Clear();
         }
     }
 }
 private void button1_Click(object sender, EventArgs e)
 {
     if (sxolia.comments == 1)
     {
         if (aksiotheata.aks == 1)
         {
             richTextBox1.AppendText(" <--Παλια Πόλη");
         }
         else if (aksiotheata.aks == 2)
         {
             richTextBox1.AppendText(" <--Ενυδρείο ");
         }
         else if (aksiotheata.aks == 3)
         {
             richTextBox1.AppendText(" <--Ακρόπολη ");
         }
         else if (aksiotheata.aks == 4)
         {
             richTextBox1.AppendText(" <--Κοιλάδα των Πεταλούδων ");
         }
         string text = Form1.textboxvalue;
         conn.Open();
         OleDbCommand command = new OleDbCommand();
         command.Connection  = conn;
         command.CommandText = "insert into Database1.users ([aksiotheata]) values ('" + richTextBox1.Text + "')";
         command.ExecuteNonQuery();
         MessageBox.Show("Το σχόλιο καταχωρήθηκε επιτυχώς.");
         richTextBox1.Clear();
         this.Hide();
         aksiotheata aks = new aksiotheata();
         aks.ShowDialog();
         conn.Close();
     }
     else if (sxolia.comments == 2)
     {
         if (paralies.par == 1)
         {
             richTextBox1.AppendText(" <--Καλλιθέα");
         }
         else if (paralies.par == 2)
         {
             richTextBox1.AppendText(" <--Φαληράκι ");
         }
         else if (paralies.par == 3)
         {
             richTextBox1.AppendText(" <--Άντονυ Κουίν ");
         }
         else if (paralies.par == 4)
         {
             richTextBox1.AppendText(" <--Τσαμπίκα ");
         }
         string text = Form1.textboxvalue;
         conn.Open();
         OleDbCommand command = new OleDbCommand();
         command.Connection  = conn;
         command.CommandText = "insert into Database1.users ([paralies]) values ('" + richTextBox1.Text + "')";
         command.ExecuteNonQuery();
         MessageBox.Show("Το σχόλιο καταχωρήθηκε επιτυχώς.");
         richTextBox1.Clear();
         this.Hide();
         paralies par = new paralies();
         par.ShowDialog();
         conn.Close();
     }
     else if (sxolia.comments == 3)
     {
         if (estiatoria.est == 1)
         {
             richTextBox1.AppendText(" <--Σαρρής Ταβέρνα");
         }
         else if (estiatoria.est == 2)
         {
             richTextBox1.AppendText(" <--Canton Chinese Restaurant ");
         }
         else if (estiatoria.est == 3)
         {
             richTextBox1.AppendText(" <--Romeo Restaurant ");
         }
         string text = Form1.textboxvalue;
         conn.Open();
         OleDbCommand command = new OleDbCommand();
         command.Connection  = conn;
         command.CommandText = "insert into Database1.users ([estiatoria]) values ('" + richTextBox1.Text + "')";
         command.ExecuteNonQuery();
         MessageBox.Show("Το σχόλιο καταχωρήθηκε επιτυχώς.");
         richTextBox1.Clear();
         this.Hide();
         estiatoria est = new estiatoria();
         est.ShowDialog();
         conn.Close();
     }
     else
     {
         if (ekdiloseis.ekd == 1)
         {
             richTextBox1.AppendText(" <--Bραδιά Jazz");
         }
         else if (ekdiloseis.ekd == 2)
         {
             richTextBox1.AppendText(" <--Έκθεση Ζωγραφικής ");
         }
         string text = Form1.textboxvalue;
         conn.Open();
         OleDbCommand command = new OleDbCommand();
         command.Connection  = conn;
         command.CommandText = "insert into Database1.users ([ekdiloseis]) values ('" + richTextBox1.Text + "')";
         command.ExecuteNonQuery();
         MessageBox.Show("Το σχόλιο καταχωρήθηκε επιτυχώς.");
         richTextBox1.Clear();
         this.Hide();
         ekdiloseis ekd = new ekdiloseis();
         ekd.ShowDialog();
         conn.Close();
     }
 }