Пример #1
0
        private void Register_Register_Button_Click(object sender, EventArgs e)
        {
            string Username      = Register_Username_TextBox.Text;
            string Password      = Register_Password_TextBox.Text;
            string PasswordCheck = Register_PasswordCheck_TextBox.Text;
            string Email         = Register_Email_TextBox.Text;

            if (Username == "Gebruikersnaam" || Password == "Wachtwoord" || Email == "Email")
            {
                Register_Message_RichTextBox.Text = "U moet bovenstaande velden allemaal invullen om te kunnen registreren!";
                return;
            }

            if (!RegisterCheck.RegisterCheck.IsValidUsername(Username))
            {
                Register_Message_RichTextBox.Text = "Gebruikersnaam gebruikt verkeerde character Alleen a-z / A-Z / 0-9!";
                return;
            }

            if (Password != PasswordCheck)
            {
                Register_Message_RichTextBox.Text = "Wachtwoorden komen niet met elkaar overeen!";
                return;
            }

            if (!RegisterCheck.RegisterCheck.IsValidEmail(Email))
            {
                Register_Message_RichTextBox.Text = "Dit adress is niet geldig vb. van een goeie email: [email protected]";
                return;
            }

            JsonToObjectLists.NewUser(Username, Password, Email);
            Register_Message_RichTextBox.Text = "Succescol geregistreerd";
        }
Пример #2
0
        private void AmountTicketsInfo_Click(object sender, EventArgs e)
        {
            string dateselect = DateSelected_Textbox.Text;
            Tuple <string, string, string> SortTickets = JsonToObjectLists.GetSortTickets(dateselect);

            MessageBox.Show("Adult tickets: " + SortTickets.Item1 + "\n" +
                            "Child tickets: " + SortTickets.Item2 + "\n" +
                            "Disabled tickets: " + SortTickets.Item3);
        }
Пример #3
0
        private void AmountOrdersInfo_Click(object sender, EventArgs e)
        {
            Tuple <string, string, string> MovieList = JsonToObjectLists.GetMovie();
            string dateselect = DateSelected_Textbox.Text;
            Tuple <string, string, string, Tuple <string, string, string> > revenue = JsonToObjectLists.GetData(dateselect);

            MessageBox.Show(MovieList.Item1 + " = " + revenue.Item4.Item1 + "\n" +
                            MovieList.Item2 + " = " + revenue.Item4.Item2 + "\n" +
                            MovieList.Item3 + " = " + revenue.Item4.Item3);
        }
Пример #4
0
 private void SearchDate_Button_Click_1(object sender, EventArgs e)
 {
     if (DateSelected_Textbox.Text != "")
     {
         PatatTabControl.SelectedTab = AdminPage2;
         DateSelectedText.Text       = DateSelected_Textbox.Text;
         string dateselect = DateSelected_Textbox.Text;
         Tuple <string, string, string, Tuple <string, string, string> > revenue = JsonToObjectLists.GetData(dateselect);
         AmountOrders.Text  = revenue.Item2;
         AmountTickets.Text = revenue.Item3;
         Revenue.Text       = "€ " + revenue.Item1;
     }
     else
     {
         MessageBox.Show("Kies een datum");
     }
 }
Пример #5
0
 public static void Reload()
 {
     movies = JsonToObjectLists.GetMovieList();
     users  = JsonToObjectLists.GetUserList();
     orders = JsonToObjectLists.GetOrderList();
 }