public RecipeFrm(SQLData sqldata_, string newChange) { sqldata = sqldata_; recipeID = -1; //-1 indicates this is a new recipe InitializeComponent(); this.Text = newChange; }
public RecipeFrm(long recipeID_, SQLData sqldata_, string newChange) { recipeID = recipeID_; sqldata = sqldata_; InitializeComponent(); DataTable dtIngredients = sqldata.GetIngredientsFromRecipeID(recipeID); string instructions = sqldata.GetInstructionsFromRecipeID(recipeID); CreditToTextBox.Text = sqldata.GetCreditToFromRecipeID(recipeID); FillIngredients(dtIngredients); FillInstructions(instructions); RecipeNameTextBox.Text = sqldata.GetRecipeNameFromRecipeID(recipeID); this.Text = newChange; }