public void On_Click2()
 {
     if (FarmaciasListBox.SelectedValue != null)
     {
         PaymentPrescription order = new PaymentPrescription(false);
         this.NavigationService.Navigate(order);
         Farmacia far = (Farmacia)FarmaciasListBox.SelectedValue;
         order.selectFarmacia.Content = far.Nome;
     }
     else
     {
         MessageBox.Show("Selecione uma farmacia", "Erro", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
 private void SearchKey_Click()
 {
     if (key_input.Text == "" || key_input.Text == "Key...")
     {
         MessageBox.Show("Insert medical prescription code", "Erro", MessageBoxButton.OK, MessageBoxImage.Error);
     }
     else if (key_input.Text != "1234")
     {
         MessageBox.Show("Insert a valid medical prescription code", "Erro", MessageBoxButton.OK, MessageBoxImage.Error);
     }
     else
     {
         PaymentPrescription payment = new PaymentPrescription(true);
         this.NavigationService.Navigate(payment);
     }
 }