コード例 #1
0
ファイル: PrintChangeCheck.cs プロジェクト: zhenghua75/CMSM
        public void Print(PrintElement element)
        {
            //element.AddSeat(cnvcBillType);
            element.AddHorizontalRule();
            element.AddData("小票类型", cnvcDateType);
            element.AddHorizontalRule();

            element.AddData("现金充值次数", cnvcFillCount);
            element.AddData("现金充值金额", cnvcFillFee);
            element.AddData("银行卡充值次数", cnvcFillCountBank);
            element.AddData("银行卡充值金额", cnvcFillFeeBank);
            element.AddData("消费次数", cnvcConsCount);
            element.AddData("现金零售金额", cnvcRetail);
            element.AddData("银行卡零售金额", cnvcRetailBank);
            element.AddData("会员消费金额", cnvcAssCons);
            element.AddData("回收卡数", cnvcRoll);
            element.AddData("回收退款金额", cnvcRollSum);
            element.AddData("赠送次数", cnvcLargCount);
            element.AddHorizontalRule();
            element.AddData("现金总额", cnvcCash);
            element.AddHorizontalRule();

            element.AddData("操作员", cnvcOperName);
            element.AddData("操作时间", cnvcOperDate);
            element.AddData("操作部门", cnvcDeptName);
            element.AddBlankLine();
            element.AddBlankLine();
            element.AddBlankLine();
            element.AddHorizontalRule();
        }
コード例 #2
0
        public void Print(PrintElement element)
        {
            element.AddHorizontalRule();
            element.AddData("小票类型", strDateType);
            element.AddHorizontalRule();
            element.AddData("新增会员数", strNewAssCount);
            element.AddData("挂失会员数", strLostAssCount);
            element.AddData("充值次数", strFillFeeCount);
            element.AddData("充值金额", strFIllFee);
            element.AddData("银联卡充值", strBankFillFee);
            element.AddData("会员消费次数", strAssConsCount);
            element.AddData("会员消费金额", strAssCons);
            element.AddData("零售次数", strRetailCount);
            element.AddData("零售金额", strRetail);
            element.AddHorizontalRule();
            element.AddData("现金汇总", strSum);
            element.AddHorizontalRule();

            element.AddData("操作员", strOperName);
            element.AddData("操作时间", strOperDate);
            element.AddData("操作部门", strDeptName);
            element.AddBlankLine();
            element.AddBlankLine();
            element.AddBlankLine();
            element.AddHorizontalRule();
        }
コード例 #3
0
        protected override void OnPrintPage(PrintPageEventArgs e)
        {
            float headerHeight = 20;

            Header.Draw(this, 20, e.Graphics, e.MarginBounds);
            Rectangle pageBounds = new Rectangle(5,
                                                 (int)(e.MarginBounds.Top + headerHeight), e.MarginBounds.Width,
                                                 (int)(e.MarginBounds.Height - headerHeight));
            float yPos           = 50;
            int   elementsOnPage = 0;

            while (_printIndex < _printElements.Count)
            {
                PrintElement element = (PrintElement)_printElements[_printIndex];

                float height = element.CalculateHeight(this, e.Graphics);

                element.Draw(this, yPos, e.Graphics, pageBounds);

                yPos += height;

                _printIndex++;
                elementsOnPage++;
            }
        }
コード例 #4
0
        protected override void OnBeginPrint(PrintEventArgs e)
        {
            _printElements = new ArrayList();
            _pageNum       = 0;
            _printIndex    = 0;

            foreach (IPrintable printObject in _printObjects)
            {
                PrintElement element = new PrintElement(printObject);
                _printElements.Add(element);

                printObject.Print(element);
            }
        }
コード例 #5
0
        // Print...
        public void Print(PrintElement element)
        {
            element.AddSeat(cnvcBillType);
            element.AddHorizontalRule();

            element.AddData("会员卡号", cnvcMemberCardNo);
            element.AddData("会员名称", cnvcMemberName);
            element.AddHorizontalRule();
            element.AddData("上次余额", cnnLastBalance.ToString("F2"));
            element.AddData("充值金额", cnnPrepay.ToString("F2"));
            element.AddData("赠送金额", cnnDonate.ToString("F2"));
            element.AddData("当前余额", cnnBalance.ToString("F2"));
            element.AddText("谢谢惠顾!  " + cnvcDeptName);
            element.AddData("服务电话", cnvcTel);
            element.AddData("操作员", cnvcOperName);
            element.AddData("操作时间", cndOperDate.ToString("yyyy-MM-dd HH:mm"));
            element.AddBlankLine();
            element.AddBlankLine();
            element.AddBlankLine();
            element.AddHorizontalRule();
        }
コード例 #6
0
        public void Print(PrintElement element)
        {
            element.AddText("谢谢惠顾!  " + this.strDeptName);
            element.AddData("日期", this.strOperDate);
            element.AddData("小票号", this.strSerial);
            if (this.strCardId.Length > 0)
            {
                element.AddData("卡号", this.strCardId);
            }
            if (this.dLastBalance > 0)
            {
                element.AddData("上次余额", this.dLastBalance.ToString("F2"));
            }
            if (this.strComment.Length > 0)
            {
                element.AddData(this.strComment, this.dBalance.ToString("F2"));
            }
            if (this.dIg > 0)
            {
                element.AddData("当前积分", this.dIg);
            }
            if (this.strTel.Length > 0)
            {
                element.AddData("服务电话", this.strTel);
            }
            element.AddHorizontalRule();

            if (dtConsItem.Rows.Count > 0)
            {
                element.AddFourText("商品名称", "单价", "数量", "小计");
                foreach (DataRow dr in dtConsItem.Rows)
                {
                    element.AddFourText(dr["GoodsName"].ToString(), Convert.ToDouble(dr["Price"]).ToString("F2"), dr["Count"].ToString(), Convert.ToDouble(dr["Fee"]).ToString("F2"));
                }
            }
            if (dtIgItem.Rows.Count > 0)
            {
                element.AddFourText("商品名称", "积分", "数量", "小计");
                foreach (DataRow dr in dtIgItem.Rows)
                {
                    element.AddFourText(dr["GoodsName"].ToString(), Convert.ToDouble(dr["IgValue"]).ToString("F2"), dr["Count"].ToString(), Convert.ToDouble(dr["IgPay"]).ToString("F2"));
                }
            }
            element.AddHorizontalRule();
            element.AddData("合计", this.dSum.ToString("F2"));

            if (this.dDiscount > 0)
            {
                element.AddData("折扣", this.dDiscount);
            }
            element.AddData(this.strPayType, this.dPay.ToString("F2"));
            element.AddData("找零", this.dCharge);
            element.AddHorizontalRule();
            if (dtNewItem.Rows.Count > 0)
            {
                element.AddText(this.strDeptName + "推荐新品:");
                element.AddTwoText("商品名称", "单价");
                foreach (DataRow dr in dtNewItem.Rows)
                {
                    element.AddTwoText(dr["vcGoodsName"].ToString(), dr["nPrice"].ToString());
                }
            }

            element.AddBlankLine();
            element.AddBlankLine();
            element.AddBlankLine();
            element.AddBlankLine();
            element.AddBlankLine();
            element.AddBlankLine();
            //element.AddHorizontalRule();
        }
コード例 #7
0
 public PrintEngine(string title)
 {
     Header = new PrintElement(null);
     Header.AddTitle(title);
     Header.AddHorizontalRule();
 }