Ejemplo n.º 1
0
        private void existIngrid_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            ingridients_listbox.Items.Add(existIngrid.Text);
            cost_lb.Items.Add(count_lb.Text);
            ing_count_lb.Items.Add(1);
            int ing_index = (int)((ListBox)sender).SelectedValue;
            string auto_inc_recipe_query = "select AUTO_INCREMENT from information_schema.tables where TABLE_SCHEMA = 'cafesystem' and TABLE_NAME = 'recipe'";
            int[] rec_indexes = m_cafecontext.ExecuteStoreQuery<int>(auto_inc_recipe_query).ToArray();
            int recipe_index = rec_indexes[0];

            m_rs = recipe_stuff.Createrecipe_stuff(ing_index, recipe_index, 1, 1);
            tempstuff.Add(m_rs);

            totalcost += ingridientTableAdapter.GetData()[ing_index].cost;
            totalcost_tb.Text = totalcost.ToString();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the recipe_stuff EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTorecipe_stuff(recipe_stuff recipe_stuff)
 {
     base.AddObject("recipe_stuff", recipe_stuff);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Create a new recipe_stuff object.
 /// </summary>
 /// <param name="ingridient_id">Initial value of the ingridient_id property.</param>
 /// <param name="recipe_id">Initial value of the recipe_id property.</param>
 /// <param name="recipe_stuff_id">Initial value of the recipe_stuff_id property.</param>
 /// <param name="count">Initial value of the count property.</param>
 public static recipe_stuff Createrecipe_stuff(global::System.Int32 ingridient_id, global::System.Int32 recipe_id, global::System.Int32 recipe_stuff_id, global::System.Int32 count)
 {
     recipe_stuff recipe_stuff = new recipe_stuff();
     recipe_stuff.ingridient_id = ingridient_id;
     recipe_stuff.recipe_id = recipe_id;
     recipe_stuff.recipe_stuff_id = recipe_stuff_id;
     recipe_stuff.count = count;
     return recipe_stuff;
 }