Exemplo n.º 1
0
 /// <summary>
 /// Generates the test with discount and without VAT.
 /// </summary>
 public void GenerateTestWithoutVATAndWithDiscount()
 {
     new InvoiceSharpApi(SizeOption.A4, OrientationOption.Portrait, "€")
     .TextColor("#CC0000")
     .BackColor("#FFD6CC")
     .Image(@"..\..\..\images\vodafone.jpg", 125, 27)
     .Company(Address.Make("FROM",
                           new string[]
                           { "Vodafone Limited", "Vodafone House", "The Connection", "Newbury", "Berkshire RG14 2FN" },
                           "1471587", null))
     .Client(Address.Make("BILLING TO",
                          new string[] { "Isabella Marsh", "Overton Circle", "Little Welland", "Worcester", "WR## 2DJ" }))
     .Items(new List <ItemRow>
     {
         ItemRow.Make("Nexus 6", "Midnight Blue", (decimal)1, 0, (decimal)199.99, (decimal)199.99),
         ItemRow.Make("24 Months (€22.50pm)",
                      "100 minutes, Unlimited texts, 100 MB data 3G plan with 3GB of UK Wi-Fi", (decimal)1,
                      (decimal)432.00, (decimal)432.00),
         ItemRow.Make("Special Offer", "Free case (blue)", (decimal)1, (decimal)0, (decimal)0),
         ItemRow.Make("Test", "This needs improving", (decimal)1, (decimal)10, "-5.00", (decimal) - 5),
     })
     .Totals(new List <TotalRow>
     {
         TotalRow.Make("Total", (decimal)626.99, true),
     })
     .Details(new List <DetailRow>
     {
         DetailRow.Make("PAYMENT INFORMATION", "Make all cheques payable to Vodafone UK Limited.", "",
                        "If you have any questions concerning this invoice, contact our sales department at [email protected].",
                        "", "Thank you for your business.")
     })
     .Footer("http://www.vodafone.co.uk")
     .Save("NonVAT_Discount.pdf");
 }
