public WndCustInfo(Cafeteria cafeteria, string cardUid)
        {
            this.cafeteria = cafeteria;

            InitializeComponent();
            this.textBoxCardUid.Text = cardUid;
        }
 private void InitializeDBConnection()
 {
     ShowOnStatusBar("Setting up connection to database...");
     RetrieveConnectionString();
     try
     {
         cafeteria = new Cafeteria(connString);
         ShowOnStatusBar("Ready.");
     }
     catch (Exception e)
     {
         MessageBoxResult result = MessageBox.Show(String.Format("Error: {0} \n\nRetry?", e.Message), "Connection Error",
                                                   MessageBoxButton.YesNo, MessageBoxImage.Error);
         if (result == MessageBoxResult.Yes)
         {
             InitializeDBConnection();
         }
         else
         {
             Environment.Exit(-1);
         }
     }
 }