コード例 #1
0
ファイル: AddMovieForm.cs プロジェクト: aidanbush/NextFlix
        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");
                }
            }
        }
コード例 #2
0
 private void FufillOrderButton_Click(object sender, EventArgs e)
 {
     if (DBEnvironment.FulfillOrder(order.Id, parent.User.Id))
     {
         // update parent table
         parent.FillTable();
     }
     Close();
 }
コード例 #3
0
ファイル: EditMovieForm.cs プロジェクト: aidanbush/NextFlix
 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();
     }
 }
コード例 #4
0
        private void AddUserButton_Click(object sender, EventArgs e)
        {
            if (!InputsValid())
            {
                return;
            }

            if (InsertUser() == true)
            {
                parent.FillTable();
                this.Close();
            }
        }
コード例 #5
0
        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();
        }
コード例 #6
0
        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();
            }
        }