Вы находитесь на странице: 1из 510

-

MICROSOFT
BUSINESS SOLUTIONS 3.0

2005

004
32.97
70

.
.

.
70

- Microsoft Business Solutions


Axapta 3.0 / , . .:
, 2005. 503 .
ISBN 5-9614-0108-1
Microsoft
Business Solutions Axapta. ,
-,

, .
.
,
. ,
, ,
. ,
Microsoft
Business Solutions Axapta.
, .
,
, .
004
32.97




.
.



.

ISBN 5-9614-0108-1

., ., 2005
,
, 2005

I.

11

12

MorphX

15

17
20
25

MorphX

35

++

MorphX

35
38
41
43
45

50

I I .

55

++

56

58

++
++

(Enum)

58
59
60
62
64
65
68
70
72
74
78
80
82
85
87








++

if

switch
if switch

while
do while
for
break
continue

++ SQL
while select

insert
update
delete
SQL






forUpdate

try
throw


#undef

90
90
90
93
97
98
99
101
102
103
104
104
105
106
107
108
108
108
109
110
110
111
114
115
116
117
119
121
123
123
124
125
125
125
126
126
127
127
128
130
132
133
133

134

134
134
137
138
139





:
















ActiveX
Animate
Button
ButtonGroup
CheckBox
ComboBox
CommandButton
DateEdit
Grid
Group
HTML
IntEdit
ListBox
ListView
MenuButton
MenultemButton
Progress
RadioButton
RealEdit
Separator
StaticText
StringEdit
Tab
Table
TabPage
TimeEdit
Tree
Window

140
141
142
143
159
161
163
165
166
167
168
168
170
171
171
172
173
173
174
175
175
177
178
178
178
178
178
178
178
179
179
179
179
179
180
180
180
180
180
180
180
180
181
181
181
181
182
183


display-









++



Lookup

AutoLookup

:











++




this




++


:

184
188
189
191
191
192
193
194
194
194
195
195
195
196
197
198
198
200
201
202
202
204
204
221
222
222
224
224
225
226
226
228
230
230
231
232
232
233
234
235
236
237
238
239
241
242
242
244
245
247

| 7




++
:












:

:

252
252
253
254
255
256
261
263
264
266
267
267
268
271
272
272
273
274
275
277
279
283

I I I . ?

287

288



Microsoft Axapta

MS SQLServer
Oracle

288
289
293
294
294
300
300

301
301
311
316

RunBase


API

ActiveX WinAPI

316
319
321
324
339
343

347

347
359

362
369
370

375

Best Practices

396

Microsoft Axapta
Best Practices
Best Practices

Best Practices

396
398
399
401
405
418
421

web-

422

439

451


Add-ins
++



















EBNF

459
459
461
462
464
464
465
466
467
468
468
470
472
472
473
481
481
482
482
484
486
487
488
500
502


Microsoft
Axapta
.
Microsoft Axapta ERP- , ,
,
.
, ERP (Enterprise Resource Planning)
Gartner Group 1990-
, ERP
.
,
, ,
.
Microsoft Axapta
MorphX , , ,
. -
++,
: Java, C++,
SQL. Java
, +
, SQL
. -

.
,
Microsoft Axapta.
,
.
, ,
Component Object Model (COM)
web-.
,
.

10

.
, .
Microsoft Axapta.
, ,
-, , Microsoft Axapta,
,
.
,
,
.
.
, , , ,
.
,
(-) Microsoft Axapta.
. ,
,
. ,
,
.
,
,
Best Practices,
web- Microsoft Axapta.
CD-ROM,
,
. Microsoft
Axapta 3.0 SP3.
,
:
,
,
,
,
,
(Michael Holm),
,
.
, ,
: axdevelopment@hotmail.com.

Microsoft
Axapta, .

,
Microsoft
Axapta.
, ++, .
,

.
, ,
,
.


Microsoft Axapta :

Axapta Client ,

,
Ax32.exe.

Application (Application Object Database)


( ), ,
, -
. ,

.

.


MSDE, MS SQL Oracle.
.
;
, .
Microsoft Axapta -
.
Microsoft SQL Server Oracle
Database.

Axapta Configuration Utility


Axconfig.exe,
( ,
..).
.

Axapta Object Server Axapta,


,

.

,
, 2- 3-
(2- 3- ).



.


,

-.




ODBC/
OLE MS SQL Server OCI
. 1.
Oracle Database.



,
(Intelligent Client), Axapta Object Server (
AOS) .
Micro
soft Axapta





.



.
,
,

,
. 2.

13

I.


- .

. ,
,
,
.

, :
,
AOS.


MorphX
MorphX
-,

.
MorphX :

: ,
,
;

drag-and-drop
;

- ,

;


-
++ ;

, , , -
, , , ,
, ,
Microsoft Axapta,

- . MorphX
, , -

16

| I.

, ,
.

,
(Application Object Tree, AOT).
,
.
,
: ,
, ,
,
.
drag-and-drop
,
.
- Microsoft Axapta
- ++. ++
, Java.
++ .

,
.

.
Microsoft Axapta
. ,
.
, 10 20
,
.
Microsoft Axapta
,
.
.
.
, ,
.
, ,

.
,
,
.

MorphX



.
, .

(Application Object Tree, AOT),

,
.

,

.

.
,

.

, ,
. .
.


.
, ;
.


.

.

. ,
,
.


, ,
,
.
4594

17

18

I.

.
, : ,
.
(Form)
.

. ,
, .

,
.


MorphX , :

. 4.

,


.
, .

.
,
.


,
.

. 1.

Data Dictionary

Data Dictionary

Macros

,
, ,
(job), .
Macros , .

MorphX

Classes

Classes
, ,
.

.

Forms

Forms ,

Reports


. Reports

Queries

Jobs

++,

Menus

Menus

Menu Items

Menu Items ,
.

Web

Web web- Microsoft Axapta

Resources

: , ,

System
Documentation

System Documentation

Application
Developer
Documentation

Application Developer Documentation


Application
Documentation

Application Documentation
Microsoft Axapta.


.

.
.

20

I.



.
.
.
, .
.


,
.
++.


-.

. , .



, .
,
. ,
, .

.



Microsoft Axapta.
.
16 . 8 8
.



Microsoft Axapta.

MorphX

. 5.

Appl. object layer .


Code Confirm .
, Microsoft Axapta
USR.
, ,
.
- .

. 6.


Microsoft Axapta,
,
, ,
,
,

.

21

22

I.


Axapd.aoi
,
. USR ,
SYS . ,
, , Microsoft Axapta
USR, CUS, VAR
SYS. , .

. 7.


,
. SYS, SYP, GLS GLP.
Microsoft Business
Solutions. SYS, System,
. GLS (Global Solutions)
.

, .
Microsoft Axapta.
,
.
SYP GLP SYS GLS,
.

MorphX

| 23

,
.


DIS, DIP, LOS, LOP,
Microsoft Business Solutions.
DIS (Distributor)
,

.
.
Microsoft Business Solutions
,
.
LOS (Local Solution).

.
DIP LOP,
,
DIS LOS.

-
BUS, BUP, VAR VAP, ,
, Microsoft Axapta,
. BUS
(Business), BUP,
(, )
( )
. VAR (Value Added Resellers) VAP

.


Microsoft Business Solutions, Microsoft Axapta,

. CUS,
CUP, USR USP.
, , ,
, -. ,
, - BUS

24

| I.

VAR, ,
.
CUS (Customer)
. ,
,
,
USR (User). CUS ,
. USR
.

CUP USP.
.


. : SYP, GLP, DIP, LIP, BUP, VAP, CUP USP.
Microsoft Business Solutions,
.
Microsoft Business Solutions
.

: ,
, , , , ..

.
,
.
Appl Microsoft
Axapta : < >.!,
Axsys.aod SYS, Axdis.aod DIS ..
.aod Application Object Data
. ,
,
.
: .


, ,
USR USP, ,
. , -

MorphX

SYS, SYS-.
SYP.
, .
USR USP,
, . -,

Microsoft Axapta.


Microsoft Axapta
( , .),
,
.


.

- (en-us).
,
.
.
, .
, ,
- ,
.

,
. ++

,
.

, ,

. ,

aid

.
, ,
. 8.
Microsoft Axapta,

25

26

I.

.
, Microsoft
Axapta.

aid
.
Microsoft Axapta
Appl ,
.
aid (Application Label Data).
:
<
.
.
.

Microsoft Axapta ,
, AxSYSen-us.ald, AxGLPen-us.ald, AxDISru.ald
. , ,
. , ,
.


.

Microsoft Axapta. ,
.

,
. , en-us ,
, en-gb
, . AxSYSenus.ald AxSYSru.ald ,

. : AxSYSen-us.ald
, AxSYSru.ald .

.

MorphX

, ,
, .
@,
. ,
AxSYPru.ald @SYP0
Microsoft Business Solutions-Axapta 3.0 Build #1951.3730/514-193 SP3.
.

. 9.

,
, .
,
. AxSYPen-us.ald,
, AxSYPru.ald,
.

. 10.

27

28

I.


Language
Microsoft Axapta.
RFC 1766: < >
< >, < >
ISO 639-1 ( ), < >
ISO 3166 (
/). ,
en-us RFC 1766 .
Language,
.
, Language .

. 11.

MorphX

| 29



, , .
, Windows,
,
. :
.
,
, .
,
?

.
.
.
,
.

. 12. : I


,
.
,
.

I.

. 13. : II

.
,
.


.
, ,
.

. 14. : III

MorphX

, ,
.
.
,

.

.

Microsoft Axapta.


,
,
, ,
, .

Label

++.

. 15.

31

32

I.

. 16.
.
,
.
.
.
:

, ;


.
CTRL+N
.

, .
.
.
@,
. .

.
999 999 999.

CTRL+S.

MorphX

++,
.

ALT+F9.


,
Microsoft Axapta.
, ,
, .
,
, ,
, .
, .
.

.

.
.
.

.

.

. 17.
3 4594

33

I.

.
,
,

.
. 17. @HTL54 ,
.

MorphX
++
++ .
++
: , , ,
, .
++

. ++
ENTER CTRL+SHIFT+F2.
.
++ , ,
,
, .
. 18 LedgerTable.

. ,

CTRL+TAB, CTRL+SHIFT+TAB.

, . , clicked,
,
ButtonBalanceSetup.
.
Windows
, , .

.

(. ).
,
, ,
, (. ).
*

36

I.

. 18. ++

,
*.


CTRL+S.
.

.
++, .
++, ,
.
. ,
. Microsoft
Axapta (. ) .
.

.
element, this,
.
,
. ,
,
.

MorphX



CTRL+SPACE.
. ,
,
. ,
, ,
.

.
.

. 19.

,
.
IntelliSence, .


++
. ,
, , ,
,
, ,
.

++ Scripts.
.

37

38

I I.

, .

(debugger)
.

IDE (Integrated Development Environment,
).
/
Axdebug.exe Bin
Microsoft Axapta.

. 20.

MorphX

, ;

(breakpoint);

, ,
;

, ,
:

. 21.

/
:

,
Debug/Stop
debugging;
,
++.


++. /
, ,

39

40

I.

F9 .
,
++.
.
,
Debug/Go F5.
.
:

Step Over
/;

Step Into
, ;

Step Out , ,
, .
:

;
,
, SHIFT+F9,
;
, ,
;
.

. 22.

:

++;
. , ,
Allow debugging of X++ code running in the
Business Connector;

MorphX

3- . AOS
AOS, Server, Allow debugging
of X++ code running on the server;

web-.

Microsoft Axapta , , ,
.

, //.
() , . 4

(Best Practices)
.

. 23.

;

.
MorphX.
, ,
.
:

/
/ ;

41

42

I I.


.
,
, .
,
( )
Add-Ins/ .

:

(
);
/

( ),
, ;
Best Practices
(Microsoft
Axapta developer's Best Practices; III);
- ,
TODO, :
/7T0D0: ,

. 24.

:
;
/,
;

, ;
,
;
/ /
HTML;

MorphX

| 43

Best Practices
.

MorphX

Microsoft Axapta
.
++, ,
.
, , ,
, .
:

(/
/ / /
),
;

,
(//).

. 25.

44

I.


, :

(/)?

,
, , ..

++.

/
/ ,
.
, Address,
,
Add-Ins/ . ,

.

,

. ,

.


, .

,
. /
/.
Microsoft Axapta:

, .
,
Report
.

MorphX

, .

.
,
.
-,
.
,
.
, .
,
.
.

. 26.

,
SysWizard SysBaseDataWizard.


,

.

45

46

I.

.
, .
(private) (shared).
,
.
.

, ,
,
. ,
, ,
.
.
,

(, , ..) - .

.
:
, ..
.
, ,
.




.

Private Shared
.
Private Shared.

ENTER.
,
.

. 27.


ALT+ 1 .

MorphX



Private Shared.
. ,
.
Project
.

CTRL+N.


,
,
.

,
. 28.
.

.
drag-and-drop
.
,
:
.
.
.


,
.
Group
. , ,
.
:

47

48

I.

, Private Shared.
Private Shared .
Shared Private, .

.
ProjectGroupType
, GroupMask
(
. ).

Microsoft
Axapta. , ,
.


,
, ,
.
, ProjectGroupType Forms,
GroupMask ,
, .
, ProjectGroupType
Forms, .
,
.
.
,
.

ProjectGroupType ,
.

MorphX



: .
.

.
(. 29).
?
.
?

,

.
. 29.


,

, .
, ,
.
, . ,
,
. .
,
.

.

, .

, ,
.

4 4594

49





.
:

, ;

, .

,
,
, .
:


.
(). ,
,
.
.
.

. 30.

:
;
.

.

. ,
, .
,
.
,
:

4*



,
;


.
.
. ,
,
,
. , ,
;

51

52

I.

, ,
. ,
- , ,
.
, ,
;

;
, ,
.



.

.
.

. 31.



.

Microsoft Axapta.
,
II.
.
RHotelManagement.

Microsoft Axapta
MorphX (//

).
Projects Private
.
Projectl.
Projectl
.

RHotelManagement,
.
-
.



Group.

. 32.
:
. 2.

Name

Forms

ProjectGroupType

Forms

GroupMask


Tables, Views,
Extended Data
Types, Base Enums,
Configuration
Keys, Security
Keys, Classes, Queryes,
Report, Menus,
Menultems, Jobs.

. 33.

54

I I.



: SYS, GLS, DIS.
,
, .
:

( //
// ).


HTL.

, , .

. ,
axHTLru.ald.

RHotelManagement
, . ,
++,
,
.
,
,
, .

II


I,
Microsoft Axapta, , ,
,
Microsoft Axapta .

, .
++,
.

++
++
Microsoft Axapta.
,
.
++ ,
.
++ -.
-
. ,
++,
Microsoft Axapta,
I/O, DDE,

. , ,
.
++ C++ Java,
. MorphX
,
, ++
SQL. ++
- C++, Java
SQL. , ,
Java C++, ++
.
++
, ,
.
,
.
: new.
-
.
,

++

C++. ++ ,

,
.

. ,
:
, .
, ,
.

57


, ++,
. .
++ ,

++. ,
.
.

++
, ,
. ++ :

boolean .
: (true),
(false). false true
++ ;

int , ;

real .
;

str ,
;

enum ,
;

date , , ;

timeOfDay , , .


++
:

. 3.

Boolean

false

Int

Real

0.0

BCD (Binary Coded Decimal -


). 4 ()
0 9.

1 0 99

Str

Enum

0 ( )

Date

null

TimeOfDay

++
++ :


. ;

,
;

.

:
. 4.


, ,
, .

.
false

.
,

59

60

II.

null

,
null

.
.

++ ,
:
. 5.


. object

common



.
.
, ,
BCD.
.
:
. 6.

+ *

real, real
real. int, boolean enum,
int, boolean enum . boolean
enum, enum int

/ .
++ real .
real

MOD DIV

MOD DIV
,
. int

,
,
:

. 7.

1 int = boolean + boolean

int

int = false + false

2 int = real + boolean

int

int = 33.3 + true

34

3 boolean = int + real

boolean

boolean = 10 + 33.3

4 boolean = int + int

boolean

boolean = 0 + 1

true

5 real = int + boolean

real

real = 100 + false

100.0

6 real = int + boolean

real

real = 100 + true

101.0

7 int = real MOD boolean

int

int = 33.3 MOD true

8 real = int DIV int

real

real = 100 DIV 5

20.0

9 date = date + int

date

date = 01\01\2004 + 30

31\01\2004

10 int = date + int

int

int = 01\01\2004 + 1

11 date = date + date

date

date = 01\01\2004+01\01\2004

12 str = str + str

str

str = a + b

ab

13 int = str + i

int

int = a + 100

2 i = + , = 33.3
b = true :
i = 33.3 + t r u e ; / / r e a l
i = 33.3 + 1.0; / /
i = 3 4 . 3 ; / /
/ /
i = 34; / /

3 ,
: false (0) true (1),
10 + 33.3 43,
.

,
. ,
43, , ,
true.
9 10 .
10 ,
. 11 ,
.

61

62

II.

12 ,
. 13 ,
,
.
MorphX date str ,
int date . ,
.


boolean
, false
true.
.
false (0), true
(1).
,

. 0,
true .

, true false
, .


,
. :
boolean

boolean { , } ;

[ ]

EBNF
(Extended Backus Naur Form ). EBNF .
:
boolean b; // .
boolean , 2 ; // 2.
boolean = true; // .
// ,
boolean 4[]; //
// .

Boolean
++: false
true. ,
( enum, int real).


,
boolean
(int real).

boolean

.
:
s t a t i c void Jobl ()
f
// ExprValue boolean
boolean exprValue;
/ / exprValue
/ / (7*6 == 42)
exprValue = (7*6 == 42);
if (exprValue)
// exprValue true
info("OK"); //"OK" -
}

, Job,
Jobs ,
.
exprValue true,
, 7 x 6 42. (true),
.

boolean

false (0) and true (1)


false
int, date real

63

64

II.

(int) .
++.
int 32 . , ,

. Microsoft Axapta
Record ID (RecID), .
:
[-2.147.483.647; 2.147.483.647].

int
,
. int:
int

=
=
=

int { , } ;
[ ]
I


:
s t a t i c void Job2()
{

// i.
int i;
// il i2
int il,12;
// 100
int i3 = 100;
//
int i4[];
}


,
.
, 32768.
,
++.



, .


,
. :
static void Job3()
{
//
int i = l,j = 2;
// J
// J + ((i + i) DIV 2)
j +=(i + i) DIV 2;
// J=3
if (j>2) // (J > 2)
// "J 2"
info("J 2") ;
else //
// "J HE 2"
info("J HE 2") ;
}

int

32

[-2.147.483.648; 2.147.483.647]

real, boolean
enum

str2lnt, int2Str

,
. , 1/4
0.25 ++. , ++
(real) .
Binary Coded Decimal (BCD).
BCD
0.1.
real .

[-(10) 127 ; (10) 127 ], 16
.
I -127 . 16-
:
5 4594

65

66

II.
1

123456789012345.6

12345678.90123456

1.234567890123456

1 ,
,
. ,
++ 123456789012345.5,
123456789012345.7. , 0.1,
,
, .
2 12 ,
8 .
0.00000001. , ,
12345678.90123455, 12345678.90123457.
3 ( 10),
15 .
.
1.234567890123455 1.234567890123457.

real

real, .
:
real

= real ( , 1;
= [ ]
= I

:
static void Job4 ()
//
real r;
// :
real rl,r2;
//
real r3 = 3.1415;
//
real r4 [] .;
}

()
,
.
,
, 3.141528.
,

++.



. .
s t a t i c void

Job5()

real r;
= 1.000;
= 1.2345+3;
= 1.2345+03;
= 1234.540;
= 1 . 0 ; / /

1.01

real
++
, ,
, .

, .
,
.
:
s t a t i c void

Job6()

// int exprValue
int exprValue;
// real area
real area =3.141528;
exprValue = area/3;
}

67

68

II.

/3 ,
, 1.047176.
(
) , 1,
exprValue .

real
,
. :
static void Job7()
{
real i = 2.5, j = 2.5; //
// real
j = j * i; // j j * i
// , : j=6.25
if (j > (i * 2)) // J > 5
info("Great"); // "Great"
else //
info("Oops"); // "Oops"

real
BCD-: 64
] -(10)127 ; (10) 127 [,
16
0.00
boolean,
enum, int
str2Num, num2Str

date () , (day, month


year).
[1UU901; 31\12\2154]
1 1901 31 2154 .

date
date
date ,
EBNF:


date

date ( , I ;

[ ]

:
static void Job8()
{

// date
date d;
// :
// date
date dl,d2;
// date
// 21- 1998
date d3 = 21\11\1998;
//

date

date d4 [ ] ;
}

() date
++
, (EBNF):
Date literal = day \ month \ year

,
++ .
85 15
( 100 ). ,
MorphX
85 15
.
2004.
. 8.

...

04

2004

18

2018

19

2019

20

1920

45

1945

55

1955

00

2000

69

70

II.

,
.
:
s t a t i c void Job9()
{

int anlnt;
date aDate;
/ / Adate d a t e ,
/ / 1 1998
aDate = 1 U U 9 9 8 ;
/ / a n l n t i n t ,
/ / 30.
a n l n t = 30;
/ / aDate, aDate + 30,
/ / 31 1998
aDate = aDate + a n l n t ;


, .
date .
:
d a t e = date i n t d a t e = d a t e + i n t

,
.

date

32

[1YIYI901; 31\12\2154]

null

str2Date, Date2Str, Date2lnt, lnt2Date

,
++ str,
. , -

, , ,
. ++
str.
.
,

.


:
str

str [] I , } ;

[ ] [ left I right ]

[ ]

left right ,
.
.
:
s t a t i c void JoblO()
{

//
s t r indefiniteStr;
// 100 ,
// ""
s t r 100 maxLengthStr = "";
// 30
s t r 30 l e f t l e f t A l i g n e d S t r ;
// 30
s t r 30 r i g h t r i g h t A l i g n [ 1 0 0 ] ;
}

()

,
( ), ,
, :
Nothing;
;
yiruyshf kj sadhfkasf hksaf hask;
Please do not hesitate. Press any key NOW.

71

72

II.


,
.
+. :
s t a t i c void JobllO
{

/ / b
Str a="Hello", b="World";
// , " " b
info(a+" "+b) ;
}

str

()

Str2int, Int2str, Str2l\lum, l\lum2Str, Str2Date, Date2Str

(Enum)
,
.
:

;
.

++ ( constant),

. ,
MorphX.
,
, .

.
0, 1,
2 .. ,
.
.
MorphX , No Yes

No Yes. No 0, ,
Yes 1.


, ,
251 ( 0 250)
.



. enum,
:
enum

= enumtype { , );

= [ ]

= I

enumtype
.
:
static void Jobl2()
{

// NoYes. : No, Yes


No Yes done;
// criteria.
// : EQ, LT, GT, NEQ, GEQ, LEQ
Criteria crit[100];
}

++
,
, ,
.
.
:
Enumreference

= Enum : :

literal

Enum , literal
().
No NoYes,
NoYes::No.
, ++.

73

74

II.


,
.

0 ( )

boolean, int, real

enum2str, str2Enum

.
. ,

. ++
.
.
. ++
, : ,
.
, ++ .

.
.


,
:

datatype { , ) ;

[ [ ] [, ] ]

.
.
, ;

,
, .
.
:

s t a t i c void Jobl3()
{

//
int i [ ] ;
//
// 100
real [100];
// , 10
//
date d[,10] ;
// NoYes,
// 10 -
NoYes [ 100,10];
}


,
, ,
:
ArrayltemReference

[ ]

.
,
.
, 9 array
: array[9].


++ :
,
. 1. [1],

75

76

II.

[2] .. ++ [0]
. ,
:
intArray[0]

= 0;


, C++ Java,
( ), ++
. .
,
.
. C++
:
real

earning[10,

3] ;

Microsoft Axapta ,

:
real

earnings[10*3];

earnings[i, j] :
earnings[(i-1)*3

+j]

:
tlocalmacro.earninglndex
(%1-1)*3+%2
#endmacro
earnings[tearninglndex(i, j)]


. a[il, i2, ..., ik]
, :
( - I)*d2*d3*..*dk +
(12 - I)*d3*d4*. . .*dk +
(ik-1 - l ) * d k +
(ik-1)

, (dl*d2*...*dk) .


:
Datatype a r r a y V a r i a b l e [ ] ;


arrayVariable, Datatype.
:
int

intArray[];



, .
, ,
, :
Datatype a r r a y V a r i a b l e [ l e n g t h ] ;


, :
boolean boolArray[100] ;

,
, , ,
,
, ,
.
, 100
,
(1000 ). 200
:
s t a t i c void

Jobl4()

int arrayVariablel[ ,100];


str arrayVariable2[1000, 200] ;
}

[ ]

77

78

!!.

++ , ,

, .
.
.
boolean,
int, real, date, str, container, arrays, tables
. .



container .
:

= container ( , ) ;
= [ ]
= I

. :
static

void

Jobl5()

//
container cl;
//
container c2 [] ;
/* :
(1), (3.14) "" */
container = [1,3 .14,""];
}



, .

, :


static void Jobl6()
{
container = [1,3.14,"abc"];
if ( [1,3.14,"abc"] == c)
info(" [x,y,z] ');
}

,
: [x,y,z]
.



, .
, ,
,
. ,
.
s t a t i c void

Jobl7()

r e a l r = 0;
s t r 30 s = "";
container = ["3.14",3.14];
s = conpeek(c,2);
r = conpeek(c,1);
}

s = 3.14 = 3.14. conpeek


.

container

79

80

| II.


, ++
.


( ),
. ,
new.


connull:
s t a t i c void JoM8()
f
c o n t a i n e r c;
= connull( ) ;
}

,
. conlen,
.
s t a t i c void

Jobl9()

container

// 0
info(int2str(conlen()));



conf ind. conf ind
.
0 ( ) .
s t a t i c void

Job20()

{
container = [7,3.14, "Hello"];
int i;
i = confindf c, "Hello"); //i
}

,
. conins
: , ,
.
s t a t i c void

Job21()

c o n t a i n e r ;
= conins ( , 1 , " H e l l o

World");


:
static

void

Job22()

container

= ["Hello W o r l d " , 1 , 3 . 1 4 ] ;

,
condel : ,
.
s t a t i c void Job23()
(
c o n t a i n e r = ["Hello World",
= condel(,1,2);

1,

3.14];

,
: ,
( ), .
s t a t i c void

Job24()

c o n t a i n e r = [7, 3.14, " H e l l o " ] ;


/ / - 7 "Hello World"
= conpoke(c, l , "Hello World");
}

6 4594

81

82

II.


: .

, .
s t a t i c void

Job25()

s t r 10 s;
c o n t a i n e r = [1, 3.14, " H e l l o " ] ;
/ / . 3.14
/ / : " 3 . 1 4 "
s = (,2) ;
}


:
s t a t i c void

Job26()

s t r 10 s;
int i;
real r;
container = [1,3.14,"Hello"];
[ i , r , s ] = ; / / 1 i ,

3.14 "Hello" s

)
+=
. , ,
10 .
s t a t i c void Job27()
(
int i;
c o n t a i n e r c;
for (i = 1; i <= 10;

i++)

+= i * i ;
}


(Extended Data Types) ,
.

. ,
,
.

| 83


.
, , Name,
str
. :

,
, . ,
Name str,

,
,
, .
, ,
, .


.
, .
ProductID
, ,
65 .
, 45 ,
ProductID.

, ProductID.
,

. ,

.
.
, .

( )
.

,
: boolean, int, real, str, date container.


Extended Data Types Data
Dictionary .
, -

84

II.

. 34.

, , ,
,

.


.
Base Enums
.

Data Dictio
nary
,
Extended Data Types
.


, ,
(

).

.
,
.
.

:

extendedtype I ,

[ ]

extendedtype
.
s t a t i c void

Job28()

. * /
Integer integer = 1;
// Amount
Amount currency;
}


,
,
.


.
,
++.
(
, )
. ,
.
new.

= UserDefinedClass ( , 1 ;
= I
= = new ( ( , ) )

UserDefinedClass
. ,
:
static

void

Job29()

ABCBase a l ; // ABCBase ,
ABCBase a2, ; // ABCBase ,
/ /
ABCBase a4 = new ABCBase ()/// ABCBase
/ /

)

, .
,
new.
.
, , 4
new ABCBase.
. al, a2,
, ,
null:

85

86

II.

al- ,



new.
,
al 2,
4:
. 35.

al = new ABCBaseO;
a2 = new ABCBaseO;
a3 = a4;

. . 35 36.



this.


, ,
, ++ .
MorphX ,
, .

, .
2 null, ,
, 2. null
al , 4
.
al 4 .


,
, -
-. , ,
object,
.

( )

null

-
object


, MorphX
,
.
.
.
, , ,
,
.

:


.
;

public,
;


MorphX, ,
. -

87

.
, ,
, .
. ,
object,
common. , common,
.



, .
:

= ( I common ) I , } ;

