Beispiel #1
0
        private void button6_Click(object sender, RoutedEventArgs e)
        {
            if (String.IsNullOrEmpty(textBox.Text))
            {
            }
            else
            {
                try
                {
                    var.temperature = int.Parse(textBox.Text);
                } catch (Exception ring)
                {
                    MessageBox.Show("Κάτι πήγε λάθος με την θερμοκρασία. Θέλει μόνο αριθμούς. Προσπαθήστε ξανά !");
                }
            }

            if (radioButton.IsChecked == true)
            {
                var.pool_water = "Low";
            }
            else if (radioButton1.IsChecked == true)
            {
                var.pool_water = "Medium";
            }
            else
            {
                var.pool_water = "High";
            }
            Pages.poolPage poolP = new poolPage();
            this.NavigationService.Navigate(poolP);
        }
Beispiel #2
0
        private void button4_Click(object sender, RoutedEventArgs e)
        {
            OleDbCommand cmd = new OleDbCommand();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "insert into [user] ([username],[pass],[weight]) values (?,?,?)";
            cmd.Parameters.AddWithValue("@username", textBox.Text);
            cmd.Parameters.AddWithValue("@pass", textBox1.Text);
            cmd.Parameters.AddWithValue("@weight", textBox2.Text);

            cmd.Connection = conn;
            conn.Open();
            cmd.ExecuteNonQuery();
            conn.Close();
            Pages.poolPage pool = new poolPage();
            this.NavigationService.Navigate(pool);
        }
Beispiel #3
0
 private void button6_Click(object sender, RoutedEventArgs e)
 {
     if (gymGuestPage.current_user_id == null)
     {
         Pages.poolLogin pl = new poolLogin();
         this.NavigationService.Navigate(pl);
     }
     else if (controlPage.employee)
     {
         Pages.poolPage plpg = new poolPage();
         this.NavigationService.Navigate(plpg);
     }
     else
     {
         Pages.poolPage plpg = new poolPage();
         this.NavigationService.Navigate(plpg);
     }
 }
Beispiel #4
0
        private void button4_Click(object sender, RoutedEventArgs e)
        {
            conn.Open();

            String          query = "Select id,username from [user] where username='******'  and pass='******'";
            OleDbCommand    cmd   = new OleDbCommand(query, conn);
            OleDbDataReader rdr   = cmd.ExecuteReader();

            if (rdr.Read())
            {
                gymGuestPage.current_user_id = rdr.GetValue(1).ToString();
                Pages.poolPage sd = new poolPage();
                this.NavigationService.Navigate(sd);
            }
            else
            {
                MessageBox.Show("Δεν βρέθηκε χρήστης με αυτά τα στοιχεία !");
            }
            conn.Close();
        }
Beispiel #5
0
 private void help(object sender, RoutedEventArgs e)
 {
     Pages.poolPage ins = new poolPage();
     this.NavigationService.Navigate(ins);
 }