Пример #1
0
 /// <summary>
 /// Provides a deterministic way to create the AddCreditNoteLineViewModel property.
 /// </summary>
 public static void CreateAddCreditNoteLineViewModel()
 {
     if (_AddCreditNoteLineViewModel == null)
     {
         _AddCreditNoteLineViewModel =new AddCreditNoteLineViewModel();
     }
 }
Пример #2
0
        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();
        }
Пример #3
0
 /// <summary>
 /// Provides a deterministic way to delete the AddCreditNoteLineViewModel property.
 /// </summary>
 public static void ClearAddCreditNoteLineViewModel()
 {
     _AddCreditNoteLineViewModel.Cleanup();
     _AddCreditNoteLineViewModel = null;
 }