Exemplo n.º 1
0
 private void btn_ViewRecipe_Click(object sender, EventArgs e)
 {
     if (dgv_BrowseRecipes.SelectedRows.Count > 0)
     {
         int recipeID;
         recipeID   = Convert.ToInt32(dgv_BrowseRecipes.CurrentRow.Cells[0].Value);
         recipe     = GetRecipe(recipeID);
         viewRecipe = new ViewRecipeForm(recipe, null);
         this.Hide();
         viewRecipe.ShowDialog();
         this.Close();
     }
 }
Exemplo n.º 2
0
        private void btn_Review_Click(object sender, EventArgs e)
        {
            updateCookInfoTable();
            updateDirectionTable(directions);
            recipe.ovenTemp        = Convert.ToInt32(cmb_OvenTemp.Text);
            recipe.prepTimeHours   = Convert.ToInt32(cmb_PrepHours.Text);
            recipe.prepTimeMinutes = Convert.ToInt32(cmb_PrepMinutes.Text);
            recipe.cookTimeHours   = Convert.ToInt32(cmb_CookHours.Text);
            recipe.cookTimeMinutes = Convert.ToInt32(cmb_CookMinutes.Text);
            recipe.directions      = directions;

            ViewRecipe     view           = new ViewRecipe();
            ViewRecipeForm viewRecipeForm = new ViewRecipeForm(recipe, RecipeDataSet);

            //MessageBox.Show(view.PrintRecipe(recipe));

            //RecipeReview reviewRecipe = new RecipeReview(recipeID,RecipeDataSet);
            this.Hide();
            viewRecipeForm.ShowDialog();
            this.Close();
        }