Beispiel #1
0
        private void printInvoice(string client)
        {
            List <string> column = new List <string> {
                "Bike", "Size", "Color", "Quantity", "Price"
            };
            var unselectedData = _currentUser.GetCartList();
            List <List <string> > selectedData = new List <List <string> >();

            foreach (var elem in unselectedData)
            {
                List <string> row = new List <string> {
                    elem[0], elem[1], elem[2], elem[3], elem[4]
                };
                selectedData.Add(row);
            }
            ExportData.CreateInvoice(client, column, selectedData);
        }
Beispiel #2
0
        private void printInvoice(string client)
        {
            List <string> column = new List <string>();

            column.Add("ID Part");
            column.Add("Name");
            column.Add("Provider");
            column.Add("Quantity");
            column.Add("Price");
            List <List <string> > selectedData = new List <List <string> >();

            foreach (var elem in user.cartPart)
            {
                List <string> row = new List <string>();
                row.Add(elem.part.part_Id.ToString());
                row.Add(elem.part.name);
                row.Add(elem.part.provider);
                row.Add(elem.quantity.ToString());
                row.Add(elem.price.ToString());
                selectedData.Add(row);
            }
            ExportData.CreateInvoice(client, column, selectedData);
        }