Exemplo n.º 2
0
 public void PrintInvoice()
 {
     new InvoicerApi(SizeOption.A4, OrientationOption.Landscape, "NGN")
     .TextColor("#CC0000")
     .BackColor("#FFD6CC")
     .Image(@"vodafone.jpg", 125, 32)
     .Company(Address.Make("FROM", new string[] { "Vodafone Limited", "Vodafone House", "The Connection", "Newbury", "Berkshire RG14 2FN" }, "1471587", "569953277"))
     .Client(Address.Make("BILLING TO", new string[] { "Isabella Marsh1", "Overton Circle", "Little Welland", "Worcester", "WR## 2DJ" }))
     .Items(new List <ItemRow> {
         ItemRow.Make("Nexus 6", "Midnight Blue", (decimal)1, 20, (decimal)166.66, (decimal)199.99),
         ItemRow.Make("24 Months (£22.50pm)", "100 minutes, Unlimited texts, 100 MB data 3G plan with 3GB of UK Wi-Fi", (decimal)1, 20, (decimal)360.00, (decimal)432.00),
         ItemRow.Make("Special Offer", "Free case (blue)", (decimal)1, 0, (decimal)0, (decimal)0),
     })
     .Totals(new List <TotalRow> {
         TotalRow.Make("Sub Total", (decimal)526.66),
         TotalRow.Make("VAT @ 20%", (decimal)105.33),
         TotalRow.Make("Total", (decimal)631.99, true),
     })
     .Details(new List <DetailRow> {
         DetailRow.Make("PAYMENT INFORMATION", "Make all cheques payable to Vodafone UK Limited.", "", "If you have any questions concerning this invoice, contact our sales department at [email protected].", "", "Thank you for your business.")
     })
     .Footer("http://www.vodafone.co.uk")
     //.Save();
     .Save(@"C:\NewProjects\Juju\", 0);
 }
Exemplo n.º 3
0
        public void Go(Venta v)
        {
            List <ItemRow> lstItems = new List <ItemRow>();

            foreach (ProductoVendido pv in v.LstProductosVendidos)
            {
                lstItems.Add(ItemRow.Make(pv.Producto.Descripcion, pv.Producto.Marca.Descripcion, (decimal)pv.Cantidad, (decimal)pv.PrecioU, (decimal)pv.PrecioT));
            }

            new InvoicerApi(v.IdVenta, v.FechaVenta, SizeOption.A4, OrientationOption.Portrait, "$")
            .TextColor("#CC0000")
            .BackColor("#FFD6CC")
            .Image(@"..\..\images\veggiestuff.jpg", 135, 25)
            .Company(Address.Make("DATOS VENDEDOR", new string[] { "Veggie Stuff", "Av. Mitre 2425", "Vicente Lopez", "Buenos Aires" }, "", ""))
            .Client(Address.Make("DATOS CLIENTE", new string[] { v.Cliente.NombreCompleto }))
            .Items(lstItems)
            .Totals(new List <TotalRow> {
                TotalRow.Make("Total", (decimal)v.Monto, true),
            })
            .Details(new List <DetailRow> {
                DetailRow.Make("INFORMACIÓN DE PAGO", "Destinar cheques a Veggie Stuff Incorporated.", "", "Por cualquier consulta puede contactarnos mediante correo electronico a [email protected]", "", "Gracias por su compra.")
            })
            .Footer("http://www.veggiestuff.com.ar")
            .Save();
        }
Exemplo n.º 4
0
    void QRCodeScanned(Result result)
    {
        scanReady = false;
        bool addItem = true; //do we still need to add the item to the list?

        //foreach (ItemRow row in itemList.GetRows())
        //{
        //    if (row.GetScanString() == result.Text)
        //    { //Does item already exist in list
        //        row.SetQuantity(row.GetQuantity() + 1); //item already exists, add quantity
        //        addItem = false;
        //    }
        //}

        //Check if we still need to add the item to the list or if we already added quantity to an existing item
        if (true)
        {
            String[] resultString = new string[4];
            resultString = result.Text.Split('|');

            float itemPrice = float.Parse(resultString[1], NumberStyles.Currency); //Get the value of the float, ignoring the currency format

            ItemRow newItem = itemList.AddItem();
            newItem.SetScanString(result.Text);
            newItem.SetItemDescription(resultString[2]);
            newItem.SetProductOwner(resultString[3]);
            newItem.SetItemPrice(itemPrice);
            newItem.SetItemOriginalPrice(itemPrice);
        }

        //update the transactions itemlist
        transaction.SetItemListData(itemList.itemListData);

        //Update checkout button
    }
Exemplo n.º 5
0
        private void BillingRow(Table table, ItemRow item)
        {
            Row row = table.AddRow();

            row.Style         = "TableRow";
            row.Shading.Color = MigraDocHelpers.BackColorFromHtml(Invoice.BackColor);

            Cell cell = row.Cells[0];

            cell.AddParagraph(item.Name, ParagraphAlignment.Left, "H2-9B");

            cell = row.Cells[1];
            cell.AddParagraph(item.Brand, ParagraphAlignment.Left, "H2-9");

            cell = row.Cells[2];
            cell.VerticalAlignment = VerticalAlignment.Center;
            cell.AddParagraph(item.Amount.ToCurrency(), ParagraphAlignment.Center, "H2-9");

            cell = row.Cells[3];
            cell.VerticalAlignment = VerticalAlignment.Center;
            cell.AddParagraph(item.Price.ToCurrency(Invoice.Currency), ParagraphAlignment.Center, "H2-9");

            cell = row.Cells[4];
            cell.VerticalAlignment = VerticalAlignment.Center;
            cell.AddParagraph(item.Total.ToCurrency(Invoice.Currency), ParagraphAlignment.Center, "H2-9");
        }
Exemplo n.º 6
0
        private void preformInvoice()
        {
            int            cost           = totalDaysRented * 30;
            SaveFileDialog saveFileDialog = new SaveFileDialog();

            saveFileDialog.DefaultExt = "pdf";
            saveFileDialog.Filter     = "PDF files (*.pdf)|*.pdf";
            saveFileDialog.ShowDialog();
            string filePath = saveFileDialog.FileName;

            string[] name = new string[4] {
                "Kia of Hamilton", "1885 Upper James Street", "Hamilton, Ontario, Cananada", "L9B1B8"
            };
            string[] customer = new string[4] {
                txtfname.Text + " " + txtlname.Text, txtAddress.Text, cmbCity.Items[cmbCity.SelectedIndex] + ", " + cmbProvince.Items[cmbProvince.SelectedIndex], txtPhone.Text
            };
            new InvoicerApi(SizeOption.A4, OrientationOption.Portrait, "$")
            .TextColor("#CC0000")
            .BackColor("#FFD6CC")
            .Image(@"logo.jpg", 90, 80)
            .Company(Address.Make("FROM", name))
            .Client(Address.Make("BILLING TO", customer))
            .Items(new List <ItemRow> {
                ItemRow.Make("2018 Soul", "Car rental", totalDaysRented, 30, cost),
            })
            .Totals(new List <TotalRow> {
                TotalRow.Make("Total", cost, true),
            })
            .Details(new List <DetailRow> {
                DetailRow.Make("RENTAL INFORMATION", "\n1. I am the only driver authorized by Kia of Hamilton to operate the Vehicle unless others are listed below. The Vehicle is in good and safe mechanical condition and I shall return the Vehicle in the same condition. If applicable, list other authorized drivers here . \n\n 2. I shall obey all Federal, Provincial and Municipal laws, rules and regulations relating to the operation and use of the Vehicle and I shall indemnify Kia of Hamilton for any infractions of such laws, rules and regulations.\n\n 3. I shall pay for all loss or damage to the Vehicle whether or not caused by my negligence. \n\n 4. I have confirmed with my insurance company that this Vehicle is covered under my insurance policy as a substitute vehicle. Insurance Company Name: Policy Number: . \n\n 5. For consideration in the amount of $10.00 which is acknowledged to have been received by Kia of Hamilton, the Vehicle shall be considered to be a Leased Vehicle and I and any other authorized drivers of the Vehicle ('Authorized Drivers') shall be considered to be Lessees for the purposes of determining the order of third party liability established by Section 277 of the Insurance Act R.S.O. 1990, c. I. 8.\n\n 6. I understand that I am being provided with the Vehicle for normal personal use only and will not allow the Vehicle to be used for commercial purposes or for hire, or for any illegal purpose. \n\n 7. During the time that I am authorized to use the Vehicle I shall not operate it in an area outside a 100 km radius from Kia of Hamilton’s location and in no event shall I allow the Vehicle to be driven outside of Ontario without the express written consent of Kia of Hamilton. A charge of 10 cents per km will apply if the Vehicle is driven more than km per day that I am in possession of the Vehicle. \n\n 8. I shall be responsible to pay all fees, tolls and costs of operating the Vehicle while in my custody and shall return the Vehicle with a full tank of gas at my expense. \n\n 9. I shall indemnify Kia of Hamilton against all other liabilities, losses, costs, damages, fines, fees, tolls and expenses of any kind arising while the Vehicle is in my custody. \n\n 10. I shall return the Vehicle to the location where I received it no later than or forthwith upon demand.\n\n 11. I agree to provide Kia of Hamilton with a credit card imprint in my name which I hereby authorize to be processed for a deposit immediately of $ and any additional sum for which I might become liable under this authorization.\n\n 12. Card Number: " + txtCC.Text + " Expiry: " + txtMM.Text + "/" + txtYY.Text + " CVC: " + txtCVV.Text + " \nI agree to pay and authorize Kia of Hamilton to process any applicable credit card voucher for advance deposits and all charges incurred including parking violations, traffic violations, toll charges, damages to and theft of the Vehicle. \n\n 13. I acknowledge, in providing a copy of my driver’s licence and number that Kia of Hamilton at its discretion will run a driver’s abstract to ensure that I am legally permitted to operate the Vehicle. \n\n", "", "", "Thank you for your business.")
            })
            .Footer("http://www.kiaofhamilton.com | The Power to Surprise")
            .Save(filePath);
            Process.Start(filePath);
        }
Exemplo n.º 7
0
        private void DisplayTotal(ItemRow row)
        {
            IXLWorksheet tempSheet = _currentSheet == InOrOut.In ? _sheetForIn : _sheetForOut;

            var total = tempSheet.Cell(_rowIndex, _maximumColumn);

            total.Value = _currentSheet == InOrOut.In ? row.InTotal : row.OutTotal;
        }
Exemplo n.º 8
0
 public void OpenAdjustPanel(ItemRow row)
 {
     itemRow            = row;
     isAdjustingItemRow = true;
     InitializeVariablesForItem();
     this.transform.parent.gameObject.SetActive(true);
     this.gameObject.SetActive(true);
 }
Exemplo n.º 9
0
 private void uiEditItemDatagrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (uiEditItemDatagrid.SelectedItem != null)
     {
         SelectedRow = (ItemRow)uiEditItemDatagrid.SelectedItem;
     }
     RefreshEntries();
 }
