2017-01-20 21 views
0

我正在使用windows的POS应用程序中工作。我在写收据时遇到问题。这里缺少格式。任何人都可以帮助我解决这个问题。Pos应用程序中的打印收据

+1

您的收据格式请 – archit

+0

什么问题和哪种语言?细节将真正赞赏。谢谢 – archit

回答

0

您可以在C#中创建一个表格,并在解析数据时将数据添加到每个框中。

using System; 
using System.Data; 

class Program 
{ 
    static void Main() 
    { 
     // Get the DataTable. 
     DataTable table = GetTable(); 
     // ... Use the DataTable here with SQL. 
    } 

    /// <summary> 
    /// This example method generates a DataTable. 
    /// </summary> 
    static DataTable GetTable() 
    { 
     // Here we create a DataTable with four columns. 
     DataTable table = new DataTable(); 
     table.Columns.Add("Dosage", typeof(int)); 
     table.Columns.Add("Drug", typeof(string)); 
     table.Columns.Add("Patient", typeof(string)); 
     table.Columns.Add("Date", typeof(DateTime)); 

     // Here we add five DataRows. 
     table.Rows.Add(25, "Indocin", "David", DateTime.Now); 
     table.Rows.Add(50, "Enebrel", "Sam", DateTime.Now); 
     table.Rows.Add(10, "Hydralazine", "Christoff", DateTime.Now); 
     table.Rows.Add(21, "Combivent", "Janet", DateTime.Now); 
     table.Rows.Add(100, "Dilantin", "Melanie", DateTime.Now); 
     return table; 
    } 
} 

,然后使表invisible.Hope的边界这有助于

0

您可以创建一个回执单,并放置一个网格就可以了。
根据需要在每个单元格中为标签创建尽可能多的网格行和列。
分别指定列和行的宽度和高度。

这样所有的列都会正确对齐。