Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
     }
 }
Exemplo n.º 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();
        }
Exemplo n.º 5
0
 private void help(object sender, RoutedEventArgs e)
 {
     Pages.poolPage ins = new poolPage();
     this.NavigationService.Navigate(ins);
 }