Exemplo n.º 10
0
    public void RemoveRow(ItemRow row)
    {
        itemListData.itemRowDataListContainer.itemRowDataList.Remove(row.itemRowData);
        ContentRow contentRow = row;

        base.RemoveRow(contentRow);
        CalculateTotals();
        SetCheckoutButtonInteraction();
    }
 private void ItemFillRows(List <Item> itemList)
 {
     foreach (var item in itemList)
     {
         ItemRow newItemRow = dtItem.NewItemRow();
         newItemRow.Name        = item.Name;
         newItemRow.Price       = item.Price;
         newItemRow.Description = item.Description;
         dtItem.Rows.Add(newItemRow);
     }
 }
Exemplo n.º 12
0
        private List <ItemRow> GenerateFakeDate()
        {
            List <ItemRow> list = new List <ItemRow>();

            for (int i = 0; i < 5; i++)
            {
                list.Add(ItemRow.Make("Parvifolia par 20 -------------------", null, (decimal)1, 20, (decimal)166.66, (decimal)199.99));
            }

            return(list);
        }
Exemplo n.º 13
0
    public void AddItem(Sticker sticker)
    {
        ItemRow newItem = itemList.AddItem();

        //newItem.SetScanString(sticker.);
        newItem.SetItemDescription(sticker.itemDescription);
        newItem.SetProductOwner(sticker.owner);
        newItem.SetItemPrice(float.Parse(sticker.price));
        newItem.SetItemOriginalPrice(float.Parse(sticker.price));

        transaction.SetItemListData(itemList.itemListData);
    }
