コード例 #1
0
        private void MD_Confirm_Button_Click(object sender, EventArgs e)
        {
            if (dataTableRecipe.Rows.Count == 0)
            {
                DialogResult mDialogResult = MessageBox.Show("配方未存在香料", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                if (mDialogResult == DialogResult.OK)
                    return;
            }
            else if (modifyRecipeNumber_TextBox.Text.Length != 14)
            {
                DialogResult mDialogResult = MessageBox.Show("配方號碼格式錯誤", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                if (mDialogResult == DialogResult.OK)
                    return;

            }
            else if (modifyRecipeNumber_TextBox.Text.IndexOf("-", 0, 14) != 1)
            {
                DialogResult mDialogResult = MessageBox.Show("配方號碼格式錯誤", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                if (mDialogResult == DialogResult.OK)
                    return;

            }
            // Console.WriteLine(dataTableAddRecipe.Rows.Count);
            Confirm_RecipeForm confirm_recipeForm = new Confirm_RecipeForm();
            confirm_recipeForm.pushMainForm(this);
            confirm_recipeForm.StartPosition = FormStartPosition.CenterScreen;
            confirm_recipeForm.changControl("modifyRecipe");
            confirm_recipeForm.pushLabel(modify_recipe_combobox.Text
                // , modifyNumberLabel.Text);
                                          , modifyRecipeNumber_TextBox.Text);
            confirm_recipeForm.ShowDialog();
        }
コード例 #2
0
        private void Fix_Recipe_Confirm_button_Click(object sender, EventArgs e)
        {
            if (DB_Recipe_comboBox.Text == "") {
                DialogResult mDialogResult = MessageBox.Show("請選擇香料配方", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                if (mDialogResult == DialogResult.OK)
                    return;
            }

            else if (DB_Recipe_comboBox.SelectedValue == null ) {

                DialogResult mDialogResult = MessageBox.Show("請選擇香料配方", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                if (mDialogResult == DialogResult.OK)
                    return;
            }

            Confirm_RecipeForm confirm_recipeForm = new Confirm_RecipeForm();
            confirm_recipeForm.pushMainForm(this);
            confirm_recipeForm.StartPosition = FormStartPosition.CenterScreen;
            confirm_recipeForm.changControl("actionRecipe");
            confirm_recipeForm.pushLabel(DB_Recipe_comboBox.Text, DB_Recipe_comboBox.SelectedValue.ToString());
            confirm_recipeForm.ShowDialog();
        }
コード例 #3
0
        private void delete_Recipe_Button_Click(object sender, EventArgs e)
        {
            if (dataTableRecipe.Rows.Count == 0)
            {
                DialogResult mDialogResult = MessageBox.Show("配方未存在香料", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                if (mDialogResult == DialogResult.OK)
                    return;
            }

            Confirm_RecipeForm confirm_recipeForm = new Confirm_RecipeForm();
            confirm_recipeForm.pushMainForm(this);
            confirm_recipeForm.StartPosition = FormStartPosition.CenterScreen;
            confirm_recipeForm.changControl("deleteRecipe");
            confirm_recipeForm.pushLabel(modify_recipe_combobox.Text
                                          , modifyRecipeNumber_TextBox.Text);
            confirm_recipeForm.ShowDialog();
        }
コード例 #4
0
        private void deleteSpiceButton_Click(object sender, EventArgs e)
        {
            Confirm_RecipeForm removeSpiceForm = new Confirm_RecipeForm();
            removeSpiceForm.pushMainForm(this);
            removeSpiceForm.StartPosition = FormStartPosition.CenterScreen;
            removeSpiceForm.changControl("deleteSpice");

            removeSpiceForm.pushLabel(dataTableAddRecipe.Rows[allSpiceDataGridView.CurrentCell.RowIndex][3].ToString()
                                     ,dataTableAddRecipe.Rows[allSpiceDataGridView.CurrentCell.RowIndex][0].ToString());
            removeSpiceForm.ShowDialog();
        }
コード例 #5
0
        private void confirmDirectButton_8_Click(object sender, EventArgs e)
        {
            control.changControl("directRecipe");
            Confirm_RecipeForm directSpiceForm = new Confirm_RecipeForm();
            directSpiceForm.pushMainForm(this);
            directSpiceForm.StartPosition = FormStartPosition.CenterScreen;
            directSpiceForm.changControl("directRecipe");

            directSpiceForm.pushLabel(BucketComBoBox_8.Text
                                     , BucketComBoBox_8.SelectedValue.ToString());
            directSpiceForm.pushBucket("8");
            directSpiceForm.ShowDialog();
        }
コード例 #6
0
 private void confirmButton_Click(object sender, EventArgs e)
 {
     if (dataTableRecipe.Rows.Count == 0)
     {
         DialogResult mDialogResult = MessageBox.Show("配方未存在香料", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         if (mDialogResult == DialogResult.OK)
             return;
     }
        // Console.WriteLine(dataTableAddRecipe.Rows.Count);
     Confirm_RecipeForm confirm_recipeForm = new Confirm_RecipeForm();
     confirm_recipeForm.pushMainForm(this);
     confirm_recipeForm.StartPosition = FormStartPosition.CenterScreen;
     confirm_recipeForm.changControl("addRecipe");
     confirm_recipeForm.pushLabel(Recipe_NameLabel.Text
                                 ,Recipe_NumerLabel.Text);
     confirm_recipeForm.ShowDialog();
 }