资源简介
C# 小票打印代码,支持市面上常用的小票打印机
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using SLDESS.Helper;
using System.Drawing.Printing;
namespace zc_pos_client
{
public class pos_printer
{
public string header_ = frmSystemSet.get_value(frmSystemSet.key_title_ “中储万能POS“);
public string foot_ = frmSystemSet.get_value(frmSystemSet.key_foot_ ““);
public string saild_id_ = “201210220001“;
public string date_ = DateTime.Now.ToString();
public List> datas_ = new List>();
public string num_ = “5“;
public string total_ = “0.00“;
public string discount_ = “5.00“;
public string amount_ = “43.00“; // 应收金额
public string recv_cash_ = “45.00“; // 收款金额
public string ret_cash = “2.00“; // 找零金额
public string card_no_ = “350104198311155470“; // 会员卡号
public string mark_in_ = “43“; // 本次积分
public string mark_available_ = “5000“; // 可用积分
public string car_use_ = “0.00“; // 卡 消 费
public string car_available_ = “300.00“; // 可用余额
private System.Windows.Forms.PrintPreviewDialog printv_pos = null;
private System.Drawing.Printing.PrintDocument printd_pos = null;
public pos_printer()
{
this.printv_pos = new System.Windows.Forms.PrintPreviewDialog();
this.printd_pos = new System.Drawing.Printing.PrintDocument();
this.printv_pos.AutoScrollMargin = new System.Drawing.Size(0 0);
this.printv_pos.AutoScrollMinSize = new System.Drawing.Size(0 0);
this.printv_pos.ClientSize = new System.Drawing.Size(400 300);
this.printv_pos.Document = this.printd_pos;
this.printv_pos.Enabled = true;
// this.printv_pos.Icon = ((System.Drawing.Icon)(resources.Getobject(“printv_pos.Icon“)));
this.printv_pos.Name = “printPreviewDialog1“;
this.printv_pos.Visible = false;
//
// printd_pos
//
this.printd_pos.DocumentName = “中储POS小票“;
this.printd_pos.OriginAtMargins = true;
this.printd_pos.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printd_pos_PrintPage);
datas_.Clear();
for (int i = 0; i < 5; i++)
{
List item1 = new List();
this.datas_.Add(item1);
item1.Add(“商品名称“);
item1.Add(“6913027817039“);
item1.Add(“1.0“);
item1.Add(“25.00“);
item1.Add(“25.00“);
}
}
private int getYc(double cm)
{
return (int)(cm / 25.4) * 100;
}
public string GetPrintStr()
{
StringBuilder sb = new StringBuilder()
相关资源
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
- 基于c#的实验室设备管理系统621530
- C# 使用ListView控件实现图片浏览器(源
- C#简单窗体聊天程序
评论
共有 条评论