예제 #1
0
        public void AddOfferLine(IBaseItem myItem, int quantity)
        {
            IExtendOfferLine newOfferLine = new OfferLine(myItem, quantity);

            OfferLines.Add(newOfferLine);
            newOfferLine.APWC += NotifyPropertyChanged;
            string[] propertiesChanged = { nameof(OfferTotal), nameof(NoOfTotalPackages), nameof(NoOfTotalPallets), nameof(OfferLinesSubtotal), nameof(TotalDiscountedPrice), nameof(TotalPercentDiscount) };
            NotifyPropertiesChanged(propertiesChanged);
        }
예제 #2
0
        private void DrawOfferLineRow(ref XGraphics gfx, ref int height, XFont regularFont, ref PdfPage page, OfferLines ol)
        {
            var actualRow = NewLine(ref height, 0, tableLineHeight);

            gfx.DrawString(ol.Product.ProductName.ToString(), regularFont, XBrushes.Black, new XRect(NewColumn(actualRow, col1Pos), new XSize(col2Pos - col1Pos, tableLineHeight)), XStringFormats.TopLeft);
            gfx.DrawString(ol.Quantity.ToString(), regularFont, XBrushes.Black, new XRect(NewColumn(actualRow, col2Pos), new XSize(col3Pos - col2Pos, tableLineHeight)), XStringFormats.TopLeft);
            gfx.DrawString(ol.W, regularFont, XBrushes.Black, new XRect(NewColumn(actualRow, col3Pos), new XSize(col4Pos - col3Pos, tableLineHeight)), XStringFormats.TopLeft);
            gfx.DrawString(ol.Medium, regularFont, XBrushes.Black, new XRect(NewColumn(actualRow, col4Pos), new XSize(col5Pos - col4Pos, tableLineHeight)), XStringFormats.TopLeft);
            gfx.DrawString(ol.AdditionalEquipment, regularFont, XBrushes.Black, new XRect(NewColumn(actualRow, col5Pos), new XSize(col6Pos - col5Pos, tableLineHeight)), XStringFormats.TopLeft);

            var salesPrice = "";

            if (ol.SalesPrice != null)
            {
                salesPrice = ol.SalesPrice.ToString();
            }
            gfx.DrawString(salesPrice, regularFont, XBrushes.Black, new XRect(NewColumn(actualRow, col6Pos), new XSize(col7Pos - col6Pos, tableLineHeight)), XStringFormats.TopLeft);
            gfx.DrawString(ol.OfferLineProcess.Count.ToString(), regularFont, XBrushes.Black, new XRect(NewColumn(actualRow, col7Pos), new XSize(page.Width - col7Pos - marginRight, tableLineHeight)), XStringFormats.TopLeft);
        }