//Adds the selected Ingredient to the selected menu item protected void btnAddIngredientToMenuItem_Click(object sender, EventArgs e) { TreasureLandDataClassesDataContext db = new TreasureLandDataClassesDataContext(); MenuItemIngredient mii = new MenuItemIngredient(); mii.IngredientID = Convert.ToInt16(ddlIngredients.SelectedValue); mii.MenuItemID = Convert.ToInt16(ddlMenuItemIngredients.SelectedValue); mii.MenuItemIngredientQty = Convert.ToDecimal(txtMenuItemIngredientQty.Text); db.MenuItemIngredients.InsertOnSubmit(mii); db.SubmitChanges(); lbMenuItems.DataBind(); lblIngredientInsert.Visible = false; }
private void detach_MenuItemIngredients(MenuItemIngredient entity) { this.SendPropertyChanging(); entity.MenuItem = null; }
private void attach_MenuItemIngredients(MenuItemIngredient entity) { this.SendPropertyChanging(); entity.Ingredient = this; }
partial void DeleteMenuItemIngredient(MenuItemIngredient instance);
partial void UpdateMenuItemIngredient(MenuItemIngredient instance);
partial void InsertMenuItemIngredient(MenuItemIngredient instance);