Exemplo n.º 14
0
 public Item(ItemRow itemRow, int pos = -1, int count = -99)
 {
     ID                 = itemRow.ID;
     Type               = itemRow.Type;
     Name               = itemRow.Name;
     EffectValue        = itemRow.EffectValue;
     IconKey            = _GetIconKeyPrefixByItemType(Type) + itemRow.IconKey;
     Count              = count == -99 ? 1 : count;
     Pos                = pos;
     Desc               = _GetDescription();
     _inCompleteIconKey = itemRow.IconKey;
 }
        public void AddRow(ItemRow row)
        {
            if (IsReadOnly)
            {
                return;
            }

            lock (Lock)
            {
                this.ItemTable.Rows.Add(row);
            }
        }
Exemplo n.º 16
0
    public ItemRow AddItem(ItemRow row)
    {
        ItemRow newRow = Instantiate(row, contentPanel.transform);

        newRow.transform.SetAsLastSibling();
        contentList.Add(newRow);
        itemListData.itemRowDataListContainer.itemRowDataList.Add(row.itemRowData);
        ResetAllRows();
        CalculateTotals();
        SetCheckoutButtonInteraction();
        return(newRow);
    }
Exemplo n.º 17
0
            public ItemRow AddItemRow(string Name, string Company, string Type, string Price)
            {
                ItemRow rowItemRow = ((ItemRow)(this.NewRow()));

                object[] columnValuesArray = new object[] {
                    Name,
                    Company,
                    Type,
                    Price
                };
                rowItemRow.ItemArray = columnValuesArray;
                this.Rows.Add(rowItemRow);
                return(rowItemRow);
            }