:
static void Job30()
{
//
// CustTable
CustTable custtable;


:
RefTableVariable

[ ( )

| fieldname ]


: Tablevariable.Fieldname, , CustTable AccountNum.
s t a t i c void
CustTable

Job31()
custTable;

info(custTable.AccountNum);

++
,
TableName.(Fieldld). , ,
,
. ().

s t a t i c void

Job32()

i n t i , n, k;
C u s t l a b l e c;
DictTable dt = new D i c t T a b l e ( c . T a b l e l d ) ;
n = dt.fieldCnt () ;
print " CustTable: ", n;
for(i=l; i<=n; i++)
{

k = dt.fieldCnt2Id(i) ;
p r i n t " ", dt .fieldName (k) ,
" ' " ,
. (), "'";

"

=",,

pause;
}

fieldCnt fieldCnt2Id.
fieldCnt ,
fieldCnt2Id ID . ,
fieldCnt2Id ,
6 ID, 54. ,
, ID
.


. ,
common, .

89


++ :

++ :


,
,
.
, ,
. ,
,
, .
(, , , ,
..) .
:

myVar2;
thisIsAveryLongVariableNameButltlsAllowedWithintheAxaptaLanguage,
partlpart2\
helloWorldJI.

,
. ++
. ,
++ .
,
.
++ : , .


,
.
:

Datatype

Datatype ++.
,
:
int intVariable;

intVariable.
++
,
.
.


, ,
,
. ++
.

:

Datatype

[ ]

= I = new ( )

91

II.

pi:
real

pi

3.14159265359;


:
/ / new
ABCBase a b c O b j e c t - new ABCBase ;

ABCBase



.
. ++
,
:
= Datatype { , ) ;

,
:
int

a[100,5],

b =

1;


100 , 5 ,
1.

++:

Datatype { , ) ;

Datatype

boolean I Int I real I date I str I container I

I I I

[ ] Identifier [ ]

[ ] [ left I right ]

[ length , memory J

= I = new ( )

:
s t a t i c void

Job33()

//
boolean ;
//
int i, j;

(1 j)

| 93
// 100
real [ 100 ] ;
// s, 10
//
str 10 left s;
/* si, 30,
10 */
str 30 sl[,10] ;
//
// 3.14
real r = 3.14;


.
MorphX
, .


.
, ,
. .
:

=
=
=
=
=
=


_ ( [])
Datatype I void I anytype
| , )
Datatype [ = ]
{( ! (_) {
! I
= ({ ! {
}}

, anytype ,
. void
, .
- ,
return.
:
,
;
, ;
, .

94 | II.


:
1
void methodName()
{
}

2
int methodName()
{
return 1;
}

1 , void
, ( ) .
, { }, .
, ,
.
- , ,
,
2. int
, , ,
return 1,
. ,

.
update CustTable
, :
/ / : ,
void update ()
{

//
//
CustTable this_Orig = this.orig();
ttsBegin; // :
this.setNameAlias();
super(), // update
this.setAccountOnVend(this_Orig);
if (this__Orig.custGroup != this .custGroup)
ForecastSales::setCustGroupId(this.accountNum,
this__Orig. custGroup,
this.custGroup) ;
ttsCominit; //

) //

,

. EBNF
, :

= _ ([])

= I , )

= Datatype [ = ]

,
( )
.
checkAccountBlocked CustTable
, :
boolean checkAccountBlocked(AmountCur
{
boolean ret = true;

_amountCur)

if (this.blocked == CustVendorBlocked::A11 II
(this.blocked == CustVendorBlocked::Invoice &&
_amountCur > 0 ) )
ret = checkFailed(strFmt("@SYS7987", this.accountNum));
)
return ret;
}

checkAccountBlocked
_amountCur.
,
.
.
, .
:
real

a g e ( d a t e _calcDate = today())

return

(_calcDate -

this.birthDate)

/ 365;

age ,
birthDate _calcDate
. ,
:
// = 1 1990
Human kid = new Human (1\1\1990) ;

95

96 | II.
//
print kid.age();
// 1 1991
print kid.age(l\l\1991);

,
,
.
. 9.

abstract

, . -
.
, -
.
, .
.
. -

display

.
. -

edit

.
.
, .
-

final

public

, public, , ,
-

protected

, protected, , ,
-. -

private

, private, ,
,

static

static ,

client

server


. ,
:
void
final

someMethod() ; //
i n t dontAlterMe () ; //,
//
s t a t i c void classNoChange(); //
d i s p l a y i n t v a l u e ; //, ,
/ / d i s p l a y


. ++
,
. :

1 ; I
2 I
2 ;

1
2

=
=

= I += I -=
++ I -

,
;

+= ,
;
++ ,
;
-=

--

,
.

:
static void Job34()
{
int i,j;
i = 1; // i 1.
j = 2 ; // j 2
i = i + 1; // i i + 1. i=2
i += 1; // i i + 1. i=3
i++; // i 1
++i; // i 1
j -= i; // j j - i. j=-3
i--; // i 1
--i; // i 1
}
7 4594

98

II.


++
. ~,
(), .
:
1

:
. 10.

. 1 ,
2 ( 2)

. 1
, 2 ( 2)

. 1 2

. 1 2

DIV

. 1 2

MOD

. 1 2

. . (
)

&

. 1 2

-. - 1
2

. 1 2

. 1 2

. 2 1

?:

. : 1 ? 2:
. 1 , 2,

:
static

void

Job35()

int i ;
// 1 4 (1*2*2*2*2). : i=16
i = 1 4;
// 16 4 (16/2/2/2/2) . i=l
i = 16 4;

| 99

// 4 5.
i = 4*5;

i=20

// 20 5. i=4
i = 20/5;
// 100 21. i=4 (4*21 = 84, 16)
i = 100 div 21;
// 100 21. 1=16
i = 100 mod 21;
/* 1. i=-2. (
) */
i = ~1;
/* . ,
. i=l */
i = 1 & 3;
/* . ,
. i=3 */
i = 1 I 3;
/* -. ,
. i=2 */
i = 1 3;
// 1 3. i=4
1 = 1 + 3;
// 1 3. i=2
1 = 3 - 1 ;
/* (400>4) , 1, 5.
400>4, 1. i=l */
i = (400>4) ? 1 : 5;
}


,
++. ( !)
:
! 2

. 11.

like

true, 1 2.
*
( ) ?
.
like SQL,

==

true,

100

II.

>=

true, 1 2

<=

true, 1 2

>

true, 1 , 2

<

true, 1 , 2

!=

true, 1 ( )
2

&&

true, 1 2 true

II

true, 1, 2,
true

. . true,
false, false,
true


. :
. 12.

Jones like Jo?es

true, ?

Central Intelligence Agency like Ce*

true, *

(( 42 * 2) == 84)

true, 42*2 84

14 II 21

true, true

(1 <4) II (4> 1)

true, 1<4

(1 >4) II (10 < 9)

false,

((11 div 10) > 1)

false, 11
10 1

((11 div 10) >=1)

true, 11
10 1 (, >= 1 )

(1 ==1) && (3> 1)

true, true

1(1 ==1) && (3> 1)

false, !(1==1), 1 1

(11 1=12)

true, 11 12

today() >= 1YIM980

true, 1 1980


++
,
. , , ,
. :
* *z
,

. .
,
,
:
+ / 100
( )
++, .
, :
( + ) / 100
,
,
.
, ,
. , , ,
+ /100
/ 100. ,
+ / 100

+ ( / 100).
,
,
.

++:
. 13.

[] . (params) expr++

++expr -expr +expr -expr ~ !

new (type)expr

101

102

| II.

*/%

+-

<><=>=

==!=

&

(, )

&& II

()

?:

= +=-=

:
, .
.

, ,
. ,
, .
.


.
. { },
.
, :
= {I }}
,
,
:
if (true)
{ // " { "
//

//
} //

" } "

,
.

++

. .
.
, .
++ :
.


,
. ,
.
:
= //

.
,
:
void main()

//

CustTable c u s t t a b l e ;
i n t i ; / /
/ / s e l e c t
select custtable;
)


,
.
.
.
:
= /* */

,
,
. :
/*
.
, :
-
-
*/

103

04

II.

:
: ,
: _today,
: 25.06.04
int dayQty(date _today = today())
return dateEndYr(_today) - _today;
}




true false. ++
:

If;

switch.

if

.
, ,
. if
.
if ++,
:
if = if ( ) [ else ]

, if
.
, true false.
, , , true
true.
EBNF ,
if. else:

else

else

if (a > 4)
print a;

if (a > 4)
print a;
else
print 4 , ;

if (CustTable.Name == )
print ;

if (CustTable::find(1).ReclD)
print ;
else
print ;

if- if-.
if- ,
if- switch.


if
, .
.
:
= ? :

true,
(?) ( :),

( :).
if , if
,
.
if-onepa :

int result;
int choose = 3;
result = choose > 3 ? 100 : 50;

If
int result;
int choose = 3;
if (choose > 3)
result = 100;
else
result = 50;

:
p r i n t custTable.AccountNum > "1000" ? (custTable.AccountNum <
"2000" ? " " : " 2000") : "
1000";

105

106

II.

AccountNum CustTable ,
1000, , 2000,
. AccountNum 1000
2000, 2000. ,
AccountNum 1000,
1000.
result

= (CustTable: :find ("1") .RecID)

? ""

: " ";

:
. RecID
, .
(RecID ! = 0),
, .

switch
,
. switch,
.

, .
switch default,
, .
switch
, .

switch switch,
break.
Switch = switch ( ) { {case } [ d e f a u l t :
] }
case = case { , } :

switch:
switch (telephoneArea)
I
case "555" : _;
break;
case "501" : _;
break;
)

switch (CustTable.AccountNum)
{
case "1000" : _;
break;
case "2000" : _;
break;
default : _;
)

, break switch
case.

break, case , break


, switch.

if switch
, , ,
, :
$200, , ,
$500, , , $1000,
, $2000, d,
:
if
if (account == 200)
//;
else if (account == 500)
lib;
else if (account == 1000)
//c;
else if (account == 2000)
//d;
else
//e;

switch
switch (account)
{

case 200 : /* a 7; break;


case 500 : /* b 7; break;
case 1000:/* 7; break;
case 2000: /* d */; break;
default: /* e */;
)

, ,
break,
case.
, ++
, :
number 10 10, 12 14, ,
13, 17, 21 500, , :
if
num10 = number /10;
if (num10 == 10 II num10== 12 II
num10 == 14)
/* a 7;
else if (num10 == 13 II
num10==17 II
num10==21 II
num10== 500)
/* b 7;
else
/* */;

switch
switch (number/10)
I
case 10 :
case 12 :
case 14 :
/* a 7;
break;
case 13,17,21,500 :/* b 7;
break;
default : /* */;
)

107

108

II.


++ :

while;

do while;

for.

:

break;

continue.

while
,
. , , ,
, .
while ,
. , while
, .
While = while ( )
,
. , , ,
, .

, while:
i n t no
while
(
print
no =
)

= 1;
(no <= conLen (cont) )
conPeek(cont,
no + 1;

no);

do while
do while while, ,
, do while
.
Do While = do {{ 1) while () ;
, do while
.
do while,
10, _value.
i n t findPower ( r e a l
{

_value)

| 109

i n t ex = - 1 ;
r e a l curVal;
do
{

ex += 1 ;
curVal = power(10, ex);
}
while (_value > curVal);
return ex;
}

for
for while.
,
, ,
.
for

.
for = for ( ; ; )

,
++ for

. , , for
,
{ }.
, for
,
.
.
, 100
, :
for
int i; // control-variable
for (i=1; k=100; i+=1)

(
print ra[i];

while

int i; // control variable


i = i;
while (i <= 100)
1
print ra[i];
1

110

| II.

for while ,
for .

break
.
break.
break = break ;

for
int iarray[100];
int i;
for (i=1; i <= 100; i = i+1)
if (iarray[i] > 0)
break;

while
int iarray[100];
int i;
i =1;
while ((i<=100) && (iarray[i] <= 0))
i = i + 1;

, , for ,
, .
,
while.

continue
continue ,

. ,
if.
continue = continue ;

,
continue if:
if

continue

int i;
int iarray[100];
for (i=1; i<100; i = i + 1)

int i;
int iarray[100];
for (i=1; WOO; i = i + 1)

i
i

if (iarrayfi] > 0)
{
//
)
1

if (iarrayp] <= 0)
continue;
//
)


, ++
select.
select .
.
select
() .
while select
next.
select, ,
. ,
next,
. , select ,
next.

select
select

select

[ [ ] [ from ] ] []
[ ] [ ] [ ]

reverse I firstfast I firstonly I forupdate I nofetch

{ , ) I *

( ) I

sum I avg I minof I maxof I count

( order by I group by ) [ ] { ,
[ ] }

index I index hint

asc I desc

where

[exists I notexists I outer ] join

TableVariable, select. select


,
. (
) , sum count,
,
.

select:

111

112

II.

. 14. select

reverse

firstfast

. ,
.

firstonly

forupdate

.
, forupdate

nofetch

, , . nofetch
,
, ,

sum

, group by.
, ..
,

avg

,
group by

minof

,
group by

maxof

,
group by

count

, group by

order by

group by

asc

order by group by.

desc

order by group by.

index

index hint

select,
, CustTable,
, , (
):

. 15. select
AccountNum

Name

Blocked

CreditMax

100

10,000

No

200

20,000

No

300

30,000

No

4000

5,000

Invoice

5000

1,000,000

No

static void Job36()


{
CustTable custTable;
//
select * from custTable;
print custTable.Name;

custTable

// "100"
select * from custTable
where custTable.accountNum > "100";
print custTable.Name;
/* "100" ,
" " 200. */
select * from custTable order by accountNum
where custTable.AccountNum > "100";
print custTable.Name;
next custTable; // ,
//.. ""
/* ( 100),
: "" */
print custTable.Name;
select * from custTable order by accountNum DESC
where custTable.accountNum > "100";
next custTable; // (
// - DESC) = ""
print custTable.Name;
// : ""
select reverse custTable order by accountNum;
print custTable.Name;
/*
[100;1000], " ". */
select * from custTable order by name
where custTable.accountNum > "100" &&
custTable.accountNum < "1000";
print custTable.Name;
8 4594

113

114

II.
/* COUNT select
( ) 5 */
select count(accountNum) from custTable;
print custTable.accountNum; // count
/*
.
: SUM: $1060000,
CreditMax custtable */
select sum(CreditMax) from custTable
where custTable.blocked == CustVendorBlocked::No;
print custTable.CreditMax;
pause;
}

