Application in the preparation of management information systems, typically encounter a common problem is how to control under different conditions data in the table columns, such as for the same DATAWINDOW different users have different operations (such as for data entry personnel can change data , and for general inquiries, staff can not change the data), following on the payroll of a simple example to demonstrates the use of PB Ruhe in DATAWINDOW Lie of a modified form of control.
Basic payroll as follows:
Code name variable working hours of the basic wage wage wage jobs pay subsidized intellectuals
code name workdata basesa movesa stationsa bt othersa
char varchar char decimal decimal decimal decimal deciaml
There are two ways in PB can control the column attribute, one static, the other is dynamic ways. The so-called static approach is adopted in the column attribute option to achieve. Way is to use the so-called dynamic programming. Are introduced respectively:
First, the static method
(1) select a column in the datawindow MOUSE right after the point, select "properities" pops up after the system, a label, select "Edit" tab to "Display Only" option to the system to have more;
(2) or select the "Expression" tab, in the "Protect Express" fill in "1";
(3) or select the "Expression" tab, in the "Protect Express" fill in conditional expressions, such as working hours, staff can not be changed less than one year, then write "if (daysafter (date (workdate), today () ) <= 365,1,0) ";
(4) in datawindow in the value of a column of the Tab Order system to 0, the column due to lack of focus and not be modified;
(5) in the DataWindow Painter state Select Rows menu, then select the Update Properties, pop Specify Update Properties dialog box, set the Allow Updates empty.
Second, the dynamic modification method
(1) set for the protection of the entire Datawindow way: Using DataWindow Object The ReadOnly property can be set for the protection of the Datawindow way.
The syntax is: dw_1.Object.DataWindow.ReadOnly = value or dw_1.Modify ("DataWindow.ReadOnly (= value)"), including: value that Datawindow is read-only (read-only) state, it has two values : Yes and No. Yes that makes Datawindow as read-only; No on the contrary, the default value is No. For example: If you want Datawindow set to conservation, the corresponding event in the script contains the following code:
dw_1.Modify ("DataWindow.ReadOnly = Yes") or as:
dw_1.Object.DataWindow.ReadOnly = Yes
(2) protects only certain columns Datawindow
Method 1: Use column Protect property
The syntax is: dw_1.Object.name.Protect = integer or dw_1.Modify ("columnname.Protect (= integer)").
Parameter Description: cloumnname: In order to protect the column names; integer: the column to protect the state, a value of 0 or False when the column is not protected; value of 1 or True, the column is protected. For example, to set the column name to protect the state, the corresponding code: dw_1.Object.name.Protect = 1 or to: dw_1.Moidfy ("name.Protect = 1")
Method 2: Use column TabSequence property, in the program execution as needed TabOrder the column is set to 0, so as to achieve the purpose of protection.
The syntax is: dw_1.Object.name.TabSequence = number or dw_1.Modify ("columnname.TabSequence (= number)")
Parameter Description: columnname: to protect the column names; number: the column TabOrder value (0-32000).
For example, to set the column name to protect the state, the corresponding code:
dw_1.Object.name.TabSequence = 0
Or: dw_1.Modify ("name.Tabsequence = 0")
Method 3: Using the modified column ED99v properties DisplayOnly property values.
The syntax is: dw_1.Object.columnname.Edit.DisplayOnly = value or dw_1.Modify ("columnname.Edit.DisplayOnly (= value)")
Parameter Description: columnname: to protect the column names;
value: that the column is to show only (DisplayOnly) state, it has two values: Yes and No. Yes that does not allow the user to enter data (display only): No, by contrast, the default value is No.
For example: if the column name is set to only show events in the corresponding script contains the following code:
dw_1.Object.name.Edit.DisplayOnly = Yes
Or: dw_1.Modify ("name.Edit.DisplayOnly = Yes")
Although not with this method can be modified when the column but the column will be the focus of these other methods can not.
Third, selective protection of certain lines
DataWindow above methods will work for all lines, but to protect only some of these lines, you need to use the column to protect (Protect) attributes (values with the above method 2), but this is achieved in the establishment when the DataWindow . Methods: the DataWindow Sketchpad (Painter), double-click the appropriate column, the pop-up Column Object dialog box, select the Expressions page, write in the box after Protect if (conditional expression, 1,0). Flexible use of conditional expression can get a variety of protective effect.
(1) only allows to modify the new row inserted
In a DataWindow, sometimes there is a demand: do not allow the existing data can only browse changes, only the data entered by the user before allowing the new changes, then the expression is:
if (isrownew (), 0,1), or if (not isrownew (), 1,0)
(2) the protection of a column other columns according to the data
Such as staff salaries management, more than 5 years of work experience only when allowed to enter the intellectual subsidies (bt), bt the Protect are shown after the box: if (integer (mid (string (today (), 'yyyymmdd '), 1,4)) - integer (mid (workdata, 1,4))> 5,0,1)
(3) to protect the line can be determined only at execution time, and changing the management of such wages, assuming that only the wages of wage changes is change the input by, and generally only in the implementation of the conditions need to be established a variable, which requires the establishment of DataWindow data when a search for the specified parameters (such as the flag), then the column can be modified after the box Protect (user_name is the DataWindow in a, on behalf of the importer's name) :
if (user_name = flag, 0,1)
Also note that in practical applications the actual type parameters.
(4) add a flag in the table column
Basically, these methods require the line to protect certain rules to follow, no rules when these lines when the corresponding table in a marked increase in the specific column (set out name flag), values of 1 and 0, Protect in the other column and then the box directly after the flag of the expression. Run-time if the line flag = 1, the corresponding column in the bank is protected. Column value for the flag amendment, by the data administrator to modify or under certain circumstances flexibility in the program settings.
Recommended links:
Motorola Recall: a beautiful mistake
Custom programming of the intercept keystrokes VB.NET control action
Wave Of Mergers BI Have A Happy Life
"Staying Princess" Mercenary Information Finished
Report ASP And PHP
MKV to iPod
Reviews Covert Surveillance
ASF CONVERTER
Establish OSPF ADJACENCY relationships in
quot spore this application has failed to START
What rod DEALER outlets
In October 2007 The Sixth New York International Outsourcing Exhibition
VOB to MP4
I think the admin of this website is truly working hard for
ReplyDeletehis website, since here every data is quality based
stuff.
Here is my site: raspberry ketone diet
The next time I learn a weblog, I hope that it doesnt disappoint me as much
ReplyDeleteas this one. I mean, I know it was my option to read, but I
truly thought youd have one thing attention-grabbing to say.
All I
hear is a bunch of whining about one thing that you may repair if you werent too busy in search of attention.
Also visit my web page ... osborne group spain
This piecе of wгiting is trulу а plеasant
ReplyDeleteοne it assists nеw net users, who arе ωishing
fοr blogging.
Αlso viѕіt my web site; reputation management
What's up, after reading this awesome post i am also delighted to share my knowledge here with friends.
ReplyDeletemy website Pure garcinia cambogia review
Card Debt Relief plan is a reliable alternative. This in
ReplyDeleteturn may propel them to obtain a loan except in certain
instances where a lender specializes in poor credit card debt
relief and is looking for such borrowers.
my weblog: help with debt
Card Debt Relief plan is a reliable alternative. This in turn may propel them to obtain a loan except in certain instances where a
ReplyDeletelender specializes in poor credit card debt relief and
is looking for such borrowers.
Visit my blog post; help with debt
All these may look trivial to you now, but, there are quite many factors which will
ReplyDeleteaffect the Cheap Online Car Insurance Quote premium in
half. The" fraud mill" simply asked the participants
to sign insurance forms, which would later be submitted to insurance companies
struggling to meet investment targets, said Thomas Mercein, global
head cheap online car insurance quote of debt capital markets at J.
It seems like the car manufacturers, insurance companies will do everything to protect their
insured clients. Moreover, because it is a personal or a friend's car.
Here is my blog post ... car insurance ()
She might develop fine, thin hair over the body called lanugo hair.
ReplyDeleteClick here to get Paco Rabanne 1 Million!
Here is my homepage - how do you get a girlfriend
Or maybe she makes strict rules about how many times I ruined a relationship with a married guy who owns a promising wealth.
ReplyDeleteTake pride in how you go about finding your own style to charm the pants off every
lady you meet? I ran across I used to share with you the great
quotes, I need to know what to say, just ask her!
Visit my web page: how to attract beautiful women
Post writing is also a excitement, if you be acquainted
ReplyDeletewith after that you can write or else it is difficult to write.
Here is my web-site: initial Time (kspd.ks.Ac.kr)
I quite like looking through a post that will make men and
ReplyDeletewomen think. Also, many thanks for allowing for me to
comment!
My page ... szyby Do kuchni Poznań
These are in fact impressive ideas in on the topic
ReplyDeleteof blogging. You have touched some good points here. Any way keep up wrinting.
Also visit my homepage: how do you take garcinia cambogia
Having really outstanding օѵеr at scrabble requirements learning аll those simple
ReplyDeletemethods ɑnd սsing tҺese pesople іn eaach and еѵery sport.
1 previus method іn which Ӎy partner and i'deborah personaly claim tҺаt ʏoս'll
be аble to boost սp yߋur vocabulary iis tο truth be told, start
оff studying the thesaurus. An electric sport employs consumer electronics tߋ maқе thhe interactive sound-graphicor еven 3d images ѕystem,
providing players havіng a energetic along witɦ involved experience.
Alsߋ visit my site - scrabble game download
I am now not sure the place you are getting your
ReplyDeleteinfo, however great topic. I needs to spend a while learning more or working out more.
Thanks for magnificent info I was looking
for this info for my mission.
my web blog best bed bug killer
vous pouvez essayer ici répliques de sacs ysl visitez la page d'accueil réplique gucci découvrir Gucci Dolabuy
ReplyDelete