Exemplo n.º 1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the MealPrices EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToMealPrices(MealPrice mealPrice)
 {
     base.AddObject("MealPrices", mealPrice);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Loads the settings.
 /// </summary>
 private void LoadSettings()
 {
     this.mealPrices = DataAccess.Instance.MealPrices.GetAll().FirstOrDefault();
     if (this.mealPrices != null)
     {
         this.Form.BreakfastTextBox.Text = this.mealPrices.BreakfastPrice.ToString(CultureInfo.CurrentCulture);
         this.Form.DinnerTextBox.Text = this.mealPrices.DinnerPrice.ToString(CultureInfo.CurrentCulture);
         this.Form.LunchTextBox.Text = this.mealPrices.LunchPrice.ToString(CultureInfo.CurrentCulture);
         this.Form.AllMealsTextBox.Text = this.mealPrices.ThreeMealsPrice.ToString(CultureInfo.CurrentCulture);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Create a new MealPrice object.
 /// </summary>
 /// <param name="breakfastPrice">Initial value of the BreakfastPrice property.</param>
 /// <param name="lunchPrice">Initial value of the LunchPrice property.</param>
 /// <param name="dinnerPrice">Initial value of the DinnerPrice property.</param>
 /// <param name="threeMealsPrice">Initial value of the ThreeMealsPrice property.</param>
 /// <param name="id">Initial value of the Id property.</param>
 public static MealPrice CreateMealPrice(global::System.Double breakfastPrice, global::System.Double lunchPrice, global::System.Double dinnerPrice, global::System.Double threeMealsPrice, global::System.Int32 id)
 {
     MealPrice mealPrice = new MealPrice();
     mealPrice.BreakfastPrice = breakfastPrice;
     mealPrice.LunchPrice = lunchPrice;
     mealPrice.DinnerPrice = dinnerPrice;
     mealPrice.ThreeMealsPrice = threeMealsPrice;
     mealPrice.Id = id;
     return mealPrice;
 }