Exemplo n.º 18
0
        public ActionResult createinvoice(Guid id)
        {
            if (id == null)
            {
                return(new HttpNotFoundResult("Geçersiz fatura numarası"));
            }
            if (id == Guid.Empty)
            {
                return(new HttpNotFoundResult("Geçersiz fatura numarası"));
            }
            Siparisler result = _siparis.Find(id);

            if (result == null)
            {
                return(new HttpNotFoundResult("Böyle bir sipariş bulunamadı."));
            }
            SirketBilgiTB  sirket      = _sirket.Find();
            string         fatid       = Guid.NewGuid().ToString().Replace("-", "").ToUpper();
            List <ItemRow> aciklamalar = new List <ItemRow>();

            aciklamalar.Add(ItemRow.Make("Günlük Yemek Ücreti", $"{result.Yemek.YemekAdi} {result.Yemek.PorsiyonGr} gr,{result.YemekSayisi} kişilik,sipariş trh:{result.SiparisTarihi.ToShortDateString()}", result.YemekSayisi, 8.0m, result.Musteri.GunlukYemekFiyati, decimal.Parse(result.Odeme.OdemeTutari)));
            new InvoicerApi(SizeOption.A4, OrientationOption.Landscape, "₺")
            .TextColor("#8C2234")
            .BackColor("#FFD6CC").Title($"Günlük Yemek Faturası")
            .Image(HttpContext.Server.MapPath("~/Content/assets/images/ikra/logo.png"), 127, 85)
            .Company(Address.Make($"ÖDEME YAPAN", new string[] { result.Musteri.FirmaAdSoyad, result.Musteri.Telefon, result.Musteri.Email, result.Musteri.FirmaAdres }))
            .Client(Address.Make($"ÖDEME ALAN", new string[] { sirket.Name, sirket.Phone, sirket.VATNo, sirket.Address }, sirket.Name, sirket.VATNo))
            .Items(aciklamalar)
            .DueDate(result.Odeme.OdemeTarihi)
            .Totals(new List <TotalRow> {
                TotalRow.Make("Ara Toplam(Kesinti)", 0m),
                TotalRow.Make("Toplam Ödenen Ücret", decimal.Parse(result.Odeme.OdemeTutari), true),
            })
            .Details(new List <DetailRow> {
                DetailRow.Make("Yemek Ücreti Faturası",
                               $"Müşterimiz {result.Musteri.FirmaAdSoyad}'nın günlük yemek ücreti için verilen faturadır")
            })
            .Footer("http://www.ikrayemek.com.tr")
            .Reference(fatid.Substring(0, 15))

            .Save(HttpContext.Server.MapPath("~/Content/") + fatid + ".pdf");
            byte[] fileBytes = System.IO.File.ReadAllBytes(HttpContext.Server.MapPath("~/Content/") + fatid + ".pdf");
            string fileName  = $"IKRAYEMEK{result.SiparisTarihi.Year}{result.SiparisTarihi.Month}{result.SiparisTarihi.Day}{result.SiparisTarihi.Hour}{result.SiparisTarihi.Minute}{result.SiparisTarihi.Second}-FATURA.pdf";

            return(File(fileBytes, System.Net.Mime.MediaTypeNames.Application.Pdf, fileName));

            return(File("", ""));
        }
        async virtual public Task BeginCommitRow(ItemRow row, Action successCallback, Action <Exception> failureCallback)
        {
            await Task.Run(() =>
            {
                lock (this.Lock)
                {
                    try
                    {
                        switch (row.RowState)
                        {
                        case ItemRowState.Added:
                            Int64 id      = InsertItem(row);
                            bool wasAdded = row.SetField <Int64>(PrimaryKeyName, id);

                            row.AcceptChanges();
                            break;

                        case ItemRowState.Deleted:
                            DeleteItem(row.Field <Int64>(PrimaryKeyName));
                            bool wasDeleted = this.ItemTable.Rows.Remove(row);
                            Debug.Assert(wasDeleted);

                            row.AcceptChanges();
                            break;

                        case ItemRowState.Detached:
                            break;

                        case ItemRowState.Modified:
                            UpdateItem(row.Field <Int64>(PrimaryKeyName), row);

                            row.AcceptChanges();
                            break;

                        case ItemRowState.Unchanged:
                            break;
                        }
                    }
                    catch (Exception ex)
                    {
                        Telemetry.TrackException(ex);
                        failureCallback(ex);
                    }
                }

                successCallback();
            });
        }
        /// <summary>
        /// Call this constructor when restoring a gauge from the DB
        /// </summary>
        /// <param name="row"></param>
        public GaugeItem(ItemRow row)
        {
            this.Row = row;

            this._context    = new UndoRedoContext();
            this.UndoCommand = this._context.GetUndoCommand();
            this.RedoCommand = this._context.GetRedoCommand();

            this.LoadFromRow();
            this.NotifyOfPropertyChangeAll();

            Messenger.Default.Register <Color>(this, "OnForegroundColorChanged", (color) =>
            {
                this.GaugeColor = color;
            });
        }
        /// <summary>
        /// Remove the row from the database
        /// </summary>
        /// <param name="row"></param>
        /// <returns></returns>
        async public Task BeginRemove(ItemRow row)
        {
            if (null != row)
            {
                row.Delete();

                await BeginCommitRow(row,
                                     () =>
                {
                },
                                     (ex) =>
                {
                    Telemetry.TrackException(ex);
                });
            }
        }
        private void SetPropertyValue <T>(ItemRow row, T value)
        {
            var @switch = new Dictionary <Type, Action> {
                { typeof(int), () => { row.SetField <T>(Constants.c_SystemInt64, value); } },
                { typeof(Int64), () => { row.SetField <T>(Constants.c_SystemInt64, value); } },
                { typeof(float), () => { row.SetField <T>(Constants.c_SystemDouble, value); } },
                { typeof(double), () => { row.SetField <T>(Constants.c_SystemDouble, value); } },
                { typeof(string), () => { row.SetField <T>(Constants.c_SystemString, value); } },
                { typeof(byte[]), () => { row.SetField <T>(Constants.c_SystemByteArray, value); } },
                { typeof(DateTime), () => { row.SetField <T>(Constants.c_SystemDateTime, value); } },
                { typeof(bool), () => { row.SetField <T>(Constants.c_SystemBoolean, value); } },
            };

            @switch[typeof(T)]();

            RaisePropertyChanged(row.Field <string>("Property"));
        }
