Esempio n. 1
0
        private void orderNow_Click(object sender, RoutedEventArgs e)
        {
            Window placeorder = new PlaceOrder();

            placeorder.Show();
            base.Close();
        }
Esempio n. 2
0
        private void Reset_Click(object sender, RoutedEventArgs e)
        {
            Window Placeorder = new PlaceOrder();

            Placeorder.Topmost = true;
            Placeorder.Show();
            base.Close();
        }
Esempio n. 3
0
        private void done_Click(object sender, RoutedEventArgs e)
        {
            bool good = true;

            u_ag.BorderBrush = Brushes.Transparent;
            // number?
            if ((Tools.isNumeric(u_ca.Text)) && (Tools.isNumeric(u_id.Text)) && (Tools.isNumeric(u_tel.Text) && (Tools.isNumeric(u_ag.Text))))
            {
                New.get_card   = long.Parse(u_ca.Text);
                New.Get_Cus_id = int.Parse(u_id.Text);
                New.get_phone  = int.Parse(u_tel.Text);
                New.get_age    = int.Parse(u_tel.Text);
            }
            else
            {
                good = false;
            }

            // string?
            if ((!Tools.isNumeric(u_add.Text)) && (!Tools.isNumeric(u_em.Text)) && (!Tools.isNumeric(u_n.Text)))
            {
                New.get_add   = u_add.Text;
                New.get_email = u_em.Text;
                New.get_name  = u_n.Text;
            }
            else
            {
                good = false;
            }


            if (!mybl.age_limit(New.get_age))   // age limit
            {
                u_ag.BorderBrush = Brushes.Tomato;

                good = false;
            }

            if (good && (u_lo.SelectedItem != null))
            {
                New.get_cus_lo   = (Location)u_lo.SelectedItem;
                New.get_member_b = true;
                mybl.add_client(New);
                MainWindow.client = New;

                Window Place_Order = new PlaceOrder();
                Place_Order.Show();

                base.Close();
            }
        }