/// <summary> /// Deprecated Method for adding a new object to the ordert EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToordert(ordert ordert) { base.AddObject("ordert", ordert); }
private void MakeOrderBtn_Click(object sender, EventArgs e) { ordert o = new ordert(); o.date = DateTime.Now; o.totalcost = getCurrentCost(); o.order_id = m_currentORDERNUM; cafeContext.AddToordert(o); foreach (recipe r in m_currentOrder) cafeContext.AddToorder_stuff(new order_stuff() { order_id = m_currentORDERNUM, recipe_id = r.recipe_id, }); cafeContext.SaveChanges(); m_currentOrder.Clear(); totalOrder_tb.Text = ""; orderList.Items.Clear(); m_currentORDERNUM = Constants.Functions.ORDER_NUM(); printOrderTemplate(); }
/// <summary> /// Create a new ordert object. /// </summary> /// <param name="order_id">Initial value of the order_id property.</param> /// <param name="totalcost">Initial value of the totalcost property.</param> /// <param name="date">Initial value of the date property.</param> public static ordert Createordert(global::System.Int32 order_id, global::System.Int32 totalcost, global::System.DateTime date) { ordert ordert = new ordert(); ordert.order_id = order_id; ordert.totalcost = totalcost; ordert.date = date; return ordert; }