如何跟踪存折中的打印行号 [英] How to keep track of printed line numbers in a passbook

查看:94
本文介绍了如何跟踪存折中的打印行号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好



我在存折中打印了一笔交易。

打印部分很好,但如何跟踪在存折上​​打印的行号.. ??



例如银行每页限制为10笔交易..

最后一页打印是4行。



所以下次应该开始从第5行开始..





请知道如何做到这一点..

Hi all

I got a work of printing transactions in a passbook.
printing part is fine but how to keep track of the line number printed at passbook..??

e.g. bank has a limit of 10 transactions per page..
last printed in a page is 4 line.

so next time it should start from 5th line..


Please need some idea how to do that..

推荐答案

我猜你有某种抽象/类代表交易或交易集合(我的意思是收集一般)。



我想你还需要一本存折的抽象,它可以保存页数,每页的交易次数(例如你的10),最后一次页面使用,最后一行使用等 - 这可以扩展,例如,如果第一页是'存折所有者详细信息'页面



您可能需要序列化存折类所以它可以存储,或者有一个数据库映射层等等。然后打印机类使用存折类的实例,从文件加载数据/ disk / deserialzed,以及一个事务实例.....



这真的不太难
I guess you have some sort of abstraction/class that represents a transaction or collection of transactions (and I mean collection generically).

I guess you'll also need an abstraction for a passbook, that keeps the number of pages, number of transactions per page (eg 10 in your case), last page used, last line used etc - this could be extended for example, if the 1st page was a 'passbook owners details' page

You'd likely need to serialize the passbook class so it can be stored, or have a database mapping layer or such

The printer class then uses an instance of the passbook class, with data loaded from file/disk/deserialzed, and an instance of the transactions.....

It really doesn't seem hard


这篇关于如何跟踪存折中的打印行号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