private void Edit() { SelectedItem.Name = EditName; UnitPriceDao.Update(SelectedItem); SelectedItem = null; EditName = string.Empty; }
private void DeleteItem() { SelectedItem.IsDeleted = true; UnitPriceDao.Delete(SelectedItem); this.ApplyFilter(); ClearInput(); }
private void Delete() { SelectedItem.IsDeleted = true; UnitPriceDao.Delete(SelectedItem); this.ApplyFilter(); SelectedItem = null; EditName = string.Empty; }
private void UpdateItem() { SelectedItem.Name = _inputName; SelectedItem.Price = inputPrice; SelectedItem.MaterialCode = (SelectedMaterial == null ? string.Empty : SelectedMaterial.Code); SelectedItem.Size = SizeText; SelectedItem.Processing0 = Processing0Text; SelectedItem.PieceWeight = PieceWeightText; SelectedItem.Package = PackageText; SelectedItem.ColorTypes = ColorItemToString(ColorList.ToList()); UnitPriceDao.Update(SelectedItem); ClearInput(); }
private void Create() { UnitPriceItemModel item = new UnitPriceItemModel() { Code = UnitPriceItemModel.GetNewProductCode(_listModel, _customerType, true), Name = _inputName, Price = CombinedPrice, CustomerCode = _customerType, IsCombined = true, CombinedUnits = GetCombinedString(), IsDeleted = false, }; this._listModel.Add(item); UnitPriceDao.Create(item); CombiningUnits.Clear(); InputName = string.Empty; OnPropertyChanged("CombinedPrice"); }
private void CreateItem() { UnitPriceItemModel item = new UnitPriceItemModel() { Code = UnitPriceItemModel.GetNewProductCode(_listModel, _customerType, false), Name = _inputName, Price = inputPrice, CustomerCode = _customerType, MaterialCode = (SelectedMaterial == null ? string.Empty : SelectedMaterial.Code), Size = SizeText, Processing0 = Processing0Text, PieceWeight = PieceWeightText, Package = PackageText, IsCombined = false, IsDeleted = false, ColorTypes = ColorItemToString(ColorList.ToList()), }; this._listModel.Add(item); UnitPriceDao.Create(item); ClearInput(); }