private void RepeatPrint(string strSerial) { CommAccess cs = new CommAccess(SysInitial.ConString); Exception err; DataTable dtConsItem = cs.GetConsItemBySerial(out err, strSerial); if (err != null) { MessageBox.Show("查询消费明细出错,请与管理员联系!", "系统提示", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); clog.WriteLine(err); dtConsItem = new DataTable(); } DataTable dtBill = cs.GetBillBySerial(out err, strSerial); if (err != null) { MessageBox.Show("查询小票信息出错,请与管理员联系!", "系统提示", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); clog.WriteLine(err); dtBill = new DataTable(); } DataRow dr = dtBill.Rows[0]; CMSMData.CMSMStruct.ConsItemStruct cis = new CMSMData.CMSMStruct.ConsItemStruct(); cis.strCardID = dr["vcCardId"].ToString(); string strConsType = dr["vcConsType"].ToString(); cis.strConsType = strConsType; cis.dTRate = Convert.ToDouble(dr["nTRate"].ToString()); cis.dFee = Convert.ToDouble(dr["nFee"].ToString()); cis.dPay = Convert.ToDouble(dr["nPay"].ToString()); cis.dBalance = Convert.ToDouble(dr["nBalance"].ToString()); cis.iIgValue = Convert.ToInt32(dr["iIgValue"].ToString()); cis.strOperName = dr["vcOperName"].ToString(); cis.strOperDate = dr["dtConsDate"].ToString(); cis.strDeptID = dr["vcDeptId"].ToString(); CMSMData.CMSMStruct.CardHardStruct chs = new CMSMData.CMSMStruct.CardHardStruct(); switch (strConsType) { case "PT001": //会员刷卡 this.AssConsPrint(chs, cis, cs, strSerial, dtConsItem, cis.dFee); break; case "PT002": //支付现金 this.RetailConsPrint(cis, cs, strSerial, dtConsItem, cis.dFee, cis.dPay, cis.dBalance, cis.dTRate); break; case "PT003": //积分兑换 dtConsItem.Columns["Price"].ColumnName = "IgValue"; dtConsItem.Columns["Fee"].ColumnName = "IgPay"; this.AssIgPrint(chs, cis, cs, strSerial, dtConsItem, cis.dFee); break; case "PT004": //赠送商品 this.AssGiftPrint(chs, cis, cs, strSerial, dtConsItem, cis.dFee); break; case "PT005": this.RetailConsPrint(cis, cs, strSerial, dtConsItem, cis.dFee, cis.dPay, cis.dBalance, cis.dTRate); break; case "PT006": this.RetailConsPrint(cis, cs, strSerial, dtConsItem, cis.dFee, cis.dPay, cis.dBalance, cis.dTRate); break; case "PT007": this.RetailConsPrint(cis, cs, strSerial, dtConsItem, cis.dFee, cis.dPay, cis.dBalance, cis.dTRate); break; case "PT008": this.RetailConsPrint(cis, cs, strSerial, dtConsItem, cis.dFee, cis.dPay, cis.dBalance, cis.dTRate); break; } }