private void AddMovieButton_Click(object sender, EventArgs e) { if (CheckTextBoxes()) { if (movie != null) { if (!EditMovie()) { MessageBox.Show("There was a problem editing the movie"); return; } parent.FillTable(); MessageBox.Show("Movie Edited!"); this.Close(); } else if (InsertMovie()) { if (!InsertActors(movie)) { Debug.Print("There was a problem adding the actors"); return; } parent.FillTable(); MessageBox.Show("Movie added!"); this.Close(); } else { MessageBox.Show("Movie could not be added"); } } }
private void FufillOrderButton_Click(object sender, EventArgs e) { if (DBEnvironment.FulfillOrder(order.Id, parent.User.Id)) { // update parent table parent.FillTable(); } Close(); }
private void EditMovieButton_Click(object sender, EventArgs e) { if ((MessageBox.Show("Edit movie with current information?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.Yes)) { EditMovie(); Console.WriteLine("REFRESH"); parent.FillTable(); this.Close(); } }
private void AddUserButton_Click(object sender, EventArgs e) { if (!InputsValid()) { return; } if (InsertUser() == true) { parent.FillTable(); this.Close(); } }
private void AddUserButton_Click(object sender, EventArgs e) { if (!checkFormInputs()) { if (employee == null) { Debug.Print("Couldn't add employee"); } else { Debug.Print("Couldn't Edit employee"); } return; } if (employee == null) { if (!ValidUsernamePassword()) { return; } if (InsertUser()) { parent.FillTable(); } } else { if (EditUser()) { parent.FillTable(); } } this.Close(); }
private void buttonClick() { if ((MessageBox.Show("Edit Customer with current information?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.Yes)) { EditUser(); if (type == ParentType.Manager) { managerParent.FillTable(); } else { customerParent.FillUserInfo(); } this.Close(); } }