public DataEditViewModel(IPartsListRipository partsListRipository, IBomRepository bomRepository) { _partsListRipository = partsListRipository; _bomRepository = bomRepository; PartsList.Clear(); foreach (var partslist in _partsListRipository.GetPartsList(1)) { PartsList.Add(new PartsListEtity(partslist.Id, partslist.SqkId, partslist.PartsNumber, partslist.PartsName, partslist.PartsQuantity)); } BomList.Clear(); foreach (var bomlist in _bomRepository.GetBoms("test")) { BomList.Add(new BomEntity(bomlist.Id, bomlist.AircraftNumber, bomlist.AssyNo, bomlist.PartsNo, bomlist.NeedQuantity, bomlist.ReceivedQuantity, bomlist.Memo)); OriginalQuantityText += bomlist.ReceivedQuantity; } UpdateButton = new DelegateCommand(UpdateButtonExecute); DivideQuantityText = 10; RemainingQuantityText = DivideQuantityText; }
private void PartsListUpDate() { PartsList.Clear(); foreach (var partslist in _partsListRipository.GetPartsList(Convert.ToInt32(SqkIdText))) { PartsList.Add(new PartsListEtity(partslist.Id, partslist.SqkId, partslist.PartsNumber, partslist.PartsName, partslist.PartsQuantity)); } }
private void SearchButton3Execute() { Field1Text = "akira"; var partsList = _partsListRipository.GetPartsList(1); }