Example #1
0
 private void btnMainMenu_Click(object sender, EventArgs e)
 {
     appState = AppState.None;
     HideAllButtons();
     ShowMainButtons();
     ClearEntryBoxes();
     DisplayAllMovies();
 }
Example #2
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     appState = AppState.Delete;
     HideAllButtons();
     ShowDeleteForm();
     DisplayAllMovies();
     lbID.Visible = false;
     txtID.Text   = "Please select an item from the list above";
 }
Example #3
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     appState = AppState.Add;
     HideAllButtons();
     ShowAddForm();
     DisplayAllMovies();
     txtID.Text         = businessLayer.IncrementID(businessLayer.DisplayAllMovies()).ToString();
     this.ActiveControl = txtName;
 }
Example #4
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     if (lstDisplayList.SelectedItem != null)
     {
         appState = AppState.Update;
         SetUpdateValues(GetMovieFromListBox());
         this.ActiveControl = txtName;
     }
     else
     {
         MessageBox.Show("Please select an Movie above.");
     }
 }