Exemplo n.º 23
0
        private List <ItemRow> GetItemRows(DataTable dt)
        {
            List <ItemRow> ItemRowList = new List <ItemRow>();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                ItemRow itemrow = new ItemRow();
                itemrow.Name        = Convert.ToString(dt.Rows[i]["F26"]);
                itemrow.Description = string.Empty;//dt.Rows[i]["F26"].ToString();
                itemrow.Amount      = Convert.ToDecimal(dt.Rows[i]["F9"]);
                itemrow.Price       = Convert.ToDecimal(dt.Rows[i]["F9"]);
                itemrow.VAT         = Convert.ToDecimal(dt.Rows[i]["F21"]);
                itemrow.Total       = Convert.ToDecimal(dt.Rows[i]["F24"]);
                ItemRowList.Add(itemrow);
            }
            return(ItemRowList);
        }
Exemplo n.º 24
0
    private LoopListViewItem2 OnGetItemByIndex(LoopViewBase listView, int rowIndex)
    {
        if (rowIndex < 0)
        {
            return(null);
        }
        //create one row
        LoopListViewItem2 item       = listView.NewListViewItem("ItemPrefab");
        ItemRow           itemScript = item.GetComponent <ItemRow>();

        if (item.IsInitHandlerCalled == false)
        {
            item.IsInitHandlerCalled = true;
        }
        itemScript.Init(rowIndex, dataCenter);
        return(item);
    }
