コード例 #1
0
 //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;
     }
 }
コード例 #2
0
 private void CreateNewReceipt()
 {
     CurrentPurchase       = new PurchasedProductModel();
     CurrentPurchase.Label = $"{++_receiptCounter}";
     ReceiptList.Add(CurrentPurchase);
     ReceiptIndex = ReceiptList.Count() - 1;
 }
コード例 #3
0
        //Returns product information from the list
        public ReceiptList GetProductInfo(int Idproduct)
        {
            var res = shopContext.Products.Join(shopContext.Categories, x => x.Idcategory, y => y.Idcategory, (x, y) => new
            {
                Discount     = x.Discount,
                Vat          = x.IdcategoryNavigation.Vat,
                Idproduct    = x.Idproduct,
                Idcategory   = x.Idcategory,
                ProductName  = x.ProductName,
                UnitPrice    = x.UnitPrice,
                UnitQuantity = x.UnitQuantity,
            })
                      .Where(x => x.Idproduct == Idproduct);

            ReceiptList receiptLists = new ReceiptList();

            foreach (var item in res)
            {
                receiptLists.Discount     = item.Discount;
                receiptLists.Idcategory   = item.Idcategory;
                receiptLists.Idproduct    = item.Idproduct;
                receiptLists.ProductName  = item.ProductName;
                receiptLists.UnitPrice    = Math.Round(item.UnitPrice, 2);//Because in database i have type money which is not rounded to two places after pointer
                receiptLists.UnitQuantity = item.UnitQuantity;
                receiptLists.Vat          = item.Vat;
            }
            return(receiptLists);
        }
コード例 #4
0
        private void Pay()
        {
            ReceiptList.Remove(CurrentPurchase);

            if (ReceiptList.Count == 0)
            {
                CreateNewReceipt();
            }
            else
            {
                SelectPreviousReceipt();
            }
        }
コード例 #5
0
    protected void ReceiptBind(bool current = false)
    {
        if (current)
        {
            TabPlay("receipt");
        }

        int pageCount = 0;
        List <WMUserReceipts> list = WMUserReceipts.GetList(out pageCount, UserId, ReceiptPager.CurrentPageIndex - 1, ReceiptPager.PageSize);

        ReceiptList.DataSource = list;
        ReceiptList.DataBind();
        ReceiptPager.RecordCount = pageCount;
    }
コード例 #6
0
 public ReceiptForm()
 {
     InitializeComponent();
     Receipt                     = new ReceiptExternal();
     ReceiptV2                   = new Receipt.Receipt();
     ReceiptList                 = new ReceiptExternalList();
     ReceiptListV2               = new ReceiptList();
     reFunc                      = new ReceiptEndPointFunctionality();
     reFunc.ReturnMessageXml    += ReturnMessageXmlHandler;
     SaveReceipt                 = new ReceiptExternal();
     UpdateReceipt               = new Receipt.Receipt();
     receiptSearchShipment       = new ReceiptSearchExternalShipment();
     receiptV2SearchShipment     = new ReceiptV2SearchExternalShipment();
     receiptSaveShipment         = new ReceiptSaveExternalShipment();
     receiptUpdateShipment       = new ReceiptUpdateExternalShipment();
     receiptListSearchShipment   = new ReceiptListSearchExternalShipment();
     receiptListV2SearchShipment = new ReceiptListV2SearchExternalShipment();
     SetupObjectsForPropertyGrid();
 }
コード例 #7
0
 public ReceiptAgencyFormEC2()
 {
     InitializeComponent();
     ReceiptExt                = new ReceiptExternal();
     ReceiptV2                 = new ReceiptAgencyEC2.Receipt();
     ReceiptList               = new ReceiptExternalList();
     ReceiptListV2             = new ReceiptList();
     RaeFunc                   = new ReceiptAgencyEndpointFunctionalityEC2();
     RaeFunc.ReturnMessageXml += ReturnMessageXmlHandler;
     SaveReceipt               = new ReceiptExternal();
     UpdateReceipt             = new ReceiptAgencyEC2.Receipt();
     SetupObjectsForPropertyGrid();
     ReceiptSearchShipment       = new ReceiptSearchExternalShipmentEC2();
     ReceiptV2SearchShipment     = new ReceiptV2SearchExternalShipmentEC2();
     ReceiptSaveShipment         = new ReceiptSaveExternalShipmentEC2();
     ReceiptUpdateShipment       = new ReceiptUpdateExternalShipmentEC2();
     ReceiptListSearchShipment   = new ReceiptListSearchExternalShipmentEC2();
     ReceiptListV2SearchShipment = new ReceiptListV2SearchExternalShipmentEC2();
     TestShipment = new BaseShipment();
 }
コード例 #8
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);
     }
 }
コード例 #9
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();
 }
コード例 #10
0
 /// <summary>
 /// Holt alle Rechnungen aus der Config
 /// </summary>
 public void GetReceipt()
 {
     ReceiptList.Clear();
     ReceiptList = _configManager.GetReceipts();
 }
コード例 #11
0
ファイル: Filterchain.cs プロジェクト: yellow444/HudlFfmpeg
        public void CreateInput(IStream stream)
        {
            var streamId = StreamIdentifier.Create(Owner.Owner.Owner.Id, Owner.Owner.Id, stream.Map);

            ReceiptList.Add(streamId);
        }