private void TestData() { SeqParts parts; SeqPart sp; parts = new SeqParts("test A"); sp = new SeqPart("A1", "titleA1", "descriptionA1"); parts.AddPart(sp); sp = new SeqPart("A2", "titleA2", "descriptionA2"); parts.AddPart(sp); PartsList.Add("P1", parts); parts = new SeqParts("test B"); sp = new SeqPart("B1", "titleB1", "descriptionB1"); parts.AddPart(sp); sp = new SeqPart("B2", "titleB2", "descriptionB2"); parts.AddPart(sp); PartsList.Add("P2", parts); OnPropertyChange("PartsList"); }
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; }
public void AddPartToProduct(Part p, int q) { for (int i = 0; i < q; i++) { PartsList.Add(p); Price += p.Price; } }
public void AddPart(string text, params string[] headers) { PartsList.Add(new MimePart { Headers = new List <String>(headers), Data = text.ToUTF8() }); }
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)); } }
public void AddPart(byte[] data, params string[] headers) { PartsList.Add(new MimePart { Headers = new List <String>(headers), Data = new byte[data.Length] }); Array.Copy(data, PartsList[PartsList.Count - 1].Data, data.Length); }