示例#1
0
 private void CreateNewReceipt()
 {
     CurrentPurchase       = new PurchasedProductModel();
     CurrentPurchase.Label = $"{++_receiptCounter}";
     ReceiptList.Add(CurrentPurchase);
     ReceiptIndex = ReceiptList.Count() - 1;
 }
 //Methods
 public string AddReceipt(Receipt receipt)
 {
     try
     {
         if (receipt != null)
         {
             bool IsExists = false;
             foreach (var i in ReceiptList)
             {
                 if (i.receipt_sn == receipt.receipt_sn)
                 {
                     i.amount += receipt.amount; IsExists = true; break;
                 }
             }
             if (!IsExists) ReceiptList.Add(receipt);
             return AddToReceipttOK;
         }
         else
             return AddToReceiptNG;
     }
     catch(Exception e)
     {
         return AddToReceiptNG;
     }
 }
示例#3
0
 /// <summary>
 /// 获取数据
 /// </summary>
 public void GetDate()
 {
     try
     {
         List <SeatManage.ClassModel.AMS_Advertisement> modelList = SeatManage.Bll.AdvertisementOperation.GetAdList(null, SeatManage.EnumType.AdType.PrintReceiptAd);
         ReceiptList.Clear();
         foreach (SeatManage.ClassModel.AMS_Advertisement model in modelList)
         {
             SeatManage.ClassModel.PrintReceiptInfo view = SeatManage.ClassModel.PrintReceiptInfo.ToModel(model.AdContent);
             view.AdContent = model.AdContent;
             view.ID        = model.ID;
             ReceiptList.Add(view);
         }
     }
     catch (Exception ex)
     {
         ErrorMessage = ex.Message;
         SeatManage.SeatManageComm.WriteLog.Write("获取学校通知失败" + ex.Message);
     }
 }
示例#4
0
 /// <summary>
 /// Fügt der Konfigruationsdatei eine neue Rechnung hinzu.
 /// </summary>
 /// <param name="receipt"></param>
 public void AddReceipt(Receipt receipt)
 {
     ReceiptList.Add(receipt);
     _configManager.SaveReceiptChanges();
 }
示例#5
0
        public void CreateInput(IStream stream)
        {
            var streamId = StreamIdentifier.Create(Owner.Owner.Owner.Id, Owner.Owner.Id, stream.Map);

            ReceiptList.Add(streamId);
        }