/// <summary> /// Provides a deterministic way to create the AddCreditNoteLineViewModel property. /// </summary> public static void CreateAddCreditNoteLineViewModel() { if (_AddCreditNoteLineViewModel == null) { _AddCreditNoteLineViewModel =new AddCreditNoteLineViewModel(); } }
public void AddLineItem(AddCreditNoteLineViewModel item) { CreditNoteLineItemView line = TempCreditLineItem.FirstOrDefault(p => p.ProductId == item.ProductLookUp.ProductId); if (line == null) { line = new CreditNoteLineItemView(); TempCreditLineItem.Add(line); line.ProductId = item.ProductLookUp.ProductId; line.ProductName = item.ProductLookUp.ProductName; } line.Quantity = item.QuantityRequired; line.UnitPrice = item.ProductLookUp.UnitPrice; line.Reason = item.Reason; refreshList(); }
/// <summary> /// Provides a deterministic way to delete the AddCreditNoteLineViewModel property. /// </summary> public static void ClearAddCreditNoteLineViewModel() { _AddCreditNoteLineViewModel.Cleanup(); _AddCreditNoteLineViewModel = null; }