next select .
select .
select, ,
.
:
s t a t i c void Job37()
{

// Name (" ")


print (select CustTable order by Name).Name;
// CreditMax 5000
if ((select CustTable
where CustTable.AccountNum == "5000").CreditMax > 500000)
print "This customer has a balance above $500,000";

1
select
select . select
, select
.

++ SQL
t

, where- ,
SQL - ,
count- 0 (),
null SQL.

Microsoft Axapta (null)


, SQL
++: , SQL,
(null) (,
sum(f)),
.
, SQL,
count 0 ().
SQL, ++
group by order by select.
, .

while select
while select .
.
select
MorphX. while select
next. while
select :
while select

= while select

select, while select


. while
select ,
, while select
.

while select:
/ / deleteTransFromVoucher LedgerJournalTrans
s e r v e r s t a t i c void deleteTransFromVoucher(JournalNum _JournalNum,
Voucher _voucher)
{

LedgerJournalTrans l e d g e r J o u r n a l T r a n s ;
LedgerJournalTable l e d g e r J o u r n a l T a b l e =
LedgerJournalTable: :find(_journalNum) ;
Counter c o u n t e r ;
ttsbegin;
while s e l e c t forupdate ledgerJournalTrans
index h i n t NumVoucherldx
where ledgerJournalTrans.JournalNum == _journalNum &&
l e d g e r J o u r n a l T r a n s . v o u c h e r == _voucher
{

115

116 | II.
ledgerJournalTrans.doDelete();
counter++;
}
ttscommit;
}
// , ,
//
static void Job38()
{
CustTable custTable;
while select custTable
order by Name
where custTable.AccountNum > "1000" &&
custTable.AccountNum <= "5000"
{
print custTable.Name, " ", custTable.Phone;
}
pause;
)


, select
,
, .
:

insert ;

update
;

delete .


. , , update,
select forupdate.

. ,
, delete.
++ ,
. ,
, :

insert_recordset;

update_recordset;

delete_from.


.
. , Microsoft
Axapta RecordlnsertList, RecordSortedList,
RecordLinkList,
.

insert
insert.
, ,
. insert
insert ,
. insert , ,
insert, , , .
insert
R e d d
, CreatedDate, ModifiedBy .
, insert,
.
insert :
/ /
s t a t i c void Job39()

Tablel

Tablel table;
ttsbegin;
table.fieldl = "1"; // str
table.field2 = 100.2;
// real
table.insert (); // insert
//Tablel
ttscommit;
}
// Tablel Table2
static void Job40()
{
Tablel tablel;
Table2 table2;
while select' tablel
(
table2.fieldl = tablel .fieldl; //
//
table2 . insert () ;

117

II.

dolnsert
dolnsert insert.
,
dolnsert insert,
insert. , ,

insert, . , insert Tablel
:
public void insert()
{

super ; // insert
info(" "); //
}
2

!
static void Job41()
(
Tablel table;

static void Job42()


{

Tablel table;

table.fieldl = -!;
table.dolnsert();/*
insert */

table.fieldl = 1;
table.insert();/*
insert Tablel 7
)

1, 2,
Tablel. 1
.

insert_recordset
insert_recordset

. :
INSERT_RECORDSET ( )
SELECT FROM - [WHERE ]
[ JOIN FROM - [WHERE ]]


-.
. ,
, ,
++. , Redd,
.

insert_recordset:
static

void

Job43()

Tablel t a b l e l ;
Table2 t a b l e 2 ;
// Tablel Table2,
/ / fieldl ,
/ / fieldl . fieldl
//field2 Tablel fieldl
//field2 2
i n s e r t _ r e c o r d s e t t a b l e l (fieldl, field2)
s e l e c t fieldl, field2 from t a b l e 2
order by fieldl desc
where t a b l e 2 . f i e l d l != "";
}

update
update
. Modif iedBy,
ModifiedDate, ModifiedTime. update up
date , , ,
update.
/ / 100 field2
/ / fieldl "1"
s t a t i c void Job44()

Tablel,

Tablel

table;

ttsbegin;
s e l e c t forupdate t a b l e
where t a b l e . f i e l d l == "1";
t a b l e . f i e l d 2 += 100;
t a b l e . u p d a t e () ;
ttscommit;
}

while select select



Tablel, .

119

120

| II.

doUpdate
dolnsert, doUpdate
update. doUpdate:
static void Job45()
{
Tablel table;
ttsbegin;

while s e l e c t forupdate t a b l e
where t a b l e . f i e l d l == "!"
(
t a b l e . field2 += 100;
table.doUpdate();
}

ttscommit;
}

update_recordset
update_recordset
. update_recordset
. ,
, .
update_recordset
update .
, update,
. update_
recordset ,
skipDataMethods,
update.
update_recordset
.
where-.
/ /
/ / Tablel
s t a t i c void Job46{)

field2

Tablel

tablel;

update_recordset t a b l e l
s e t t i n g field2 = t a b l e l . f i e l d 2

* 2;

//
//

field3 t r u e

field2


// Tablel, fieldl
,
static void Job47()
{
Tablel tablel;

tablel.skipDataMethods(true); /*
update_recordset update Tablel.
update_recordset
doUpdate */
update_recordset tablel
setting field2 = tablel .field2 * 2,
field3 = true
where tablel.fieldl != "";
}

delete
delete .
delete

select. delete delete
, .
// Tablel,
// fieldl "!"
static void Job48()
{
Tablel table;
ttsbegin;
select

forupdate table where table.fieldl == "1";

table.delete();
ttscommit;

doDelete
doDelete .
doDelete ,
delete.
//
//

T a b l e l ,
1="1"

121

II.
static void Job49()
{
Tablel table;
ttsbegin;
while select forupdate table
where table.fieldl == "!"
{
table.doDelete () ;
}
ttscommit;
}

deletejrom
delete_from
. delete_from
while select delete.
.
delete while select,
delete_from
Microsoft Axapta .
, .
.
, delete_from
.
delete

delete.
.
delete ,
,
skipDataMethods.
// Tablel,
//fieldl ,
static void Job50()
{
Tablel tablel;

tablel.skipDataMethods(true) ; /*
delete_from delete Tablel */
delete_from tablel
where tablel.fieldl
}

!= "";

SQL
, ++
.
:
. 16.

DELETE
FROM

UPDATE.
RECORDSET

INSERT
RECORDSET

...

SQL-
(, ,
)

delete
actions

skipDeleteActions()



(Database log)

skipDatabaseLog()

skipDataMethods()

, ,
. , ,
,
delete, update insert delete_from,
update_recordset, insert_recordset .
delete_from
delete
actions. ,

. , ,
,
skipDataMethods.


.
, ,
. ,
.
,
, , .

123

124

II.

,
.
, , .
,
, .

. , , - ,
- ,
.
, ? ,
,
.
. 17.

1
2
3
4
5

,
.
,
.
4 .
. ++
select forupdate.


,
ttsbegin. ,
.
= ttsbegin ;

, ,
, ttscommit ttsabort.

| 125


,
ttscommit.
. MorphX ,
.
= ttscommit;


.
ttsbegin ttscommit
, , .
ttsbegin;
//
ttsbegin;
//
ttscommit;
//
ttscommit;

++ .

,
ttscommit. ,
, .


ttsabort .

: .
= ttsabort;

, ,
.


ttsabort. throw
.

126

II.


Microsoft Axapta
, ++.
, ,
, ,
,
.

forUpdate
,
,
.
forUpdate select,
selectForUpdate .


, ,
, ,
, .
,
:
s t a t i c void Job51()
{

Tablel table;
ttsBegin;
select * from table; // forUpdate.
table. Fieldl = "aba
table, update (); // // : forUpdate
ttsCommit;

static void Job52()


{
Tablel table;
ttsBegin;
select forUpdate * from table;
table.Fieldl = "abc";
ttsCommit;

| 127
ttsBegin;
table.update(); //
// :
ttsCommit;
}


MorphX
.
.
++, ,
try. try
catch. catch
,
. catch
.
catch, .
try
throw.
try
catch .
try.
try ,
try ..

++.
, ,
, .
,
.

try
try
:
try = try __ catch
__ catch = catch () { __ catch }

retry catch.
retry try,
. ,
(, ). , catchlist
.

II.

throw
throw , ,
. ++ throw ,
exception.
exception, :
. 18.

info

warning

, - .
,

deadlock

error

internal

()

break

, BREAK CTRL+C

ddeerror

, DDE-

throw catch-
try. catch,
, throw.
,
.. throw :
Throw = throw ;

, throw
. try
, .
try, throw retry:
/* throw exception::error,
catch */
try
{
throw exception::error;
//
}
catch (exception::error)
{
//
(


/* try throw.
. exception::warning,
catch */
try
{
throw exception::deadlock;
throw exception::warning;
//
}
catch (exception::deadlock)
{
//
retry;

/* try ,
exception::warning. ,
. try
exception::warning, catch
exception::error . - catch
try */
void methodA()
throw exception::warning;
//
try
methodAO ;
i

catch

(exception::error)

//
}

9 4594

129


MorphX .

.
Microsoft Axapta :

Macros
.


Macros
Macro.

Macro (
Macro 1).

++,
.

: ,
,
++.

. 37.
.

.
.
:
= # [ macrolib. ] _

. macrolib
. :

#macrolib.aviFiles
#aviFiles
#macrolib.sysDataExpImp
file


++.
,
.
#define, #localmacro #endmacro.
#def ine
. #define:
= #(1._ ( _ )

:
#define. MaxLength (100)
#define. Init (" ")
str #MaxLength strValue = #Init;
info(strValue);

#localmacro #endmacro
,
.
:
= #11._
{_ }
#endmacro

#endmacro
.
.
%1, %2, %3 ..
.
:
#localmacro.AnExample
/ /
#endmacro

:
#localmacro.ComplexMacro
#DEFINE.ARG(%1); / / ARG
#IF.EMPTY(%1) / / p a r a m e t e r l
i n f o ( " T h e f i r s t p a r a m e t e r i s empty ( n o t u s e d ) " ) ;
#ENDIF
#IFNOT.EMPTY (%1) //
info("The first parameter is NOT empty, it is 1");

131

132

II.
#ENDIF
%2 = %3 + %4; // param2
// param3+param4
#IF.ARG(1) // parameterl 1
info("Parameterl has the value 1") ;
#ENDIF
#UNDEF.ARG // ARG
tendmacro



(#).
:
#complexMacro(parameter1, parameter, parameter, parameter*^

(1-4): 1 ,
,
(#IFNOT.EMPTY), 2, 3 4
( %2 = %3 + %4) ,
. ,
, :
#ComplexMacro(1,,3,4);

:
DEFINE.ARG(1); //
#IF.EMPTY(1) // parameterl
info ("The first parameter is empty (not used)");
#ENDIF
#IFNOT.EMPTY(1) //
info ("The first parameter is NOT empty, it is 1") ;
#ENDIF
A = 3 + 4; // param2
// param3+param4
#IF.ARG(1) // parameterl 1
info("Parameterl has the value 1") ;
#ENDIF
#UNDEF.ARG // ARG

, ,
:
info ("The first parameter is NOT empty, it is 1") ;
A = 3 + 4; // param2
// param3+param4
info("Parameterl has the value 1");

I 133

7,
.

2-4, :
info ("The first parameter is NOT empty, i t is 1")
= + ; / / param2 param3+param4
info("Parameterl

has the value

1")

, ,
.

#undef
#undef
#define. :
= #(11._

,
#define. He
#undef ,
#define.
:
#undef.MaxLength
#undef.Init

MaxLength
Init.


,
,
.
Microsoft Axapta :

#1'._(_)

;

#if.empty( )
#if, ;

#ifnot.empty( )
#if, .

#endif.



MorphX - ,

Microsoft SQL Oracle.
.
( , ,
, ..).
, ,
() .
MorphX
. ,

.
MorphX .


.
MorphX
SQL- ++.
MorphX ,
-
. ,
--
.

,
.
,
.
, .

,
,
. .
,
.
.
,
. ,
.
,
.
.
.
.
.
.
Field Groups
AutoReport AutoLookup.
AutoReport ,
.
.
, ,
. AutoLookup
.
.
display-
edit-,
.

:

Name ;

: Identification, Description, Admi


nistration, Dimension, Address, < > (,
Ledger);

Dimension
Dimension ;

,
;

, ,
; ,
;

135

136

II.


AutoReport.

Data Dictionary ,
Tables. Table
Table (
Table 1).
(
Alt+Enter)
, (
) .

. 38.

.
, .

++.
:

- ;

| 137

.
,
;

,
,
;

, /,
. ,
<tmptable>::createTable(),
,
, ;

(setTmpData), (
), ;


, (, ).


( , ),
. , ,

() ;

.

.

() :
.
, .
.
:

AutoJoin ;

,

;

138

II.


Relations,

.
,
.



,
,

.

. 39.
,
.

(, ,
LedgerTransType, LedgerTransType::Invent).
, , , ,
.
, ,
.

.


MorphX ,
, , .
MorphX ++, .
Microsoft Axapta
, ,
.
su(). ++ ,
.

Data Dictionary ,
Methods. ,
, . -

Methods
Method .

.

find(), existQ, checkExist() txtNotExist().
. 74.

find

exist

exist .
true, . exist
find,

checkExist

true, .
InfoLog

txtNotExist

,
().
.
.
.
,
..
, DML-:
, , .
.

, .

:

,
.
.
.
;

,
.
.

139

140

II.

,
, Indexes.
,
Index. MorphX ,
.


. ,
Field
. Alt+t Alt+4
.
:

where select;

join;

group by, order by select;

(range) .



.
Delete Actions
.

. 40.

. 75.

Cascade

superQ delete(). .
: CustTable, CustBankAccount

Restricted

superf) ValidateDeleteQ,
false, ,
. ,
. ++
ValidateDeleteQ . :
CustTable CustTrans

Cascade+Restricted

super() Delete() ValidateDelete() ,


, ,
, false, ,


(insert, update, delete)
,
.
:

( new())
. ;
(
Common);


( Id );

:

.
:

static

void deleteTransFromVoucher(JournalNum _journalNum,


Voucher
_voucher)

// -->
LedgerJournalTrans ledgerJournalTrans;
LedgerJournalTable ledgef-JournalTable =
LedgerJournalTable: :find(_journalNum) ;
// <-Counter counter;
ttsBegin;

141

II.
while select forOpdate ledgerJournalTrans
where ledgerJournalTrans.journalNum
== _journalNum &&
ledgerJournalTrans.voucher == _voucher
{
ledgerJournalTrans.doDelete (); //
counter++;
}
if (counter &&
ledgerJournalTable.journalType != LedgerJournalType::
Periodic)
NumberSeq::release(ledgerJournalTable.voucherSeries,
_voucher);
ttsCommit;
}


,
.
. ,
,
.
, ,
, ,
.


(
/).
,

, (
//
).

. 41.

. 42.

:

,
.

RHotelRoomTable.
RHotelBookingTable.
, ,
RHotelGuestExpenses.
RHotelParameters.
.
Parameter.
Key.
, .
, Key
.

.


1.
2.

Extended Data Types


.
()
Extended Data Types
.

143

44

II.

3.

4.

5.

. 43. RHotelRoomld

.
String.

RHotelRoomld (. . 43).
HelpText
@
HTL.

.


HelpText.

Ctrl+N
@ HTL.


.

().

. 44. @HTL1

6.

7.

8.
9.

( Ru)
.
.
Room number.

HelpText
.
Label @DIS4412
().

RHotelBookingld RHotelComplaintStr

String, RHotelComplain Container


RHotelRoomCost Real.
:
. 76.

Lablel

HelpText

RHotelBookingld

@HTL2


Book code

@HTL3


Unique book code

RHotelComplaintStr

@HTL4

Complaint

@HTL5


Customer complaint

RHotelComplain

@HTL4

Complaint

@HTL5


Customer complaint

RHotelRoomCost

@HTL6


Room price

@HTL7


Daily room price

Extends RHotelRoomCost
Amount StringSize RHotelComplaintStr (Memo).
.

RHotelManagement.


1.
2.

3.

Base Enums peno .



Base Enums
Base Enums.

:

. 77. RHotelRoomType

Name

RHotelRoomType

Label

@HTL8 ( ,
.: Room Type)

HelpText

@HTL9 ( ,
.: Hotel room type)

UseEnumValue

Yes

10 4594

145

146

II.


.
4.
.


Ele
ment. .
5.

(. . 78).

. 45. RHotelRoomType

. 78. RHotelRoomType

Name

Label

EnumValue

Elementl

Single

OHTL10 (,
.: Single)

Element2

Double

@HTL11 (,
.: Double)

Elements

Executive

@HTL12 (,
.: Executive)

6.

RHotelCust
Expense :

. 79. RHotelCustExpense

Name

RHotelCustExpense

Label

DIS9220 ( ,
.: Expense type)

HelpText

OHTL13 ( ,
.: Customer expense)

UseEnumValue

Yes

| 147

RHotelCustExpense
:
. 80. RHotelCustExpense

Name

Label

EnumValue

Elementl

Breakfast

GLS32495 (, .: Breakfast)

Element2

Minibar

@HTL14 (-, .: Minibar)

Element3

Telephone

SYS7869 (, .: Telephone)

Element4

Internet

@SYS50857 (, .: Internet)

7.

8.

,
,
NumberSeqModule. BaseEnums NumberSeqModule
RHotel
Label @HTL15 ( , .: Hotel management)
EnumValue 200.

RHotelManagement.


1.
2.

3.

4.

Tables
.

Tables
Table.
.

(

ALT+ENTER

).
:

. 81. RHotelParameters

10*

Name

RHotelParameters

Label

SYS7764 ()

148

II.

MaxAccessMode

Edit

CasheLookup

EntireTable

TableGroup

Parameter

ModifiedDate

Yes

ModifiedTime

Yes

ModifiedBy

Yes

.
5.

6.

Fields
String (Field 1)
Integer (Field2).

Fields

/ .

(. . 82).

. 46. RHotelPara
meters
. 82. RHotelParameters

FielcH String
Name

LedgerAccount

ExtendedDataType

LedgerAccount

Field2 Integer
Name

Key

AllowEditOnCreate

No

AllowEdit

No

Visible

No

ExtendedDataType

ParametersKey

7.

Field Groups
:

. 83. RHotelParameters

Groupl
Name

LedgerAccount

Label

DIS77 ( )

LedgerAccount

8.

Indexes :

. 84. RHotelParameters

Name

Key

AllowDuplicates

No

Key

9.


, :

. 85. RHotelParameters

Primarylndex

Key

Clasterlndex

Key

10. RHotelRoomTable, RHotelBookingTable, RHotelGuestExpenses


:

149

150

II.

. 86. RHotelRoomTable, RHotelBookingTable, RHotelGuestExpenses

RHotelRoomTable
Name

RHotelRoomTable

Label

@HTL16 ( ,
.: Hotel rooms)

TitleFieldl

HotelRoomld

TitleField2

HotelRoomType

CasheLookup

EntireTable

TableGroup

Main

Primarylndex

HotelRoomldx

Clasterlndex

HotelRoomldx

Fieldl String
Name

HotelRoomld

Mandatory

Yes

AllowEdit

No

ExtendedDataType

RHotelRoomld

FielrJ2 String
Name

LedgerAccount

ExtendedDataType

LedgerAccount

FielrJ3 Real
Name

RoomCost

ExtendedDataType

RHotelRoomCost

FielrJ4 Enum
Name

HotelRoomType

EnumType

RHotelRoomType

Fields Container
Name

Complain

ExtendedDataType

RHotelComplain

Groupl
Name

RoomNumber

Label

@HTL1 ( )

HotelRoomld, HotelRoomType

Group2
Name

RoomCost

Label

@HTL6 ( )

RoomCost

Group3
Name

LedgerAccount

Label

@DIS77 ( )

LedgerAccount

Indexl
Name

HotelRoomldx

Allow/Duplicates

No

HotelRoomld

RHotelBookingTable
Name

RHotelBookingTable

Label

@HTL17 ( ,
.: Room booking)

TitleFieldl

Hotelbookingid

TitleField2

HotelRoomld

CasheLookup

Found

TableGroup

WorksheetHeader

Primarylndex

Bookingididx

Clasterlndex

Bookingididx

Fieldl String
Name

HotelBookingld

Mandatory

Yes

AllowEdit

No

ExtendedDataType

RHotelBookingld

Field2 String
Name

HotelRoomld

Mandatory

Yes

ExtendedDataType

RHotelRoomld

15

152

| II.

Field3 String
Name

CustAccount

Mandatory

Yes

ExtendedDataType

CustAccount

Field4 Date
Name

FromDate

ExtendedDataType

FromDate

Fields Date
Name

To Date

ExtendedDataType

To Date

Field6 Enum
Name

Posted

Label

@SYS1711 ()

AllowEditOnCreate

No

AllowEdit

No

EnumType

NoYes

Groupl
Name

Customer

Label

SYS14787 ()

CustAccount

Group2
Name

Identification

Label

@SYS5711 ()

Hotelbookingid

Group3
Name

Number

Label

@HTL1 ( )

HotelRoomld

Group4
Name

Period

Label

@HTL18 ( ,
.: Booking period)

FromDate, ToDate

Group5
Name

Posted

Label

SYS1711 ()

Posted

Indexl
Name

Bookingididx

AllowDuplicates

No

Hotelbookingid

RHotelGuestExpenses
Name

RHotelGuestExpenses

Label

@HTL13 ( )

TitleFieldl

HotelBookingld

TitleField2

CustExpense

CasheLookup

NotlnTTS

TableGroup

WorksheetLine

Fieldl String
Name

HotelBookingld

Mandatory

Yes

AllowEdit

No

AllowEditOnCreate

No

ExtendedDataType

RHotelBookingld

Field2 Enum
Name

CustExpense

EnumType

RHotelCustExpense

Field3 Date
Name

TransDate

ExtendedDataType

TransDate

153

154

II.

FieltH Real
Name

Amount

ExtendedDataType

Amount

Groupl
Name

Identification

Label

@SYS5711 ()

HotelBookingld, CustExpense

Group2
Name

Payment

Label

@SYS23400 ()

TransDate, Amount

11.
RHotelManagement.


1.
2.

3.

,
RHotelManagement.
Relations RHotelRoomld
RHotelRoomTable
HotelRoomld.
Relations \
.
:

. 47.
RHotelRoomld

4.

RHotelBookingld
RHotelBookingTable Hotelbookingid.

. 48.


1.
2.

3.

, , RHotelManagement.
DeleteActions RHotelBookingTable
RHotelGuest
Expenses.
DeleteActions
DeleteAction.

:

. 49.
RHotelBookingTable

4.

RHotelRoomTable
RHotelBookingTable.
Restricted.

155

156

II.


1.
2.

3.

, , RHotelManagement.
Methods RHotelParameters
find
.
Methods
Method.
:

. 50. find RhotelParameters

4.
5.

find , , .
(
).
exist, numberSeqModule, numberSeqReference numHotelBookingld.

s t a t i c boolean exist ()
{

return (select firstonly r e d d


from RHotelParameters).recID

!= 0;

exist (
).
static client server NumberSeqModule numberSeqModule()
{
return NumberSeqReference_RHotel::numberSeqModule();
}
static client server NumberSeqReference

numberSeqReference()


<
returnNumberSeqReference::
construct(RHotelParameters::numberSeqModule());
}


.
static client server NumberSequenceReference numHotelBookingld
{
return NumberSeqReference::
findReference (typeId2ExtendedTypeId (typeid (RHotelBookingld) ) ) ;
}

display-
1.

, , RHotelManagement.
Methods RHotelRoomTable display-
container2Text
, .
Methods
Method.
:

2.

3.

d i s p l a y RHotelComplaintStr

container2Text()

L i s t l i s t = new L i s t (TYPES::String);
c o n t a i n e r = ( s e l e c t RHotelRoomTable
where RHotelRoomTable.HotelRoomld ==
this.HotelRoomld).Complain;

;
list = list::create(c) ;
if (list)
{

list.getEnumerator().reset() ;
return list.toString();
}
else
return "";
}
}

4.
5.

(
)
(F7
).
FieldGroups RhotelRoom
Table. Complaints

157

II.

Label @HTL5 ( ).
display- .
display- RHotelBooking
Table Customer:

6.

d i s p l a y Amount

totalExpense()

RHotelRoomTable room;
RHotelGuestExpenses expenses;

s e l e c t firstonly RoomCost from room


where room.HotelRoomld == this.HotelRoomld;
s e l e c t sum(Amount) from expenses
where expenses.HotelBookingld ==
return

this.HotelBookingid;

(this.ToDate - this.FromDate + 1 )
room.RoomCost + expenses.Amount;


1.

2.

delete RHotelParameters
.
Methods
MeTOA\delete.
:

c l i e n t void d e l e t e ()
{
throw error("@SYS23721") ;
}

delete ,

.
3. (
)
(F7
).
4. validateDelete:
Boolean

validateDelete()

return
}

false;



. ,
, -.
. ,
.
, ,

.
MorphX ,
.

,
.
, CustVendTable
: CustTable VendTable.
CustTable VendTable CustVendTable,
,
.

.

,
.
Maps Data
Dictionary .

Fields, Field Groups, Mappings
Methods. .
, ,
.
, ,
.

160

II.


Fields ,
, .
.




.

. ++

,
, .

Mapl, Field 1
Tablel 2 (. 51).




. ,
,
Common,
. 51.

.
,
, ,
.
.
,
. ,
insert Mapl
tablel:
Tablel t a b l e l ;
tablel.Mapl::insert();

Table 1 insert
.
.

Microsoft Axapta map,


, ,
. .


.
:
1. Data Dictionary Maps.
2.
Map .
3. . MorphX
.

. 52.

Fields ,
.
.
.
Field Groups
Group -

161

162

| II.

6.

7.

.
.

.
Mappings Mapping
. MorphX Mappings.
.

. 53.

8.

MappingTable ,
. MorphX

.
9. .
MapFieldTo ,
.
10. .
11. .


View
.


.
, , .
, .
:

Microsoft Axapta
.
.
,
. ,
,
.
: .
,
.
,
,
, ,
, .
, Field Groups,
, Methods. ,
. ,
Common, ++
,
. ,

164

II.

. 54.

select,
.

, .
.

Views Data Dictionary
. Views
.

Metadata, Fields, Field
Groups Methods.


,
. ,

.


Fields ,
. .

, .

. , ,
,
-. -
,
,
. - .
, , ,
.
, ,
, .
- ,
.



Common,
.
, validateDelete, validate Write, insert, update
, , .

, .
, ++.
, super insert,
update delete .


.
.
.

. 55.



. ,
.
:
;
;
.
, ,
, .
,
. ,
, , , , ..
,
, .
.
.
.

. 56.


,
, . ,
:

. ,
800 600
.

.
.

.

. ,
.
,
.
(grid),
, .
. ,
,

.

.

MorphX.
.
,

.


Forms
.

Forms.
Form.
Name.
:

Data Sources;

Methods;

Designs.

167

68

II.


, ,
Data Sources.
, .

drag-and-drop.
Data
Source . Data Source
,
.
-
, , .

. ,

:
. 87.

AllowEdit

AllowCreate

AllowDelete

join;

link.


.
relations .


,
.


,
.

JoinSource
. LinkType:
. 88.
:

InnerJoin

,
.
,

OuterJoin

ExistJoin


. InnerJoin.
InnerJoin,
, ExistJoin
.
ExistJoin
, .

NotExistJoin

,
.

Tutorial_Form_
Join
Grid (). LinkType,
.
,
.



.
JoinSource -

169

170

| II.

LinkType Active, Passive


Delayed.
. 89.

Passive

.
active()

Delayed

.
,
. ,

Active


. ,

, ,
.

.
.


, , ,

. ,
. ,
.
Methods.

Methods,
.
super (),
.
Methods
.
Method.
, ,
, .
,
, . ,

| 171

, ,
.
Methods
ClassDeclaration. Class
Declaration,
FormRun, ObjectRun.
FromRun
.
FromRun ObjectRun Classes,
System Documentation .


.


, ,
,
.
,
,
Design. ,

.

. ,

.
. 57.

drag-and-drop;




Design Control.

72

II.


. ,
. , Tab
TabPage.

.
, .


.

.
DataSource DataField
.
,
,
.



drag-and-drop.

Data
Sourse Design.
SHIFT CTRL,
.


, . .
,
. ,
,
, .
,
,
.
:
StringEdit , IntEdit , RealEdit
ComboBox .

| 173


, .
drag-and-drop
.
drag-and-drop .
,
CTRL.



.
,
Design.
.
,

, .
,

.

, Top, Left, Width Height
. Auto
.
. 58.




DEL.

, :
.
, , ,
.

II.


.


. ,
, ,
.

. ,
Label HelpText,
,
, .
:
.
,
, .

.

DataSource DataField.
DataSource , DataField
.

.
DataSource DataField
(, StringEdit, IntEdit),
- (Design, Tab, TabPage,
Group), .
,
.
DataSource ,
DataSource
. ,

. DataSource
.

.
.
, ,
, Index
.


,
,
. ,
StaticText,
Button,
Window.

.

ActiveX
ActiveX -,
.
ActiveX .
, ActiveX-,
,
, ,
, - .
Microsoft Office Microsoft Internet Explorer
- ActiveX-
Microsoft Axapta.
-
.
.

ActiveX-
ActiveX ,
:
1.

Design
Control.

2.

ActiveX . ActiveX.

ActiveX.

3.

.
Microsoft MonthView Control.

17

II.

. 59. ActiveX

4.

ActiveX-
ActiveX Explorer.

. 60. ActiveX Explorer

,
, ,
. Type Library
, .
Type Library.
, Microsoft Axapta - ,
.
5.

, ,
.

ActiveX
-. ++ ,
Microsoft Axapta .
ActiveX
ActiveX-. ++.
ActiveX Explorer
, ActiveX . ,
Microsoft Month View Control
Day, ,
ActiveX.

ActiveX
1.

2.


ActiveX
.
ActiveX,
Custom.

. 61. ActiveX

Animate
, *.avi.
.avi .
AutoPlay Yes, Loops
0, .avi
.
12 4594

177

78

II.

Button
.
, ,
clicked.

ButtonGroup
,
.

CheckBox
, , .
.
CheckBox
.

ComboBox
. ComboBox

,
.

CommandButton
, , (,
, ).
.

DateEdit
, .
: DateFormat, DateSeparator, Date Year,
DateMonth, DateDay.

Grid
.
(ALT+F9)
(CTRL+INS).


,
, .

, Microsoft Excel.

Group
, ,
.
Group.
.

HTML
HTML.

IntEdit
.
, 125+3*(10/3)-(8/(11+3)).
, .
: SignDisplay, RotateSign, ShowZero, DisplaceNegative.

ListBox
.
.

ListView
ListBox.
, .
ListView
:

(icon);

(small icon);

(list);

(report).
, Windows
Explorer.
ListView .
12*

179

180

II.

MenuButton
. Menultem
CommandButton, MenuItemButton,
Separator Button.

MenuItemButton
, .
MenuItemType MenuItemName.
.
'-

Progress
,
. ,
. .

RadioButton
,
.

RealEdit
.
.
: SignDisplay, RotateSign, ShowZero, DisplaceNegative,
ThousandSeparator, DecimalSeparator, NoOfDecimals, AutoInsSeparator.

Separator
, .
MenuButton.

StaticText
.
Text.

StringEdit
.
. MultiLine.
Changecase.

Tab
TabPages.
Tab ,
, Tab 2,
.

Table
. Table
. Grid, , ,
.
.

. ,
. TabPage
Tab.
Caption .



Tab.
1.

Design Tab
Control.

2.

Tab
TabPage Control.

3.

, Caption.

4.

2 .


Data Sources,
Control.
,
.

TimeEdit
, .
: TimeFormat, TimeHours,
TimeMinute, TimeSeconds, TimeSeparator.

181

82

II.

Tree
,
,
.
.
SysQueryForm.


Tree ListView
Tree ListView
,
.

. , ,
ImageListAppl.
ImageListAppl

. ImageListAppl_Prod,
.
ImageListAppl:
1.
2.
3.

, ImageListAppl.
ImageListAppl_XXX (, ,
ImageListAppl_Aot, ImageListAppl_Prod).
build, , ,
.

void b u i l d ()
{
super (); //
this.Add(tlmageProduction) ;
this.Add(#lmageltem) ;
this.Add(#ImageBOM) ;
this.Add(#ImageService) ;
this.Add(#ImageSetUp);
this.Add(tlmageProcess);
this.Add(#ImageQty);

super()

, Tree ListView,
, .
ImageListAppl_Prod.
void ClassDeclaration()
{
tresAppl


ImageListAppl_Prod imageListAppl_Prod;
FormTreeControl tree;
FormListControl list;
}
void init()
{
tree = element.control(control::myTree);
list = element.control(control::myList);
imageListAppl_Prod = new ImageListAppl_Prod();
tree.setlmageList(imageListAppl_Prod.ImageList()
list.setlmageList(imageListAppl_Prod.ImageList()
}
void insertTreeItem(int parent, str name)
{
FormTreeltem item = new FormTreeItem(name,
imageListAppl_Prod.image
(tlmageProduction) , 1 ) ;
tree.addltem(parent, FormTreeAdd::LAST, item)
}
void insertListItem(int parent, str name)
{
FormListltem item = new FormListItem(name,
imageListAppl_Prod.image(tlmageProduction));
list.addltem(item)
}

tutorialJormListControl tutorialJormTreeControl,
.


Window, .
,
.
Window
.
ImageName,
.

183

II.


:
1. Design Window
Control.
2. , , ImageName ImageMode. ImageName
. ImageMode
.


,
,
.
,
. ,
.
, ,
display edit.
Display ,
, , ,
.
, . display
, .

. , RealEdit
display-,
.
,
display-, .
display-
.
,
display
edit.
edit
. edit-
,
.

| 185

display-
display :
;
;
;
;
.
display-
,
. ,
display- . ,

.
display-, display
, :
// CustTrans
display AmountCur remainAmountCur()

display-,
.
, :
// LedgerTable
display AmountMST accountBalance(LedgerTable _ledgerTable)

display-, display-
. Display- edit-
, . Display-,
, .

remainAmountCur(), ,
CustTrans RemainAmount.

j II.

. 62.

DataSource
,
, DataMethod
display-.
DataSource ,
,
.
CustTransList
BalanceCur,
, BalanceCur.

. 63.

DataMethod display-.
Table , ,
,
, ReportRun.
Table display-
.

ExtendedDataType , ,

.
Display- .
Arraylndex 0, ,
. Arraylndex 2,
.

edit-
edit :

.
edit-
display-:
/ / edit-
e d i t FreeTxt t x t D e f a u l t ( b o o l e a n _ s e t ,

FreeTxt

_txt)

_set ,
- .
_txt ,
.
edit- ,

:
/ / CustOpenTrans
e d i t Amount s e t t l e ( b o o l e a n s e t , CustTrans _ c u s t T r a n s ,

Amount u)

, ,
, DataSource
DataMethod.

, edit- display-, ,
.


.
Tablel Subtotal_A Subtotal_B,
.

187

188

II.

1.

Tablel display-, :

Display int methodlO


{
return this.SubTotal_A + this.Subtotal_B;
)

2.


IntEdit.
DataSource Tablel,
DataMethod methodl.

. 64.

display-
display-
, display-
Grid.
display-.
,
, display- .
display,
edit- . , display . ,
.
, cacheAddMethod
super()
.
cacheAddMethod display-
.
,
.
.
.

public boolean cacheAddMethod(str _methodName,


boolean _updateOnWrite)

TRUE, display-
, FALSE. _updateOnWrite -

,
. TRUE. _updateOnWrite
,
display- .
cacheAddMethod
, .
super()
.
display-
cacheCalculateMethod.
tableMethodStr ,
, :
public void
{
super();

initO

this.cacheAddMethod(tablemethodstr(CustTable, freeValueCur));
}


, ,
- ClassDeclaration.
,
. :

;
;
;
.


, DataSources
, ,
Name ,
.
:
1. , ,
, :
Tablel.setDefault(ReadWrite::Write);

2.

, :

accountNum = Tablel.AccountNum;

189

190

| II.


.

_ds. FormDataSource.

, :
// AllowEdit
Tablel_ds

Tablel_ds.allowEdit(true);


, :
/ / AllowEdit F i e l d l
/ /
T a b l e l _ d s . object (fieldNum(Tablel, F i e l d l ) ) . a l l o w E d i t ( t r u e ) ;


,
element. element
, :
/ /
element.redraw();
/ / ,
object = element . a r g s () . c a l l e r () ;

/ /
formdesign = e l e m e n t . d e s i g n ( ) ;



,
AutoDeclaration .
,
. ,
ComboBox
FormComboBoxControl. ListBox FormListBox
Control.
Classes System Documentation
.

,
, ,
, :
/ / V i s i b l e
/ / f a l s e
ComboBoxl. v i s i b l e ( f a l s e ) ;

/ / Width
/ / 150
:,istBox.width(150) ;


, .
Microsoft Axapta :
, ,
.
.
,

.
,
, :



:
1. new.
2. init.
3. loadUserSetting.
4. init.
5. run.
6. execute
Query.

191

92

II.

. 65.


(Cancel)
:

. 66.

1.
2.
3.

closeCancel .
canClose .
close .


.
,

, :

. 67.

1.

2.
3.
4.

,
closeOK , ,
, closeOK .
canClose .
leave.
close .



Enter :

leave

>

design

validate
design

modified
design

>-

validate

DS

*-

modified
validate
modified
Field
Field >>
table

DS

table

. 68.

1.

leave .

2.

validate .

3.

modified .

4.

validate .

5.

validateField .

6.

modified .

7.

modifiedField .


:
, , ,
.
validate, modified validateField TRUE,
.
FALSE,
.

. ,

.
,
: , ,
/, ,
.
,
. ,
,
, , .

194

II.

. 69.

1)
2)
3)

create ;
initValue ;
initValue .

. 70.

1.
2.
3.
4.

validate Write .
validateWrite .
write .
insert
update, .

. 71.

1.
2.
3.
4.

delete .
validateDelete .
, .
validateDelete . validateDelete
, .
delete .



.

.

(. ).

++
++
ClassFactory. ,
CustTable:
form = ClassFactory.FormRunClass(formstr(CustTable));
form.init () ;
form, run () ;

ClassFactory xClassFactory,
FormRunClass, FormRun.
,
xClassFactory.



,
. Microsoft Axapta
Box.

Box. ,
warning:
Box: :warning(" ",

" ");

Box .
.

195

196

| II.


Box:
. 90. Box

info

warning

yesNo

stop

yesNoCancel


//

,
,

okCancelBox


,

, .

.
:

TitleFieldl ;

TitleField2 ;

, .
,

:
.

. 72.



CustGroupId,
CustGroup.

. 73.

TitleFieldl TitleField2
CustGroup
CustGroup ( ) Name
().

. 74. - TitleFields

, CustGroup.
CustGroup,
.
Name.
Name,
.
, , ,
TitleFieldl.



:
Lookup;
;
AutoLookup .

197

198

II.

Lookup


Lookup. ,
.
super() Lookup , ^
,
performDBLookup(Fieldld,

Fileld,

Company);


performTypeLookup(ExtendedDataType,

arraylndex, Company);

FormControlTypeControl (FormStringControl, FormRealControl, FormlntControl, FormDateControl


FormTimeControl).
superQ,
.
, performDBLookup
Fieldld,
.
void Lookup ()
{
FormStringControl FEL;
FEL = element.design().control(control::Country);
//12 Id ,
// Country
FEL.performDBLookup(12);
}

Buttonlmage ,
.



.
:
performFormLookup(FormRun),

FormControlTypeControl
(FormStringControl, FormRealControl, FormlntControl, FormDate
Control FormTimeControl).

,
, :

Frame Border. ,
;

CloseSelect(str).

CloseSelect FormRun.
, , ,
.
, ColorLookup
.

. 75. ColorLookup


, ,
, .
Clicked
.
Clicked :
void Clicked ()
(
Element.CloseSelect("Green");
}

Lookup ,
:
void Lookup ()
{

FormRun FR = new FormRun(New Args("ColorLookup"));


FR.init () ;

this.performFormLookup(FR) ;
}

,
, ColorLookup.
ColorLookup
,
. 76.

. 76. ColorLookup

199

II.

AutoLookup

, AutoLookup . ,
AutoLookup,
.

1.

:
,

.

. 77.

.
2.

3.


,
,
AutoLookup.
,
,
AutoLookup
.

. 78.
AutoLookup

AutoLookup .



, ,

.
, SysTableLookup.
SysTableLookup (
) ,
.
Query.
SysTableLookup:
/ / lookup
void lookup ()
{

// Query, QueryBuild
Query
query = new Query();
QueryBuildDataSource
queryBuildDataSource;
QueryBuildRange
queryBuildRange;
// SysTableLookup
// 'this' -
//
SysTableLookup SysTableLookup =
SysTableLookup::newParameters(tableNum(custTable) , this);

// ,
//
SysTableLookup.addLookupField(fieldNum(custTable, accountNum) ) ;
SysTableLookup.addLookupField(fieldNum(custTable, name) ) ;
// CustTable
queryBuildDataSource = query.addDataSource(tableNum
(custTable));
// AccountNum
queryBuildRange
= queryBuildDataSource.addRange (fieldNum
(custTable, accountNum));
//
queryBuildRange.value("A..B");
// SysTableLookup
SysTableLookup.parmQuery(query);
//
SysTableLookup.performFormLookup();

201

202 | II.
// .. ,
//
// super () ;
}

SysTableLookup
.

:
.
, :

.
;

. ,
;

.
,
.
.


, ,
,
.
, , ,
. Microsoft Axapta
, ,
.
.

,
,
.
:
.

. 79.

,
..
.
.
.
,
:
. 9 1 .

203

II.


: .

. 80.

:
. 92.

() ,

, : ,

,
, , ,
.
,
.
,
.
.


,
.

. ,
.
:
RHotelBookingTable RHotelGuestExpenses.
.
,
. .
,
, ,
.
. 93.

() .
.
,
. ,
. ,

. .

, . .

,
, , ,
, .
, ,
,
, .

.

205

II.

. 81.


. , -,
.
RHotelGuestExpenses

.
:
. 94.

.
.

, ,
, .
.
.

] 207


1.
2.

3.

4.
5.

6.

Forms .

Forms
Form.
.

.
RHotelParameters.
DataSources .
DataSources,

Data Source.

:

. 95. RHotelParameters

Name

RHotelParameters

Table

RHotelParameters

AllowCreate

No

AllowDelete

No

LinkType

Passive

InsertAtEnd

No

InsertlfEmpty

No

.
7.

. 96. NumberSequenceReference

Name

NumberSequenceReference

Table

NumberSequenceReference

AllowCreate

No

AllowDelete

No

InsertAtEnd

No

InsertlfEmpty

No

208

I II.

8.

RHotelRoomTable RHotelBookingTable :

. 97.

RHotelRoomTable
Name

RHotelRoomTable

Table

RHotelRoomTable

RHotelBookingTable
Name

RHotelBookingTable

Table

RHotelBookingTable

RHotelGuestExpenses
Name

RHotelGuestExpenses

Table

RHotelGuestExpenses

AllowCheck

No

JoinSource

RHotelBookingTable

9.


RHotelManagement.


1.
2.

, RHotelManage
ment.
RHotelParameters:

. 98. RHotelParameters

Width

Column width

Height

Column height

Caption

HTL19 ( ,
.: Hotel parameters)

DataSource

RHotelParameters

Columns

HidelfEmpty

No

3.

Design
Control\Tab.
Tab, .
Tab:

. 99. Tab

Name

Tab

Width

Column width

Height

Column height

Tab

4.

Tab
Control\TabPage. TabPage
TabPagel :

. 100. TabPage

TabPage
Name

General

Caption

SYS2952 ()

DataSource

RHotelParameters

TabPagel
Name

NumberSeq

HelpText

SYS53768 (
)

Caption

@SYS26442 ( )

DataSource

NumberSequenceReference

5.

6.

TabPage
LedgerAccount.
,
LedgerAccount RHotelParameters.
TabPagel
Group Grid. :

. 101.

Group
Name

Header

Width

Column width

FrameType

None

DataSource

NumberSequenceReference

Columns

14

4594

209

210

II.

Grid
Name

Grid

Width

Column width

Height

Column height

DataSource

NumberSequenceReference

7.

Group:Header
:

. 102.

Groupl
Name

Groupl

FrameType

None

Group2
Name

Group2

Width

Column width

FrameType

None

8.

Groupl Window:

. 103. Window

Name

Window

AlignControl

No

ImageResource

930

BackStile

Transparent

BackgroundColor

Button face (3D)

ShowLabel

No

9.

Groupl
StringEdit:

. 104.

StringEditl
Name

referenceLabeH

AllowEdit

No

Width

Column width

Skip

Yes

Border

None

BackgroundColor

Button face (3D)

ShowLabel

No

DataSource

NumberSequenceReference

DataMethod

referenceLabel

StringEdit2
Name

referenceHelp

AllowEdit

No

Width

Column width

Height

39

Skip

Yes

Border

None

MultiLine

Yes

BackgroundColor

Button face (3D)

ShowLabel

No

DataSource

NumberSequenceReference

DataMethod

referenceHelp

10.
NumberSequence, AllowSameAs
Grid.
Grid.
:
. 105.

NumberSequence
Name

NumberSequence

DataSource

NumberSequenceReference

DataField

NumberSequence

AllowSameAs
Name

AllowSameAs

BackgroundColor

Window background

DataSource

NumberSequenceReference

DataField

AllowSameAs

211

II.

11. Grid StringEdit


:
. 106.

StringEditl
Name

referenceLabel

AllowEdit

No

Skip

Yes

DataSource

NumberSequenceReference

DataMethod

referenceLabel

StringEdit2
Name

referenceSameAsLabel

AutoDeclaration

Yes

AllowEdit

No

Skip

Yes

DataSource

NumberSequenceReference

DataMethod

referenceSameAsLabel

12.
(


).
. 82. RHotelParameters

| 213
13.

RHotelRoom
Table:

. 107. RHotelRoomTable

RHotelRoomTable
Caption

@HTL15 ( )

TitleDatasource

RHotelRoomTable

Tab RHotelRoomTable
Name

Tab

TabPage RHotelRoomTable
Name

Overview

Caption

SYS9039 ()

TabPagel RHotelRoomTable
Name

General

Caption

@SYS57714 ()
14.

TabPage Grid:

. 108. Grid

Name

Grid

Width

Column width

Height

Column height

DataSource

RHotelRoomTable

15.

Grid RHotelRoomTable
HotelRoomld, HotelRoomType, RoomCost LedgerAccount.

16.

TabPagel
RoomNumber, RoomCost, LedgerAccount Complaints.

17.

ButtonGroup
Button :

. 109.

Buttonl
Name

AddComplaint

AutoDeclaration

Yes

Text

@HTL20 ( , .: Add complaint)

214

II.

Button2
Name

RemoveComplaints

AutoDeclaration

Yes

Text

@HTL21 ( , .: Remove complaints)

. 83. RHotelRoomTable

18. RHotelBooking
Table:
. 110. RHotelBookingTable

RHotelBookingTable
Caption

@HTL17 ( )

TitleDatasource

RHotelBookingTable

SaveSize

Yes

Columns

Tab RHotelBookingTable
Name

Tab

Width

Column width

Height

Column height

Columns

TabPage RHotelBookingTable
Name

Overview

Caption

SYS9039 ()

TabPagel RHotelBookingTable
Name

General

Caption

SYS2952 ()

Columns

Grid, TabPage
Name

Grid

Width

Column width

Height

Column height

DataSource

RHotelBookingTable

19. Grid Hotelbookingid, HotelRoomId,


CustAccount, FromDate, ToDate Posted.
TabPagel Identification, Number,
Customer, Period Posted.
20. RHotelBookingTable
Group, :
. 111.

Group RHotelBookingTable
Name

Line

Width

Column width

FrameType

None

ArrangeMethod

Horizontal, flush right

Tab RHotelBookingTable
Name

LineTab

Width

Column width

Columns

TabPage RHotelBookingTable
Name

LineOverview

Caption

@SYS9039 ()

TabPagel RHotelBookingTable
Name

LineGeneral

Caption

SYS2952 ()

215

216

II.

21. LineOverview Grid:


. 112. Grid
""

'."

Name

LineGrid

Width

Column width

Height

Column height

DataSource

RHotelGuestExpenses

22. LineGrid
CustExpense, TransDate
Amount
RHotelGuestExpenses.
23. LineGeneral
Identi
fication Payment.
24.
(
).
25. (
)


.

. 84. RHotelBookingTable


1.

final

Methods RHotelParameters.
++ ClassDeclaration.
:
class

FormRun extends

ObjectRun

NumberSeqReference numberSeqReference;
boolean runExecuteDirect;
TmpIdRef tmpIdRef;

2.

ClassDeclaration RHotelBookingTable:

public class FormRun extends ObjectRun


{
NumberSeqFormHandler numberSeqFormHandler;
}


1.

Methods RHotelParameters.
numberSeqPrelnit numberSeqPostlnit (
)
:

void

numberSeqPrelnit()

runExecuteDirect = f a l s e ;
numberSeqReference = RHotelParameters::numberSeqReference();
numberSeqReference.load();
tmpIdRef.setTmpData(NumberSequenceReference::
configurationKeyTable (RHotelParameters : : numberSeqModule () ) ) ;
}

void

numberSeqPostlnit()

numberSequenceReference_ds . o b j e c t (fieldNum
(NumberSequenceReference, AllowSameAs)).
visible(numberSeqReference.sameAsActive() ) ;
referenceSameAsLabel.visible(numberSeqReference.sameAsActive());

1
2.

numberSeqFormHandler
RHotelBookingTable:

NumberSeqFormHandler

numberSeqFormHandler()

if

(!

numberSeqFormHandler)

numberSeqFormHandler = numberSeqFormHandler::newForm(
RHotelParameters::numHotelBookingId().NumberSequence,
element, RHotelBookingTable_DS,
fieldNum (RHotelBookingTable, Hotelbookingid) ) ;
)
return

numberSeqFormHandler;

3.

(
)
(F7
).

217

II.


1.

Methods RHotelParameters.
init (
) :

void

i n i t ()

this.numberSeqPrelnit();
super () ;
RHotelParameters: :find () ;
this.numberSeqPostlnit();
}

2.

close RHotelBookingTable:

void

closed

if (numberSeqFormHandler)
{
numberSeqFormHandler.formMethodClose();
}
super () ;
}

3.

( )
(F7 IffiJ).



1.

Methods NumberSequenceReference RHotelParameters.


removeFilter executeQuery:

void removeFilter()
(
runExecuteDirect = false;
numbersequenceReference_ds.executeQuery();
}
void executeQuery()
{
if (runExecuteDirect)
{
super () ;
}
else
{
runExecuteDirect = true;


this.queryRun(NumberSeqReference::buildQueryRun(
numberSequenceReference,tmpIdRef,
RHotelParameters::numberSeqModule()));
numbersequenceReference_ds.research();
}
}

2.

create, delete, write, linkActive


validateWrite RHotelBookingTable
RHotelBookingTable:

p u b l i c void c r e a t e ( b o o l e a n

_append = f a l s e )

super(_append);
element.numberSeqFormHandler().formMethodDataSourceCreate();
}
public void delete ()
{
ttsbegin;
element.numberSeqFormHandler().formMethodDataSourceDelete();
super () ;
ttscommit;
}
public void write ()
{
ttsbegin;
element.numberSeqFormHandler().formMethodDataSourceWrite();
super () ;
ttscommit;
}
public void linkActive()
{
element.numberSeqFormHandler().formMethodDataSourceLinkActive();
super () ;
}
public boolean validateWrite()
{
boolean ret;
ret = super () ;
if (ret &&
!element.numberSeqFormHandler().
formMethodDataSourceValidateWrite())
{
ret = false;
}
return ret;
}


1.


AddComplaint RemoveComplaints. ,

219

220

II.

, clicked.
,
:
// clicked AddComplaint
void clicked ()
{
Dialog dialog = new Dialog("0HTL2O") ;
DialogField dlgComplaint;
List list = new List(Types::String);
#resAppl

if (! RHotelRoomTable.RecId)
return;
dialog.addlmage(#ImageEmployee);
dialog.addlnfolmage();
dlgComplaint = dialog.addField(typeid(RHotelComplaintStr));
if (dialog, run () )
{
ttsbegin;
if (rhotelRoomTable.complain)
{
list = list::create(rhotelRoomTable.complain) ;:
list.addEnd(dlgComplaint.value());
}
else
list.addStart(dlgComplaint.value()) ;
rhotelRoomTable.complain = list.packf);
rhotelRoomTable.update();
ttscommit;
RHotelRoomTable_ds.reread();
RHotelRoomTable_ds.refresh();
}
}
/ /
void c l i c k e d ()

RemoveComplaints

if

(! RHotelRoomTable.RecId)
return;

ttsbegin;
rhotelRoomTable.complain = c o n n u l l O ;
rhotelRoomTable.update();
ttscommit;
RHotelRoomTable_ds.reread();
RHotelRoomTable_ds.refresh ( ) ;
}

2.

(
)
(F7
).


,
.
,
.
MorphX
. , , ,
++ ,
.
.

.
SysQueryForm, Forms
.
,
Form .

. 85.

222

II.


,
,
.

.

.

, Data Sources;

, Methods.


,
.
. Data Sources
,
.
Relations
FetchMode JoinMode.

Sorting Ranges.

Sorting
Sorting
.
,
Sorting.
Ordering .
Sorting .
.
.
,
..
, Sorting,

.
Ordering.

| 223

Ranges
Ranges.

, Ranges. ,
:
"1000..2000,

11500,

3000"

,
1000 2000,
1500 3000.
,
,
( AND).
Value.
:
. 113. ,

. , .
= . , ABCD =ABCD
ABCD

. , .
, IABCD
. , . ,
100..200 100 200

>

, . ,
. , >100 101..

<

, . ,
. , <100 ..99
. , S*
, S. *S ,
S. S*S ,
S

. ,
, . , ?
, .
?
. , 1,3,5
1, 3 5

, Ranges,
.
Value.

224

II.


Methods
.
, , Method
.

:

. 86.

1.

, , init.
.

2.

run,
prompt next.

3.

prompt . prompt
true,
. , prompt
false
.

4.

next
.


.
Data Sources, Fields, Sorting, Ranges
.
.

| 225



. ,

.
Data Sources
, .
Relations.

, Relations .
Relations Yes.
FetchMode JoinMode
.
FetchMode :
. JoinMode
:

Innerjoin.
Relations;
Outerjoin.
Relations.
,
, ;
Existsjoin. ,
.
;
NoExistsJoin. ,
.
.

.
2 Tablel
. Tablel
2. :
. 114.
Tablel

1
2
3
15 4594

4
5
6
7

226

I II.


JoinMode :
. 115.

Tablel

JoinMode = InnerJoin

JoinMode = OuterJoin

JoinMode = ExistsJoin

JoinMode = NoExistsJoin

Queries ;

++ .


Queries .
:
1.

Queries
. Query
.

2.

, Name

;.

3.

Data
Sources
Data Source. .

4.


Table.

5.

Dynamic Fields
. Yes ,
. No
.
Yes.

6.

Fields
.
Dynamic No.
Fields ,
, ,
, ,
. Fields
, -.

7.

.
Fields Sorting
. Sorting,
, .

8.

, Sorting,
: (ascending)
(descending).

9.

.
Fields Range
.

10. -
Value.
11. .
Data Sources
. Data Source
Table
.
Relations
, Relations ,
Relations .
12. ,
Relations. Relations
Relations
.

227

228

II.

++
MorphX
++. , ,
.
.
,
.

Build Run.
Query, QueryBuildDataSource, QueryBuildRange,
QueryBuildLink, QueryBuildDynalink QueryBuildFieldList.
QueryRun.
Build
.
,
:
1.

Query
.

2.

QueryBuildDataSource
. -
.

3.

QueryBuildLink QueryBuildDynalink
.

4.

QueryBuildFieldList
.

5.

QueryBuildRange .

QueryRun, ,
, (next),
(get),
(prompt).
:
//
Query queryl = new Query ();
//
QueryBuildDataSource qbds = queryl.addDataSource(tablenum
(TableD);
// -
QueryBuildRange qbr = qbds .addRange (fieldnum(Tablel, Fieldl));
QueryRun qr;
//
qbr.value("100..200");


//
qr = new QueryRun(queryl);

// QueryRun
//
qr.queryO .dataSourceNo (1) .addRange (fieldnum(Tablel, Field2)) .
value("A*");
//
if (qr.prompt())
{
while

(qr.nextO)

//

(
//
qr.get(tablenum(Table1));
)
}

229


++ -
. ++
, . ,
.
, .
. ,
int, ,
.

,
() () .
, ,
. .
,
.
. ,

. ,
.
.
. ,
, ,
, .
, Point
class Point
{

int x; / / instance variable


int y; / / instance variable
}

, ,
.


1.
2.

Classes.
Classes
Class .


Classl, Class2 ..
classDeclaration,

.
. 87.


1.
2.

classDeclaration.
{ } .


1.
2.
3.

Method .
.
.
{ } .

232

II.


, Point.
Point, :
static void Job53()
{
// , Point
Point myPoint;
// Point
myPoint = new Point();
}

,
.
,
new .

++ new,
.
Point

class Point
{

int x; //
int ; // classDeclaration
}
void new (real _a=10.0, real _b=10.0)
{ //
= _;
= _;

new .
Point,
,
. ,
,
.
Point .
Point

:
static void Job54()
{
Point lowerLeft;
Point upperRight;

233

//
lowerLeft = new Point ();
//
upperRight = new Point(100., 200.0);
}


, ,
. ,
, ,
.
, Rectangle,
Point. Point Rectangle.
class Rectangle
f
Point
Point

lowerLeft;
upperRight;

new(real _topLeftX,

r e a l _topLeftY,

real
real

_bottomRightX,
_bottomRightY)

lowerLeft = new Point(_topLeftX, _topLeftY);


upperRight = new Point(_bottomRightX, _bottomRightY) ;
}

Rectangle ,
Point .
Point .



, finalize.
,
. , finalize ++
.
,
.
//

i f (Condition)
t h i s . f i n a l i z e () ;
(

234

II.

finalize ,
finalize .
finalize, MorphX ,
. finalize
, ,
DLL, finalize
.

Microsoft Axapta ,
. finalize .


,
.
,
.
.
:
Human

class Human
(
date birthdate;
boolean female;
)

new
void new(boolean isFemale, date _birth=today())
I
birthdate = _birth;
female = JsFemale;
1

Joirth
=.
new _birth,
(
todayO). ,
:
/ /
Human adam = new Human () ;
//
//

_ b i r t h ,

Human eve = new Human (true, 1\1\1990);

(today)


. ,
++
, :
myPoint.x = 10.0;
myPoint.y = 2 5 . 7 ;

//!!!
//!!!

Point
,
.

,
, ++
, .
, , Point,
.
class Point
{

real x; //
real ; //
}
//
void new(real _x=10, real _y=10)
{ // ,
= ;
= _;
}
real parmX(real _x = ) //
{
= _ ;
return x;
}
real parmY(real _ = ) //
{
= _;
return ;
)

, Point
.

Point, :
s t a t i c void

Job55()

// , Point
Point myPoint;

235

236

II.
myPoint = new Point();// Point
myPoint.parmX (10.0); //
//
myPoint.parmY(25.7); //
//
}

, ++

, .

this
this .
, , this
. this
( ).

, this
, .
, this
.
this:
class

Classl

int

a;

i n t parmA(int _a = a)
a = _a;
r e t u r n a;
void methodl ()
t h i s .parmA(16) ;

, this ,
this.a, .

this
( ) .
this .


,
, ,
.
.

static.

: , ,
, ,
. .
, (
).

static
,
static. :
-

methodAttr

class Attribute

static void methodAttr()

//
)

//
1


,
, () .

(::), :
Classl\lame::method();


:
class Classl
{
}

static void staticMethodl()//


{
//
}

237

238

II.
void methodl() //
{
//
}
:
void someMethodO
{
Classl classlObject = new Classl ();
classlObject.methodl(); //
//
Classl::staticMethodl(); //
}

++
.

++ .
.
,
.
, Point
. ThreePoint.
class Point
real x; /* x */
real ; /* */
void new (real _x, real _y)
{ //
= _ ;

= _;
class

ThreePoint

real
void

z;

11

new ( r e a l

super(_x,
z = _z ;

extends

Point

_x,

_y) ;

real
//

_y,

real

_z)

, ThreePoint z
(, ), Point.
, -

ThreePoint. ,
ThreePoint ,
.

, , , .
, ,
.
, .


-
,
, .
.

. ,
new finalize.
-
super(). ,
:
/: A t t r i b u t e * /
public class Attribute
int
void

objectVariable;
methodAtt()

//
/ s u b c l a s s : */
public class ColorAttribute
int
void

extends

Attribute

addedObjectVariable;
methodAtt()

super () ;
//

ColorAttribute
Attribute. , ColorAttribute
methodAtt. ColorAttribute
, .
super() methodAtt po-

239

240

II.

. superQ
,
-.


,
-
. ,

.

, ++ final,
,
. , methodAtt
final:
public class Attribute
{

int

objectVariable;

final void methodAtt ()


{

//
}

,
, . ,
final
.

,
final ,
:
/*: Attribute*/
final class Attribute
{

int

objectVariable;

public void methodAtt()


{

//
>

| 241


.

-, ++
:

Public. , public,
, ,
-.

Protected. , protected,
-,
.

Private. , private,
, .

,
,
, . ,

, protected. ,
,
private.
, ,

. , , protected,
public,
private.
private protected
, ,
.

,
public.

private-

16 4594

242

II.


,
. ++
. ++
.
. :
void methodl ()
f
// , MyMethod
void embeddedFunction()

t
//
}

embeddedFunction();
}

Microsoft Axapta
. 400,
.
.

++
++
. ,
, .
.
,
.
++
: ,
.
, .
++
.
:
class Classl
(
int valuel;
}


void methodlO
{
int value2;
}

valuel , value2
methodl. ,
, (
valuel), . ,

.
valuel methodl,
.
,
,
:

. 88.

.
.
,
.

d . d .
due ,
.
++,
:

243

244

II.


class ClassA

methodB

//

void methodBO
f
//

methodC
void methodCO
(
//
void functionD()
{

//
)
int functionE()
{

//
)
)


, ++
.
.
.

, ,
. :

class Parameter
1
int a;
real b;
)

methodQ
void methodQ(int _aval, real _bval)
{

a = _aval;
b = _bval;
1

Parameter.
methodQ, : .
methodQ.
_aval, _bval, .
, .
, ParameterObject
Parameter. methodQ
:
ParameterObj ect.methodQ(1,2.0) ,

_aval 1,
_bval 2.0.
b ParameterObject 1 2.0 -

.
.

, .
, ,
,
:
methodA


class ByValue
(
)

methodB

void methodA(int i)

void methodB()

i = i + 1;
print i;

int i = 3;
print i;
this.MethodA(i);
print i;

I
1

ByValue
methodA methodB.
MethodB ,
methodA.
MethodA ,
, , .
i
methodB ( ).
methodB ;
methodB methodA
methodA, .
: 3 4 3. ,
i , ,
methodA ,
.


,
.
, .
, .

245

246

II.

, ,
, . ,
.
,

. :

, .


.
ClassDeclaration
,
.
interface

Interface!

extends

Interface2

,
.


,
.
. :
class

SysDatalmport

extends SysDataExpImp
implements sysDeleteTables

{
}

//
container deleteTables()
{

//

, ,
.



,
.
Microsoft Axapta .
.
NumberSequenceReference ( ),

. ,
,
. , , :

( );

,
;

NumberSequenceTable ( )
,
.
, .

NumberSeqReference_RHotel NumberSeqReference.
, ,
NumberSeqReference
: construct moduleList.

RHotelLedgerPosting.

.
.

,
, ,
, ( ),
( ).
display- totalExpense,
RHotelBookingTable.
.
,
, .

247

248

II.

(
).


1.

2.


Classes
Class.
- ClassDeclaration.
NumberSeqReference_RHotel NumberSeqReference.

public class

NumberSeqReference_RHotel
extends numberSeqReference

{
}

3.

numberSeqModule.

Method.
Methodl.
, numberSeqModule.
:

public

static

client

s e r v e r NumberSeqModule

numberSeqModule()

return

NumberSeqModule::RHotel;

4.

loadModule.

MeTOflUoadModule. :

p r o t e c t e d void

loadModule()

NumberSequenceReference

numRef.dataTypeld =

numRef;

typeId2ExtendedTypeId(typeid
(RHotelBookingld));
numRef.referenceHelp = literalStr("8HTL22");
numRef.wizardContinuous = true;
numRef.wizardManual = NoYes::No;
numRef.wizardAllowChangeDown = NoYes::No;
numRef.wizardAllowChangeUp = NoYes::No;
numRef.sortField = 1;
this.create(numRef);

@HTL22
,
Unique key for identification of booking code.
5. construct moduleList NumberSeqReference. construct switch
:
/ / Hotel module >
case (NumberSeqReference_RHotel::numberSeqModule())
r e t u r n new NumberSeqReference_RHotel(_module);
/ / Hotel module <

moduleList, , return,
:
/ / Hotel Module -->
moduleList += NumberSeqReference_RHotel::numberSeqModule();
/ / Hotel Module <--

6.

(F7 Compile
).
RHotelManagement.


1. RHotelLedgerPosting.
2. checkPost, initValue, post, postLedgerTrans main:
class

RHotelLedgerPosting

RHotelBookingTable bookingTable;
void initValue(RHotelBookingTable

_bookingTable)

bookingTable = _bookingIable;
static void main(Args _args)
RHotelLedgerPosting

posting = new RHotelLedgerPosting() ;

posting.initValue(_args.record()) ;
if (posting.checkPost() )
posting.post();
}
boolean checkPost()
{
boolean ret = true;

249

250

II.
if
if

(! bookingTable.RecId)
return false;
(bookingTable.Posted)
return false;

return ret;
(
void postO
{

ttsbegin;
this.postLedgerTrans() ;
bookingTable.Posted = NoYes::Yes;
bookingTable.update();
ttscommit;
}
protected void postLedgerTrans()
{
LedgerVoucher ledgerVoucher;
LedgerVoucherObject ledgerVoucherObject;
LedgerVoucherTransObject ledgerVoucherTransObject;
TransactionTxt transactionTxt;
LedgerBondClient_RD ledgerBondClient;
NumberSeq numberSeq;
Voucher voucherld;
RHotelRoomTable room;

numberSeq = NumberSeq::newGetNum(CustParameters : :
numRefCustlnvoiceVoucher()) ;
voucherld = numberSeq.num();
transactionTxt = new TransactionTxt!);
transactionTxt.setType(LedgerTransTxt::None) ;
transactionTxt.setDate(bookingTable.ToDate) ;
transactionTxt.setVoucher(voucherld);
transactionTxt.txt(bookingTable.HotelRoomld) ;
ledgerVoucherObject = LedgerVoucherObject::
newVoucher(voucherld,
bookingTable.ToDate, SysModule::System,
LedgerTransType::None, NoYes::No);
ledgerVoucher = LedgerVoucher::newLedgerPost(DetailSummary: :
Summary, SysModule::System, voucherld);
ledgerVoucher.parmVoucherSeriesCode
(numberSeq.parmNumberSequenceCode());
ledgerVoucher.AddVoucher(ledgerVoucherObject);
ledgerBondClient = ledgerVoucher .findLedgerVoucherObject () .
ledgerBondClient RU();


if (ledgerBondClient)
ledgerBondClient.addNewLogObject ();
ledgerVoucherTransObject = LedgerVoucherTransObject::
newCreateTrans(
ledgerVoucher .findLedgerVoucherObject () ,
LedgerPostingType::Allocation,
custLedgerAccounts::sumAccount(bookingTable.CustAccount) ,
Dimensions::emptyDimension() ,
Companylnfo::standardCurrency(),
bookingTable. totalExpense () , bookingTable. r e d d ) ;
ledgerVoucherTransObject.parmTransTxt(transactionTxt.txt());
ledgerVoucher.addTrans(ledgerVoucherTransObject);
select firstonly LedgerAccount from room
where room.HotelRoomld == bookingTable.HotelRoomld;
ledgerVoucherTransObject = LedgerVoucherTransObject::
newCreateTrans(
ledgerVoucher .findLedgerVoucherObject () ,
LedgerPostingType::Allocation,
room.LedgerAccount, Dimensions::emptyDimension(),
Companylnfo::standardCurrency() , -bookingTable.totalExpense() ,
bookingTable. r e d d ) ;
ledgerVoucherTransObject.parmTransTxt(transactionTxt.txt() ) ;
ledgerVoucher.addTrans(ledgerVoucherTransObject);
if (ledgerBondClient)
{
if (ledgerBondClient.currentLogLength() == 2)
ledgerBondClient.bondLastVRef2CurrentLog();
ledgerBondClient.removeCurrentLogObject();
}
ledgerVoucher.end();
}

3.


RHotelManagement.

251



.
,
. ,
,
.
MorphX ,
.

. , Microsoft Axapta
,
. ,
,
.
,
, ,
.
Microsoft
Axapta

.
.
Microsoft Axapta,
, , ,
Menus .
, ,
.


:
1. Menu ,
Menus .
2. .

3.

, , ,
,
.


drag-and-drop.

4.


MenuItemType MenuItemName. MenuItemType
: Display, Output Action.
MenuItemName .
Shortcut

.


, .
: ,
, , , web-.

. ,
,
main, .
89 ,
, , ,
, X.

. 89.

253

254

II.

. 90.

, , , D
X,
,
X.
, ,

.
,
, X
.
Menu Items
.

Display, Output Action, Menu Items,


:

Display ,
;

Output , ;

Action , ,
.

,
, .
, ,
.

.


:
1. Menu Item ,
Display, Output Action.
2. (
).

I 255

, drag-anddrop, (, , , ) Menu Items.

++
++ MenuFunction. formSettlement
LedgerJournalTrans:
client boolean

formSettlement(LedgerJournalEngine
_ledgerJournalEngine)

{
FormRun
Args
boolean

if

formRun;
args = new A r g s O ;
end
= false;

(!this.accountNum)

{
throw error("@SYS25989") ;
}
//
args.record(this) ;
args.parmobject(_ledgerJournalEngine) ;
//
//
switch (this.accountType)
{

II
case LedgerJournalACType::Cust :
formRun = new MenuFunction(menuItemDisplayStr(
CustOpenTrans),
MenuItemType::Display).create(args);
break;
//
case LedgerJournalACType::Vend :
formRun = new MenuFunction(menuItemDisplayStr(
VendOpenTrans),
MenuItemType::Display).create(args) ;
break;
default:
end = true;
}

256

II.
if

(!

end)

if
{

(formRun)

//
formRun. run () ;
// ,
formRun.wait();
}
}
return end;
}

:

.
.
:

. 91.


.
,
.
.


1.
2.

Display Menultems
.

Display
Menultem.

3.

Menulteml
:

. 116. RHotelParameters

Name

RHotelParameters

Label

OSYS7764 ()

HelpText

@HTL23 ( , . Set up
parameters for the hotel management module)

Class

Form

Object

RHotelParameters

4.
5.

(

).
RHotelRoomTable RHotelBookingTable:

. 117. RHotelRoomTable RHotelBookingTable

RHotelRoomTable
Name

RHotelRoomTable

Label

@HTL16 ( )

HelpText

HTL24 ( , .: Room data)

Class

Form

Object

RHotelRoomTable

RHotelBookingTable
Name

RHotelBookingTable

Label

SYS7669 ()

HelpText

@HTL17 ( , .: Room booking)

Class

Form

Object

RHotelBookingTable

6.


RHotelManagement.


1.
2.
17 4594

Action Menultems
.

:

257

258

II.

. 118. RHotelLedgerPosting

Name

RHotelLedgerPosting

Label

@SYS12919 ()

HelpText

SYS1900 ( )

Class

Class

Object

RHotelLedgerPosting

3.


RHotelManagement.
RHotelBookingTable,
ButtonGroup Group:
Line.
RHotelLedgerPosting
ButtonGroup.
MenuItemButton,
.


.
.
, active:

4.

5.

6.

public int active()


{

int

ret;

if (RHotelBookingTable.Posted)
{
RHotelBookingTable^ds.allowEdit(false);
RHotelGuestExpenses_ds.allowEdit(false);
}
else
{
RHotelBookingTable_ds.allowEdit(true);
RHotelGuestExpenses_ds.allowEdit(true) ;
}
ret = super () ;
return ret;
}

7.



. , -

. ,
clicked RHotelLedgerPosting:
void clicked()
{

super () ;
RHotelBookingTable ds.refresh();
RHotelBookingTable_ds.active();
}

super()
, RHotelLedger
Posting . ,
,
.



1.
2.
3.

Menus .
.
Menus Menu.
Menul
:

. 119. RHotel

Name

RHotel

Label

@HTL25 ( , .: Hotel management)

HelpText

@HTL26 ( , .: Hotel management module)

setCompany

Yes

4.
5.


/ .
:

. 120.

Menultemtype

Display

MenultemName

RHotelBookingTable

6.

() .

259

260

| II.

/.
:
. 121.

Submenul
Label

SYS7800 ()

Submeau2
Label

SYS2186 ()

7.


RHotelRoomTable RHotelParameters.
8. (

)
RHotelManagement.
9. Menu MainMenu.
MainMenu
/ .
Select:Menus.
RHotel Select:Menus MainMenu.
,
.
10. (

).



. ,

.
Reports .

. 92.

Query.
, .
,

262

II.

Data Sources. , ,
Data Sources.
,
. .

Relations ;

Ranges. Ranges

. . ,

, AccountNum
40..50. ,
40 50.
,
;

Sorting. Sorting

.
.
;

Methods.
. ,
;

Report Design. .
,
Report Design. Report Design
: AutoDesignSpecs
Generated Design. AutoDesignSpecs
Query
.
Generated Design
Report template.
Generated
Design .
,
,
,
. , AutoDesignSpecs
.
Generated Design.


, ;

Report Templates.
, ,
.
.
,
.
.
,
;

Section Templates.
,
. ,
, .
.

Microsoft Axapta
:


.
, , ,
.

.
.
Reports
.


, ,
.
,
,

.

263

264

II.

. 93.

, ,
. ,
.
: ,
.
,
, ,
, , ,
.
AutoReport. ,
,
.
,
.


, .

Reports, , .
. ,
.


,
,
.
:
1.
, .
,

2.

, ,
.
.

.

.
.

3.

.
, .
.

4.


.
.

5.

.
display-.

6.

.
.

7.

-.
. ,
.

8.

.
6. ,
.

9.

. -

.

10. .
, .
11. .
.
.
,
.

.
12.
,
.
.

265

II.

,
.
13.
.


.
:
1.

Reports
Report.

2.

3.

,
.
, .
Ranges.
Sorting. Relations
.

4.

.
Designs Report Design
. ReportDesignl
AutoDesignSpecs.

5.

Report Template ReportDesignl


. , MorphX
.

6.

AutoDesignSpec
Query.
AutoDesignSpecs
Body
,
Sorting
. Sorting ,
Body
. Body

,
, .
7.

. 94.

drag-and-drop,

. -

8.


.

. ,
Table DataField.


. .
, , ,
,

.
-
. ,
-,
.
,
Report Design.
Generated Design.

. -,
.

,
.


, ,
. .
,
,
Portrait, Eandscape.
,
.

Report Design ,
Designs.

. -

267

268

II.

. design .
, init :
public void init ()
<
super () ;
// this.design("ReportDesignl");
// -
this.design("ReportDesign2");

.!


,
. .



, .
,
, .
.
. 122.

Prolog

. ,
, , .

Page Header

Header

.
, ,

Section Group

.
, ,

Body

. .
.

Section Template

. ,
Section Teamplates Reports

Footer

.
,

Page Footer

,
.

Epilog

.
.

Programmable
Section

,
. .

element.execute(N). N ,
ControlNumber

96 ,
.

. , ,
, , ,
. ,
,
,
, .
,
.

.
.
. 123.

String

Enum

Integer

Real

Date

Time

Text

, Text

Prompt

.
, , Label

Shape

. :
, , ,

269

270

II.
1

Bitmap

, ,
display-

Sum

. , Footer,
PageFooter Epilog. ModelFieldName
, .
display-

, String, Enum,
Integer, Real, Date, TimeOfDay Date,
, display-.
Table DataField
. Display- DataMethod.

Bitmap, display-:
1.

Prolog Bitmaps.

. 95. Bitmaps

2.

display-.

display container

showCompanyLogo()

image img = new image () ;


i m g . l o a d F i l e ("c: WbitmapsWcompanylogo.bmp") ;
r e t u r n img.getData () ;
}

3.

DataMethod display showCompanyLogo.



.

,
.

. 96.

,

,
.
.

.
.
.
Left,
,
Auto . Auto

.

DEL .

271

272

II.



, , ,
, .
.
ReportTemplate . ,
,
AutoDesignSpecs. ,
, ,
, ,
.
,
.
,
.
, .
,
,
.
, AutoDesignSpecs. ,
Generated Design,
, .
,
Generated Design ,
, .

.
display-.


:
1.

2.
3.

4.

Report Templates,
Reports,
Report Template.
.

, , ,
.

.

5.

display-,
Methods Method.
display-
.
display- . Display-
DataMethod .


Methods ,
.
.
.

. , ,
,
.

. Display-
.
Methods ClassDeclaration, .
, .

Method .
Methods
ExecuteSection.
. ,
, ,
super().
ExecuteSection
,
, .
.
AutoDeclaration Yes.
++
hide() .
show().
Exe
cuteSection ,
.
element.newPage(),
superQ ExecuteSection.

273

274

II.

. 97.

1.

, , ink,
.

2.

run .

3.

run fetch.

, .

4.

run print,
.

fetch .

. fetch
.
fetch send. , send
executeSection ,
header footer
.
:

. 98.

1.
2.

3.
4.
5.
6.

| 275

prompt .
prompt printerSettings,
: ,
.
send , .
send header.
header.
executeSection
.
footer footer. footer
footer.

:

,
, .


.

. ,
,
.

. 99.


1.

2.
3.

18"


(/ //
). , ,
.

.
RHotelComplainTotal
.
HTL.

276

II.

4.

RHotelRoomTable. .

5.

tainer2Text. display-.

6.


HotelRoomID.

7.

HotelRoomID
.

8.

HotelRoomID ,
.

9.

.
(Tabular)
FrontPage.

10.
.

.
11. ,
.
.
12. RHotelComplainTotal Reports .

.
13. RHotelComplaintTotal RhotelComplaintTotal RHotelManagement.

,
1.

2.
3.

4.

, ,
, .
.
, , RHotelManagement.
.
ReportDesign
.

Container2Text. AutoDeclaratin
Yes.

5.

executeSection RHotelRoomTable_Header :

public void executeSection ()

if (RHotelRoomTable_l.Complain)
{ // ,
// ,
Container2Text.visible(true);
super () ;
}
else // , ,
//
Container2Text.visible (false);
}

6. (
).




, ,
(
, , 1099 ..),
/ /
.

.
,

Microsoft Axapta ( ).
( ,
),
, .
:

Microsoft Axapta;
;
.

277

278

II.

3.0
, 30 :

(security keys);

(configuration keys).

feature,
.
,
. :
LedgerBasicSalesTax, LedgerBasic.
,
, .
16
( CSECountry).

(
), Production:

ProductionDaily ( );

Productionjournals ( );

Productionlnquiries ();

ProductionReports ();

ProductionPeriodic ( );

ProductionSetup ();

ProductionMiscellanous ( menuitems,
, );

ProductionTables ( ).

. 100.

| 279

2. ,
.
drill-down
, ,
..
.
:

. 101.

:

RHotel,
,
.

RHotel.

280

II.

. 102.


1.

Configuration Keys
.

2.


Configuration Keys
Configuration Key.

3.


RHotel :

. 124. RHotel

'

Name

RHotel

Label

@HTL22 ( )

ParentKey

CSECIS

4.

RHotel.

. SecurityKeys
.
:


. 125. RHotel

RHotel

Label

@22 ( )

ConfigurationKey

RHotel

5.

RHotelSetup, RHotelReport, RHotelDaily:

. 126.

RHotelSetup
Name

RHotelSetup

Label

SYS2186 ()

ParentKey

RHotel

RHotelReport
Name

RHotelReport

Label

SYS7800 ()

ParentKey

RHotel

RHotelDaily
Name

RHotelDaily

Label

SYS13656 ( )

ParentKey

RHotel

6.
7.


RHotelManagement.
ConfigurationKey (,
, ),
, RHotel.
:

. 127. ,

RHotelCustExpense, RHotelRoomType

RHotel NumberSeqModule

281

282

II.

8.

SecurityKey.

:

. 128. ,

RHotelSetup

RHotelParameters

RHotelRoomTable

RHotelParameters

RHotelRoomTable

RHotelDaily

RHotelBookingTable

RHotelBookingTable

RHotelReport

9.

RHotelComplaintTotal


++. post
RHotelLedgerPosting :

DictSecurityKey SecurityKey = new


DictSecurityKey(securityKeyNum(RHotelDaily));
if

( S e c u r i t y K e y . r i g h t s ( ) == AccessType::NoAccess
S e c u r i t y K e y . r i g h t s () == AccessType::View)

throw
}

error("@SYS60037");

||


HTML.
:

RoboHelp.

RoboHelp ( eHelp)
()
. RoboHelp HTML
*.chm
.
RoboHelp.
,
( ):


: ?,
?
;


, ?
? ?;


.
.

.

Microsoft Axapta Micro


soft FrontPage.
Microsoft FrontPage,

.
Microsoft
Axapta:

284

II.

( ),
;

F1 ;

Microsoft Axapta
.
Application Documentation
.
.
, , ,
.
, , .
help
Shift+Fl ? .

. ,
,
.

. 103.

,

.


.

. 104.


Microsoft Axapta (appldoc://
Classes/SysHelpEditor):
Microsoft Axapta (
F1 );
;
.

. 105.

285

III


?
,
,

, II.

Best Practices. ,
.
, , (
), SYS,

.
,
, ,
.
,
.

,
.

,
( ), .
SQL Server
.
.
/ SQL Server
, .
, .
,
SQL Server 8 .
,
. :

Data

image, text, ntext.

Index
.
,
.

Text/Image
, image, text ntext.
,
,
Data.

Global Allocation Map (GAM) .


().

Page Free Space (PFS)


.

Index Allocation Map (IAM)


,
.


.
(extent),
.
, ,
.

MS SQL Books Online. ,

,
. , ,
,
, .


,
.
, ,
.

.
, , .

.


,
. ,
. , , , ,
, .
SQL
. .

, .

. , -

289

290

| III. ?

ACID,
. :

(Atomicity). ,
, .
,
, .
(Consistency).
,
, .
(Isolation). ,
,
. , ,
, .
.
(Durability).

,
(, ).
.

,

.
SQL-
(locks).
,
. ,

. ,
,
.
,
.
.
.

, ACID
, -,
,
.
:
,
.
.

,
, .

. ,
, .
(deadlock).
.
, , ,

. ,
,
.


(locks) ,
.
,
.
.

,
,
. SQL Server
,
.

, .
.
(Row),
(Table) .
, (Page)
(Extent).

, ,
:

(The lost update problem).



.

,
.
,

291

292

| III. ?

,
.
(The uncommitted dependency
problem). ,
,
. ,
,
- .
(The inconsistent analysis prob
lem).
.
,
.
(The phantom read problem).
,
,
.

,
.

(ANSI) ,
.
, ,
( ) .
.
, MS SQL
:

READ UNCOMMITED
. ,

, , ,
.
(dirty) (unrepeatable) .
, ,
.

READ COMMITED
. ,
,
. ,
, ,
,
. ,

(unrepeatable)
.

REPEATEABLE READ
,

.
.

SERIALIZABLE ,
MS SQL Server.
,
. , /
,
, .


MS SQL Server
,
. :

RID
.

Key .

Page .
.

Extent .
, (
).

Table .
DB .

SQL Server
.

.

Microsoft Axapta
Microsoft Axapta (
) Microsoft Axapta, (application) .
:

Microsoft SQL Server, ,


Microsoft Axapta, ,

293

294

III. ?

Oracle 9i server, Microsoft Axapta


/ Oracle Microsoft Axapta
, .

Microsoft Axapta ODBC


MS SQL Server. ODBC
Microsoft MDAC. MDAC 2.6 SP2
Microsoft
Axapta 3.0.
Microsoft Axapta
,
.

(constraints) no Primary key ( ).


, Primary key
.
, Null, .

Null Not Null. Not Null


Null-.

Check.
, true, false Unknown
(Null).
Microsoft Axapta 3.0 Redd <> 0.

(View):

Microsoft Axapta 3.0


.

MS SQL Server;

Oracle Microsoft Axapta 2.5.


Oracle
(Index organized tables).

Oracle Microsoft Axapta 3.0.


Oracle.

LOB ( ). LOB
.
Microsoft Axapta LOB,
.
( , partitioning)
(company Id). Microsoft Axapta
3.0 .
Microsoft Axapta
-.
.

Microsoft Axapta
Microsoft Axapta
( ) .
, Microsoft Axapta ,
.

:

DataAreald.
DataAreald Microsoft
Axapta. DataAreald
. DataAreald ,
SaveDataPerCompany Yes, .
,
.
,
SaveDataPerCompany , DataAreald = < > . ,
DataAreald. ,
, .
,
, DataAreald
,
,
.

Redd.
Redd .
Microsoft Axapta
1..2147483647, -2147483647..-1,
.

.

295

296

III. ?

Redd,
, .

.
R e d d Microsoft Axapta
SystemSequences :

SELECT NextVal
WHERE Id = -1
AND DataAreald = <Current
AND Tabid = 0

Company>

NextVal 25.
25 .
. ,
,
.
R e d d ( ),
,
/ /SQL /
.

Microsoft Axapta
, Microsoft Axapta
, .

. , ,
.
. 129.

ModifiedDate

Date

Virtual: NULL
Real:

ModifiedTime

Integer

Virtual: 0
Real:
0.00

Modified By

Str(5)

Virtual: NULL
Real: ,

ModifiedTransactionld

Interger

Virtual: 0
Real: Id ,

Created Date

Date

Virtual: NULL
Real:

CreatedTime

Integer

Virtual: 0
Real: 0.00

CreatedBy

Str(5)

Virtual: NULL
Real: ,

CreatedTransactionld

Integer

Virtual: 0
Real: Id ,

Tableld

Integer

Id

SequenceNum

Integer

Redd


. Transactionid Redd,
, Transactionid
10:
SELECT NextVal FROM SystemSequences WHERE Id=-2.


NOT NULL ,
Str memo
Container.
, ,
Microsoft Axapta .

.
.130.

Microsoft Axapta


SQL Server


Microsoft Axapta

Oracle

Str(n)

Varchar

Varchar2(n)

Oracle: ASCII(2)
SQL Server: "

Str memo

Text

Clob

NULL

Int

Int

Number(10)

Real

Numeric(28,12)

Mumber(32,16)

Enum

Int

Number(3)

Date

DateTime

Date

Oracle:
1900-01-01 00:00:00
SQL Server:
N1900-01-01 00:00:00.000'

Time

Int

l\lumber(10)

Container

Image

Blob

NULL

297

298

III. ?

,
.
,

.
:
I_<TableId><IndexName>.
Tableld Micro
soft Axapta, IndexName . ,
Myldx ZipCode (Tableld 517)
I_517MYIDX .

INDEX.
:

SaveDataPerCompany = Yes,
DataAreald

AllowDuplicate = Yes,
, .

, Microsoft
Axapta , Redd
.

.

,
Microsoft Axapta.
, ,
.


I_<TableId>RecId,
:

;

;
CreateRecIdlndex .

(,
, , )
Microsoft Axapta. ,


Microsoft Axapta.
. ,
- .

.

2- Microsoft Axapta
:

,
(number sequence generation)
. .

,
.

,
- .

(read-only),
, ,
. ,
,
.

. ++

, Connection, UserConnection
OdbcConnection.


.
, , ,
,
.
,
.

Oracle SQL Server Microsoft Axapta


Microsoft Axapta:

MS SQL Server,
(uncommitted) .
Oracle . -

299

300

III. ?


(scrolling) .
MS SQL Server
. Oracle ,

.

MS SQL Server


.
Microsoft
Axapta ( ).
(hints, ) ,
, .
Microsoft Axapta :
READ UNCOMMITTED ;
READ COMMITED .
SELECT FORUPDATE SELECT FROM <Table>(UPDLOCK).
SELECT ( ForUpdate):
CacheLookup = None NotlnTTS
NOLOCK;
CacheLookup NotlnTTS

NOLOCK;
<Table>.SelectLocked(FALSE)

CacheLookUp;
<Table>.ReadPast(TRUE)
.
Microsoft Axapta
.

Oracle

,
.
( 2.5
3.0 ,
2.5).
SELECT FORUPDATE SELECT FOR UPDATE.
.


,
,
.
.

.


Microsoft Axapta
. ++
.
,
, .
( )
,
:

Microsoft Axapta
: (set),
( ) , (list), (array)
(struct).

Microsoft Axapta.
++, anytype
. anytype
++.
, .

302

| 111. ?


. ,
,
(, , ).
,
,
. ,

s ,
(
, ).
, (,
), (
), .

.

(List)
,
,
.
++. ,
. ,
.
-
(Listlterator).
:
/ /
L i s t 1 = new L i s t ( T y p e s : : S t r i n g ) ;
/ /
1.addEnd("");
l.addEnd("HBaH");

l.addStart("") ;
/ /
p r i n t 1.elements ( ) ; / / : " 3 " ( )
p r i n t l . d e f i n i t i o n S t r i n g () ; / / : " L i s t of s t r "
p r i n t 1 . t o S t r i n g ( ) ; / / : <"", "",
"">
pause;

,
,
.

, :
/ /
Listlterator l i ;
/ /
L i s t 1 = new L i s t ( T y p e s : : S t r i n g ) ;
l.addEnd("");
l.addEnd( w MBaH");
l.addStart("") ;
//
li = new Listlterator(1) ;
while (li .more () )
{
print li.value () ;
li .next () ;
}
pause;

. 131.

public new(types type)

public boolean empty()

true, , false;
elements() == 0

public int elements()

public any addStart(any value)

public any addEnd(any value)

public boolean equalTo(list I)

true,
, ,
false; ,

public int typeld()

container pack()

,
; ,

oublic str toString()

,
<, , >,

1 public str definitionString()

, list
of int ( )

304

I III. ?

public static list merge (list 11, list 12)

,
12,

public static boolean equal(list 11, list 12)

true,

public static list create(container c)

,
()

(Set)
-,
.
, Set Setlterator
, List Listlterator.
,
.

.
.
add().
:
/ /
Set i s = new s e t ( t y p e s : : i n t e g e r ) ;
/ /
print is.add(1);
print is.add(2);
print is.add(l);
p r i n t i s .definitionString () ;
print is.toString();
pause;


, .
. 132.

public new (types type)

public boolean in (any value)

true,
, false

public boolean add (any value)

; true,

public int elementsQ

public boolean empty()

true, ;
elementsQ == 0

public boolean remove (any value)

;
true, , false,

public boolean equal (set s)

true,
,

public types typeld()

container packQ

public str toString()

:
{, , )

public str definitionString()

, set
of str

public static set intersection (set


setl, set set2)

,
, ,

public static set union (set setl, set


set2)

public static set difference (set setl,


set set2)

,
setl, set2

public static set create(container c)

,
()

(Map)
,
. ,
. ,
++, .
,
- Maplterator.
() value(),
.
:
/ /
map simap = new m a p ( t y p e s : : s t r i n g ,
/ /
simap.insert("", 24);
simap.insert("", 56);
simap.insert("", 3 5 ) ;
simap.insert("", 56);
p r i n t simap.toString() ;
pause;
: 0 4594

types::integer);

305

III. ?

, ,
lookupQ.
.
exists()
.
:
Map example;
//
Map invertMap(map _mapToInvert)
{
maplterator it;
map result = new map(_mapToInvert.valueType(),
_mapToInvert. keyType (
'
) ) ;
if (_mapToInvert.keyset().elements() !=
_mapToInvert.valueSet().elements())
{
return null;
}
it = new maplterator ( mapToInvert);
while (it .more () )
;

1
resuit.insert(it.value() , i t . k e y O) ;
it .next () ;
return result;
}

//
example = new Map(types::integer, types::string);
example.insert (1, "one");
example.insert (2, "two");
print invertMap(example).toString();
//
,

(2 3) '

//


e x a m p l e . i n s e r t (3, " t w o " ) ;
i f (! invertMap(example))
p r i n t "
pause;

";

,
, .
keySetQ valueSetQ.
invertMapO
.
toStringO
.

. 133.

public new (types keyType, types valueType)

,
keyType valueType

public insert(any keyValue, anytype value)

(keyValue,
value)

public boolean remove(anytype keyValue)

. false,
, true

public any lookup(anytype keyValue)

,
. ,
. existsQ

public boolean exists(anytype keyValue)

true,
, false

public int elements()

public boolean empty()

true, ,
(key, value), false.
elementsQ == 0

public types keyType()

public types valueType()

public set keySet()

public set valueSet()

,
.
,

public str toString()

public str definitionString()

public container pack()

,
.
,

public static create (container c)

,
().
,
,

public static boolean equal(map m l ,


map m2)

true,

307

III. ?

(Array)
,
( ,
++). .
:
Array oarray = new a r r a y

( t y p e s : : c l a s s ) ;:

o a r r a y . v a l u e (1, new q u e r y ( ) ) ;
o a r r a y . v a l u e ( 2 , new q u e r y ( ) ) ;
o a r r a y . v a l u e (4, new q u e r y ( ) ) ;
print oarray.toString();
p r i n t o a r r a y . definitionString () ;
pause;

. 134.

public new (types type)

, ,

public any value (int index,


any value=NULL)


. , ,

public int typeld()

public str toString()

, (Peter,
Paul, Mary)

public str definitionString()

, array of class
( )

container pack()

,
. ,

public int lastlndex()

public static array create


(container c)

,
. ,
,

(Struct)
(Struct structures)
++.
. ,
, ..
.

.
, ,
.
.
++
, . , ,
.
.
(),
, . ,
(
), .
.
,
. , .
.
,
.
,
.
.
fields(),
fieldNameQ fieldTypeQ.
, struct::
create().
:
S t r u c t s = new s t r u c t ( t y p e s : : i n t e g e r , "age", t y p e s : : s t r i n g ,
"name");
S t r u c t s i = new s t r u c t ("int age; s t r name") ;
S t r u c t copy;
c o n t a i n e r c;
int i;
/ /
p r i n t s . d e f i n i t i o n S t r i n g () ;
p r i n t s i . d e f i n i t i o n S t r i n g () ;
s . v a l u e ( " a g e " , 25);
s.value("name", "John Doe");
/ / :
print s.toString();
for (i = 1; i <= s.fields ( ) ; i++)
{
p r i n t s.fieldType (i) , " ", s .fieldName (i) ;
}

309

310 | III. ?
//
s.add("Shoesize", 45);
print s . definitionString () ;
print s.toString{);
//
= s .pack () ;
= struct::create();
print copy.definitionString () ;
print copy.toString() ;
pause;

. 135.

public new (str fieldSpecifier),


public new (...)

.
. ,

.
:

public anytype value (str


fieldname, anytype value = null)

,
fieldname. value,
. fieldname
,

public anytype valuelndex (int


index, ay value=null)

,
index

public int index(str fieldName)

, fieldname.
, 0

public str fieldl\lame(int index)

, index.
,

public types fieldType(int index)

, index.
, types::void

public int fields()

public void add(str fieldName,


anytype value)

public str toString()

public str definitionString()

public str valuelma"ge(int index)

, , index.
,

container packQ

,
. ,

public static boolean equal


(struct s1, struct s2)

true, , false.
,
, ,

public static struct create


(container c)

,
(). ,
,

public static struct merge (struct


s1, struct s2)

, s1
s2


(Application, ClassFactory, Company .)

, .

.
.

MorphX, .
.

-
System Documentation\Classes
-.
, , , ..

(X) .
. 136. -
-

xApplication

Application

, ..

xClassFactory

ClassFactory

, .

xCompany

Company

xlnfo

Info


, .

311

312

III. ?

xRecord

xRef

xSession

Session

,
..

. 106. -

xClassFactory
xClassFactory ,
;
.

xlnfo Infolog
,
, ,

Infolog , ,
xlnfo.
(), , Global::checkFailedQ, Infolog. Infolog
, ,

add().
add():
Infolog.add(Exception::<>,<>);

(,
, ..),
. Infolog. add () ,
info(), warningO, error(), checkFailedQ
. ,
break().
,
. ,
.

1().
,
cut() ().
.
view().
add(),
.
,
.
setPrefix(), :
SetPrefix ('' ) ;
Infolog.add(Exception::Info,"
Infolog.add(Exception::Info,"

1") ;
2");

Global
Global
. .
,
,
.

Diet
Diet (Diet Dictionary)

.
, , .

313

314

III. ?

. 107. Diet*

Session
Session
.
Session :

.
Session sessionldQ
. Global::isSessionActiveQ.

Application
Application xApplication,
. xApplication
.
.
Application :

:
: logDelete, loglnsert
logUpdate. ,
(delete, insert
update).

:
(resetNumberSeqAutoAbort
numberSeqAutoClean) TTS (tts*)

Application.

.

TTS:
TTS
TTS; ttsNotifyAbort
throw.

:
updateUserLog
; updateUserLog
startup.

startupQ:
startup ( xApplication) ,
Axapta.
.
;
startup , startup command,
General
Axapta.

ttsbegin, ttsabort ttscommit


Application.
ttsbegin, appl.ttsNotifyBegin() appl.ttsbegin(). ttscommit,
the appl.ttscommit() appl.ttsNotifyCommit().
appl.ttsNotifyBeginQ appl.ttsNotifyCommit(). .


startupQ
Application Info. startupPost(), startupO,
.

SysStartupCmd.

- SysStartupCmd construct().

Application Info ( appl
infolog ).
xSession .
,
newUserId(_login, _password).

315



,
,
. ,
,
(,
, ).

RunBase
,
, RunBase.
,
,
.

RunBase
- RunBase
:

:
c l a s s MyRunBase extends

DialogRunBase

dialogRunBase;

DialogField
LedgerAccount

RunBase

dialogLedgerAccount;
ledgerAccount;


QueryRun;
:

QueryRun

queryRun;

| 317

ClassDeclaration;
(
1),
:

#define.CurrentVersion (1)
flocalMacro.CurrentList
transDate,
ledgerAccount,
ledgerTransType
tendmacro

. 137. RunBase

canGoBatch()

true, (
,
). false,

checkCloseDialog()

(closeOk())

cleanupDialog()

(closeCancelQ),
,

dialogO

prompt() dialog,
formRun.
, ..
:
protected Object dialog()
(
DialogRunBase myDialog = super(dialog);
dialogLedgerAccount = myDialog. addField(typelD(LedgerAccount));
dialogLedgerAccount.value(ledgerAccount);
dialogTransDate = myDialog.addField(typelD(TransDate));
dialogTransDate.value(transDate);
return myDialog;
1

description()

,
:
// Here goes a description of the class
static ClassDescription description()
I
return GLS42723;
1

318

III. ?

getFromDialogO

checkFromDialog(),
, :
boolean getFromDialogO
{

ledgerAccount = dialogLedgerAccount.value();
transDate = dialogTransDate.value();
return true;
}

getLast()

-
/
( unpack())

i n itParm Def au lt()

,
getLast()

lastValueDataAreald()

lastValueUserld()

pack()

:
return [#CurrentVersion,#CurrentList, queryRun.pack()];

prompt()

-.
true, validateQ
true:
if (this.promt()) this.run()

runBase()

this

saveLast()

prompt(), .
( ())

unpack()

:
Version version = runbase::getVersion(packedClass);
container packedQueryRun;
switch (version)
{

case #CurrentVersion:
[version,#CurrentList,packedQueryRun] = packedClass;
if (packedQueryRun)
queryRun = new QueryRun(packedQueryRun);
break;
default:
return false;
)
return true;
validate()

(closeOk())

queryRun()

,
:
public QueryRun queryRun()

I
Query query = new Query();
query.addDataSource(tableNum(LedgerTrans));
return new QueryRun(query);
I

RunBase
/
parm. ,
ledgerAccount parmLedgerAccount(). ,
,
initParm.
RunBase:
//
MyRunBase myRunBase;
myRunBase = new MyRunBase(); //
if (myRunBase.prompt()) //
myRunBase.run(); //

,
SysLastValue, getLast():
MyRunBase myRunBase;
myRunBase = new MyRunBase();
//
myRunBase.getLast ();
myRunBase.parmTransDate(SystemDateGet());
if

(myRunBase.prompt())
myRunBase.run ()


Microsoft Axapta
.
,

319

320

III. ?


.

().
.
. , -
().
, ,
,
.
,


.
,
,
.

. 108.

RunBaseBatch

RunBaseBatch.
,
,
- RunBaseBatch.
(RunBase
RunBaseBatch).

RunBaseBatch RunBase,
, ,
.
. 138. RunBaseBatch

canGoBatchQ

true, ( ,
).
false,

goBatchJournal()

true,
, false

initBatch()

tutorial_Ru n Base Batch,


RunBaseBatch.


( , ,
..) , ,
. ,
.



xJournalNames, , LedgerlournalName InventJournalName. JournalType,
xJournalType, ,
(,
, .).
,
xJournalTable, LedgerJournalTable, InventJournalTable
ProdJournalTable, , .
:
, LedgerJournalTable
:
l e d g e r J o u r n a l T a b l e . JournalName = "",ledgerJournalTable.Name = " ";
ledgerJournalTable.insert();
21 4594

321

322

III. ?

insert()
, .
,
. LedgerJournalTable
JournalNum.
,
LedgerJournalTable LedgerJournalTrans.
.


Journal
Trans, LedgerJournalTrans InventJournalTrans.
: ,
.

. ,
:

xJournalTrans.JournalNum ( xJournalTrans.JournallD
) ,
,
xJournalTable;

xJournalTrans.Voucher ,

.
NumberSeq:
NumberSeq numberSeq = NumberSeq::newGetNumAndVoucherFromCode
( L e d g e r J o u r n a l N a m e : :find("IIKO") . V o u c h e r S e r i e s ) ;
L e d g e r J o u r n a l T r a n s . V o u c h e r = numSeq.NumO;


,
.
.
LedgerJournalCheckPost.

.
newLedgerJournalTable
. :

_ledgerJournalTable ,
;

_post NoYes. No
, Yes , ;

_transferErrors NoYes,
Yes
,
. No.
:

LedgerJournalCheckPost ledgerJournalCheckPost;
ledgerJournalCheckPost = LedgerJournalCheckPost: :
newLedgerJournalTable
( l e d g e r J o u r n a l T a b l e , NoYes::Yes);
ledgerJournalCheckPost.run() ;

InventJournalCheckPost.
,
newJournalCheckPost :

JournalCheckPostType JournalCheckPost
Type : Post ,
, Check
;

_inventJournalTable ,
.

ProdJournalCheckPost.
newJournalCheckPost :

_autoblock ,
NoYes;

_showInfoResult ,
infolog;

JournalCheckPostType JournalCheckPost
: Post ,
, Check
;

_tableld Id xProdJournalTable;

Journalld .

323

324

III. ?

API
API (Application Programming Interface,
) Microsoft Axapta
,
.
, , .
, API ,
,
.
API ,
Microsoft Axapta
. API,
, ,
,
.

()
LedgerVoucher
, .
, ,
.

, end(). end()
.
LedgerVoucher LedgerVoucherObject.
LedgerVoucherTransObject.
:

LedgerVoucher;


LedgerVoucherObject
LedgerVoucher;


LedgerVoucherTransObject
LedgerVoucher.

, ,
LedgerVoucherObject,
.

| 325

,
( ),
LedgerVoucher.
, LedgerVoucherObject
LedgerVoucherTransObject
. ( ,
) LedgerVoucher.
LedgerVoucher:
LedgerVoucher::newLedgerPost(_detailSummary,
sysModule,
numberSeqCode);

. 139. LedgerVoucher::newLedgerPost()

_detailSummary

, ,
,

sysModule

, ;

numberSeqCode

LedgerVoucherObject:
LedgerVoucherObject::newVoucher(voucher, transactionDate,
sysModule, transType,
creditNote, _operationsTax) ;

. 140. LedgerVoucherObject::newVoucher()

voucher

transactionDate

sysModule

transType

, LedgerTransType,
LedgerTransType::None

creditNote

NoYes, ,

j)perationTax

,
OperationTax, OperationTax::Current

,
LedgerVoucherObject:
ledgerVoucherObject.parmDocument(transdate, voucher);
ledgerVoucherObject.parmTaxReference(tax.taxReference());

326

| III. ?

. 141. LedgerVoucherObject

parmDocument

()

parmTaxReference

LedgerVoucherObject LedgerVoucher:
ledgerVoucher.addVoucher(ledgerVoucherObject);

LedgerVoucherTransObject:
LedgerVoucherTransObject::newCreateTrans(ledgerVoucherObject,
ledgerPostingType,
ledgerAccount,
dimension,
currencyCode,
amountCur, _recld);

. 142. LedgerVoucherTransObject::newCreateTrans()

ledgerVoucherObject

ledgerPostingType

, LedgerPostingType

ledgerAccount

dimension

currencyCode

amountCur

_recld

ID

LedgerVoucherTransObject
:
ledgerVoucherTransObject.parmTransText(_transTxt);

LedgerVoucherTransObject LedgerVoucher:
ledgerVoucher.addTrans(ledgerVoucherTransObject);

:
NumberSeq

numberSeq =
NumberSeq::newGetNum(EmplParameters_RU::
numRefEmplAdvVoucher());
LedgerVoucher ledgerVoucher;
LedgerVoucherObj ect ledgerVoucherObj ect;
r

ledgerVoucher =
Summary,

LedgerVoucher::newLedgerPost(DetailSummary:


SysModule::Employee_RU,
numberSeq.parmNumberSequenceCode());
ledgerVoucher.AddVoucher(LedgerVoucherObject::
newVoucher(numberSeq.numO,
advanceTable.TransDate,
SysModule::Employee_RU,
LedgerTransType::None,
false,
OperationsTax::Current));
ledgerVoucherObject
voucher () ,

LedgerVoucherObject::newVoucher(numberSeq.

ledgerVoucher.lastTransDate(),
ledgerVoucher.parmSysModule(),
ledgerVoucher .findLedgerVoucherObject () .parmLedgerTransType () ) ;
ledgerVoucher.addVoucher(ledgerVoucherObject);

end()
:
ledgerVoucher.end();

LedgerVoucher
TutorialLedgerVoucher. runSalesPostQ
. runJoumalPostQ
.


,
Microsoft Business Solutions.

, A (account
activity) .
,
,
.
,

.

, .

327

328

III. ?


, AmountMst , 0,1 ,
0.
*
:

1-1 ( )
.
, .

1-N ( )
N ,
N
.
, ( ).

M-N ( )

, ,
( ) .

3.0
, .
, ,
,
.

LedgerBond.
LedgerBondClient_RU,
:

bondVref2Vref() 1:1,
;

bondVref2Log() ,
, 1:N,
1000 ()
800
200 , ,
(800 200 )
1000 ;

bondLastVref2CurrentLog() ,
,
;

bondLog2Log() M-N,

.


bondLog2Log(),
,
.

1:1 1:N,
.
ledgerBondClient ,
.
, (800 200 )
(1000 ):

LedgerVoucher
findLedgerVoucherObjectQ
:

ledgerBondClient = ledgerVoucher .findLedgerVoucherObject () .


ledgerBondClient JUJ () ;


, ()
(addNewLogObjectQ), :

if

(ledgerBondClient)

ledgerBondClient.addNewLogObject() ;
(

LedgerVoucherTransObject
LedgerVoucher,
:

ledgerVoucher.addTrans(ledgerVoucherTransObject);

( )
:

ledgerBondClient.bondLastVRef2CurrentLog();

if

(ledgerBondClient)

ledgerBondClient.removeCurrentLogObject() ;
}


ledgerVoucher.addTrans() .

run() RCashExchAdj,
( )
, .

329

330

III. ?

bondLog2Log() ,
1:1 1:N , ,
. bondLog2Log()
.
,
.

tutorial_BondTestJob_RU tutorial_BondDateTestJob_RU.

. 109.

CustVendVoucher
; (
LedgerVoucher LedgerVoucherTransObject), .

. 110.

.
new() .
const
ruct^), CustVoucher
VendVoucher
. CustVoucher VendVoucher
CustVendVoucher.
. 143. CustVendVoucher::construct()

_module

, ;
SysModule

JedgerVoucher

LedgerVoucher

_accountl\lum

_amount

_currencyCode

JransTxtType

, LedgerTransTxt

.dimension

_postingProfile

.posting

, LedgerPostingType

_paymCode

.settlement

, Settlement
, SettlementType::l\lone

_approvedBy

, ,
curuserldQ

331

332

| III. ?

:
ttsbegin;
ledgerVoucher =

ledgerVoucher::newLedgerPost(DetailSummary::Detail,
SysModule::Cust,
CustParameters::numRefCustAccount() .
NumberSequence);
LedgerVoucher.AddVoucher(LedgerVoucherObject::newVoucher(numseq.
num(),
today () ,
Sysmodule::Cust,
LedgerTransType::Sales) ) ;
ledgerVoucherTransObject = LedgerVoucherTransObject::
newCreateTrans (ledgerVoucher .findLedgerVoucherObject () ,
LedgerPostingType::CustPayment,
ledgerAccount, //
dimension,
Companylnf::standardCurrency(),
amountcur,
redd) ;
//
ledgerVoucherTransObject.parmTransTxt(txt) ;
// () LedgerVoucher
ledgerVoucher.addTrans(ledgerVoucherTransObject);
// CustVoucher,
custVoucher = CustVendVoucher::construct(SysModule::Cust, //

ledgerVoucher, // LedgerVoucher
customerAccount, //
amountCur, //
Companylnfo: :find() .currencyCode, //
LedgerTransTxt::CustInvoiceCust) ; //
//,
custVoucher.post(custTrans) ;
//
ledgerVoucher.end();
numseq.used () ;
ttsCommit;

,
,
.

,
, .
//
.

. 111.


CustTable::createOneTimeAccount(common).
SalesTable,
CustlnvoiceJournalTable.

PurchAutoCreate SalesAutoCreate.


.
SalesLine.createLineQ SalesTableType.
( ) -
, ,
.

333

334

III. ?


SalesTable.initFromCustTable().
PurchLine.createLineQ
PurchTableType.

,
. SalesFormLetter PurchFormLetter , ,
.
SalesFormLetter,
. ,
PurchFormLetter.
:

(SalesEditLines);

SalesParmTable
SalesParmLine;

Sales
FormLetter, -
( ).
:
SalesFormLetter::construct(DocumentStatus

, boolean = t r u e )

DocumentStatus ,
,
, , DocumentStatus::Confirmation.
-,
SalesFormLetter_Confirm.
, ,
,
. false,
SalesFormLetter.parmld(Parmld).
SalesFormLetter
SalesFormLetter.update(),
:


SalesFormLetter.update(common,
today () ,
SalesOpdate = SalesUpdate::A11,
AccountOrder = AccountOrder::None,
NoYes = NoYes::No,
NoYes = NoYes::No);

. 144. SalesFormLetter.update()

source

SalesTable

JransDate

_specQty

_accountOrder

_proforma

, -
( )

_printFormLetter

SalesFormLetter PurchFormLetter update(): _number


Num, :
PurchFormLetter.update(common,
Num,
Today () ,
PurchUpdate
= PurchUpdate:
AccountOrder
= AccountOrder::
NoYes =
NoYes::No,
NoYes = NoYes::Yes)

:All;
None;



.
API , :

API;

InventMovement
,
.
InventMovement ,
.

335

336

III. ?

,
.
- InventMovement ()
,
.
,
transDateO ,
.
- InventMov_Sales
:
TransDate

transDateO

return

s a l e s O r d e r L i n e . confirmedDlv;

InventMov_Purches ,
:
TransDate

transDateO

r e t u r n purchLine. confirmedDlv
purchLine.deliveryDate;

? purchLine.confirmedDlv


, .
API InventMov_Sales InventMov_
Purches.
InventUpdate
.

(, ),
InventMovement.
InventUpdate ,
.
, ()
..
Invent
Update InventUpd_Financial,
:
newSalesInvoice() newPurchlnvoiceQ.

updateNowQ :

| 337
inventUpd_Financial
Line,

InventUpd_Financial::newPurchInvoice(purch
inventVoucherTransPost,
number,
lineValue,
purchLine.currencyCode,
purchParmLine);

inventDpd_Financial.updateNow();

API ,
. API
:

ProdStatusType ,
.

ProdTableType ,
,
..


( )
.
// .

. 112.


,
.
.

338

| III. ?


(Number Sequence).
.

, (,
).

(NumberSeqReference). NumberSeqReference .
NumberSeq
.
,
NumberSeq.
- FromCode, (
,
),
().
. 145. NumberSeq

newGetNum

NumberSeq
, ,
.
NumberSeq.num():
newGetNum(NumberSequenceReference _numberSequenceReference,
boolean MakeDecisionLater = false, boolean donffiirowOnMissingRefSet
Up = false)

newGetVoucher

,
, .
NumberSeqvoucherQ:
newGetVoucher(NumberSequenceReference _numberSequenceReference,
boolean jnakeDecisionLater = false, boolean _doniThrowOnMissingRefSet
Up = false)

ewGetNumAndVoucher

, :
newGetl\lumAndVoucher(
NumberSequenceReference jumberSequenceReference,
NumberSequenceReference _voucherSequenceReference,
boolean _makeDecisionLater = false,
boolean _dontThrowOnMissingRefSetUp = false)
l\lumberSeq.num(),

NumberSeq.voucher()

lewReserveNum

.
releaseQ

:
num()
;
voucher()
;
abort() ,
;
numAndVoucherQ
;
releaseQ ,
, ;
highest() ;
lowest() ;
numInsertFormat()
;
numRemoveFormat() ,
newInsertFormat ().


COM (Component Object Module) Microsoft
Axapta .
Microsoft Axapta
- (, Microsoft Excel
Microsoft Axapta ..), Microsoft
Axapta (,
Outlook ).
web- Microsoft Axapta

MS Internet Information Server MS Transaction Server.

339

III. ?

VBX, OLE,
ActiveX, ,
.
DCOM,
(
) .
-
Microsoft Axapta.
- Microsoft Axapta :
= new C O M ( " E x c e l . A p p l i c a t i o n " ) ;
.open(":\\MyBook.xls");

, Microsoft Word,
Microsoft Axapta,
c:\AxaptaCOMDocument.doc
Microsoft Word:
COM
COM
COM
COM

wordApplication;
wordDocuments;
wordDocument;
wordRange;

//
wordApplication = new COM("word.application");
wordApplication.visible(true);
wordDocuments wordApplication.Documents();
wordDocument = wordDocuments.add();
wordDocument.saveas("c:\\AxaptaCOMDocument.doc");
//
wordDocument.activate();
//
wordRange = wordDocument.range(0,0);
wordRange.insertafter(" Microsoft Axapta");
wordRange = wordDocument.range(6,19);
wordRange.bold(true);
wordRange = wordDocument.range(11,26);
wordRange.italic(true);
//
wordDocument.save();
wordDocument.close ();
wordApplication.quit();


ComWordDocument_RU ComExcelDocument_RU,
Microsoft Office.
COMOfficeDocument_RU.
Microsoft Word
Microsoft Excel.

| 341

Microsoft Agent
- Microsoft
Axapta Microsoft
Agent tutorial_COMAgent. Microsoft Agent
,
.

. 113. Microsoft Agent

- SysMicrosoftAgent, tutorial_COMAgent.

Axapta Business Connector


Axapta Business Connector
, Microsoft Office
Visual Basic, Java Microsoft Office, Microsoft
Axapta -. , Microsoft Axapta
.

342

III. ?

Axapta Business Connector


Microsoft Axapta:

IAxapta:

IDispatch;

IAxapta2:

IAxapta;

Logon2
.

IAxaptaObject:

IDispatch;


Axapta.

IAxaptaRecord:

IDispatch;


Axapta.

IAxaptaContainer:

IDispatch;


Axapta Container.

IAxaptaBuffer:

IDispatch;

Axapta.

IAxaptaParameterList:

IDispatch;


Axapta.

, , VBA,
Microsoft Excel:
Sub

l o a d ()
Dim Axapta As AxaptaCOMConnector.Axapta
Dim AxaptaQuery As AxaptaCOMConnector.IAxaptaObject
Dim AxaptaDataSource As AxaptaCOMConnector.IAxaptaObject
Dim AxaptaRange As AxaptaCOMConnector.IAxaptaObject

| 343
Dim CustGroupBuffer As AxaptaCOMConnector.IAxaptaRecord
Dim CustTableBuffer As AxaptaCOMConnector.IAxaptaRecord
Dim Value As String
Set Axapta = New AxaptaCOMConnector.Axapta
Axapta.Logon

"Admin", "", "", ""

Set AxaptaQuery = Axapta.CreateObject("Query")


Set AxaptaDataSource = AxaptaQuery.Call("AddDataSource", 57)
Set AxaptaRange = AxaptaDataSource.Call("AddRange", 1)
Set AxaptaDataSource = AxaptaDataSource.Call("AddDataSource", 77)
AxaptaDataSource.Call "relations", 1
Value = "20..40"
AxaptaRange.Call("Value", Value)
Set AxaptaQueryRun = Axapta.CreateObject("QueryRun",
AxaptaQuery)
i = 1
While (AxaptaQueryRun.Call("Next") )
If AxaptaQueryRun.Call("Changed", 57) Then
Set CustGroupBuffer = AxaptaQueryRun.Call("GetNo", 1)
Worksheets(1).Cells(i, 1).Value = "Group"
Worksheets(1).Cells(i, 2).Value = CustGroupBuffer.
field ("CustGroup")
Worksheets(1).Cells(i, 3).Value = CustGroupBuffer.
field ("Name")
i = i + 1
End If
Set CustTableBuffer = AxaptaQueryRun.Call("GetNo", 2)
Worksheets(1).Cells(i, 2).Value = CustTableBuffer.
field ("AccountNum")
Worksheets (1) .Cells (i, 3) .Value = CustTableBuf fer .field ("Name")
i = i + 1
Wend
End Sub

ActiveX WinAPI
ActiveX
, DLL (Dynamic Link Libraries)
-. ,
Microsoft Axapta.
ActiveX Microsoft
Axapta,


ActiveX.

344

III. ?

. 114. ActiveX

ActiveX
ActiveX ActiveX
Explorer .
:

,
ActiveX,
;

,
ActiveX.

ActiveX
.

. 115. ActiveX Explorer

. 116. ActiveX

345

346

III. ?

WinAPI
WinAPI
. ,
Windows,
.
, WinAPI
:

USER32.DLL
,
, , , ,
, ..

COMDLG32.DLL
COMmon DiaLoGinterface,
, , , ..

KERNEL32.DLL
, , , ,
, ..
ADVAPI32.DLL
, , ,
, , ..

DLL
Microsoft Axapta, ,
, DLL.
, Windows, WinAPI
.
WinAPI,
DLL.





Microsoft Axapta 3-
-
.
, .

.
.
( RunOn
), (
server/client).
, , , ,
, .
,
, ,
,
.
RunOn
:

Called From
; ,

;

Client (,
RunBaseReportDialog);

Server .

348

III. ?

<
,
,

. , /


;

,
!
.
,
, !

. 117. RunOn

. (

, .
, <

, ?,
}
.
(
// ).
RLedgei
SheetClient, ;
, RLedgerSheetServer,
.

.
,
:
server static void copy(NoYes reverseSign, Common bufferFrom,
Common bufferTo)
{
CurrencyCode
MarkupTrans
MarkupTrans
SalesTable
SalesLine
PurchTable

currencyCode;
oldMarkupTrans;
newMarkupTrans;
salesTable;
salesLine;
purchTable;


PurchLine

purchLine;

switch(bufferTo.tableld)
{
case(tablenum(SalesTable)): salesTable = bufferTo;
currencyCode = salesTable.currencyCode;
break;
case(tablenum(SalesLine)) : salesLine = bufferTo;
currencyCode = salesLine.currencyCode;
break;
case(tablenum(PurchTable)): purchTable = bufferTo;
currencyCode = purchTable.currencyCode;
break;
case(tablenum(PurchLine)) : purchLine = bufferTo;
currencyCode = purchLine.currencyCode;
break;
}
ttsbegin;
while select oldMarkupTrans
index hint TableRecIdldx
where oldMarkupTrans.transTableld == bufferFrom.tableld
oldMarkupTrans. transRecId == buf ferFrom. r e d d

&&

{
newMarkupTrans
newMarkupTrans.transTableld
newMarkupTrans .transRecId
newMarkupTrans.origTableld
newMarkupTrans .origRecId
newMarkupTrans.calculatedAmount
newMarkupTrans.posted
newMarkupTrans.voucher
newMarkupTrans.transDate
if

=
=
=
=
=
=
=
=
=

oldMarkupTrans.data() ;
bufferTo.tableld;
buf f erTo. r e d d ;
bufferFrom.tableld;
buf ferFrom. r e d d ;
0;
0;
w
;
dateNull();

(reverseSign && newMarkupTrans.markupCategor


MarkupCategory::Fixed)

==

(
newMarkupTrans.value

= -oldMarkupTrans.value;

}
if

(newMarkupTrans.isMarkupOfTypeCustVend())

{
if (currencyCode && newMarkupTrans.currencyCode !=
currencyCode &&
newMarkupTrans.markupCategory != MarkupCategory::Percent)
(
newMarkupTrans.value = Currency::curAmount2CurAmount(newMarkupT
rans.value,
newMarkupTrans.currencyCode, currencyCode);
}

349

350

III. ?
newMarkupTrans.currencyCode
}
newMarkupTrans.insert();
}
ttscommit;

= currencyCode;

, ;
, :
// AOSRunMode::Client
client static void main(Args args)
{
BudgetManipulation manipulation =

BudgetManipulation::
construct(args.record());

QueryRun qR;
FormDataSource datasource;
datasource = args.record().dataSource();
qR = datasource.queryRun();
manipulation.initParmQueryCon(BudgetManipulation::queryPack(qR.
query () ) ) ;
if (manipulation.prompt())
manipulation.run ();
}

,
:
client static boolean exitWindowsEx (int _flags)
{
DLL winApiDLL = new DLL(tUSERDLL);
DLLFunction exitWindowsEx = new DLLFunction(winApiDLL,
'ExitWindowaEx' ) ;
exitWindowsEx.returns(ExtTypes::DWord) ;
exitWindowsEx.arg(ExtTypes::DWord, ExtTypes::DWord);
return exitWindowsEx. call (_flags, 0) ;
)



,
.
, ,
,
.

:
2-
AOS;

AOS.

:
(Single Record Caching);
(Entire Table Cache);
(Record View Cache).

100/1000 ,
(primary) .

Microsoft Axapta.

. CacheLookup
.

. 118. CacheLookup

(, LedgerParameters): EntireTable;

(, LedgerTrans): None;

351

352

| III. ?

(, InventTable): Found (
), EntireTable ( );

(, LedgerJournalTable): NonlnTTS;

(, LedgerJournalTrans): Found (
) None ( , InventJournalTrans.

,
Entire Table, ;
.
:

None ;

NonelnTTS ,
; ,

;
CustTable;

Found ,

, ;
ZipCode;

FoundAndEmpty
.



.

. 60
.
.
.

( ). ,
k l , k2, k3,
, , , :
s e l e c t * from t a b l e where t a b l e . k l
&& t a b l e . k3 == ' ;

== 'A'

&& t a b l e . k 2

== ' B '

,
:
select * from table where table.kl == 'A' && table.k2 == 'B'
&& table.fieldl == '1234';

:
select * from table where table.kl == 'A' && table.k2 == 'B'
&& table.k3 == ' C && table.fieldl == '1234';

. 119.

,
.
23 4594

353

354

| III. ?


. ,
100.
,
,
,
, ,
.
.
60
( Microsoft Axapta 3.0 SP2).
, ,
.

. 120. , 1

| 35

(EntireTable)
SQL, ==.

- ,

/ . ,
, , ,
, ,
.
(
2) , EntireTable,
. , /
.

. 121. , 2

23'

356

| III. ?


++,
, where,
.

.
:
void

selectZipCode()

CustInvoiceJour custInvoiceJour;
ZipCode zipCodelnv;
ZipCode zipCodeDlv;
zipCode zipCodeCache;
RecordViewCache zipCodeViewCache;
//
select nofetch zipCodeCache
where zipCodeCache.ZipCode == custlnvoiceJour.DlvZipCode
zipCodeCache.Country == custlnvoiceJour.DlvCountry;

&&

//
zipCodeViewCache = new RecordViewCache(zipCodeCache) ;
//
while select * from zipCodelnv
where zipCodelnv.ZipCode == custlnvoiceJour.DlvZipCode &&
// 1
zipCodelnv.Country == custlnvoiceJour.DlvCountry && //
2
zipCodelnv.County == custlnvoiceJour.DlvCounty
{ ... }
}


, where
zipCodeCache.
,
,
:
// ...
// ,
while select * from zipCodelnv
where zipCodelnv.ZipCode == custlnvoiceJour.DlvZipCode &&
// 1
zipCodelnv.County == custlnvoiceJour.DlvCounty;
{ ... }
// ...

-
-

.

initQ ,
super(), this.cacheAddMethodQ:
// PurchTable,
public void initO
{
super () ;

PurchLine

purchLine_ds.cacheAddMethod(tableMethodStr(PurchLine,
ReceivedlnTotal));
purchLine_ds.cacheAddMethod(tableMethodStr(PurchLine,
InvoicedlnTotal));
}

Microsoft
Axapta 3.0 SP2.
.

.
,
. Microsoft Axapta
Garbage Collector,
( 60 ).
:


( CACHESYNCTIME
MaxCacheSyncTime)
;

MaxCacheSyncTime
Microsoft Axapta, 60 ;


( )
;

,
;

,
;


SysLastValue ;

357

358

III. ?

(2-tier, 3-tier fat


clients) MaxCacheSyncTime ,

-
SysLastValue ;

(3-tier thin clients),


MaxCacheSyncTime
.

. 122. MaxCacheSyncTime

| 359


,
, ,
AccountNum LedgerTable.

:


, 5-7 ,
;

,
, , 5-7
,
;

,
,
,
;

, ,
;

, ,
;

,
Dimension
. ,
,
Dimension ( ),
,
( Dimension Dimension, Dimension2_,
Dimension3_).
DataAreald,
Microsoft
Axapta. , MS SQL Server Oracle Database
.

360

III. ?

. 123. LedgerBalanceDimTrans.AccountPeriodldx

. 124.



,
, .
,
.
:

,
;

, ,
;


.
:

, ,
, ;

,
,
.

. 125.

361

362

III. ?

RecID
RecID
, ,
RecID, lookup.
RecID CreateRecIdlndex
, .


(
):
select firstonly address index Typeldx,
select firstonly address index hint Typeldx.
index hint
,
; , Oracle index
hint.

.
.



.

.
Micro
soft Axapta (Microsoft SQL Server
Oracle Database).
SQL
(, , )
.
:

, (Rule-based).

,
,
. , ,

. Oracle.

(Cost-based).
Microsoft SQL Server, Oracle.

, .

, .

Microsoft Axapta
.
,
, :

: ,
.

: ,
( ).

: ( ) ,
,
.


Microsoft Axapta ,
.
Prepare Executive ,
.

. 126. Prepare Executive

363

364

I III. ?

,
;

, ,
.
:


.
, Executive
Direct,

.
,

.

.

. 127. Executive Direct


(literals ,
) Executive Direct,

, .
(placeholders,
)
,
,
where.
Prepare Executive.

| 365
:


,
,
;

;

(join),
;

;
(index hint)
.


++,
, , Microsoft Axapta

.
,
,
:

Miscellaneous (, LedgerConsolidateHist);

Main (, LedgerTable);

Transaction (, LedgerTrans);

Worksheet Header (, LedgerJournalTable);

Worksheet Line (, LedgerjournalTrans).

,
,
.
:

Parameter (, LedgerParameters);

Group (, LedgerPeriod), ,
.

366

III. ?

. 128.


, -
,
.
/
Microsoft Axapta, Data
base, Turning-Autogenerate.

. 129. Tunung-Autogenerate

++
:

ForceLiterals :

SELECT f o r c e L i t e r a l s
WHERE m y F i e l d > 10
ORDER BY m y F i e l d 2

* FROM myTable

ForcePlaceholders :

SELECT f o r c e P l a c e h o l d e r s * FROM o r d e r L i n e s
JOIN o r d e r T a b l e
WHERE o r d e r L i n e s . o r d e r N o == o r d e r T a b l e . o r d e r N o
AND o r d e r T a b l e . o r d e r N o == 10

367

368

III. ?

FirstFast ,

, where,
;

FirstOnly ,
,
:

SELECT F i r s t O n l y * FROM m y C u s t T r a n s
WHERE myCustAccountNo == 10
ORDER BY myCustAccount DESC, m y C u s t T r a n s

DESC

He ,

:

Index ( index hint)


;
,
(, ,
, , );
Microsoft Axapta index hint
;

ForceSelectOrder
(join) ,
;
forceNestedLoop;

ForceNestedLoop
, ,
;
NoLock
(uncommitted reads),
,
;
, buffer.selectLocked(false)
.

Microsoft Axapta index hint


:

,
;

,
.

| 36


? Microsoft
Axapta .
.

.

,
:

RecordlnsertList
.
InventAdj_Cancel.updateInvent():

InventTrans inventTrans;
InventSettlement inventSettlement;
InventSettlement cancelSettlement;
//
RecordlnsertList recordlnsertList = new
m(InventSettlement),true,true);

recordlnsertList(tableNu

while select inventSettlement


index hint DateVoucherldx
where inventSettlement.voucher voucherCancel &&
inventSettlement.transDate == inventClosing.transDate SS
inventSettlement.cancelled == NoYes::yes &&
inventSettlement.TransRecId != 0
&&
inventSettlement.SettleModel != inventSettlemodel::
PhysicalValue

f
progress.incCount() ;
cancelSettlement = inventSettlement.data();
cancelSettlement.transDate = inventClosing.transDate;
cancelSettlement.voucher = inventClosing.voucher;
cancelSettlement.qtySettled = -inventSettlement.qtySettled;
cancelSettlement.costAmountSettled = -inventSettlement.
costAmountSettied;
cancelSettlement.costAmountAdjustment = -inventSettlement.
costAmountAdjustment;
cancelSettlement.posted
= NoYes::No;
recordlnsertList.add(cancelSettlement); //

}
recordlnsertList.insertDatabase(); //
24 4594

370

III. ?

insert_RecordSet, update_RecordSet

.
ReleaseUpdateDB_V25toV30.updateASPEmail():

insert_recordset newTable (Emailld, subject,


subject, contents from oldTable;

mail)

select id,

delete_from
while select ... delete().
OfficialsServ_RU:: releaseOffsessionId():

delete_from officialsTrans where officialsTrans .Of f Sessionld ==


offsessionld;




.
.

//SQL.
SQL
// /
SQL.

. 130. SQL

| 371


, MS SQL
, Oracle
. Oracle
.

hint .


SQL.

. 131. SQL

24*

372

III. ?

, alertest Number int,


Numberldx .
100 150 000.
:
s t a t i c void ExecutionPlanExample(Args

_args)

alertest alertest;
ttsbegin;
s e l e c t forupdate number from a l e r t e s t
where a l e r t e s t . N u m b e r > 50000 &&
a l e r t e s t . N u m b e r < 50010;

//.
//.
ttscommit;
t

730 .
( )
:

. 132.

.
Microsoft Axapta.
.



.
/
/ .

(


).

. 133.

. 134.

37

374

III. ?

//SQL.

SQL.

10
10 (
>= 1000 ).

,
.

SQL.

.
:

2.

,
.

, 569 (
accountBalance).



?
?
,
?
,
.
.

.

. 135.

III. ?

,
, .


.

.

:
;
, ;

();
.


, /
/ , .

. 136.


,
,

. ,
.
, ,

.
,
,
.

,
.
, Microsoft Axapta
.

, .
, ,
; ,
.
, ,
, , .

,
.

, , ,
.
.

.
.
.
, , ,
,
.
.

378

III. ?

. 146.
,

(.)

SalesOrder

0,5

0,5

0,5

10

0,5

11

12

13

14

15

SalesOrder

16

, 146,

500 .
, 2500 .
.

10 , ,
, 50-70.
, Axapta
50 .
1.

, .

-
.
-
Microsoft Axapta (Axapta Standard User
ASU).


. 147.
-

GLA

GLO

50

0,5

SO

50

50

PRM

0,3

PRP

100

PRF

20

0,8

PRO

0,1

WMR

200

1,5

WMO

50

0,2

HRC

200

HRI

0,1

CRM

CRM

10

CSS

CSSU

10

0,1

ESS

ESSU

10

0,1

QP

BPM

10

BSCP

SHEMP
SFPR
SFFORM

50

0,5

35

0,5

20


.

, . ,
, ,
50 , ,
1 ASU. .

380

III. ?

: (
) 10
5 (50 ), 10 20 (200 ) . ,
, , 4 ASU.
, 1
ASU.
,
ASU.


,
,
.

. 137.

,
, (
)
. ,

,
, ,
.

. 138.


,
. ,
" \ , . 4 ;,
.

, ,
.

, (,
LedgerTable
AccountNum, 10).

.

382

III. ?

. 139.


.
, :


,
.
, ,
.


, .
,
,
,
. ,
.

, ,
,
.


,
(AOS, ).


,
. <Lab
Id> <Lab serial n u m b e r X r u n serial number>,
.
.

. 140.


.
(, ,
)
,
.
.

.

, .
, ,
.

. 141.

384

III. ?


. ,
,
( , , ..).
,
.

. 142.


, ,
.

:

,
;
AOS
'

;

.

Display dependent :

;

.

Display independent :
-, ,
..;
,
,
.

Worker thread:

;
AOS
.
:

, ;

,
;

,
,
;

,
.

,
.
, .
()
(AOS),
.

386

III. ?

. 143. ,

. 144.



,
,



, -
.

():

2-
;

Worker thread (3-)


AOS.

(Cockpit),

.
:

:
(ping)
;

(
)
.

:
,
;
.

:
;
;

Microsoft Axapta
, .

. 145.

388

III. ?


.

:

:
Microsoft Axapta;
;
ODBC AOS;
(, ,
).

:
;
.

.
:

. 146.

j 389

, ;

( )
.
:

(
, ,
1000 ( 1 )).

. 147.

(
!).

( ).

(2-).

, (
).

(
, ,
).

, /
.

390

III. ?


,
.
?
.
, ,
,
.
,
:

;
, ;
.



( ,
, , ..).
,
, , .

,
, .
(, ,
), ,
.

.
Init (
). <>:

BMBuildldEnum,
<>;

BMInit<xxx>, BMInit;

:
BMInit: :buildld2clsld;
BMModuleTable::
createAll();

Buildld, BMBuildEnum::<xxx>;

InitSetup
:

BMTableSetup::CreateRecord(<tableId>, < >, <>, , classnum(BMInit<XXX>);

run()
:
1::(1\[(<
^).

bmNewRecord()
, :

bmNewRecordQ
;

, (
) _tablefill.actualld();

_tablefill.
(< >);

-
( scope) ,
, , ,
.
,
, ,
.
:

Display dependent: (
);

Non-display ( batch): -,
, ,
Display dependent.
:

(, ,
, , );

, <>;


BMScriptScope ( 100);

,
, BM<yyy>Cmd;

391

392

III. ?

, BMScopeBase, BMScope<> ( : abstract class BMScopeSO


extends BMScopeBase, SO Sales Orders):

;
scriptScopeQ ,
BMScriptScope::<yyy>;
(switch)
BM<yyy>Cmd ;
doRunScope;

8< Kypcopa>NonDisplay (
8< Kypcopa>Batch) 8< Kypcopa>Display,
5< >:
newScriptScopeDisplay BMScopeBase.

-
:

:
,
(, ,
..);
, ,
,
. ,

: application.getinfoholderQ.
parmBMScriptScope().<4TO-HH6yflb>;

:
, ,
, .


,
BMDataBank, ,
.

:

, 80%
;

| 393

: databank.tableKey(TableNum(InventTable),ratio); ,
ratio ,
( ratio = 100).



, .
,

.
,
, .
:

BMScriptWizard<yyy>,
BMScriptWizardBase;

BMScript;

getPossibleScripts newScriptld
BMScriptWizardBase;

BMScriptWizard<yyy>
makeScript;

:
;
;
.

BMMainControl
, BMMainCotrol::inAction()
true.
,
,
, SalesCreateOrder:
void SetCustomerAndExit ()
{

FormStringControl

Cust

FormStringControl

Name

= Element.Control(Control::
SalesTable_CustAccount);
= Element.Control(Control::
CustName);

394

III. ?
FormDateControl deliveryDate = Element.Control(Control::
SalesTable_DeliveryDate); ;
deliveryDate.setFocus ();
de1iveryDate.pasteText(strfmt('%1',BMRandom::randomday ) ) ;
Cust.SetFocus();
Cust.PasteText(Appl.bmDataBank().tableKey(TableNum(CustTable)));
Name.SetFocus();
Element.SetTimeOut('CloseOk',100,FALSE);

run():
if

(BMMaincontrol::inAction())

f
element.setCustomerAndExit();
}


(Cockpit);

BMbuild BMblock
, ;

400 ,
BMPostingChange
( ,
.., , )
3.0.


.

, .
,
BMScopeLedger* BMScopeSalesOrder* (, , BMScriptWizard_LJ
BMScriptWizard_SO).
:

RHotel BMBuildldEnum;

BMInitRHotel BMInit;

buildld, BMBuildEnum:: RHotel;

initSetup
;

run()
;

| 39

bmNewRecord();

: BMInit::
buildld2clsld BMModuleTable::createAll();

BMScriptWizardRH, BMScriptWizardBase;

- #hotel('hotel')
BMScript;

, RHotel BMScriptScope;

,
(, ,
, ,
). BMRHotelCmd.
:

getPossibleScripts newScriptId
BMScriptWizardBase;

BMScriptWizardRH makeScript
;

, BMScopeBase, BMScopeRHotel. : abstract class BMScopeSO extends


BMScopeBase', SO Sales Orders:

;
scriptScopeQ ,
BMScriptScope::RHotel;
getCmdEnumId() ,
BMScriptScope::RHotel;
command()
(switch) BMRHotelCmd
;
doRunScope;

BMScopeRHotelNonDisplay ( BMScopeRHotelBatch) BMScopeRHotelDisplay, BMScopeRHotel:


;
construct()
BMScopeBase.

Best Practices
Best Practices
, . Best Practices
:

,
;


:
.

Best Practices
,
.
Best Practices
,
,
.
Best Practices
, ,
.

Microsoft Axapta
Best Practices
:

,
.

,
,
.

Best Practices


, ,
2- 3-
.



, .

,
:
,
.


, .

Microsoft Axapta
.

Best Practices Axapta


Developer's Best Practice HandBook ( Micro
soft Axapta).
Best Practices ,
:

(
);

Best
Practices :

Best Practices
(/) Best Practices.
,
.

398

III. ?

. 148. Best Practices

Best Practices
Best Practices
SysBPCheck, SysBPCheckBase
.
(
, ) .

, (
) ,
. Best Practices
149.

Best Practices

. 149. Best Practices

Best Practices
Best Practices (//Best Practices) ,
. ,
.
,

.

399

400

III. ?

. 150. Best Practices

. 151.

,
4 ( /
/)
.

. 152.

Best Practices


Infolog .

. 153. Infolog

,
;

,

(, LedgerTable , canGoBatchJournal()
, houseNumber );


:
RCashVoucher RCash (Russian Cash)

;
AddressTypeTable_RU
, (RU);

401

402

III. ?


(,
).
, .
.


Microsoft Axapta 3.0
:

ttsbegin;

,
forupdate (, select firstonly
forupdate LedgerTable).
.
,
;

ttscommit.


Microsoft Axapta
.
,
for

(i=l;

i<1000;

i++)

#define.thousand(1000)>>
:
for

(i=l;

i<#thousand;

i++)


,

RecID , .
,
. ,
Redd
RefRecID.
.

Best Practices

RecID , Ref RecID,


.


.

( ):

(, LedgerParameters): EntireTable;

(, LedgerTrans): None;

(, InventTable): Found (
), EntireTable ( );

(, LedgerJournalTable): NonlnTTS;

(, LedgerJournalTrans): Found (
) ( , InventJournalTrans).

display- ;

!


.
( ), ,
( ), .

,
.
,
(
,
).


.
,
. ,
.

:

403

404

| III. ?

[ c l i e n t ] [server] [ e d i t | d i s p l a y I p u b l i c I p r o t e c t e d |
p r i v a t e ] [ s t a t i c I a b s t r a c t j final] < >
> ( )


3- .
, client
server. , ,
.
,
.
, ,
.
3- .
( III.)


,
:

5-7 (
). ,
(
MS SQL 16, Oracle Database 18).
, Dimension
; ,
(Dimension[l], Dimension[2]
Dimension[3]) Dimension,
Dimension2_ Dimension3_ .

, ,
.

(
cost-based optimizer ):
select f irstonly address index Typeldx,
select firstonly address index hint Typeldx.

Best Practices | 405

Best Practices

:

3- ;

. 148.

Display/Edit


Display/Edit (display-
void)



('<>')



,
.

ttsbegin/
ttscommit ' '

/
,
( ttsbegin
ttscommit)


display-

,

,
Auto (
)

'<>'

406

| III. ?

deletejrom
'while select
delete()'



SQL- deletejrom (
, )


ClassFactory.FormRunClass(..) new
menuFunction(..).run()

-
' ' ' '

. ,
SysOperationProgress
(
,
,
).

error, warning,
info, checkFailed


' ' .
: '<>'


, ,
.

(
, Forms)


'<>'


(security key),


tables


(.
),

,
,

menuitem (, )


,
Auto, ,


, (,
)

(label)
(
)

Best Practices

'<>'

,

( )


,
(,
)


(
) ,
(,
)

'
'<>',
' '

(
, ),

Display/Edit


:


Display/Edit (
void)


, ,
.


<> ... )

(
{)

)


: ' '


(.
)


' ' ,

public


++,
,

(enum)
,
( )


++,


,
( )

407

408

III. ?

' ' .

!

,
,


. (.
)


'<>',

' '
'<>'


,
( ,
,
,
)



(,
)


,
, ,
(,
)

'<>,
' ' ?

,
, ,
, .
,



('<>')



,
.




, '<>'


identifierStr

Best Practices


<>



.
, <>


. , ,

.
(
, ,
)

(

)



('<>')

, ,

1
static BMRunID newRunID(BMUniquelD
{
Inteqer temp;
BMLabSeries labSeries;
if

uniquelD)

(strLen(uniquelD)== 0)
throw error("0SYS52584");
ttsbegin;
temp 0;
// for serialization
select forupdate labSeries where labSeries.uniquelD ==
uniquelD;
if (! labSeries)
throw error ("@SYS52577");
if (labSeries.internalNumbers == NoYes::No)
{
ttscommit;
// return BMLabControl::NewRunIDObs(uniqueid) ;
}
temp = labSeries.nextRunNumber;

409

410

III. ?
labSeries.nextRunNumber ++;
labSeries.update();
if (temp<l | I temp>9999)
throw error ("@SYS52577");
ttscommit;
return BMLabControl::composeRunID(uniquelD,temp);
}

2
:
ttsbegin;
while select forupdate ledgerTrans
where ledgerTrans.AccountNum == _accountToBeDeleted
{
ledgerTrans.delete();
}
ttscommit;

:
ttsbegin;

delete_from ledgerTrans where ledgerTrans.AccountNum ==


accountToBeDeleted;
ttscommit;

3
:
advLine.AmountCur

= _amount;

advLine.AmountCurApproved = advLine.AmountCur;
advLine.AmountMst = advLine.CurrencyCode ?
Currency::amountCur2MST(advLine.AmountCurApproved,
CurrencyCode) :
advLine.AmountCur;
}

advLine.

( if):
if (! advLine.Dimension)
{
advLine.Dimension = advLine.advTable().Dimension;
}

:
;
;
Delete Actions;

Best Practices

;
;
;
;
;
.
. 149.

Delete Actions
ID:

, Delete Actions
(
),

, ,
: ,

'AutoReport'

'AutoReport' ,

'AutoReport'

2
, 2
( )

' '

, ,

(, )

SelfRelation,
PrimaryKey = PrimaryKey


(.

)

412

III. ?

, ,
,
. ,

(.
)


,
, ,
(,

)

, ENUM (
,
)

, ,

,
,

<>

(FieldID)

Dimension
Dimension


Dimension,


++


(
AllowEdit )

, ,
,
AllowEdit

ENUM
,
0

FieldID
(
,
)

, ,

Best Practices

(view)
, ,
, .
(.

)

, (FieldID)


(
,

ABCD, ABC,
ABCF)

'<>' (
' ' ) ,

Global



, ,

' ' (
' ' ) ,



, ,

<>

.
. ,
.


, ,

(.

)

, ,


RecID,
RecID
'<>'

RecID ,


RecID,

select...

RecID
where '<>'

RecID ,

RecID ,

413

414

III. ?

ID

Tableld

RecID,

RecID

RecID ,

RecID,

RecID lookup

RecID lookup
, Redd

''
Delete Actions

(view),

,
,

4
,
, , RecID
(, custTrans RecID, custSettlement TransRecID):
while select custSettlement
where custSettlement .transRedd ==
custTrans .redd &&
custSettlement.offsetTransVoucher
{
while select custOffsetTrans
where custOffsetTrans.accountNum ==
custSettlement.accountNum &&
custOffsetTrans.voucher ==
custSettlement.offsetTransVoucher &&
custOffsetTrans.invoice
{
numOfInvoices ++;
tmpStatPer.averagePaymDays+=
custTrans.transDate custOffsetTrans.transDate);
}
}

. 154.
RecID (CreateRecldlndex)

Best Practices | 415

print pause;

, ;

RunBase;

. 150.

printdebug (printtab,
print, pause, breakpoint)

++
: ,


. ,
,

(
, )

: .
'parent', 'child' 'sibling'

father, mother,
mummy, sister ..

,
,
?

416

III. ?



ID .

<>

' '
'<>',

,
,

super ()
new -!

,
,

new()

RunBase
,

- RunBase
(,
main)


.

?


,
' '

:
,




(, ret
_ret )

,
,
?

5
: packed query ,
. / packed
query .
p u b l i c boolean unpack(container
{

packedClass)

Best Practices I 417


Integer version = conPeek(packedClass,1);
PackedQueryRun packedQuery;
switch

(version)

case #CurrentVersion:
[version,ICurrentList,packedQuery]
break;
default :
return false;

= packedClass;

1
return true;
1

6
Class 1 method 1.
Class2 Class 1.
Best Practices :
methodl Class2 .
7
, (packedClass)
, (_base):
public boolean unpack(container packedClass)
{
container _base;
boolean _ret;
Integer __version = conpeek(packedClass,1);
switch (_version)
{
case ICurrentVersion:
[_version, #CurrentList, Joase] = packedClass;
_ret = super(_base);

break;
default:
_ret = false;
}

return _ret;
:
public boolean unpack(container _packedClass)
{
container base;
boolean ret;
Integer version = conpeek(_packedclass,1);
switch

(version)

418 | III. ?
{
case #CurrentVersion:
[version, #CurrentList, base] = _packedClass;
ret = super(base);
break;
default:
ret = false;
}
return ret;
}


:
;

(AllowEdit, Skip, Enabled);


.
.151.


<>
( ' ' != ' ' ) ,

A0S


,
,

' '
''

,
,


New Group ,

' '
(<>)

( )
( )
,
A0S


,
,

Best Practices | 41H

27.

<> <>
edit/display


edit/display
(,

)

Display

display-

: <>


Enabled No.
AllowEdn No Skip Yes

,

(:
, )


<>.<>


' '

' '
'<>'

<>

' ' ' '



.
,

<>
. <>(<> *
<>)

4 ,

1280 1024, 1024 768 800 * 600

420

III. ?



control:: ,

<>
<>.

Left, Top, Width,


Height, Frame WindowType

,
<>

.
,

SetCompany
No,

,
Save Data Per Company Yes
(
SetCompany = Yes)

,


.
<> ,

SetCompany
Yes,

,
Save Data Per Company
No (
SetCompany = No)

, ,
,

,
'<>',

,
,


, .
Auto


(Tab), .
Tab Auto

. 155.

Best Practices | 421


, Best Practices .
, , (
) , ,
Best Practices.

.
, ,
,
, :
,
.

, ,
, ,
.
, ,
, .

web-
web-
(
-, SQL, XML, HTML),
..
Microsoft Axapta ,
Windows-, web-.
,
,
.
. Windows-.
Web- web-.

web-
web- Microsoft
Axapta 3.0, :
Internet Information Service 5;
+ Axapta Business Connector;
2- Microsoft Axapta 3.0.
web- web-
.
HTML-. ,
, .
Java ,
web-. ASP-, web-
Axapta Axapta Business Connector.
web- web-.
Axapta Business Connector :
Axapta COM Connector;
Axapta Internet Connector.

web- | 423

. 156. Axapta Business Connector

Axapta COM Connector - (


DLL), ,
- -
Axapta.
Axapta Internet Connector Axapta
(USServer, IISResponse, IISRequest ..),
web- (IIS) Axapta (X++).
, Axapta Business Connector
web-.
Windows-, web- Microsoft Axapta
,
(), (
, , , ..).
Web- . web-
web-, , ,
web-.

424

III. ?

web- GUI-
Microsoft Axapta , .
web-
GUI-, .

. 157. Microsoft Axapta 3.0

. 158. web-

web-

Web-
Web- (
).
web-

3.0.
Web- ,
, (
),
, ,
, . Web-,
web-
. html- asp.
web- , -
. web-
(VideoShop).

. 159. web-
Web- -
WebApplication.

425

426

| III. ?

, asp-, lookup,
CSS:
class WebVideoApp extends
{}

WebApplication

online- offline-,
.

. 160.
. Online- offline web-, offline-
.

. 161.

, .
,

web- I 427

.
,
.

web-
web-. Web-, web-
web- MorphX.
Web- ,
web-.
, .
, Windows Microsoft Axapta.
Action Web WebPage web- .
Web- ,
, Weblet
.
Web- web-,
. Web-
- ,
, web -. LocalWebMenu Design web ,
web-.
,
-.

. 162. web-


, .

, web-,
, ,
.

428

| III. ?

, web-, ,
.
,
.
:

WebCatBrowseWeblet
;

WebCategoryBrowsing
.
.
LookupMethod Custom LookupControl
,
.
,
:
LookupMethod Configuration Custom,
LookupControl .
web-:

web;

WebButton ;

SUBMIT;

, .
web- ,
.
,
, ,
10 . 10
, . ,
2, 3, 4, 5 6 , 12 3 4 5
next. 4 .
next ,
6 7 8 previous next,
.

Axapta, web-. WebReports
,
web- Windows. Web
, ,
web-.

web-

. 163. web-

.
,
showAsGraph().
RunbaseReport.
:

,
RunBaseReport, showAsGraph()
showAsGraphQ.

,
.
,
drill-down
.
Web- LocalWebMenu,
, web-
(
web-).

429

430

III. ?

Product groups
W e l c o m e t o online-ordering at
t h e Light Company. Y o u can
b r o w s e o u r online s t o r e , a n d
add items t o your basket by
clicking t h e A d d - t o - b a s k e t
i c o n . I f y o u already k n o w t h e
i t e m n u m b e r o f an i t e m , y o u
can add it t o your basket by
typing t h e item number and
desired quantity in t h e
quickorder f o r m o n t h e right.

Product group

Accessories
Bubs
Cabtes
Lamps.
Parts
Shades

Description
Plugs, Brackets and Tubes
Light bulbs for our lamps
Connect your lamp
Lamps
I f you miss that little thing
Shades and Covers

. 164. web-
PDF
web- .
web-:
.

Weblets
Weblet , web-
HTML-. Microsoft Axapta
Weblet
web-. , Outlook Weblet
Microsoft Outlook. Weblet,
News Weblet Discussin Weblet,

Axapta. Web Panel Weblet
web-.
Weblet .
, , Weblets
.
:

WebTarget Weblet ,
WebTarget ;

web- | 431

WebError Weblet ,
.

web-
Weblet,
web-

, , ,
.
. 165. Weblet

Microsoft Outlook
Weblet: Outlook Calendar Weblet Outlook Tasks Weblet.
Outlook Business Connector.
Outlook ,
Business Connector.
. web-
, Navision TechNet.

. 166.

.
.

.
. Poll WebLet

, web-.

432

III. ?

. 167.
.
Weblet ,
Navision TechNet.
:

.
,

.
,
//.
web- WebParts,
Microsoft Digital Dashboard.
,
, Microsoft Outlook

web-

Inbox, , MSN
Business News, Stock Ticker ..

. 168. WebParts

Web- WebLets WebParts.



.

. 169. web-

web-
,
web-. ,
. Web-
, WebLets
WebParts.
.

433

434

III. ?

. 170. web-

HTML- web-,
HTML .
web- I-Frames.

. 171. web-

web- | 435

web-.
, ,
(menuitem) ,
.
, ,
.
,
/ .

web-
web-
, ///-.

. 172. web-


web-.
,
IIS.
, ,
User
.
28*

III. ?

Web-
,
web-, Intranet. Allow
anonymous access web-
NT.
Web- , ,

: AOD, .
,
HTML-.
Business Connector
web-.

. 173. web-


Axapta Business Connector
.

web-

. 174. Axapta Business Connector

web-
web- , ;
.
, , web-
Microsoft Axapta web-
web-.
web-
web- .
, Microso
Axapta, web-
, web- Wu

438

III. ?

. 175. web-

dows-
. web-
web-
, .
Weblet
, web-
web-.

web-.
online- offline-.
.
web-.
web-,
Display . (
) web-.
web-, WebTarget WebError Weblet
online-.
web- .
web- .
web-
web-.



2.5 CIS 3.0 CIS.
? -,
,
. . , .
,
:

: ,
, , XBRL, ,
, ..

: IMTS, MUIC, OCI,


-, .

: ,
, .

:
, , ,
Web, , , SQL, .

: ,
, , ,
.

: ,
SSL, OLAP
.

OLAP:
Axapta Microsoft Analysis Services,
Decision Support Object ,
OLAP,
-.

440

III. ?

:
3.0.
, ,
, -.

XML-:
XML- Microsoft
BizTalk Server, - XML.


,
.
.
:

OLD *.aod
.
,
;


.
USR- axUsr*.ald. ,
axUSRru.ald,
axUSRen-us.ald;




. -.
- .
:

. , ,
Axapta 2.1, Axapta 2.5 Axapta 3.0.

,
.


ID, ID,
.
, ,
ID .


( )

.
.
:

,
.
:

Axapta 3.0.
,
.


,
, axUsr.aod.
USR-.
:

ID .

.
:

, ,
. , ,
.
, Microsoft Axapta
2.1 Microsoft Axapta 2.5.

441

442

III. ?

. , , Microsoft
Axapta 2.5 CIS Release,
Microsoft Axapta 2.5 CIS SP5.

,
, , ,
, ,
.

,
. ,
Upgrade Project,

.

. 176.


,
,
, -

;
.

(public/protected/private).
.
.

forupdate,
ttsbegin ttscommit.
select forupdate,
.
:
static

void

setDefaultModule(BMBuildID

BMTableSetup

_buildID)

tableSetup;

ttsbegin;
while select forupdate tableSetup
where tableSetup.buildld == _buildID
{
tableSetup.numRecord = tableSetup.defaultTableRecords;
tableSetup.write ();
}
ttscommit;
}

3.0 ,
, DIS, DIS,
.
2.5, 3.0 API
, ,
, IMTS, MUIC.

.
,

, .
web-.
,
- .

.
.
:

443

444

III. ?

;
;

web-.


,
Microsoft Axapta 3.0,
.
,

.

:

. 177.

.


.
,
(
) :

.

.


.

.

.

Axapta 3.0

.

(

)
.

. 178.

.
.

,

, ,
. Microsoft
Axapta ,

, .
(i
Upgrade Check Lists)

446

III. ?

(Data upgrade cockpit)


SysCheckListItem_ApplicationPreUpgrade SysCheckListItem_ApplicationUpgrade.

SysDatalmport (
).

. 179.

,
.
:

ReleasellpdateDB
;

ReleaseUpdatePreSynchronizeDB_V25toV30
,
Microsoft Axapta 2.5 Microdoft Axapta 3.0;

ReleaseUpdatePreSynchronizeDB_V30toV30SP
,
, Microsoft Axapta 3.0
(SP);

ReleaseUpdatePreSyncDB_V25toV30_RU
, Microsoft
Axapta 2.5, , Microsoft Axapta
3.0;

ReleaseUpdateDB_V25toV30
Microsoft Axapta 2.5 Microsoft Axapta 3.0;

ReleaseUpdateDB_V30toV30SP
SP Microsoft Axapta 3.0;

ReleaseUpdateDB_V25toV30_RU
, Microsoft Axapta
2.5, , Microsoft Axapta 3.0.

, ?
ReleaseUpdateDB
initJobs(). initJobsQ
, ,
, .
.
add<XXXX>Job()
.

ReleaseUpdateDB. ReleaseUpdateDB_<old version>to
<new version> ReleaseUpdateDB.
:
p u b l i c c l a s s ReleaseUpdateDB_V25toV30

extends ReleaseUpdateDB {

.

.
initJobs().

. ,
.
ReleaseUpdateDB
:

protected void addStartJob(IdentifierName _methodName, ClassDescription description);

protected void addJob(IdentifierName _methodName, ClassDescription description);

protected void addSharedJob(IdentifierName _methodName,


ClassDescription description);

protected void addFinalJob(IdentifierName _methodName, ClassDescription description).

:
_methodName ,
, description .

447

448

III. ?


addDependecyQ.
ReleaseUpdateDB.addStartJobQ
addStartJob(),
.
,
addStartJob():
PreSync ,
(,
AllowDuplicates No).
PostSync .
ReleaseUpdateDB.addSharedJob()
addSharedJobQ,
,
addJob().
,
addSharedJobQ:
PreSync.
, ,
(, sysExpImpGroup).
PostSync. ,
, (,
sysExpImpGroup).
ReleaseUpdateDB.addJobQ ,
addJobQ,
,
addSharedJobQ.
,
addJobQ:
PreSync:
;
;
, ,
( ). ,
.
PostSync. ,
, (
).
ReleaseUpdateDB.addFinalJobQ
addFinalJobQ, -


, ,
.
,
addFinalJob():

PreSync .

PostSync ,
(
,
addStartJobQ).

ReleaseUpdateDB.addDependencyO addDependencyQ,

:
void addDependency (IdentifierName
toMethodName).

fromMethodName,

IdentifierName

, toMethodName,
,
fromMethodName.
, , ,
, updateInventJournalTrans()
ReleaseUpdateDB_V25toV30, . addJobQ
. addDependecyO ,
,
. , updat
eInventJournalTrans() ReleaseUpdateDB_V25toV30(),
,
updateNumberSequences() ReleaseUpdateDB_
V25toV30().
void initJobs ()

// " "
this.addJob(methodStr(ReleaseOpdateDB_V25toV30,
updatelnventJournalTrans),"@SYS22604");
// " "

//
this.addDependency(methodStr(ReleaseUpdateDB_V25toV30,
updateNumberSequences),
methodStr(ReleaseOpdateDB_V25toV30,
updatelnventJournalTrans));

449

III. ?


,
.
SP4 2.5,
, .

.
/
/SQL .
(
),
SysDeletedObjects30 ( , 3.0).
Axapta 3.0:
SP HF. SP
. 2.5 SP5 RU SP4 RU
.

2.5:

- DIS , ,
, , Microsoft
Axapta 3.0 . ,
, . :
JournalCheckPost, JournalTableData, JournalTransData.

, ,
.
-. , ,
,
( , ).

:

MorphX Development Suite;




Microsoft Axapta .
,
,
,
. ,
, ,
.
,
,
. .
,
.
.
Microsoft , Microsoft
Axapta .
.
,
.
, .
Microsoft Axapta ,
(
..). ,
, ,

( ) .
,
, ,
. ,
2- (.
) -

452

III. ?

. , ,
,
.


Microsoft Axapta,
.

:

.

, ().


.
,
, ,
.
.


.

.
, , .
,
. ,

.
, ,

.

. ,

. .


, , ,

, :

.
Axapta
, Microsoft,

453

(, ..) .
,
, (++,
MorphX Web MorphX),
VAR/VAP .

" .
Microsoft Axapta
, Microsoft,
(, ..) .

Microsoft,
Microsoft Axapta,
Microsoft Axapta, .
,
Microsoft Axapta.

. ,
,
.



. (Runtime)
- Axapta
. , -
, , VAR-,
Runtime VAR-. ,
VAR, VAR development, a
, -,
VAR, VAR Runtime.
Axapta Runtime
SYS, GLS, DIS LOS
. Runtime
,
Axapta.
Runtime, CUS USR
Runtime,
++, , SYS, GLS, DIS LOS
. Runtime CUS USR
.
VAR BUS
Runtime .

454

III. ?

Axapta :
, MorphX,
.
MorphX
Window's MorphX Development Suite, Web MorphX Development Suite,
++ Source code. ++
Runtime BUS/BUP, VAR/VAP, CUS/CUP USR/USP
CUS/CUP USR/USP .

. 180.



Application Object Layer
.


Axapta , ,
.
,


.
(code letter),
Microsoft Business Solutions.
, ,
, , Code
Confirm.

, ,
. .


, VAR- AxVAR.aod;

(.-).


. ,

.
,
.

.
-,
.
.



(Add-On).
, Microsoft Axapta
.
,
, .

( --

45

456

| III. ?

): ,
Microsoft Axapta . ,
, ,

.
,
.
:

(BUS);

Axapta Development Best Practices;


();

Microsoft Axapta
;


,
, .


( ),
( )
.
( .doc .pdf)
:

-
.dat, -
,
.
( )

| 4

Microsoft Axapta InstallShield


.

, Microsoft Axapta:

,
.

,
Microsoft Axapta.

,
,
.

:

, Microsoft
Axapta.

, ,
Axapta Development Best Practices, .

, -,
,
, .

Microsoft,
Microsoft.
,
Microsoft.

,
.

30 4594




, .

Add-lns


MorphX,

++

...

Query

, ,

<object name>

30*

460

, ..

...


SQL-

.
++

Scripts

++

| 461

Add-ins

Add-ins

.

() ,
.

, /


.
,

,
.
++


MorphXplorer

/ ++ ,

.

:
\ ( )
< ()

> ()
&
?

. ()
: ()
* ()
+ ()
- ()
[] ( )

462

Best Practices

++ Microsoft Axapta

++
Best Practices

,
: -
.

. ,
,


. , ,
, MorphXplorer.

Add-ins ,
.

++
,
:


CRTL+ALT+S

ALT+DOWN ARROW

Delete

CRTL+A

ALT+A

ALT+0

ALT+L

CTRL+L

CTRL+SHIFT+L

ALT+S

CTRL+ALT+H

ALT+M

CTRL+BACKSPACE

F6

F8

CTRL+SHIFT+F9

F9

CTRL+F9

TAB

SHIFT+TAB

F1

CTRL+F

F3

F7

F8

CTRL+R

CTRL+SHIFT+SPACEBAR

ALT+O

ALT+U

CTRL+Z ( 10 )

CTRL+Y ( 10 )

CTRL+G

PgUp

PgDn

CTRL+HOME

CTRL+END

HOME

//

END

//

CTRL+LEFT ARROW

CTRL+RIGHT ARROW

SHIFT+PgUp

SHIFT+PgDn

CTRL+SHIFT+HOME

CTRL+SHIFT+EMD

SHIFT+HOME

//

SHIFT+END

//

CTRL+SHIFT+LEFT ARROW

CTRL+SHIFT+RIGHT ARROW

464

CRTL+TAB

CTRL+SHIFT+TAB

SHIFT+F9

CTRL+ALT+SPACEBAfi

CTRL+SHIFT+SPACEBAR

CTRL+SPACEBAR

SHIFT+F11

CTRL+T

F2

F12

F11

SHIFT+F2

SHIFT+F4

TAB

SHIFT+TAB

ENTER

ALT+UP

ALT+DOWN ARROW

DEL

ESC

CTRL+G

CTRL+F9

CTRL+SHIFT+F9

F3

F5

F9

SHIFT+F9

F8

SHIFT+F8

CTRL+F8

ALT+2

ALT+3

ALT+4

F4

Alignment

(Left, Right, Center)

Allow/Negative

ArrayLength

AutolnsSeparator

(, 222222,
222.222,00)

Buttonlmage

, ,

ChangeCase

DateDay

DateLayout

DateMonth

DateSeparator

DateYear

DecimalSeparator

DisplayHeight

DisplayLength

Extends

ConfigurationKey

FormHelp

HelpText

.
-,

Label

466

Name

.
++

NegativeAdjustment

NoOfDecimals

RotateSign

ShowZero

SignDisplay

-, . ,

StringSize

TimeFormat

TimeHours

TimeMinute

TimeSeconds

TimeSeparator

ThousandSeparator

Id

ID

Name

,
++

Label

FormRef

,

. Display

TitleField1,TitleField2

, .
Titlefieldl , TitleField2

Temporary

GonfigurationKey

MaxAccessMode

.
,
,

CacheLookup

CreateRecldlndex


Record Id

SaveDataPerCompany

TableGroup

, .
,
Best
Practices

Primarylndex

Clusterlndex

,

, Modif iedBy.
.

Id

ID

Name

, ++

HelpText

, -

Label

GroupPrompt

SaveContents

,
.
,

Mandatory

.
validateWrite

AllowEditOnCreate

AllowEdit

Visible

ConfigurationKey

AliasFor

,
(alias)

ExtendedDataType

Adjustment

.
string

467

468

Length

.
. (Memo) ,
. string

FieldUpdate


.
integer real

EnumType

,
. enum

Id

ID

Name

AllowDuplicates

.
AllowDuplicates Yes ,
. AllowDuplicates No
, .
, Axapta
Redd

Enabled

ConfigurationKey

Name

Title

Form

,
. SysQueryForm

UserUpdate

Version

. .

Literals

Interactive

AllowCheck

Name

Table

Uniqueld

Company

, .

FirstOnly

.
.
, ,

FirstFast

AllowAdd

OrderMode

Order by
Group by

FetchMode

JoinMode

Update

Relations

, relations,

Enabled

.
No,

Field

Dynamic

Yes ,
. No

Field

Ordering

Field:


Name

Field

Value

Field

Label

(),
. ,
Field

469

470

Status

,
. Open ,
Lock , Hide

Enabled

Name

AllowCheck

. Yes

AllowCreate

.
Yes

AllowDelete

.
Yes

AllowEdit

.
Yes.
AllowEdit ,
,

AutoNotify

.
Yes. AutoJoin Microsoft Axapta

AutoQuery

,
, JoinSource.
Yes.
AutoJoin Microsoft Axapta

AutoSearch

Company

, .

CounterFieid

.
Real. CounterFieid ,
, , , ,
.
, 3 4,
3,5

DelayActive

Active .
Yes. AutoJoin Microsoft Axapta.

( LinkType Delayed).
Yes , Active
, (20 ). ,
,

Index

, ,

InsertAtEnd

,
(, F8)

InsertlfEmpty

, .
InsertlfEmpty No,
(, CTRL+N)

JoinSource

.
,

LinkType



. Delayed.
AutoJoin Microsoft Axapta.
--,
.

. LinkType Active,
, ,

OnlyFetchActive

.
.
, ,
.
OnlyFetchActive Yes,
. ,

StartPosition


. , StartPosition
First

Table

, . Name
Table

471

472

AllowEdit

.
Yes

Enabled

, , .
Yes. No, , ( )

Skip

, ,
Tab. No.
Skip Yes,
, . skip

Visible

, .
Yes.
Visible ,

Frame

, . Frame
Standard. ,
, .
, ,

HideToolbar

Mode

setCompany

TitleDataSource

WindowResize

WindowType

ActiveBackColor

ActiveForeColor

AlignChild

,
. Design
Yes AlignChildren, ,
Group2 .
Group2 AlignChild No

AlignChildren

AlignControl

.

.

Alignment

( , , )

AllowEdit

.
,
.
AllowEdit , ,
,
, (, )
. AllowEdit No ,

AllowNegative

AnimateFile

.avi, .
Avi-

AppendNew

ArrangeGuide

ArrangeMethod

(,
)

ArrangeWhen

( ,
, ..)

Arraylndex

.
Arraylndex=0,

AutoArrange

473

474

AutoDataGroup

AutoDataGroup
Yes, :
;
, ;
, , ,
;
.
Yes AutoDataGroup
, .
AutoDataGroup Yes,
,
. ,
. ,
,

AutoDeclaration

AutolnsSeparator

AutoPlay

.avi-

BackgroundColor

BackStyle

Bold

(, , ..)

Border

( , -,
..)

BottomMargin

ButtonDisplay

,
.
Text. : Normallmage,
NormalResource, Disabledlmage DisabledResource

CanScroll

, ListBox.
,

Caption

: Group, RadioButton,
ButtonGroup, TabPage

Center

.avi-

ChangeCase

CheckBox

ListView Tree

ClassName

class ID ActiveX. Class ID

ColorScheme

Column

Table

ColumnHeader

, . ,
ViewType Details

ColumnHeaderButton

, ,
. ColumnHeaderButton
, ColumnHeader

Columnlmages

. Smalllcons
,

Columns

Columnspace

ComboType

Command

, ,

ConfigurationKey

Custom

ActiveX.
, .
, ActiveX

DataField

, (
DataSource) .
: DataSource/DataField, DataMethod ExtendedDateType.
DataSource DataField

DataGroup

DataMethod

( ,
).
,
, ,

DataSource

DateDay

DateFormat

DateMonth

DateSeparator

DateValue

DateEdit. ,
, DataSource/
DataField.
Text, Value, RealValue DateValue
, /
++

DateYear

DecimalSeparator

',' '.'

31*

47!

476

DefaultButton

Direction

Disabledlmage

, .
. DisabledResource,
NormalResource.
ButtonDisplay

DisablerJResource

, .
. DisabledResource,
NormalResource.
ButtonDisplay

DisplaceNegative

DisplayHeight

.
MultiLine,
,

DisplayLength

DragOrop

, drag-and-drop.
Drag-and-drop .
drag-and-drop: tutorial_FormJJstControl
tutorial_Form_TreeControl

EditLabels

Enabled

. Yes.
No,

EnumType


.
,

ExtendedDataType

,
,

Font

FontSize

ForegroundColor

FormatMST

.
:
Auto:
;
No: ;
Yes:

FramePosition

FrameType

GridLines

, .
ListView , ViewType
Details.
Yes

HasButtons

1 Tree /

HasLines

Tree

Headerdragdrop

.
, ViewType Details

Height

HelpText

HideFirstEntry


Mandatory, Yes

HidelfEmpty

( )

HighlightActive

Grid

ImageList

.bmp-, , Tree

ImageMode

bitmap, ImageName,
(Center, Tile .)

ImageName

,
Windows- Open

ImageResource

.
id .
tutorial_resources

Italic

Item

ItemAlign

Items

Label

()

LabelAlignment

( , , )

LabelBold

(, , ..)

LabelFont

LabelFontSize

LabelForegroundColor

LabelHeight

Labelltalic

LabelPosition

( )

LabelUnderline

LabelWidth

Left

.
(, Auto (left) Auto (right)),

LeftMargin

477

478

LimitText

.
DisplayLength
LimitText , : LimitText
80 , ;
DisplayLength 20 ,
80

LinesAtRoot

Tree

LookupButton

Loops

.avi-.
0

MenultemName

MenultemType

(Display, Output, Action)

MultiLine

, .
Yes,

MultiSelect

, ,

Name

NoOfDecimals

OneclickActivate

ListView .
, ViewType Details

PasswordStyle

(*)

Pos

( )
Progress

ProgressType

Progress (Normal Smooth)

RangeHi

RangeLo

RealValue

RealEdit .

ReplaceOnLookup


.
No,
. ,
. Yes,

RightMargin

RotateSign

, - +

Row

Table

Rows

RowSelect

, .
, ViewType Details

SaveRecord

Search Mode

, SearchAfterlnput,
SearchOnTyping. None.
SearchAfterlnput,
, , , enter,
.
SearchOnTyping,

. ,
. ,

Security Key

SelectControl

tab

Selection

ShowColLabels

, Label,

ShowLabel

, ( Label)

ShowRowLabels

, ,

ShowSelAlways

ShowShortCut

, (
). .
1\1,

ShowTabs

, . No,
.
++

ShowZero

SignDisplay

- . ,

SingleSelection

SizeHeight

SizeWidth

Skip

TAB

Sort

( , , )

Step

,
Progress

Tab

TabAutoChange

TAB ,

479

480

TabLayout

TabPlacement

Tabs

Text

.
Text

ThousandSeparator

',' '.'

TimeFormat

(10:29:49 22:29:49)

TimeHours

TimeMinute

TimeSeconds

TimeSeparator

, (
, , .)

Top

.
Auto (
, Bottom edge),

TopMargin

TrackSelect

. ,

Transparent

TransparentColor

, ,
(bitmaps).
,

TwoClickActivate

.
, ViewType Details

Underline

Value

VerticalSpacing

ViewType

( , , , )

Visible

VisibleCols

.
, .
Auto,

VisibleRows

.
, .
Auto,

Width

Name

Label

(),

HelpText

, -

ConfigurationKey

Security Key

NeededAccessLevel

; ... _ ^ _ .

...

Name

Label

(),

HelpText

, -

Class

: ,
, , , , web-

Object

Parameters

EnumTypeParameter

EnumParameter

RunOn

: ,

ConfigurationKey

CountryConfigurationKey

WebConfigurationKey

web-

Security Key

.
NeededAccessLevel

NeededAccessLevel

Web

web-

WebSecureTransaction

SSL

MultiSelect

481

Caption

Clear

Delete

HelpField

,
-,

InitValue

Insert

.
, super()

PostLoad

ReRead

ToolTipField

ToolTipRecord

ToolTip

Update

ValidateDelete

ValidateField

, ,

ValidateWrite

canClose

. super() ,
. canClose closeCancel
closeOK

close

. super() ,

closed. close closeCancel, closeOK

closeCancel

, Cancel ESC.
super() closedCancel
close-

closed

. ,
,

closedCancel

closeCancel. ,
( Cancel ESC).
, ,
Cancel

closedOK

closeOK. ,
. , ,

closeOK

, . super()
closedOK close-

closeSelect


- . closeSelect close.
closeOK

copy

(CTRL+C)

cut

(CTRL+X).
cut

doApply

docCursor

.

. docCursor
.

finalize

, ,

firstField

. super()

init

. ,
, . init
new. super()

FormBuild.
super() . super(>
.
Init. Init
,
.
Init

lastField

.
super()

new

. ,
. new
, . ,
new
. ,
, init-

nextField

. supen
.
, Nextfield ,

nextGroup

.
super()

484

paste

(CTRL+V). paste

prevField

. super()

prevGroup

.
super()

print

,
Print... File

printPreview

,
Print Preview File

reload

run

In it.
.
ExecuteQuery

setApply

. (
), .

task

- :
, . super()
, nextField,
TAB

equal

. .
equal, , ,
,

toString

. .

wait

active

.
super()

create

,
(CTRL+N).
super() ,
. ,
true After

defaultMark

, (
) Grid.
,

delete

.
super() validateDelete , validateDelete
true,

deleteMarked

(ALT+F9) ()
. ()
, delete

displayOption

displayOption
.

executeQuery

.
super() , init,

first

.
super()

init

.
superQ
,

initValue

.
. superQ
initValue

last

.
super()

leave

.
leave . super()

leaveRecord

. super()
validateWrite , , write

linkActive

,
. super() executeQuery
, .
,
( Yes LinkType
)

next

.
superQ

prev

.
superQ

print

.
superQ ,

prompt

(
CTRL+F3).
superQ

485

486

refresh

super() ( ).
refresh refreshEx.

refreshEx

refresh.
refreshEx

removeFilter

reread

.
super()

research

validateDelete

.
superQ validateDelete .

validateWrite

.
superQ validateWrite .

write

.
super() validateWrite

context

helpField

,
.

jumpRef

lookup

modified

super() Modified .
,

perfomLookup

lookup.

validate

super() Modified .
super() ValidateField .
,

activateltem

ListView

activeCellChanged

Table

allltemsDeleted

ListView

beginLabelEdit

() Tree

clicked

colLabel

super{) ,
Table

context

data

super()

doubleclick

editControl

super()

endLabelEdit

()

enter

expanded

expanding

filter

gotFocus

helpField

.
superQ HelpText ,

itemDeleted

itemlnserted

jumpRef

leave

lookup

lostFocus

modified

, Validate true.
Modified :
(
StringEdit, IntEdit, RealEdit, DateEdit TimeEdit);
( CheckBox, RadioButton, ComboBox
Listbox).
,
. super() Validate
, ValidateField Modified

487

488

raouseDown

mouseMove

mouseUp

paint

super() .bmp-

perfomLookup

lookup.

rowLabel

super() ,

selectionChanged

( Tree ListView)

selectionChange

( RadioButton, ComboBox Listbox)

selectionChanging

( Tree ListView).

tabChanged

tabChange

.
false,

textChange

toolTip

validate

.
. ,
, ,

if(! a)

&

// ''.
//
i = 1 & 3; // = 1

&&

. ,
1 2

// true, true
(1 ==1) && (3> 1)

.

,

)
*

print a ;
1
, // true, 11 12
( (11 != 12)
)

i = 4 * (5 1);

// 4 5. i = 20.
i = 4 * 5;

// 1 3. i = 4.
i = 1 + 3;

++

int i = 3;
// i
// 4
i++;
date d3 = 21\11\1998;
d3++;//HTor: d3=22\11X1998

+=

i = 3 1; // i = 2.

int i = 3;
i - ; l/\ = 2.

-=

int i = 13;
i -= 10; //i = 3

class1.method1()

//Divides 20 by 5. i = 4.
i = 20/5;

int i = 3;
i + = 1 0 ; / / i = 13.

switch..case

<

32 4594

static void JoM(args a)


I
int i = 5;
try
I
Class1::Metode1(i);
1
catch (exception::error)
(
Box::stop(Error!!)
)
1

for

int i;
for (i = 1; i <= 100; i += 1)
(
print ra[i];
I

,
,

// false
((11 div 10) <1)

490

.
,
(
2)

int i;
i = 1 4;
// 1 4
// (1*2*2*2*2). :
//i = 16.

<=

(11 <= 12)//true

int i;
i = 25;

==

(( 42 * 2) == 84) //true

>

,
,

((11 div 10) > 1)//false

>=

((11 div 10) >= 1) //True

.

( )

// 16 4
// (16/2/2/2/2). :
\ = 1
i = 1 6 4;

.
: 1 ? 2:
. 1 ,
2,

// : i = 1
i = (400>4) ? 1 : 5;

abstract

, .
-
.
,


.
.
.

anytype

anytype Method1(Args a)
(
1

asc

.
select
order by group by

select * From CustTable


Qtdec bv Mams asc;

at

.

window


static void Job4(Args _args)
{

str navn;
CustTable ct;
window 80,30 at 5,3;
while select ct
(
print ct.name, ,
ct.value;
1
1

avg

select.
,
group by

CustTable ct;
select avg(value) from ct;
print ct.value;

break

int i;
for (i = 1; i <= 100; i+= 1)
{

if (iArray[0] > 0)
break;
1
breakpoint

by


group by order by

case

switch.

switch (ii)
{
case 2:
ii += 25;
break;
case 3:
ii += 3;
break;
case 4:
ii +=55;
break;

catch

try
(
methodAQ;
)
catch(exception::error)
(
// Do something
)

32*

49

492

change
company

static void main()


{

// ''
changecompany('bbb')
{

// 'bbb'
)
// ''
)
class

class Point
<
//
1

client

client method1()

container

container = [1, 3.14, abc];

continue

. for (a = 0; a < 10; a++)


for, while do/while. (
while do/while if (a>4)
continue continue;
. for )
,

count

select.

CustTable ct;
select count(value) from ct;
print ct.value;

date

date
date
date
date

default

switch.
switch- case,
, default

switch (a)
(
case 5, 10:
//
break;
case 20:
//
break;
default;
// , 5,
/ / 1 0 20
)

d;
d1,d2;
d3 = 21\11\1998;
d4[];

delete_
from

.
delete,
,
deletejrom

Tablel tablel;
DELETE_FROM tablel
where tablel .AmountMST
<='1000';

desc

.
select order
by group by

select * from CustTable


order by Name desc;

display

display
display-,

. Display-
-

display int SubtotalSum()

div

// : i=4
i = 100 div 21;

do

do do/while.
do/while
. do/while
,
while

edit


edit-

return this.SubtotaLA +
this.SubtotaLB;
1

do
{

++ii;
I
while (ii < 10);
edit Description
getGrpl\lame(Boolean _set,
Description value)
1
)

else

if.

if (a > 10)
(
)
else
I
1

exists

select.
.
,

select custTable
order by AccountNum
exists join custTrans;

extends

public class QueryRun extends


ObjectRun

FALSE

493

494

final


.
,

firstFast

.
select.
,

select firstfast custTable;

firstOnly

.
select.

select firstonly custTable;

flush

for

. for

,
, ,

int i; //
for (i = 1; i <= 100; i+= 1)

force
Literals

select.

where

select forceLiterals tablel;

forcelMestedLoop

select.
,
,

forcePlaceholders

select.

where

forceSelectOrder

select.

,

.
forcelMestedLoop

forUpdate

select.
.
,
forupdate

select forupdate tablel;

from

select. ,
.
from
select

select fieldl, field2 from


CustTable;

print ra[i];
1

select forcePlaceholders
orderLines
join orderTable

group

select.

select sum(CreditMax) from


custtable
group by CustGroup
1
print ct.CustGroup,
, ct.CreditMax;
)

hint

select.

.

select custTable
index hint Phoneldx;

if

if (a > 10)
(
//

implements

class SysDatalmport extends


SysDataExplrnp implements
sysDeleteTables

index

select.

select custTable
index Accountldx;

insert_
recordset

insert_recordset tablel
(field1,field2)
select fieldl, field2 from
table2
where table2.field1 != ;

int

. ,

int i;

interface

interface SysDeleteTables

join

select.
join select

select custTable
order by AccountNum
join custTrans;

left

str left leftAlignedStr;

like

, Jones like Jo?es //true


. Central like Ce* //true
like

maxof


, group by

select maxof(CreditMax) from


custTable;

minof


, group by

select minof(CreditMax) from


custTable;

mod

. ,
]

//: i = 16
i = 100 mod 21;

495

496

new

.
, new

next

select.


select

select custTable;
print custTable.name;
next custTable;
print custTable.name;

nofetch

select.
. nofetch
,

, ,

select nofetch custTable;

notexists

select.

.
,

select custTable
notexists join custTrans;

null

order

select.

select custTable
order by accountNum desc;

outer

select.

.
,

select custTable
outer join custTrans

pause

pause;

print

.
print
pause,

print ;
pause;

private

.
, private,
, ,

private void method1()

protected

.
, protected,
, ,
-

protected void method1()

public

.
, public,
, ,
-

public void method1()

real

retry

catch.
try

try
throw exception::deadlock;

catch (exception::deadlock)

retry;
return

.
, -

real age(date bd = today())

reverse

select.

select reverse custTable


order by accountNum;

right

str right rightAlign;

select

select * from custTable;

server

server method1()

setting

update_recordset.

.

update_recordset tablel
setting fieldl =
tablel .fieldl * 1.10;

static

static
, .

static void method1()

str

str a;

sum

select.
,
group by

select sum(CreditMax) from


custTable;

super

return (this.Birthdate
birthdate) / 365;

497

498

switch

switch (TelephoneArea)
(
case 555 : ...; break;
case 501 : ...; break;

)
tablelock

throw


.

catch

try
{
throw exception::error;
}
catch (exception::error)
{

)
TRUE

try


. ,
,

ttsabort

ttsbegin;
.
if (condition)
: ttsabort;
else

ttscommit;

ttsbegin

ttscommit

update_
recordset

update_recordset tablel
setting fieldl = 1;

void

void method1()

where

select.

select tablel
where tablel .fieldl >= 100;

while

.
,

while (a <= 5)
{

//
)
do
1
//
}

while (a <= 5);


while select custTable
{
//
i
window 80,30;

window

, .
'}'

, .
'['

.
.
'}'

//: i = 3.
i = 1 I 3;

II

. ,

(1 <4) II (4 > 1) // true


(1 >4) II (10 < 9)//false-

.
.
'
. .

// : i=2
i = 1 3;

// : i = -2
i = ~1;

499

500

EBNF
EBNF Extended Backus Naur Form c a . EBNF ,
. EBNF-on , -
.

,
.

He-
,
,
.


.
,

.

,

, -
EBNF :

()

.
.

1 I 2

.
,

1 2

. 1
2

[]

.
[] .
,
,

. II
, , .

()

= _

= _ I

, ,
. -
: _. He-
_, _.

,
:

= {} []

|_ I _}

, ,
, ,
.

501


Microsoft Axapta
. , - ,
- . ,
,
Microsoft Axapta.
, ,
.
Microsoft Axapta
( Java C++
).
,
.
, , ,
(engine), ,
.
, ( ) , ,
.

,
, Microsoft.

Microsoft Axapta. , -
.
,


MICROSOFT BUSINESS SOLUTIONS
3.0
.
.
.
.

19.11.04. 70 0'/16.
1. .
31,5 . . 2000 . 4594.

123060, , / 28
.: (095) 105-77-16
www.alpina.ru
e-mail:info@alpina.ru

. . . .
214000, . , . . , 2.


Dell : ,

, . ., 2004, 230 .
- Dell
Computer Corporation. -
, - Dell
.
Dell Computer
Corporation,
. Dell ,
,
, ;
, ;
, , .
, ,
.

-
:

, . ., 2004, 252 .

-
.

,
Computerworld - ,
.
,
, ,
,
. ,
, .
,
, ,
, .
,
, ,
.

.
, . ., 2004, 300 .
,
, .
.
.
.
,
, .
- ,
. ,
, , ,
.

, www.alpina.ru
.: (095) 105-7716.

'


DIXIS
-




Microsoft Axapta


Microsoft Axapta ,
.
,
Axapta?
:
Microsoft Axapta
: ,

,


Microsoft Axapta (
)

Axapta
CAD/CAM, PDM

Microsoft Gold Certified Partner


-
160
Axapta



,

-: (812) 303-98-58
: (095) 502-9941
www.andproject.ru

TopS Business Integrator ...


... Microsoft Axapta

TopS I
:
-







.
.

. .

Microsoft Business Solutions Axapta. ,



-,
,
.
.
,
.
, , ,
.
,
Microsoft Business Solutions Axapta.

, .
,
, .