Exemplo n.º 25
0
        /// <summary>
        /// Generates the test without VAT or discount.
        /// </summary>
        public void GenerateTestWithoutVAT()
        {
            byte[] image         = LoadImage("vodafone.jpg");
            string imageFilename = MigraDocFilenameFromByteArray(image);

            var invoice = new InvoicerApi(SizeOption.A4, OrientationOption.Landscape, "£")
                          .TextColor("#CC0000")
                          .BackColor("#FFD6CC")
                          .Image(imageFilename, 125, 27)
                          .Company(Address.Make(
                                       "FROM",
                                       new string[] {
                "Vodafone Limited",
                "Vodafone House",
                "The Connection",
                "Newbury",
                "Berkshire RG14 2FN"
            },
                                       "1471587",
                                       null,
                                       new string[] {
                "Vodafone Limited. Registered in England and Wales No. 1471587.",
                "Registered office: Vodafone House, The Connection, Newbury, Berkshire RG14 2FN."
            }))
                          .Client(Address.Make("INVOICE TO", new string[] { "Isabella Marsh", "Overton Circle", "Little Welland", "Worcester", "WR## 2DJ" }))
                          .Items(new List <ItemRow> {
                ItemRow.Make("Nexus 6", "Midnight Blue", (decimal)1, (decimal)199.99, (decimal)199.99),
                ItemRow.Make("24 Months (£22.50pm)", "100 minutes, Unlimited texts, 100 MB data 3G plan with 3GB of UK Wi-Fi", (decimal)1, (decimal)432.00, (decimal)432.00),
                ItemRow.Make("Special Offer", "Free case (blue)", (decimal)1, (decimal)0, (decimal)0),
            })
                          .Totals(new List <TotalRow> {
                TotalRow.Make("Total", (decimal)631.99, true),
            })
                          .Details(new List <DetailRow> {
                DetailRow.Make("PAYMENT INFORMATION", "Make all cheques payable to Vodafone UK Limited.", "", "If you have any questions concerning this invoice, contact our sales department at [email protected].", "", "Thank you for your business.")
            })
                          .Footer("http://www.vodafone.co.uk");

            using (var stream = invoice.Get())
            {
                using (var fs = new FileStream("fs.pdf", FileMode.Create))
                {
                    stream.CopyTo(fs);
                }
            }
        }
Exemplo n.º 26
0
        private LoopListViewItem2 OnUpdate(LoopListView2 _view, int _index)
        {
            if (_index < 0)
            {
                return((LoopListViewItem2)null);
            }
            LoopListViewItem2 loopListViewItem2 = _view.NewListViewItem(((Object)this.original).get_name());
            ItemRow           itemRow           = loopListViewItem2 as ItemRow;

            if (Object.op_Implicit((Object)itemRow))
            {
                for (int _index1 = 0; _index1 < this.countPerRow; ++_index1)
                {
                    int index = _index * this.countPerRow + _index1;
                    itemRow.SetData(_index1, this.fileInfos.SafeGet <AddUICtrl.FileInfo>(index), (Action)(() => this.Select = index), this.Select == index);
                }
            }
            return(loopListViewItem2);
        }
Exemplo n.º 27
0
        private void ComputeOutQuantityForEachItems()
        {
            _items = _itemService.AllActiveItems();

            foreach (var item in _items)
            {
                ItemRow row = new ItemRow();
                row.Id       = item.Id;
                row.ItemName = item.Name;

                foreach (var daySection in _range)
                {
                    DailyInOut dInOut = ComputeDailyInOut(daySection, item.Id);
                    row.DailyInOuts.Add(dInOut);
                }

                _itemRows.Add(row);
            }
        }
Exemplo n.º 28
0
        private void DisplayItem(ItemRow row)
        {
            IXLWorksheet tempSheet = _currentSheet == InOrOut.In ? _sheetForIn : _sheetForOut;

            var id = tempSheet.Cell(_rowIndex, 1);

            id.Value = row.Id;

            var itemName = tempSheet.Cell(_rowIndex, 2);

            itemName.Value = row.ItemName;

            foreach (var d in _daySections)
            {
                DisplayQty(d, row);
            }

            DisplayTotal(row);
        }
