public bool Save(FoodItem selectedFoodItem)
 {
     hasError = false;
     try
     {
         sqlFoodItem f = new sqlFoodItem(selectedFoodItem);
         FoodItemLINQDataContext dc = new FoodItemLINQDataContext();
         dc.UpdateFoodItem(selectedFoodItem.FoodName, selectedFoodItem.ItemPrice, selectedFoodItem.Id);
     }
     catch (Exception ex)
     {
         errorMessage = "Update error, " + ex.Message;
         hasError = true;
     }
     return (!hasError);
 }
Exemple #2
0
 public void CopyProduct(FoodItem f)
 {
     this.Id = f.Id;
     this.FoodName = f.FoodName;
     this.ItemPrice = f.ItemPrice;
 }
Exemple #3
0
 public sqlFoodItem(FoodItem f)
 {
     Id = f.Id;
     FoodName = f.FoodName;
     ItemPrice = f.ItemPrice;
 }
Exemple #4
0
 public void CopyProduct(FoodItem f)
 {
     this.Id        = f.Id;
     this.FoodName  = f.FoodName;
     this.ItemPrice = f.ItemPrice;
 }
Exemple #5
0
 public sqlFoodItem(FoodItem f)
 {
     Id        = f.Id;
     FoodName  = f.FoodName;
     ItemPrice = f.ItemPrice;
 }