private void Button_register_Click(object sender, EventArgs e)
        {
            // REGISTER //
            if (button_register.Text.Equals("REGISTER"))
            {
                // Check if there is any empty textboxes
                foreach (TextBox textBox in textBoxes)
                {
                    if (textBox.Text.ToString().Trim().Equals("") || comboBox_gender.Text.Trim().Equals(""))
                    {
                        MessageBox.Show("Please do not leave any empty fields.");
                        return;
                    }

                    if (textBox.Text.Contains("\""))
                    {
                        MessageBox.Show("Textboxes cannot contain \"");
                        return;
                    }

                    // Textbox controls
                    if (Int32.Parse(textbox_age.Text) < 2 || Int32.Parse(textbox_age.Text) > 120)
                    {
                        MessageBox.Show("Invalid Age");
                        return;
                    }
                }

                // Add Payment
                DateTime dueDate = DateTime.Today.AddMonths(Int32.Parse(textbox_mem_duration.Text));
                Payment  payment = new Payment(Int32.Parse(textbox_monthly_payment.Text) * Int32.Parse(textbox_mem_duration.Text), dueDate, "default desc", false);
                controller.AddPayment(payment);

                // Add User
                int permissionId = controller.GetPermissionId(Int32.Parse(textbox_permission_level.Text));

                member = new Member(permissionId, textbox_name.Text, textbox_surname.Text, Char.Parse(comboBox_gender.Text.Substring(0, 1).ToUpper()), Int32.Parse(textbox_age.Text),
                                    textbox_email.Text, Int64.Parse(textbox_phone_number.Text), textbox_address.Text, DateTime.Parse(date_joined.Text), DateTime.Parse(date_birth.Text),
                                    controller.GetMaxPaymentId(), Int32.Parse(textbox_height.Text), Int32.Parse(textbox_weight.Text), dueDate,
                                    Int32.Parse(textbox_weekly_entrance_right.Text));

                controller.AddMember(member);
                controller.AddMembership(member);
                controller.AddMemberImprovement(member);

                MessageBox.Show("Member " + member.Name + " has been registered.");

                // Reload Form
                MemberAdded();

                // CHANGE //
            }
            else
            {
                Member newMember = null;

                newMember = new Member(controller.GetPermissionId(Int32.Parse(textbox_permission_level.Text)), textbox_name.Text, textbox_surname.Text,
                                       Char.Parse(comboBox_gender.Text.Substring(0, 1)), Int32.Parse(textbox_age.Text), textbox_email.Text, Int64.Parse(textbox_phone_number.Text),
                                       textbox_address.Text, DateTime.Parse(date_joined.Text), DateTime.Parse(date_birth.Text), member.Payment_id, Int32.Parse(textbox_height.Text),
                                       Int32.Parse(textbox_weight.Text), member.MembershipExpiryDate, Int32.Parse(textbox_weekly_entrance_right.Text));

                if (member.Equals(newMember))
                {
                    MessageBox.Show("Nothing has changed.");
                }
                else
                {
                    controller.UpdateMember(member, newMember);
                    MessageBox.Show("Member " + member.Name + " has been changed.");

                    MemberChanged();
                }
            }
        }
        public void Add_Members_Null_Input_Test()
        {
            IActionResult result = _membersController.AddMember(null);

            Assert.True(result.GetType() == typeof(BadRequestObjectResult));
        }