Exemple #1
0
        static string GenerateFile()
        {
            string fnm = Path.Combine(Path.GetTempPath(), DateTime.Now.ToString("ddMMyyyy") + ".txt");

            File.AppendAllText(fnm, "");
            foreach (var s in dl.GetSalesForPost())
            {
                File.AppendAllText(fnm, Barcode.BarcodeWithCheckSum(s.SaleId) + ";"
                                   + s.CustomerName + ";"
                                   + s.CustomerPhone + ";"
                                   + s.DeliveryAddress + ";"
                                   + s.DeliveryCity + ";"
                                   + s.DeliveryZip + ";"
                                   + s.DeliveryCountry + "\r\n");
            }

            return(fnm);
        }