Exemplo n.º 1
0
 private static List<GoodsRow> AddTenRows()
 {
     List<GoodsRow> goodsRowCollection = new List<GoodsRow>();
     for (int i = 0; i < 9; i++)
     {
         GoodsRow row = new GoodsRow();
         row.Count = i;
         row.Goods = goodsCollection[i];
         row.Operator = userCollection[i];
         row.Price = i * 1.1;
     }
     return goodsRowCollection;
 }
 public void AddNewGoodRow()
 {
     GoodsRow item = new GoodsRow() {Goods = SelectedGood, Count = CountOfGood };
     vm.Add(new AddEditViewModel() { Id = item.Id, Good = item.Goods, Count = item.Count, TotalCost = item.TotalPrice });
     order.GoodsList.Add(item);
     goodsRowModel.Add(item);
 }
 public void AddGoodRow()
 {
     GoodsRow newGoodsRow = new GoodsRow() { Goods = SelectedGood, Count = CountOfGood, Price = SelectedGood.Price };
     order.GoodsList.Add(newGoodsRow);
     NotifyPropertyChanged("AddGoodRow");
 }