Esempio n. 1
0
        private void Btn_Signup_Click(object sender, RoutedEventArgs e)
        {
            MainWindow win4 = new MainWindow();

            win4.Show();

            if (Txt_Password.Text == Txt_Confirm_Password.Text)
            {
                var register = new RegistrationInfo
                {
                    FirstName    = Txt_FirstName.Text,
                    LastName     = Txt_LastName.Text,
                    ContactNo    = Txt_Contact.Text,
                    Address      = Txt_Address.Text,
                    EmailAddress = Txt_Email.Text,
                    Password     = Txt_Confirm_Password.Text
                };
                registeration.Add(register);
                MessageBox.Show("Registered successfully...!!");
                this.Close();
            }
            else
            {
                MessageBox.Show("Password doesn't match");
            }

            Mystorage.WriteXML <ObservableCollection <RegistrationInfo> >("RegistrationInfo.xml", registeration);
        }
Esempio n. 2
0
        private void Btn_Save_Click(object sender, RoutedEventArgs e)
        {
            var bookedcar = new ReservedCar {
                FirstName = Txt_FirstName.Text, LastName = Txt_LastName.Text, ContactNo = Txt_PhoneNo.Text, Address = Txt_Address.Text, Email = Txt_Email.Text, CarName = Txt_CarName.Text
            };

            App.reservedCar.Add(bookedcar);
            MessageBox.Show("Your Booking is Confirmed....");
            this.Close();
            Mystorage.WriteXML <ObservableCollection <ReservedCar> >("ReservedCar.xml", App.reservedCar);
        }
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            personinfo  = Mystorage.ReadXML <ObservableCollection <RegistrationInfo> >("RegistrationInfo.xml");
            reservedCar = Mystorage.ReadXML <ObservableCollection <ReservedCar> >("ReservedCar.xml");

            if (personinfo == null)
            {
                personinfo = new ObservableCollection <RegistrationInfo>();
            }
            if (reservedCar == null)
            {
                reservedCar = new ObservableCollection <ReservedCar>();
            }
            MainWindow main = new MainWindow();
            //main.Show();
        }
Esempio n. 4
0
        public Reserve_Car(String pickloc, String choosecar, String transmission)
        {
            InitializeComponent();
            cardetails = Mystorage.ReadXML <ObservableCollection <CarDetails> >("carDetails.xml");

            TBx_PickLoc.Text          = pickloc;
            TBx_ChooseCar.Text        = choosecar;
            TBx_TransmissionType.Text = transmission;
            foreach (var carName in cardetails)
            {
                if (carName.CarNameAndType == choosecar)
                {
                    TBx_Price.Text = carName.Price.ToString();
                    break;
                }
            }
        }
Esempio n. 5
0
        public Dashboard()
        {
            InitializeComponent();

            cardetails = Mystorage.ReadXML <ObservableCollection <CarDetails> >("carDetails.xml");

            if (cardetails == null)
            {
                cardetails = new ObservableCollection <CarDetails>();
            }

            PickupLocation = new List <String> {
                "Heidelberg", "Berlin", "Frankfurt", "Stuttgart"
            };


            foreach (var car in cardetails)
            {
                ChooseCar.Add(car.CarNameAndType);
            }
            TransmissionType = new List <String> {
                "Automatic", "Manual"
            };
        }
Esempio n. 6
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     registeration = Mystorage.ReadXML <ObservableCollection <RegistrationInfo> >("RegistrationInfo.xml");
 }