Exemplo n.º 29
0
    public void CheckoutButtonOnClickListener()
    {
        this.gameObject.SetActive(false);
        checkoutPanel.gameObject.SetActive(true);

        //Rebuild the list of rows in the checkout panel
        checkoutPanel.itemList.RemoveAllRows();
        foreach (ItemRow row in itemList.GetRows())
        {
            ItemRow newRow = checkoutPanel.itemList.AddItem(row);
            newRow.UpdatePriceText();
        }

        //Send all data to the checkout panel
        checkoutPanel.itemList.SetItemTotal(this.itemList.GetItemTotal());
        checkoutPanel.itemList.SetPriceSubtotal(this.itemList.GetPriceSubtotal());
        checkoutPanel.itemList.SetTaxTotal(this.itemList.GetTaxTotal());
        checkoutPanel.SetTransactionNumber(GetTransactionNumber());
        checkoutPanel.SetTransaction(transaction);
    }
Exemplo n.º 30
0
        private void BillingRow(Table table, ItemRow item)
        {
            Row row = table.AddRow();

            row.Style         = "TableRow";
            row.Shading.Color = MigraDocHelpers.BackColorFromHtml(Invoice.BackColor);

            Cell cell = row.Cells[COLUMN_PRODUCT];

            cell.AddParagraph(item.Name, ParagraphAlignment.Left, "H2-9B");
            if (!String.IsNullOrEmpty(item.Description))
            {
                cell.AddParagraph(item.Description, ParagraphAlignment.Left, "H2-9-Grey");
            }

            cell = row.Cells[COLUMN_QTY];
            cell.VerticalAlignment = VerticalAlignment.Center;
            cell.AddParagraph(item.Quantity.ToCurrency(), ParagraphAlignment.Right, "H2-9");

            cell = row.Cells[COLUMN_UNITPRICE];
            cell.VerticalAlignment = VerticalAlignment.Center;
            cell.AddParagraph(item.Price.ToCurrency(Invoice.Currency), ParagraphAlignment.Right, "H2-9");

            cell = row.Cells[COLUMN_TOTAL];
            cell.VerticalAlignment = VerticalAlignment.Center;
            cell.AddParagraph(item.Total.ToCurrency(Invoice.Currency), ParagraphAlignment.Right, "H2-9");

            if (Invoice.Company.HasVatNumber)
            {
                cell = row.Cells[COLUMN_VATPERCENT];
                cell.VerticalAlignment = VerticalAlignment.Center;
                cell.AddParagraph(item.VAT.ToCurrency(), ParagraphAlignment.Right, "H2-9");
            }

            if (Invoice.HasDiscount)
            {
                cell = row.Cells[COLUMN_DISCOUNT];
                cell.VerticalAlignment = VerticalAlignment.Center;
                cell.AddParagraph(item.Discount, ParagraphAlignment.Right, "H2-9");
            }
        }
Exemplo n.º 31
0
 public ItemInstanceRow AddItemInstanceRow(ItemRow parentItemRowByFK_Item_ItemInstance, string FullPath) {
     ItemInstanceRow rowItemInstanceRow = ((ItemInstanceRow)(this.NewRow()));
     object[] columnValuesArray = new object[] {
             null,
             FullPath};
     if ((parentItemRowByFK_Item_ItemInstance != null)) {
         columnValuesArray[0] = parentItemRowByFK_Item_ItemInstance[0];
     }
     rowItemInstanceRow.ItemArray = columnValuesArray;
     this.Rows.Add(rowItemInstanceRow);
     return rowItemInstanceRow;
 }
Exemplo n.º 32
0
 public void RemoveItemRow(ItemRow row) {
     this.Rows.Remove(row);
 }
Exemplo n.º 33
0
 public void AddItemRow(ItemRow row) {
     this.Rows.Add(row);
 }
Exemplo n.º 34
0
 public ItemRowChangeEvent(ItemRow row, global::System.Data.DataRowAction action) {
     this.eventRow = row;
     this.eventAction = action;
 }
Exemplo n.º 35
0
 public PictureRow AddPictureRow(ItemRow parentItemRowByFK_Item_Picture, string Filename) {
     PictureRow rowPictureRow = ((PictureRow)(this.NewRow()));
     object[] columnValuesArray = new object[] {
             null,
             Filename};
     if ((parentItemRowByFK_Item_Picture != null)) {
         columnValuesArray[0] = parentItemRowByFK_Item_Picture[0];
     }
     rowPictureRow.ItemArray = columnValuesArray;
     this.Rows.Add(rowPictureRow);
     return rowPictureRow;
 }