123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- // 定义 PropertyChangedEventHandler 类型
- type PropertyChangedEventHandler = (sender: any, event: { propertyName: string }) => void;
-
- // 模拟 IEntity 接口,由于未提供具体定义,这里留空
- interface IEntity {}
-
- // 定义 PrintDataLimit 类
- class PrintDataLimit implements IEntity {
- // 定义 PropertyChanged 事件
- private _propertyChanged?: PropertyChangedEventHandler;
- public get PropertyChanged(): PropertyChangedEventHandler | undefined {
- return this._propertyChanged;
- }
- public set PropertyChanged(value: PropertyChangedEventHandler | undefined) {
- this._propertyChanged = value;
- }
-
- // 表单id
- private formid: string = '';
- // 表单名称
- private formname: string = '';
- // 交易号
- private tradeno: string = '';
- // 表单索引
- private formindex: string = '';
- // 授权级别
- private authlvl: string = '';
- // 打印控制标志
- private printflag: string = '';
-
- public get Formid(): string {
- return this.formid;
- }
- public set Formid(value: string) {
- this.formid = value;
- if (this._propertyChanged) {
- this._propertyChanged(this, { propertyName: 'Formid' });
- }
- }
-
- public get Formname(): string {
- return this.formname;
- }
- public set Formname(value: string) {
- this.formname = value;
- if (this._propertyChanged) {
- this._propertyChanged(this, { propertyName: 'Formname' });
- }
- }
-
- public get Tradeno(): string {
- return this.tradeno;
- }
- public set Tradeno(value: string) {
- this.tradeno = value;
- if (this._propertyChanged) {
- this._propertyChanged(this, { propertyName: 'Tradeno' });
- }
- }
-
- public get Formindex(): string {
- return this.formindex;
- }
- public set Formindex(value: string) {
- this.formindex = value;
- if (this._propertyChanged) {
- this._propertyChanged(this, { propertyName: 'Formindex' });
- }
- }
-
- public get Authlvl(): string {
- return this.authlvl;
- }
- public set Authlvl(value: string) {
- this.authlvl = value;
- if (this._propertyChanged) {
- this._propertyChanged(this, { propertyName: 'Authlvl' });
- }
- }
-
- public get Printflag(): string {
- return this.printflag;
- }
- public set Printflag(value: string) {
- this.printflag = value;
- if (this._propertyChanged) {
- this._propertyChanged(this, { propertyName: 'Printflag' });
- }
- }
-
- public ChangeFromTable(parms: any[]): void {
- this.Formid = parms[0].toString();
- this.Formname = parms[1].toString();
- this.Tradeno = parms[2].toString();
- this.Formindex = parms[3].toString();
- this.Authlvl = parms[4].toString();
- this.Printflag = parms[5].toString();
- }
-
- public ChangeToTable(): string[] {
- return [this.Formid, this.Formname, this.Tradeno, this.Formindex, this.Authlvl, this.Printflag];
- }
- }
-
- export { PrintDataLimit };
|