Compare commits

...

152 Commits

Author SHA1 Message Date
378653c536 C2025-011 PROMS – RO Update Admin Tool Memory Enhancements
The purpose of this upgrade is to improve the user experience when using the Admin tool to Update ROs. Currently for larger RO dbs (like Barakah) we can run up against memory constraints that do not allow all the ROs to be updated at one time. This is based upon some initial resource where some places were identified where we could improve memory usage.  Some of these should benefit PROMS as a whole while others will be specific to the RO Update option in Admin Tools.
2025-02-04 13:23:21 -05:00
f2d330bd0e Merge pull request 'F2025-001 Barakah provided us with format changes to add more signoffs to the "BNPP Single Column Format - 2021" in which they had made.' (#505) from F2025-001_BNPP into Development
format only change - ready for testing
2025-02-03 13:41:58 -05:00
c1c93cbdc4 F2025-001 Barakah provided us with format changes to add more signoffs to the "BNPP Single Column Format - 2021" in which they had made. 2025-02-03 13:40:18 -05:00
47a14e143e Merge pull request 'C2019-025_Ability-to-Toggle-Replace-Words-3' (#503) from C2019-025_Ability-to-Toggle-Replace-Words-3 into Development
good for testing phase
2025-01-30 09:26:20 -05:00
b7aa85f4fc C2019-025_Ability-to-Toggle-Replace-Words-3 2025-01-30 09:22:51 -05:00
90e25f3fcf C2019-025_Ability-to-Toggle-Replace-Words-3 2025-01-30 09:09:39 -05:00
d67e81d8a6 Merge pull request 'C2025-005 PROMS – Searching Step Elements' (#502) from C2025-005 into Development
good for testing phase
2025-01-29 15:31:59 -05:00
057915baaa C2025-005 PROMS – Searching Step Elements
When searching for step elements (the Find Selected Step Elements option is selected) and multiple procedure sets are selected, but the procedure sets use different formats, PROMS puts a message in the Results area that says "folders selected contain multiple formats". Need to expand this messaging to provide more clear information regarding which formats are causing the issue, so that they can more easily decide which sets to de-select rather than doing so randomly.  There is also a refresh issue where deselecting everything, it will not always refresh properly.
2025-01-29 15:26:29 -05:00
fe268b6122 Merge pull request 'C2019-025_Ability-to-Toggle-Replace-Words-2' (#501) from C2019-025_Ability-to-Toggle-Replace-Words-2 into Development
good for testing phase
2025-01-29 15:04:09 -05:00
ca61597863 C2019-025_Ability-to-Toggle-Replace-Words-2 2025-01-29 14:21:14 -05:00
a04def360d Merge pull request 'B2025-010 PROMS – Change ID Issues' (#500) from B2025-010 into Development
good for testing phase
2025-01-28 09:05:28 -05:00
5e43a8501b B2025-010 PROMS – Change ID Issues
Removing the change id via backspaces in the change id box in the step properties panel can cause PROMS to crash. Also, it doesn’t always remove the change id properly. Changing this to instead of updating every time text changes in the box, adding a save button. Also, adding some null exception error handling.
2025-01-27 16:09:19 -05:00
e893264075 Merge pull request 'C2019-025_Ability-to-Toggle-Replace-Words' (#499) from C2019-025_Ability-to-Toggle-Replace-Words into Development
OK for testing phase
2025-01-27 15:51:01 -05:00
cf20704811 C2019-025_Ability-to-Toggle-Replace-Words 2025-01-27 15:45:09 -05:00
37c5b23a86 C2019-025_Ability-to-Toggle-Replace-Words 2025-01-27 13:38:48 -05:00
82d8fe6e17 Merge pull request 'B2025-005 PROMS - Change Reports - Invalid Transitions showing Incorrectly' (#498) from B2025-005 into Development
good for testing phase
2025-01-24 15:53:37 -05:00
4ca3697845 B2025-005 PROMS - Change Reports - Invalid Transitions showing Incorrectly 2025-01-24 15:29:07 -05:00
71130bd26b C2019-025_Ability-to-Toggle-Replace-Words 2025-01-24 10:12:43 -05:00
37626d8f45 Merge pull request 'C2025-008 RO Editor – Remove redundant Save Failed message box' (#497) from C2025-008 into Development
Good for testing phase
2025-01-24 08:36:04 -05:00
f95369d3a4 C2025-008 RO Editor – Remove redundant Save Failed message box 2025-01-24 08:02:24 -05:00
aa00891f8e Merge pull request 'B2025-008 PROMS - Display RO Step Properties - RO Tables' (#496) from B2025-008 into Development
good for testing phase
2025-01-23 16:13:56 -05:00
d44f9ba2b6 B2025-008 PROMS - Display RO Step Properties - RO Tables 2025-01-23 15:50:52 -05:00
c3b7b1e5a4 Merge pull request 'B2025-007 RO Editor – RO Figure Default File extension' (#495) from B2025-007 into Development
good for testing phase
2025-01-23 11:06:24 -05:00
f3309e4a40 B2025-007 RO Editor – RO Figure Default File extension 2025-01-23 11:02:15 -05:00
8fa059c186 Merge pull request 'C2025-007 ROEditor - PROMPT to Confirm Deletion' (#494) from C2025-007 into Development
good for testing phase
2025-01-22 13:31:24 -05:00
96e61aea2b C2025-007 ROEditor - PROMPT to Confirm Deletion
When deleting a group or an RO in the RO Editor, consider adding a prompte for the user asking if they are sure they want to delete the ro/group.  Perhaps also add text to the message saying they may want to consider creating a zip file of the RO folder prior to deleting ROs/groups.
2025-01-22 12:45:27 -05:00
565779c9c8 Merge pull request 'B2025-009 RO Editor - Disable the Save As button if it is a new RO that has not been saved yet.' (#493) from B2025-009 into Development
change ready for testing
2025-01-22 12:01:04 -05:00
b4ccd682c3 B2025-009 RO Editor - Disable the Save As button if it is a new RO that has not been saved yet.
Adding a new RO:  when you click Save As, you get the Problem Saving Data message box. Should only be able to “Save As” if it has already been previously saved.
2025-01-22 11:57:57 -05:00
dba1331556 Merge pull request 'B2025-004 Remove dependency on stored procedure (GetDisplayTabdata).' (#492) from B2025-004_v2 into Development
changes good for testing phase
2025-01-22 10:39:24 -05:00
8803ae2274 B2025-004 Remove dependency on stored procedure (GetDisplayTabdata).
-- Found during testing that needed a few additional items that needed to not create hard errors
2025-01-22 10:35:44 -05:00
69d09b7fc2 Merge pull request 'B2025-004 Remove dependency on stored procedure (GetDisplayTabdata).' (#491) from B2025-004 into Development
good for testing phase
2025-01-22 08:25:26 -05:00
8ddfc8654e Merge pull request 'C2025-006_B2025-006 - C2025-006 RO Editor Figure wording update, B2025-006 RO Editor Figure Height or Width warning message update' (#490) from C2025-006_B2025-006 into Development
good for testing phase
2025-01-22 08:19:05 -05:00
7a3243e882 B2025-004 Remove dependency on stored procedure (GetDisplayTabdata). 2025-01-22 06:59:03 -05:00
4fc3b89e06 C2025-006_B2025-006 - C2025-006 RO Editor Figure wording update, B2025-006 RO Editor Figure Height or Width warning message update 2025-01-22 06:26:48 -05:00
a17419ac12 Merge pull request 'C2025-003 Enhanced Copy/Paste Upgrade - Add ability to copy/paste over enhanced master documents' (#487) from C2025-003 into Development
ready for testing phase
2025-01-21 10:48:00 -05:00
88905132e7 Merge branch 'Development' of https://git.volian.com/Volian/SourceCode into Development 2025-01-21 10:40:06 -05:00
111bed58d6 Merge pull request 'B2025-003 Chronology/Summary of Changes Reports' (#488) from B2025-003 into Development
Reviewed-on: #488

due to GIT restore from backup
2025-01-21 10:31:21 -05:00
bed61324d6 C2025-003 Enhanced Copy/Paste Upgrade - Add ability to copy/paste over enhanced master documents 2025-01-20 14:43:54 -05:00
1a889352b8 Merge pull request 'B2025-003 Chronology/Summary of Changes Reports' (#485) from B2025-003 into Development
ready for testing phase
2025-01-09 11:14:22 -05:00
5bba126a36 B2025-003 Chronology/Summary of Changes Reports 2025-01-09 11:08:30 -05:00
e01b955d46 Merge pull request 'F2024-088 - Per customer’s request, removed “Using”, “Faulted”, “Intact”, “Normal”, “On”, “Off”, “Locally”, “Manually”, “Fall”, “Rise”, and “Ruptured” from the ReplaceWords list' (#484) from F2024-088_FNP into Development
Format only change.  ready for testing phase
2024-12-17 09:48:30 -05:00
e3431b0e1e F2024-088 - Per customer’s request, removed “Using”, “Faulted”, “Intact”, “Normal”, “On”, “Off”, “Locally”, “Manually”, “Fall”, “Rise”, and “Ruptured” from the ReplaceWords list 2024-12-17 09:46:40 -05:00
b6d646b910 Merge pull request 'F2024-086 In the PROMS Manual format in the Attachments (Step Editor) With Border section type, the page number needs centered horizontally on the page (it's located between the section number and section title.' (#483) from F2024-086 into Development
good for testing phase
2024-12-12 08:44:08 -05:00
bb679a2790 F2024-086 In the PROMS Manual format in the Attachments (Step Editor) With Border section type, the page number needs centered horizontally on the page (it's located between the section number and section title. 2024-12-12 08:36:29 -05:00
e3af0a6426 Merge pull request 'B2024-094 - Carats (as Deltas) print as question marks in tables when unit <u> is used in RO Definition Value' (#482) from B2024-094 into Development
good for testing phase
2024-12-12 08:33:12 -05:00
b2108b9e5f B2024-094 - Carats (as Deltas) print as question marks in tables when unit <u> is used in RO Definition Value 2024-12-11 15:35:29 -05:00
d100002107 Merge pull request 'F2024-087 - Fixes printing sub-sections that go from continuous (single column sub-sections) to a separate (two column sub-section) so that the two column sub-section starts at the top of the page.' (#480) from F2024-097_Farley into Development
format only - good for testing phase
2024-12-11 11:14:44 -05:00
afd61303c5 F2024-087 - Fixes printing sub-sections that go from continuous (single column sub-sections) to a separate (two column sub-section) so that the two column sub-section starts at the top of the page. 2024-12-11 11:07:30 -05:00
d1c3e81a38 Merge pull request 'B2024-096 In the Ro Editor, allow <u> for a field name in the Referenced object Definition Return Value.' (#479) from B2024-096 into Development
good for testing phase
2024-12-10 09:00:22 -05:00
46419edfee B2024-096 In the Ro Editor, allow <u> for a field name in the Referenced object Definition Return Value. 2024-12-10 08:36:30 -05:00
81c91d7866 Merge pull request 'C2024-037 Enhanced Print Section so that it can now be utilized for Sections that contain subsections.' (#478) from C2024-037 into Development
good for testing phase
2024-12-09 16:07:53 -05:00
34ee092919 C2024-037 Enhanced Print Section so that it can now be utilized for Sections that contain subsections.
Farley uses subsections in some of their AOP procedures.   The "Print Section" feature did not work for these sections - instead returning a message as if the pdf was already open.
2024-12-09 15:24:34 -05:00
d07344a88a Merge pull request 'B2024-095 In Admin Tools, added minimum heights to the left side panels above selecting items in the trees. Previously when the windows were resized the trees would overlap with buttons and notes.' (#477) from B2024-095 into Development
good for testing phase
2024-12-09 10:34:58 -05:00
66ae1c632b B2024-095 In Admin Tools, added minimum heights to the left side panels above selecting items in the trees. Previously when the windows were resized the trees would overlap with buttons and notes. 2024-12-09 08:00:15 -05:00
7cc7b71edd Merge pull request 'B2024-067 Deleting Folders through Admin Tools missing some folders' (#476) from B2024-067 into Development
ready for testing phase
2024-12-05 15:51:32 -05:00
a223dfd463 B2024-067 Deleting Folders through Admin Tools missing some folders 2024-12-05 15:27:46 -05:00
61e8bc5ffa Merge pull request 'B2024-003_B2023-113_B2024-093 Updating RO Values inside a text Grid, adding a caret and/or dash into the RO value and then updating RO values changed to question marks in the UI. This also fixes restoring a deleted RO table column that has a hyphen in …' (#475) from B2024-003_B2023-113_B2024-093 into Development
good for testing phase
2024-12-03 15:22:47 -05:00
bba52a736a B2024-003_B2023-113_B2024-093 Updating RO Values inside a text Grid, adding a caret and/or dash into the RO value and then updating RO values changed to question marks in the UI. This also fixes restoring a deleted RO table column that has a hyphen in it. Also, Dashes/Hyphens and Carets in RO TABLES were behaving differently in different data sets due to different fonts – this fixes so that carats when ConvertCaretToDelta is set in the format, will properly restore/store as Deltas. 2024-12-03 15:12:04 -05:00
c5d575a019 Merge pull request 'F2019-011 Wide step tabs were printing into text. Shifted Left Justification slightly (roughly 2 characters) to account for these / this spacing.' (#474) from F2019-011 into Development
ok for testing phase
2024-11-27 09:28:22 -05:00
08f8441aca F2019-011 Wide step tabs were printing into text. Shifted Left Justification slightly (roughly 2 characters) to account for these / this spacing. 2024-11-27 09:19:42 -05:00
6bf116cbef Merge pull request 'B2023-095_U2022-004 - When Copy/Pasting Symbols, some of the symbols paste in an incorrect font' (#473) from B2023-095_U2022-004 into Development
good for testing phase
2024-11-25 14:51:35 -05:00
cc96b3fa5b B2023-095_U2022-004 - When Copy/Pasting Symbols, some of the symbols paste in an incorrect font 2024-11-25 14:44:50 -05:00
b489452bd1 Merge pull request 'B2023-029 - Added format flag to Continuous Action Note and Continuous Action Caution so that the check box to include on the generated Continuous Action Summary is automatically checked' (#472) from B2023-039_bwd_byr into Development
format only change.
Ready for testing phase
2024-11-22 14:56:17 -05:00
fa4e3997e4 B2023-029 - Added format flag to Continuous Action Note and Continuous Action Caution so that the check box to include on the generated Continuous Action Summary is automatically checked 2024-11-22 14:55:12 -05:00
7659cbbee6 Merge pull request 'B2023-074 - Fixed printing a section title, via the section properties check box, on a two-column step editor section.' (#471) from General_Debugging into Development
minor code change - no review needed.
OK for testing phase
2024-11-22 10:20:22 -05:00
548b845f62 B2023-074 - Fixed printing a section title, via the section properties check box, on a two-column step editor section. 2024-11-22 10:10:57 -05:00
4f733656a0 Merge pull request 'F2024-085 - Added a Conditional Time Critical Action high level step type to the EOP and AOP formats' (#470) from F2024-085_BVPS_ContTimeAction into Development
format only changes
2024-11-20 09:12:29 -05:00
f4ef244a10 F2024-085 - Added a Conditional Time Critical Action high level step type to the EOP and AOP formats 2024-11-20 09:10:46 -05:00
839000d48c Merge pull request 'B2024-003_ B2023-113 Updating RO Values inside a text Grid, adding a caret and/or dash into the RO value and then updating RO values changed to question marks in the UI. This also fixes restoring a deleted RO table column that has a hyphen in it.' (#469) from B2024-003_B2023_113_GIT into Development
good for testing phase
2024-11-18 16:24:13 -05:00
bcb8f419ee B2024-003_ B2023-113 Updating RO Values inside a text Grid, adding a caret and/or dash into the RO value and then updating RO values changed to question marks in the UI. This also fixes restoring a deleted RO table column that has a hyphen in it. 2024-11-18 16:17:07 -05:00
059c399240 Merge pull request 'B2021-094 - Fixed shortcut keystroke usage for the GoTo button <Shift><Ctrl><G> when used multiple times' (#468) from B2021-094_keystroke4GoTo into Development
Looks good - ready for QA
2024-11-18 14:59:13 -05:00
13b3cd6bc4 B2021-094 - Fixed shortcut keystroke usage for the GoTo button <Shift><Ctrl><G> when used multiple times 2024-11-18 14:54:34 -05:00
3cd4f4c5d9 Merge pull request 'C2024-028 Add an enhancement to Admin Tools -> Refresh Transitions. Transitions with bad links that cannot be auto-fixed, will now add an annotation of “Bad Transition Link” (which can then be searched for and manually resolved.)' (#467) from C2024-028 into Development
good for testing phase
2024-11-15 09:51:23 -05:00
02b20df652 C2024-028 Add an enhancement to Admin Tools -> Refresh Transitions. Transitions with bad links that cannot be auto-fixed, will now add an annotation of “Bad Transition Link” (which can then be searched for and manually resolved.) 2024-11-15 09:23:27 -05:00
416bdf16e0 Merge pull request 'B2021-043 Step numbering is out of order in RO usage report if RO values exist on steps 10 or higher.' (#466) from B2021-043 into Development
good for testing phase
2024-11-13 14:40:33 -05:00
75a4f66714 B2021-043 Step numbering is out of order in RO usage report if RO values exist on steps 10 or higher. 2024-11-13 14:10:39 -05:00
a5b9c26a97 Merge pull request 'F2024-078 - Adjust the spacing before and after the Note tab, along with the blank space (line) at the bottom of the Note box per the example supplied by the customer. Also made similar adjustments to the Caution tab and box.' (#465) from F2024-078_BVNoteSpacing into Development
Looks good - Ready for QA
2024-11-11 16:35:56 -05:00
0aa476d9dd F2024-078 - Adjust the spacing before and after the Note tab, along with the blank space (line) at the bottom of the Note box per the example supplied by the customer. Also made similar adjustments to the Caution tab and box. 2024-11-11 15:56:55 -05:00
0f4eec1df6 Merge pull request 'B2024-092 Add Initial Line/Ability to Disable to UI for South Texas' (#463) from B2024-092 into Development
good for testing phase
2024-11-11 08:28:36 -05:00
4bc73f847c B2024-092 Add Initial Line/Ability to Disable to UI for South Texas 2024-11-11 07:15:02 -05:00
e1271c16d9 Merge pull request 'B2024-090 If multiple tabs are left open, and Find is clicked before clicking on a tab, PROMS would crash.' (#462) from B2024-090 into Development
good for testing phase
2024-11-08 15:43:30 -05:00
c7d2140e16 B2024-090 If multiple tabs are left open, and Find is clicked before clicking on a tab, PROMS would crash. 2024-11-08 15:37:49 -05:00
ac6ee6ff83 Merge pull request 'C2024-022 Add option to select by unit when generating a Time Critical Action Summary from the ribbon in a Parent document.' (#461) from C2024-022 into Development
good for testing phase
2024-11-07 15:24:47 -05:00
1507cf31ce C2024-022 Add option to select by unit when generating a Time Critical Action Summary from the ribbon in a Parent document. 2024-11-07 15:06:38 -05:00
aad04647ac Merge pull request 'C2024-021 Update the tool tip on the Time Critical Action Summary option (Step Properties panel) to reflect the Time Critical Action Summary text rather than the Continuous Action Summary text.' (#460) from C2024-021 into Development
good for testing phase
2024-11-07 10:54:58 -05:00
934d3977d8 C2024-021 Update the tool tip on the Time Critical Action Summary option (Step Properties panel) to reflect the Time Critical Action Summary text rather than the Continuous Action Summary text. 2024-11-07 10:08:26 -05:00
03b0e52bef Merge pull request 'B2024-064 Improve user experience by providing more descriptive wording when cannot change the Applicability of a Step/Section.' (#459) from B2024-064 into Development
good for testing phase
2024-11-07 09:20:47 -05:00
1da2b8e87c B2024-064 Improve user experience by providing more descriptive wording when cannot change the Applicability of a Step/Section. 2024-11-07 09:13:40 -05:00
e3d16142ac Merge pull request 'C2024-025 Remove the tall box characters from the search results.' (#458) from C2024-025 into Development
Good for testing phase
2024-11-07 08:42:21 -05:00
b972e40a28 C2024-025 Remove the tall box characters from the search results. 2024-11-07 08:26:26 -05:00
c508255ab3 Merge pull request 'C2024-026 Add feature to the transitions panel to allow user to hold currently selected procedure/set in the panel.' (#457) from C2024-026 into Development
good for testing phase
2024-11-05 13:21:31 -05:00
e9ec884eb9 C2024-026 Add feature to the transitions panel to allow user to hold currently selected procedure/set in the panel. 2024-11-05 10:59:01 -05:00
592d28e898 Merge pull request 'B2024-080 Add Image Thumbnails to Find Submenu items to be consistent with elsewhere in the application' (#456) from B2024-080 into Development
Good for testing phase
2024-11-05 10:53:06 -05:00
b826fa6a20 B2024-080 Add Image Thumbnails to Find Submenu items to be consistent with elsewhere in the application 2024-11-05 10:48:52 -05:00
74c2a303da Merge pull request 'B2024-089 Loic to clean up transitioning to a section that does not have a section number. Also added and updated comments.' (#455) from B2024-089 into Development
Looks good to me.
Merging to Development - Ready for QA.
2024-11-04 16:46:34 -05:00
dcf50073e7 B2024-089 Loic to clean up transitioning to a section that does not have a section number. Also added and updated comments. 2024-11-04 14:39:41 -05:00
375871012c Merge pull request 'F2024-084 - Adjusted tab spacing in Beaver Valley’s AOP format and added a space after the bullet in the Bulleted High-level step in the Beaver Valley SAMG format. For the AOP format needed to remove the general tab format setting TabPtsPerChar (tha…' (#453) from F2024-084 into Development
Format only change
2024-11-01 10:15:00 -04:00
b7b67cce69 F2024-084 - Adjusted tab spacing in Beaver Valley’s AOP format and added a space after the bullet in the Bulleted High-level step in the Beaver Valley SAMG format. For the AOP format needed to remove the general tab format setting TabPtsPerChar (that affects all of the sub-step tab spacing) in order to have all of the AOP sub-step tab spacing the same as the EOP format. 2024-11-01 10:12:52 -04:00
6c22bff1fd Merge pull request 'C2024-034 RO Editor – Enhancement for when “Standard Fields” are modified.' (#452) from C2024-034 into Development
good for testing phase
2024-10-31 15:49:33 -04:00
0b12805d4a C2024-034 RO Editor – Enhancement for when “Standard Fields” are modified. 2024-10-31 15:44:28 -04:00
4bac1a4628 Merge pull request 'C2024-035 RO Editor – Enhancement to Handle renaming of Setpoint Value.' (#451) from C2024-035 into Development
good for testing phase
2024-10-31 15:17:38 -04:00
2cf164c445 C2024-035 RO Editor – Enhancement to Handle renaming of Setpoint Value. 2024-10-31 15:11:04 -04:00
11904e177b Merge pull request 'B2024-077 When searching Referenced Objects Reports, pick the RO and select a procedure set and the selection panel refreshes and you lose your selection. If the set has to be selected first then it should be at the top of the report panel.' (#449) from B2024-077 into Development
good for testing phase
2024-10-29 16:13:51 -04:00
527e6b5053 B2024-077 When searching Referenced Objects Reports, pick the RO and select a procedure set and the selection panel refreshes and you lose your selection. If the set has to be selected first then it should be at the top of the report panel.
Also fixed a small ancillary typo that I found while finding this.
2024-10-29 15:46:12 -04:00
053ebca267 Merge pull request 'C2024-033 RO Editor – Clarify wording presented to user when utilizing new Move RO feature in RO Editor.' (#447) from C2024-033 into Development
ready for testing phase
2024-10-29 09:54:06 -04:00
5e7fae9d47 Merge pull request 'F2024-082 - Added Dump, Modulate, Observe, Return, Proceed, Direct to the replace words list in all of the Farley formats' (#448) from F2024-082 into Development
format only change
2024-10-29 09:41:02 -04:00
0e4ce99612 F2024-082 - Added Dump, Modulate, Observe, Return, Proceed, Direct to the replace words list in all of the Farley formats 2024-10-29 09:40:00 -04:00
3c75637752 C2024-033 RO Editor – Clarify wording presented to user when utilizing new Move RO feature in RO Editor. 2024-10-29 07:54:50 -04:00
fb890ded1f Merge pull request 'C2024-031 Option to Disable reopen closed tabs on PROMS reentry' (#445) from C2024-031 into Development
good for testing phase
2024-10-28 14:40:05 -04:00
4399f31a83 Merge pull request 'F2024-079 - Set the flag to not uppercase the procedure and section titles in transitions in the background formats to make it consistent with the other Beaver Valley formats.' (#446) from F2024-079 into Development
format only change
2024-10-28 14:24:51 -04:00
ca4b21e593 F2024-079 - Set the flag to not uppercase the procedure and section titles in transitions in the background formats to make it consistent with the other Beaver Valley formats. 2024-10-28 13:59:14 -04:00
23a4edb610 C2024-031 Option to Disable reopen closed tabs on PROMS reentry 2024-10-28 13:28:35 -04:00
accc1c622c Merge pull request 'F2024-077 - Made the spacing between bullet tabs the step text consistent for bulleted sub-steps types and for multiple Cautions, Notes types' (#444) from F2024-077_BVtabs into Development
format only changes
2024-10-25 15:05:17 -04:00
e50ea6a5db F2024-077 - Made the spacing between bullet tabs the step text consistent for bulleted sub-steps types and for multiple Cautions, Notes types 2024-10-25 15:03:41 -04:00
04ce6f55db Merge pull request 'CSM B2024-087 Fix RO Editor Inconsistencies' (#443) from B2024-087 into Development
ready for testing phase
2024-10-25 14:39:24 -04:00
f0493e60d8 CSM B2024-087 Fix RO Editor Inconsistencies
Refresh issue in RO Definitions.  Modify an In Use field item that is not one of the Standard items, choose Continue, choose OK in the Text Definition Field. when prompted if want to Update Local or Generic definitions:

1. Prompt should contain table name (previously was not for Setpoint items)

2. If Select "Yes", Should refresh to new field name when return to previous screen / click ok to go back to RO Definition.
2024-10-25 14:33:20 -04:00
13edc9c9ff Merge pull request 'F2024-080 Add Initial Line/Ability to Disable to UI for South Texas' (#442) from F2024-080 into Development
good for testing phase.
2024-10-25 10:12:10 -04:00
fd0ea4404b F2024-080 Add Initial Line/Ability to Disable to UI for South Texas 2024-10-25 09:19:20 -04:00
df9d0f908a Merge pull request 'C2024-030 RO Editor Enhancement to include table name / explain the scope of changing a field definition Local vs Generic' (#441) from C2024-030 into Development
good for testing phase
2024-10-24 09:08:42 -04:00
779394ffd6 C2024-030 RO Editor Enhancement to include table name / explain the scope of changing a field definition Local vs Generic
When updating a field in a RO Definition, there is a prompt asking if changes should be Local or Generic --- Should change wording to explain that Local is local to that table (and include Table name in that wording)
2024-10-24 07:43:00 -04:00
a230ecef9b Merge pull request 'Just added space to a comment to force a new check-in of these Farely fomrat files' (#440) from General_Debugging into Development
no testing needed.  This is to try to resolve a Git and build issue with Farley format files on developer machines.
2024-10-23 16:42:06 -04:00
061bcfdc0f Just added space to a comment to force a new check-in of these Farely fomrat files 2024-10-23 16:37:04 -04:00
aced10498b Merge pull request 'B2024-084 Fix Refresh Issue in RO Definitions.' (#439) from B2024-084 into Development
good for testing phase
2024-10-23 16:09:42 -04:00
cd963d01e4 B2024-084 Fix Refresh Issue in RO Definitions.
Modify an In Use field item, choose Continue, choose OK in the Text Definition Field.  Hit Cancel in the next two windows, then open the RO Definition back up and the change is still there in the "In Use" column but not the Menu Value.    Close the RO Editor and re-open and the change was now gone as it's supposed to be.
2024-10-23 15:54:20 -04:00
458dd5fff4 Merge pull request 'B2024-085 Fix Object Reference Error when Getting Schema for a RO database in SQL' (#438) from B2024-085 into Development
good for testing phase
2024-10-23 14:56:21 -04:00
0c342fa188 B2024-085 Fix Object Reference Error when Getting Schema for a RO database in SQL
After converting the Robinson ROs to SQL, upon changing an In Use field and clicking Continue, an "Error on Schema" message box displayed with an unhandled error exception.
2024-10-23 14:07:20 -04:00
43b13443ab Merge pull request 'C2024-027 RO Editor – Add additional feature to allow Cut/Paste (Moving) a RO within the same table.' (#437) from CSM-C2024-027 into Development
Good for testing phase
2024-10-23 13:38:10 -04:00
c867d4e4b1 C2024-027 RO Editor – Add additional feature to allow Cut/Paste (Moving) a RO within the same table. 2024-10-23 13:20:20 -04:00
0f541142cc Merge pull request 'F2024-081- Removed the extra blank line after the Alternate High Level Step type. This was mistakenly changed during format cleanup. It is now restored to what it should be.' (#436) from F2024-081_Catawba into Development
Format only changes.
2024-10-23 12:01:19 -04:00
b0c55d09b0 F2024-081- Removed the extra blank line after the Alternate High Level Step type. This was mistakenly changed during format cleanup. It is now restored to what it should be. 2024-10-23 11:59:55 -04:00
ee71431210 Merge pull request 'F2024-076 - Added a line before the continue message in the background formats. Centered the bottom continue message for the step editor sections – all formats' (#435) from F2024-076_BV_ContinueMsg into Development
format only changes
2024-10-23 11:08:00 -04:00
a8196db676 F2024-076 - Added a line before the continue message in the background formats. Centered the bottom continue message for the step editor sections – all formats 2024-10-23 11:06:31 -04:00
8dc78d49eb Merge pull request 'Delete .gitattributes' (#434) from remove_gitattributes into Development
changes are good. This should allow us to compare format files again.
2024-10-17 09:27:10 -04:00
3999d1c49b Merge pull request 'C2020-049-Add-the-ability-for-PROMS-to-remember-open-procedure-tabs-fixed-print' (#433) from C2020-049-Add-the-ability-for-PROMS-to-remember-open-procedure-tabs-fixed-print into Development
good for testing phase
2024-10-17 09:25:22 -04:00
aceb928dba Delete .gitattributes
remove gitattributes file
2024-10-17 09:17:01 -04:00
f17db695d3 C2020-049-Add-the-ability-for-PROMS-to-remember-open-procedure-tabs-fixed-print 2024-10-16 16:23:31 -04:00
214dd8ec08 Merge pull request 'GIT_ATTRIBUTE_FILE - adjusting GIT settings so should be able to see diff of xml files in GIT (and not just Visual Studio history)' (#432) from GIT_ATTRIBUTE_FILE2 into Development
change approved - no testing needed for this.
2024-10-15 09:23:27 -04:00
2f974d7b52 Merge pull request 'C2024-029 RO Editor - Referenced Object Definition Form - Add check if items changed before prompting to possibly save' (#431) from C2024-029 into Development
good for testing phase
2024-10-15 09:22:16 -04:00
9f1dce896f GIT_ATTRIBUTE_FILE - adjusting GIT settings so should be able to see diff of xml files in GIT (and not just Visual Studio history) 2024-10-15 08:58:15 -04:00
a8294bb01a C2024-029 RO Editor - Referenced Object Definition Form - Add check if items changed before prompting to possibly save 2024-10-15 08:40:12 -04:00
28e4bdda29 Merge pull request 'B2024-079 Consistency of adding_editing_removing fields in RO Editor - Referenced Object Definition Form' (#430) from B2024-079 into Development
change are good.  Ready for testing phase.
2024-10-14 16:36:39 -04:00
7d408df904 B2024-079 Consistency of adding_editing_removing fields in RO Editor - Referenced Object Definition Form 2024-10-14 16:17:19 -04:00
caec6adf8d Merge pull request 'F2024-075 (Farley) Action verbs should be bolded no matter if title case or lower case - all formats' (#429) from F2024-075_FarlyRplWrds into Development
Format only change. OK to test.
2024-10-14 14:08:11 -04:00
a38c0dbe33 F2024-075 (Farley) Action verbs should be bolded no matter if title case or lower case - all formats 2024-10-14 14:06:17 -04:00
d779d4ad50 Merge pull request 'GIT_ATTRIBUTE_FILE - adjusting GIT settings so should be able to see diff of xml files in GIT (and not just Visual Studio' (#428) from GIT_ATRIBUTE_FILE into Development
No testing needed.  This is just a Git configuration setting for the developers.
2024-10-10 16:30:22 -04:00
9b71ce0fee GIT_ATTRIBUTE_FILE - adjusting GIT settings so should be able to see diff of xml files in GIT (and not just Visual Studio 2024-10-10 15:51:11 -04:00
8b18005b8e Merge pull request 'B2024-078 Bad Transition preventing editing of a substep. Can enter changed text, but then when move to another textbox, original text returns.' (#427) from B2024-078 into Development
changes good for testing phase.
2024-10-10 08:57:54 -04:00
a550ef1b50 B2024-078 Bad Transition preventing editing of a substep. Can enter changed text, but then when move to another textbox, original text returns. 2024-10-10 08:38:35 -04:00
63a60b32cc Merge pull request 'F2024-074 For Farley, Include the Cover Page in the total page count of the procedures' (#426) from F2024_074_FNP_CountCoverWithProcs into Development
format only change
2024-10-09 16:47:48 -04:00
ca4dc8d330 F2024-074 For Farley, Include the Cover Page in the total page count of the procedures 2024-10-09 16:45:38 -04:00
0a52aa5c53 Merge pull request 'C2024-024 Simple Selection of Fields to add to Return Values and Menu Values' (#423) from C2024-024 into Development
file changes look good - ready for testing phase.
2024-10-09 14:02:53 -04:00
591fc03ca2 C2024-024 Simple Selection of Fields to add to Return Values and Menu Values 2024-10-09 13:12:29 -04:00
345 changed files with 166867 additions and 168002 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -23,8 +23,8 @@ using System.Runtime.CompilerServices;
// Build YYMM (two digit year, two digit month) // Build YYMM (two digit year, two digit month)
// Revision DHH (day - no leading zero, two digit hour - military time // Revision DHH (day - no leading zero, two digit hour - military time
// //
[assembly: AssemblyVersion("2.3.2404.1611")] [assembly: AssemblyVersion("2.3.2410.907")]
[assembly: AssemblyFileVersion("2.3.2404.1611")] [assembly: AssemblyFileVersion("2.3.2410.907")]
// //
// In order to sign your assembly you must specify a key to use. Refer to the // In order to sign your assembly you must specify a key to use. Refer to the
@@ -91,6 +91,8 @@ using System.Runtime.CompilerServices;

View File

@@ -377,6 +377,7 @@ namespace ROEditor
this.btnOK.TabIndex = 3; this.btnOK.TabIndex = 3;
this.btnOK.Text = "OK"; this.btnOK.Text = "OK";
this.btnOK.Click += new System.EventHandler(this.btnOK_Click); this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
// //
// btnCancel // btnCancel
// //
@@ -553,6 +554,7 @@ namespace ROEditor
// update the local/internal copy of the schema. // update the local/internal copy of the schema.
if (success != true) if (success != true)
{ {
this.DialogResult = DialogResult.Cancel;
return; // DO YET process an error. return; // DO YET process an error.
} }
else else

View File

@@ -266,6 +266,7 @@ namespace ROEditor
if (success != true) if (success != true)
{ {
this.DialogResult = DialogResult.Cancel;
return; // DO YET process an error. return; // DO YET process an error.
} }
else else
@@ -367,6 +368,7 @@ namespace ROEditor
// //
// btnOK // btnOK
// //
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Location = new System.Drawing.Point(216, 72); this.btnOK.Location = new System.Drawing.Point(216, 72);
this.btnOK.Name = "btnOK"; this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(88, 24); this.btnOK.Size = new System.Drawing.Size(88, 24);

View File

@@ -220,6 +220,7 @@ namespace ROEditor
return; return;
} }
string origFieldName = myrof.GetFieldname;
myrof.SetFieldname(this.tbFieldName.Text); myrof.SetFieldname(this.tbFieldName.Text);
uint ftype=0; uint ftype=0;
if (this.rbSingleLine.Checked == true) if (this.rbSingleLine.Checked == true)
@@ -247,6 +248,7 @@ namespace ROEditor
if (success != true) if (success != true)
{ {
this.DialogResult = DialogResult.Cancel;
return; // DO YET process an error. return; // DO YET process an error.
} }
return; return;
@@ -270,7 +272,9 @@ namespace ROEditor
} }
myrof.SetFieldType(ftype); myrof.SetFieldType(ftype);
FieldTextFrm ftxt = new FieldTextFrm(myrof, myrodb, myelem, original_type, editlevel, origname, avlist, iulist); FieldTextFrm ftxt = new FieldTextFrm(myrof, myrodb, myelem, original_type, editlevel, origname, avlist, iulist);
ftxt.ShowDialog(); if (ftxt.ShowDialog() == DialogResult.Cancel)
myrof.SetFieldname(origFieldName);
this.Close(); this.Close();
} }
#region Windows Form Designer generated code #region Windows Form Designer generated code

View File

@@ -433,6 +433,7 @@ namespace ROEditor
// //
// btnOK // btnOK
// //
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Location = new System.Drawing.Point(24, 248); this.btnOK.Location = new System.Drawing.Point(24, 248);
this.btnOK.Name = "btnOK"; this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(144, 24); this.btnOK.Size = new System.Drawing.Size(144, 24);

View File

@@ -151,7 +151,7 @@ namespace ROEditor
private string origMenuItem; private string origMenuItem;
StringBuilder parseerror; StringBuilder parseerror;
private int hi, lo; private int hi, lo;
private Label lb_chkApplc; private Label lb_chkApplc;
private int dbtype; private int dbtype;
// C2021-026 returns true is Parent/Child info was passed into the RO Editor // C2021-026 returns true is Parent/Child info was passed into the RO Editor
public bool PCApplicabilityEnabled public bool PCApplicabilityEnabled
@@ -188,33 +188,33 @@ namespace ROEditor
lboxInUse.Visible = true; lboxInUse.Visible = true;
lb_chkApplc.Visible = false; lb_chkApplc.Visible = false;
} }
if (editlevel==(uint)RecordType.GroupSchema)this.Text = "Subgroup Definition"; if (editlevel == (uint)RecordType.GroupSchema) this.Text = "Subgroup Definition";
FillInData(grptxt); FillInData(grptxt);
} }
/// <summary> /// <summary>
/// Clean up any resources being used. /// Clean up any resources being used.
/// </summary> /// </summary>
protected override void Dispose( bool disposing ) protected override void Dispose(bool disposing)
{ {
if( disposing ) if (disposing)
{ {
if(components != null) if (components != null)
{ {
components.Dispose(); components.Dispose();
} }
} }
base.Dispose( disposing ); base.Dispose(disposing);
} }
private void FillInAvailable() private void FillInAvailable()
{ {
ROField rof; ROField rof;
// put the items in the AvailList box. // put the items in the AvailList box.
for (int i=0; i< AvailList.Count; i++) for (int i = 0; i < AvailList.Count; i++)
{ {
rof = (ROField) AvailList[i]; rof = (ROField)AvailList[i];
if (rof.GetFieldname != null) // DO YET: Why null? if (rof.GetFieldname != null) // DO YET: Why null?
this.lboxAvail.Items.Add(rof.GetFieldname); this.lboxAvail.Items.Add(rof.GetFieldname);
} }
@@ -277,7 +277,7 @@ namespace ROEditor
_initializing = false; _initializing = false;
} }
private void DoValueTextBoxes() private void DoValueTextBoxes()
{ {
string menuitm, retval; string menuitm, retval;
@@ -297,7 +297,7 @@ namespace ROEditor
else else
parent = null; parent = null;
} }
if (menuitm !="") if (menuitm != "")
this.tbMenuVal.Text = CvtFldToUserFld(menuitm); this.tbMenuVal.Text = CvtFldToUserFld(menuitm);
else else
this.tbMenuVal.Text = ""; this.tbMenuVal.Text = "";
@@ -310,21 +310,21 @@ namespace ROEditor
this.lblRetVal.Visible = true; this.lblRetVal.Visible = true;
VlnXmlElement parent; VlnXmlElement parent;
parent = (VlnXmlElement) elem.ParentNode; parent = (VlnXmlElement) elem.ParentNode;
while (parent != null && (menuitm == "" || retval=="")) while (parent != null && (menuitm == "" || retval == ""))
{ {
// walk up tree to get parent and check for data there // walk up tree to get parent and check for data there
if (menuitm == "") menuitm = parent.GetAttribute("MenuItem"); if (menuitm == "") menuitm = parent.GetAttribute("MenuItem");
if (retval == "") retval = parent.GetAttribute("RetVal"); if (retval == "") retval = parent.GetAttribute("RetVal");
if (parent.Name != "RO_Root") if (parent.Name != "RO_Root")
parent = (VlnXmlElement) parent.ParentNode; parent = (VlnXmlElement)parent.ParentNode;
else else
parent = null; parent = null;
} }
if (menuitm!="") if (menuitm != "")
this.tbMenuVal.Text = CvtFldToUserFld(menuitm); this.tbMenuVal.Text = CvtFldToUserFld(menuitm);
else else
this.tbMenuVal.Text = ""; this.tbMenuVal.Text = "";
if (retval!="") if (retval != "")
this.tbRetVal.Text = CvtFldToUserFld(retval); this.tbRetVal.Text = CvtFldToUserFld(retval);
else else
this.tbRetVal.Text = ""; this.tbRetVal.Text = "";
@@ -332,7 +332,7 @@ namespace ROEditor
} }
private void FillInData(string grptxt) private void FillInData(string grptxt)
{ {
this.lblGroupText.Text = grptxt; this.lblGroupText.Text = grptxt;
DoValueTextBoxes(); DoValueTextBoxes();
SetUpListBoxes(); SetUpListBoxes();
@@ -344,24 +344,27 @@ namespace ROEditor
lboxAvail.GotFocus += new EventHandler(this.lboxAvail_GotFocus); lboxAvail.GotFocus += new EventHandler(this.lboxAvail_GotFocus);
lboxInUse.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lboxInUse_MouseUp);
lboxInUseCB.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lboxInUseCB_MouseUp);
// save copies of local data, so if there is a change, we know we must save them. // save copies of local data, so if there is a change, we know we must save them.
origRetVal=this.tbRetVal.Text; origRetVal = this.tbRetVal.Text;
origMenuItem=this.tbMenuVal.Text; origMenuItem = this.tbMenuVal.Text;
// if this is a database level definition & it's a user defined database, // if this is a database level definition & it's a user defined database,
// the okay button is disabled until a field is used. // the okay button is disabled until a field is used.
if (elem.ParentNode.Name == "RO_Root" && dbtype==3) if (elem.ParentNode.Name == "RO_Root" && dbtype == 3)
{ {
string attr; string attr;
if (editlevel==(uint)RecordType.Schema) if (editlevel == (uint)RecordType.Schema)
attr = elem.GetAttribute("FieldsInUse"); attr = elem.GetAttribute("FieldsInUse");
else else
attr = elem.GetAttribute("GroupFieldsInUse"); attr = elem.GetAttribute("GroupFieldsInUse");
if (attr==null || attr=="") btnOK.Enabled=false; if (attr == null || attr == "") btnOK.Enabled = false;
} }
} }
protected void lboxInUse_GotFocus (object sender, EventArgs e) protected void lboxInUse_GotFocus(object sender, EventArgs e)
{ {
lboxAvail.ClearSelected(); lboxAvail.ClearSelected();
this.btnRemove.Enabled = true; this.btnRemove.Enabled = true;
@@ -375,7 +378,7 @@ namespace ROEditor
this.btnAdd.Enabled = false; this.btnAdd.Enabled = false;
this.btnEdit.Enabled = true; this.btnEdit.Enabled = true;
} }
protected void lboxAvail_GotFocus (object sender, EventArgs e) protected void lboxAvail_GotFocus(object sender, EventArgs e)
{ {
if (PCApplicabilityEnabled) if (PCApplicabilityEnabled)
lboxInUseCB.ClearSelected(); lboxInUseCB.ClearSelected();
@@ -385,6 +388,103 @@ namespace ROEditor
this.btnRemove.Enabled = false; this.btnRemove.Enabled = false;
this.btnEdit.Enabled = true; this.btnEdit.Enabled = true;
} }
//CSM C2024-024
//Simple Selection of Fields to add to Return Values and Menu Values.
//Part of 2024 PROMS Upgrades
//Add Context Menu for In Use Listbox
//Will allow user to right click Selected Items
//and add then to the Return Value / Menu Value Text Boxes
//without re-typing them
protected void lboxInUse_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right && lboxInUse.SelectedItems.Count > 0)
{
ContextMenuStrip cn = new ContextMenuStrip();
if (tbRetVal.Visible)
{
var AddToReturnItem = new ToolStripMenuItem("Add to Return Value");
AddToReturnItem.Click += new EventHandler(lboxInUse_Click);
AddToReturnItem.Name = "Add to Return Value";
cn.Items.Add(AddToReturnItem);
}
var AddToMenuItem = new ToolStripMenuItem("Add to Menu Value");
AddToMenuItem.Click += new EventHandler(lboxInUse_Click);
AddToMenuItem.Name = "Add to Menu Value";
cn.Items.Add(AddToMenuItem);
this.lboxInUse.ContextMenuStrip = cn;
cn.Show(Control.MousePosition.X, Control.MousePosition.Y);
}
}
private void lboxInUse_Click(object sender, EventArgs e)
{
switch (((ToolStripMenuItem)sender).Name)
{
case "Add to Return Value":
if (tbRetVal.Text == "")
tbRetVal.Text += $"<{lboxInUse.SelectedItem}>";
else
tbRetVal.Text += $" - <{lboxInUse.SelectedItem}>";
break;
case "Add to Menu Value":
if (tbMenuVal.Text == "")
tbMenuVal.Text += $"<{lboxInUse.SelectedItem}>";
else
tbMenuVal.Text += $" - <{lboxInUse.SelectedItem}>";
break;
}
}
//CSM C2024-024
//Simple Selection of Fields to add to Return Values and Menu Values.
//Part of 2024 PROMS Upgrades
//Add Context Menu for In Use ComboBox
//(Replaces In Use Listbox when Applicability
//to allow for selection of items per Unit)
//Will allow user to right click Selected Items
//and add then to the Return Value / Menu Value Text Boxes
//without re-typing them
protected void lboxInUseCB_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right && lboxInUseCB.SelectedItems.Count > 0)
{
ContextMenuStrip cn = new ContextMenuStrip();
if (tbRetVal.Visible)
{
var AddToReturnItem = new ToolStripMenuItem("Add to Return Value");
AddToReturnItem.Click += new EventHandler(lboxInUseCB_Click);
AddToReturnItem.Name = "Add to Return Value";
cn.Items.Add(AddToReturnItem);
}
var AddToMenuItem = new ToolStripMenuItem("Add to Menu Value");
AddToMenuItem.Click += new EventHandler(lboxInUseCB_Click);
AddToMenuItem.Name = "Add to Menu Value";
cn.Items.Add(AddToMenuItem);
this.lboxInUseCB.ContextMenuStrip = cn;
cn.Show(Control.MousePosition.X, Control.MousePosition.Y);
}
}
private void lboxInUseCB_Click(object sender, EventArgs e)
{
switch (((ToolStripMenuItem)sender).Name)
{
case "Add to Return Value":
if (tbRetVal.Text == "")
tbRetVal.Text += $"<{lboxInUseCB.SelectedItem}>";
else
tbRetVal.Text += $" - <{lboxInUseCB.SelectedItem}>";
break;
case "Add to Menu Value":
if (tbMenuVal.Text == "")
tbMenuVal.Text += $"<{lboxInUseCB.SelectedItem}>";
else
tbMenuVal.Text += $" - <{lboxInUseCB.SelectedItem}>";
break;
}
}
private void btnRemove_Click(object sender, System.EventArgs e) private void btnRemove_Click(object sender, System.EventArgs e)
{ {
//get item in lboxInUse (in use list) and remove it from there //get item in lboxInUse (in use list) and remove it from there
@@ -404,7 +504,7 @@ namespace ROEditor
ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType); ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType);
AvailList.Add(copyrof); AvailList.Add(copyrof);
lboxAvail.Items.Add(copyrof.GetFieldname); lboxAvail.Items.Add(CvtFldToUserFld(copyrof.GetFieldname));
InUseList.RemoveAt(indx); InUseList.RemoveAt(indx);
if (InUseApplcList.Contains(rof)) // C2021-026 remove from the field applicability list if (InUseApplcList.Contains(rof)) // C2021-026 remove from the field applicability list
InUseApplcList.Remove(rof); InUseApplcList.Remove(rof);
@@ -427,7 +527,7 @@ namespace ROEditor
ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType); ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType);
AvailList.Add(copyrof); AvailList.Add(copyrof);
lboxAvail.Items.Add(copyrof.GetFieldname); lboxAvail.Items.Add(CvtFldToUserFld(copyrof.GetFieldname));
InUseList.RemoveAt(indx); InUseList.RemoveAt(indx);
if (InUseApplcList.Contains(rof)) // C2021-026 remove from the field applicability list if (InUseApplcList.Contains(rof)) // C2021-026 remove from the field applicability list
InUseApplcList.Remove(rof); InUseApplcList.Remove(rof);
@@ -455,7 +555,7 @@ namespace ROEditor
ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType); ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType);
InUseList.Add(copyrof); InUseList.Add(copyrof);
lboxInUseCB.Items.Add(copyrof.GetFieldname); lboxInUseCB.Items.Add(CvtFldToUserFld(copyrof.GetFieldname));
AvailList.RemoveAt(indx); AvailList.RemoveAt(indx);
lboxAvail.Refresh(); lboxAvail.Refresh();
lboxInUseCB.Refresh(); lboxInUseCB.Refresh();
@@ -477,7 +577,7 @@ namespace ROEditor
ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType); ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType);
InUseList.Add(copyrof); InUseList.Add(copyrof);
lboxInUse.Items.Add(copyrof.GetFieldname); lboxInUse.Items.Add(CvtFldToUserFld(copyrof.GetFieldname));
AvailList.RemoveAt(indx); AvailList.RemoveAt(indx);
lboxAvail.Refresh(); lboxAvail.Refresh();
lboxInUse.Refresh(); lboxInUse.Refresh();
@@ -640,12 +740,13 @@ namespace ROEditor
{ {
ROField rof = (ROField) InUseList[i]; ROField rof = (ROField) InUseList[i];
rofname = rof.GetFieldname; rofname = rof.GetFieldname;
if (inusename == rofname) if (inusename == rofname || inusename == CvtFldToUserFld(rofname))
{ {
found = true; found = true;
break; break;
} }
} }
if (inusename == "u") found = true; //to handle unit designation
if (found == false)syntax(inusename+" invalid field name",strt,where); if (found == false)syntax(inusename+" invalid field name",strt,where);
// used to have procini def stuff here. // used to have procini def stuff here.
start=where+1; start=where+1;
@@ -745,7 +846,7 @@ namespace ROEditor
{ {
ROField rof = (ROField) InUseList[i]; ROField rof = (ROField) InUseList[i];
rofname = rof.GetFieldname; rofname = rof.GetFieldname;
if (inusename == rofname) if (inusename == rofname || inusename == CvtFldToUserFld(rofname))
{ {
found = true; found = true;
break; break;
@@ -1096,7 +1197,8 @@ namespace ROEditor
return; return;
} }
} }
string origname = CvtFldToUserFld(rof.GetFieldname);
uint ftype = rof.GetFieldType; uint ftype = rof.GetFieldType;
if (ftype == (uint)FieldTypes.FrmtSingleTxt || ftype == (uint)FieldTypes.VariableTxt || if (ftype == (uint)FieldTypes.FrmtSingleTxt || ftype == (uint)FieldTypes.VariableTxt ||
ftype == (uint)FieldTypes.SingleTxt || ftype == (uint)FieldTypes.Table || ftype == (uint)FieldTypes.SingleTxt || ftype == (uint)FieldTypes.Table ||
@@ -1112,6 +1214,10 @@ namespace ROEditor
nwcomb.ShowDialog(); nwcomb.ShowDialog();
} }
//need to refresh pull from table for fields in use.
_ = myrodb.RODB_GetFields(elem, 0, true);
string newname = CvtFldToUserFld(rof.GetFieldname);
// Update Lists & Text boxes to represent any modified text. // Update Lists & Text boxes to represent any modified text.
if (isInSelList) if (isInSelList)
{ {
@@ -1125,20 +1231,31 @@ namespace ROEditor
rof = (ROField) InUseList[i]; rof = (ROField) InUseList[i];
if (rof.GetFieldname != null) if (rof.GetFieldname != null)
{ {
string fieldname = CvtFldToUserFld(rof.GetFieldname);
// C2021-026 if doing Parent/Child enabled RO Editor, put the In Use fields in the Check Box List instead of the normal list // C2021-026 if doing Parent/Child enabled RO Editor, put the In Use fields in the Check Box List instead of the normal list
if (PCApplicabilityEnabled) if (PCApplicabilityEnabled)
{ {
this.lboxInUseCB.Items.Add(rof.GetFieldname); this.lboxInUseCB.Items.Add(fieldname);
if (rof.FieldTypeCanDoApplicability()) if (rof.FieldTypeCanDoApplicability())
{ {
if (ContainedInUseApplicList(rof)) if (ContainedInUseApplicList(rof))
this.lboxInUseCB.SetItemCheckState(lboxInUseCB.Items.IndexOf(rof.GetFieldname), CheckState.Checked); this.lboxInUseCB.SetItemCheckState(lboxInUseCB.Items.IndexOf(fieldname), CheckState.Checked);
} }
} }
else else
this.lboxInUse.Items.Add(rof.GetFieldname); this.lboxInUse.Items.Add(fieldname);
} }
} }
if (origname != newname)
{
tbMenuVal.Text = tbMenuVal.Text.Replace($"<{origname}>", $"<{newname}>");
tbRetVal.Text = tbRetVal.Text.Replace($"<{origname}>", $"<{newname}>");
//CSM-C2024-035 This is needed for items like Setpoint Value that may have commas with field lengths in them
tbMenuVal.Text = tbMenuVal.Text.Replace($"<{origname},", $"<{newname},");
tbRetVal.Text = tbRetVal.Text.Replace($"<{origname},", $"<{newname},");
}
} }
else else
{ {
@@ -1148,7 +1265,7 @@ namespace ROEditor
{ {
rof = (ROField) AvailList[i]; rof = (ROField) AvailList[i];
if (rof.GetFieldname != null) if (rof.GetFieldname != null)
this.lboxAvail.Items.Add(rof.GetFieldname); this.lboxAvail.Items.Add(CvtFldToUserFld(rof.GetFieldname));
} }
} }
} }
@@ -1162,8 +1279,11 @@ namespace ROEditor
if (rof.GetFieldname != null) if (rof.GetFieldname != null)
{ {
AvailList.Add(rof); AvailList.Add(rof);
lboxAvail.Items.Add(rof.GetFieldname); lboxAvail.Items.Add(CvtFldToUserFld(rof.GetFieldname));
} }
//need to refresh pull from table for fields in use.
_ = myrodb.RODB_GetFields(elem, 0, true);
} }
// C2021-026 Check/un-check field for Parent/Child values // C2021-026 Check/un-check field for Parent/Child values
private void lboxInUseCB_ItemCheck(object sender, ItemCheckEventArgs e) private void lboxInUseCB_ItemCheck(object sender, ItemCheckEventArgs e)
@@ -1397,6 +1517,7 @@ namespace ROEditor
this.btnCancel.Size = new System.Drawing.Size(80, 24); this.btnCancel.Size = new System.Drawing.Size(80, 24);
this.btnCancel.TabIndex = 10; this.btnCancel.TabIndex = 10;
this.btnCancel.Text = "Cancel"; this.btnCancel.Text = "Cancel";
// //
// RODefFrm // RODefFrm
// //
@@ -1419,6 +1540,71 @@ namespace ROEditor
this.PerformLayout(); this.PerformLayout();
} }
//if User clicked save (DialogResult.OK) close the form
//if use did not click save, ask if they are sure they want to close the form
//only close if they say "Yes, they want to"
protected override void OnFormClosing(FormClosingEventArgs e)
{
if (this.DialogResult != System.Windows.Forms.DialogResult.OK && IsPendingChange() && !CloseCancel())
{
e.Cancel = true;
}
}
public static bool CloseCancel()
{
const string message = "Are you sure that you would like to cancel? Information may not be saved.";
const string caption = "Cancel";
var result = MessageBox.Show(message, caption,
MessageBoxButtons.YesNo,
MessageBoxIcon.Question);
return result == DialogResult.Yes;
}
//return true if a field has been modified
private bool IsPendingChange()
{
if (origRetVal != this.tbRetVal.Text)
return true;
if (origMenuItem != this.tbMenuVal.Text)
return true;
// check if in use records have changed
string inuserecs = null;
ROField rof;
for (int i = 0; i < InUseList.Count; i++)
{
rof = (ROField)InUseList[i];
if (rof.GetFieldname != null) //DO YET: why null?
{
inuserecs = inuserecs + rof.GetRecID;
if (i + 1 < InUseList.Count) inuserecs = inuserecs + " ";
}
}
if (inuserecs != origFieldsInUse)
return true;
//check if applicability fields have changed
string applicfieldrecs = null;
for (int i = 0; i < InUseApplcList.Count; i++)
{
rof = (ROField)InUseApplcList[i];
if (rof.GetFieldname != null)
{
applicfieldrecs = applicfieldrecs + rof.GetRecID;
if (i + 1 < InUseApplcList.Count) applicfieldrecs = applicfieldrecs + " ";
}
}
if (applicfieldrecs != origApplicFields)
return true;
//nothing has changed
return false;
}
#endregion #endregion
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACE ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACE
CAAAAk1TRnQBSQFMAgEBAgEAARwBAAEcAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo CAAAAk1TRnQBSQFMAgEBAgEAASwBAAEsAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@@ -175,7 +175,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAe ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAe
CwAAAk1TRnQBSQFMAgEBBgEAARwBAAEcAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo CwAAAk1TRnQBSQFMAgEBBgEAASwBAAEsAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

View File

@@ -336,10 +336,10 @@ namespace RODBInterface
public abstract bool RODB_GetChildData(VlnXmlElement node, bool CheckChildCount); public abstract bool RODB_GetChildData(VlnXmlElement node, bool CheckChildCount);
public abstract bool IsDuplicateAccPageID(VlnXmlElement ro, string newacc); public abstract bool IsDuplicateAccPageID(VlnXmlElement ro, string newacc);
public abstract VlnXmlElement RODB_ReadRO(string tbl, string recid); public abstract VlnXmlElement RODB_ReadRO(string tbl, string recid);
public abstract bool RODB_WriteRO(VlnXmlElement ro); public abstract bool RODB_WriteRO(VlnXmlElement ro, bool movedRO = false);
public abstract bool RODB_InsertRO(VlnXmlElement ro); public abstract bool RODB_InsertRO(VlnXmlElement ro);
public abstract ushort RODB_GetFieldType(VlnXmlElement elem, string TableName, string Fld); public abstract ushort RODB_GetFieldType(VlnXmlElement elem, string TableName, string Fld);
public abstract ArrayList RODB_GetFields(VlnXmlElement elem, uint rtype); public abstract ArrayList RODB_GetFields(VlnXmlElement elem, uint rtype, bool refresh = false);
public abstract string RODB_GetSchemaPiece(string Recid, string table); public abstract string RODB_GetSchemaPiece(string Recid, string table);
public abstract bool RODB_NewSchemaPiece(string recid, string parentid, string table, string schpiece, uint rtype); public abstract bool RODB_NewSchemaPiece(string recid, string parentid, string table, string schpiece, uint rtype);
public abstract bool RODB_WriteSchemaPiece(string Recid, string table, string schpiece); public abstract bool RODB_WriteSchemaPiece(string Recid, string table, string schpiece);
@@ -2120,7 +2120,7 @@ namespace RODBInterface
return retele; return retele;
} }
public override bool RODB_WriteRO(VlnXmlElement ro) public override bool RODB_WriteRO(VlnXmlElement ro, bool movedRO = false)
{ {
bool success; bool success;
if (ro.Name == "vlnGroup") if (ro.Name == "vlnGroup")
@@ -2140,6 +2140,13 @@ namespace RODBInterface
string dt = string.Format("{0:yyyyMMddHHmmss}", System.DateTime.Now); string dt = string.Format("{0:yyyyMMddHHmmss}", System.DateTime.Now);
string xmlstr = GenerateXmlString(ro, false); string xmlstr = GenerateXmlString(ro, false);
string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstr + "'"; string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstr + "'";
if (movedRO)
{
VlnXmlElement parent = (VlnXmlElement)ro.ParentNode;
ro.SetAttribute("ParentID", parent.GetAttribute("RecID"));
strUpdate += ", ParentID = '" + ro.GetAttribute("ParentID") + "'";
}
strUpdate = strUpdate + ", ModDateTime = '" + dt + "', AccPageID = '" + wraccid + "' WHERE RecID='" + ro.GetAttribute("RecID") + "'"; strUpdate = strUpdate + ", ModDateTime = '" + dt + "', AccPageID = '" + wraccid + "' WHERE RecID='" + ro.GetAttribute("RecID") + "'";
try try
{ {
@@ -2192,6 +2199,8 @@ namespace RODBInterface
ro.SetAttribute("HasChild", "False"); ro.SetAttribute("HasChild", "False");
if (ro.HasAttribute("AccPageID")) if (ro.HasAttribute("AccPageID"))
{ {
// Code is never reached, but this was noticed - this next line should likely be:
// strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageID, ModDateTime, Info ) ";
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, AccPageID, Info ) "; strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, AccPageID, Info ) ";
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID"); strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID");
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');"; strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');";
@@ -2294,11 +2303,16 @@ namespace RODBInterface
} }
// For the given element's table, get all of the RO fields defined in this table. // For the given element's table, get all of the RO fields defined in this table.
public override ArrayList RODB_GetFields(VlnXmlElement elem, uint rtype) public override ArrayList RODB_GetFields(VlnXmlElement elem, uint rtype, bool refresh = false)
{ {
string table = elem.GetAttribute("Table"); string table = elem.GetAttribute("Table");
if (!FieldDefinitions.ContainsKey(table)) if (!FieldDefinitions.ContainsKey(table))
FieldDefinitions.Add(table, RODB_GetFieldsFromDB(elem)); FieldDefinitions.Add(table, RODB_GetFieldsFromDB(elem));
else if (refresh)
{
FieldDefinitions.Remove(table);
FieldDefinitions.Add(table, RODB_GetFieldsFromDB(elem));
}
return FieldDefinitions[table]; return FieldDefinitions[table];
} }
private Dictionary<string, ArrayList> _FieldDefinitions = null; private Dictionary<string, ArrayList> _FieldDefinitions = null;
@@ -2391,7 +2405,7 @@ namespace RODBInterface
Info = null; Info = null;
DBE.ReaderClose(); DBE.ReaderClose();
DBE.CommandDispose(); DBE.CommandDispose();
return Info.Replace("&apos;", "\'"); return Info?.Replace("&apos;", "\'");
} }
public override bool RODB_NewSchemaPiece(string recid, string parentid, string table, string schpiece, uint rtype) public override bool RODB_NewSchemaPiece(string recid, string parentid, string table, string schpiece, uint rtype)
@@ -2653,8 +2667,9 @@ namespace RODBInterface
bool isused = RODB_CheckForStandardName(oldname); bool isused = RODB_CheckForStandardName(oldname);
if (isused == true) if (isused == true)
{ {
MessageBox.Show("The field name is used to define new Setpoints or Graphics Database.\n The update will be for this local (database) group only.", "Field name modification."); DialogResult result = MessageBox.Show($"The field name is used to define new Setpoints or Graphics Database.\n\n The update will be for this local (database) group only.\n\n Select OK to update local definition for all items in that table ({GetTopParentName(myelem)}).", "Field name modification.", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
changegeneric = false; changegeneric = false;
if(result == DialogResult.Cancel) return false;
} }
} }
@@ -2666,8 +2681,8 @@ namespace RODBInterface
// Generic definition, i.e. all Groups, and No updates only Local definition, i.e. just this Group Added a // Generic definition, i.e. all Groups, and No updates only Local definition, i.e. just this Group Added a
// Cancel button to Cancel from this dialog and return to previous dialog. Added more information to the // Cancel button to Cancel from this dialog and return to previous dialog. Added more information to the
// dialog to inform user of this // dialog to inform user of this
string dmsg = "Update Generic definition?\r\n\r\n Yes - updates Generic definitions, \r\n No - updates Local definitions, \r\n Cancel - returns to previous dialog." + string dmsg = $"Update Generic definition?\r\n\r\n Yes - updates Generic definitions, \r\n No - updates Local definitions, \r\n Cancel - returns to previous dialog." +
"\r\n\r\n 'Generic' updates definition in ALL groups that use the name\r\n 'Local' updates definition only in the selected group."; $"\r\n\r\n 'Generic' updates definition in ALL groups that use the name\r\n 'Local' updates definition only in the selected group, and will change the definition for all items in that table ({GetTopParentName(myelem)}).";
System.Windows.Forms.DialogResult result = MessageBox.Show(dmsg, "Referenced Object Definition", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); System.Windows.Forms.DialogResult result = MessageBox.Show(dmsg, "Referenced Object Definition", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
if (result == DialogResult.Cancel) return false; if (result == DialogResult.Cancel) return false;
if (result == DialogResult.No) changegeneric = false; if (result == DialogResult.No) changegeneric = false;
@@ -2772,6 +2787,19 @@ namespace RODBInterface
return success; return success;
} }
//CSM-C2024-030
//Explain that Local is local to that table (and include Table name in wording displayed to user)
public string GetTopParentName(VlnXmlElement elem)
{
VlnXmlElement nodetocheck = elem;
while (nodetocheck.GetAttribute("ParentID") != "00000000" && nodetocheck.ParentNode != null)
{
nodetocheck = (VlnXmlElement) nodetocheck.ParentNode;
}
return nodetocheck.FirstChild.InnerText;
}
public override XmlSchema RODB_GetGroupSchema(VlnXmlElement elem) public override XmlSchema RODB_GetGroupSchema(VlnXmlElement elem)
{ {
XmlSchema myschema; XmlSchema myschema;

View File

@@ -1557,7 +1557,7 @@ namespace RODBInterface
} }
return retele; return retele;
} }
public override bool RODB_WriteRO(VlnXmlElement ro) public override bool RODB_WriteRO(VlnXmlElement ro, bool movedRO = false)
{ {
bool success; bool success;
if (ro.Name == "vlnGroup") if (ro.Name == "vlnGroup")
@@ -1589,6 +1589,13 @@ namespace RODBInterface
command.Parameters.AddWithValue("@ModDateTime", dt); command.Parameters.AddWithValue("@ModDateTime", dt);
command.Parameters.AddWithValue("@AccPageID", wraccid); // B2020-003: set accpageid to correct value command.Parameters.AddWithValue("@AccPageID", wraccid); // B2020-003: set accpageid to correct value
command.Parameters.AddWithValue("@RecID", ro.GetAttribute("RecID")); command.Parameters.AddWithValue("@RecID", ro.GetAttribute("RecID"));
if (movedRO)
{
VlnXmlElement parent = (VlnXmlElement)ro.ParentNode;
ro.SetAttribute("ParentID", parent.GetAttribute("RecID"));
command.Parameters.AddWithValue("@ParentID", ro.GetAttribute("ParentID"));
}
using (SqlDataReader reader = command.ExecuteReader()) using (SqlDataReader reader = command.ExecuteReader())
{ {
success = true; success = true;
@@ -1744,13 +1751,18 @@ namespace RODBInterface
return ftype; return ftype;
} }
// For the given element's table, get all of the RO fields defined in this table. // For the given element's table, get all of the RO fields defined in this table.
public override ArrayList RODB_GetFields(VlnXmlElement elem, uint rtype) public override ArrayList RODB_GetFields(VlnXmlElement elem, uint rtype, bool refresh = false)
{ {
string table = elem.GetAttribute("Table"); string table = elem.GetAttribute("Table");
if (!FieldDefinitions.ContainsKey(table)) if (!FieldDefinitions.ContainsKey(table))
{ {
FieldDefinitions.Add(table, RODB_GetFieldsFromDB(elem)); FieldDefinitions.Add(table, RODB_GetFieldsFromDB(elem));
} }
else if (refresh)
{
FieldDefinitions.Remove(table);
FieldDefinitions.Add(table, RODB_GetFieldsFromDB(elem));
}
return FieldDefinitions[table]; return FieldDefinitions[table];
} }
private Dictionary<string, ArrayList> _FieldDefinitions = null; private Dictionary<string, ArrayList> _FieldDefinitions = null;
@@ -1909,7 +1921,7 @@ namespace RODBInterface
command.Parameters.AddWithValue("@RecID", Recid); command.Parameters.AddWithValue("@RecID", Recid);
using (SqlDataReader reader = command.ExecuteReader()) using (SqlDataReader reader = command.ExecuteReader())
{ {
if (DBE.Read()) if (reader.Read())
Info = reader.GetString(0); Info = reader.GetString(0);
else else
Info = null; Info = null;

View File

@@ -85,7 +85,7 @@ namespace VlnStatus
this.lblStatMsg.Name = "lblStatMsg"; this.lblStatMsg.Name = "lblStatMsg";
this.lblStatMsg.Size = new System.Drawing.Size(420, 81); this.lblStatMsg.Size = new System.Drawing.Size(420, 81);
this.lblStatMsg.TabIndex = 0; this.lblStatMsg.TabIndex = 0;
this.lblStatMsg.Text = "Put Satus Message Here"; this.lblStatMsg.Text = "Put Status Message Here";
this.lblStatMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblStatMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// StatusMessageFrm // StatusMessageFrm

View File

@@ -324,29 +324,17 @@ namespace ctlXMLEditLib
string ROINI = Directory.GetCurrentDirectory()+ "\\ROAPP.INI"; string ROINI = Directory.GetCurrentDirectory()+ "\\ROAPP.INI";
// Get the default file extension for graphic files // Get the default file extension for graphic files
// DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("ROApp","Extention","",5,"ROAPP.INI"); // DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("ROApp","Extention","",5,"ROAPP.INI");
// Bug fix: B2006-025 // Bug fix: B2006-025
// needed to pass the full path of ROAPP.INI // needed to pass the full path of ROAPP.INI
// B2025-007 only use the default file location (remove 16 bit PROMS location)
IniReader in1 = new IniReader(ROINI); IniReader in1 = new IniReader(ROINI);
DefaultGraphicFileExtension = in1.ReadString("ROApp","Extention",""); DefaultGraphicFileExtension = in1.ReadString("ROApp", "Extention");
if (DefaultGraphicFileExtension.Equals("")) if (string.IsNullOrEmpty(DefaultGraphicFileExtension)) DefaultGraphicFileExtension = in1.ReadString("ROApp", "Extension", ".TIF");
{ // if (File.Exists(PromsINI))
string ApplPathUp = ApplicationPath.ToUpper(); // DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("Graphics","defaultext",".TIF",5,PromsINI);
int idx = ApplPathUp.IndexOf("VE-PROMS.NET\\BIN"); // if (File.Exists("ROAPP.INI"))
if (idx >= 0) // DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("ROApp","Extention",".TIF",5,"ROAPP.INI");
{
string PromsINI = ApplicationPath.Substring(0, idx);
PromsINI += "VE-PROMS\\VEPROMS.INI";
IniReader in2 = new IniReader(PromsINI);
DefaultGraphicFileExtension = in2.ReadString("Graphics", "defaultext", ".TIF");
}
else
DefaultGraphicFileExtension = ".TIF";
}
// if (File.Exists(PromsINI))
// DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("Graphics","defaultext",".TIF",5,PromsINI);
// if (File.Exists("ROAPP.INI"))
// DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("ROApp","Extention",".TIF",5,"ROAPP.INI");
if (!DefaultGraphicFileExtension.StartsWith(".")) if (!DefaultGraphicFileExtension.StartsWith("."))
DefaultGraphicFileExtension = "." + DefaultGraphicFileExtension; DefaultGraphicFileExtension = "." + DefaultGraphicFileExtension;
@@ -784,6 +772,7 @@ namespace ctlXMLEditLib
dosaveflag = false; dosaveflag = false;
return (true); return (true);
} }
MessageBox.Show("Save Failed");
return (false); return (false);
} }
@@ -1129,7 +1118,7 @@ namespace ctlXMLEditLib
mylabel.BackColor = chlbckcolor; // PC Applic fields are shaded blue otherwise backcolor is transparent mylabel.BackColor = chlbckcolor; // PC Applic fields are shaded blue otherwise backcolor is transparent
mylabel.Location = new Point(screenx+indent, screeny); mylabel.Location = new Point(screenx+indent, screeny);
mylabel.Name = (pcChildIdx == 0) ? CvtUserFldToFld(element.Name) : CvtUserFldToFld(pcChildFldName); mylabel.Name = (pcChildIdx == 0) ? CvtUserFldToFld(element.Name) : CvtUserFldToFld(pcChildFldName);
mylabel.Text = (applicLabel.Length > 0) ? applicLabel : CvtFldToUserFld(element.Name); // C2021-026 applicLabel is the P/C Child name mylabel.Text = (applicLabel.Length > 0) ? applicLabel : CvtFldToUserFld(element.Name).Replace("Image_",""); // C2021-026 applicLabel is the P/C Child name
mylabel.AutoSize = true; mylabel.AutoSize = true;
Controls.Add(mylabel); Controls.Add(mylabel);
// add 3 onto screeny so that textbox is slightly below label. // add 3 onto screeny so that textbox is slightly below label.
@@ -1484,12 +1473,15 @@ namespace ctlXMLEditLib
if (fnamebox.Text != "" && fnamebox.Modified == true) if (fnamebox.Text != "" && fnamebox.Modified == true)
{ {
FileInfo ifi = new FileInfo(fnamebox.Text); FileInfo ifi = new FileInfo(fnamebox.Text);
if (ifi.Exists == false) if (ifi.Exists == false)
{ {
MessageBoxButtons buttons = MessageBoxButtons.OK; FileInfo ifi2 = new FileInfo(fnamebox.Text + DefaultGraphicFileExtension);
MessageBox.Show( "File does not exist.", if (!ifi2.Exists)
"File Input Error", buttons); {
return; MessageBox.Show("File does not exist.",
"File Input Error", MessageBoxButtons.OK);
return;
}
} }
bool ok = ValidGraphicsFile(fnamebox.Text); bool ok = ValidGraphicsFile(fnamebox.Text);
if (ok != true) if (ok != true)
@@ -1696,7 +1688,7 @@ namespace ctlXMLEditLib
} }
catch (Exception ee) catch (Exception ee)
{ {
MessageBox.Show("Invalid Height Input",ee.ToString()); MessageBox.Show("The Height and Width cannot be empty fields. Enter a number in either field and the other will automatically adjust to a proportional size.", "Invalid Height Input");
} }
} }
} }
@@ -1713,7 +1705,7 @@ namespace ctlXMLEditLib
} }
catch (Exception ee) catch (Exception ee)
{ {
MessageBox.Show("Invalid Width Input", ee.ToString()); MessageBox.Show("The Height and Width cannot be empty fields. Enter a number in either field and the other will automatically adjust to a proportional size.", "Invalid Width Input");
} }
} }
} }

View File

@@ -24039,6 +24039,66 @@ GO
========================================================================================================== ==========================================================================================================
*/ */
---The following RememberOpenTabs/AlwaysOpenTabs columns were added for Remeber Open Tabs.
--- RememberOpenTabs = Do not prompt User when PROMS opens
--- AutoOpenTabs = OpenTabs when PROMS opens - Default to On
IF NOT EXISTS(SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'Users'
AND COLUMN_NAME = 'RememberOpenTabs')
ALTER TABLE Users ADD RememberOpenTabs bit NOT NULL DEFAULT(0);
go
-- Display the status
IF (@@Error = 0) PRINT 'Altered table [Users] Succeeded for RememberOpenTabs'
ELSE PRINT 'Altered table [Users] Error on Alter for RememberOpenTabs'
go
IF NOT EXISTS(SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'Users'
AND COLUMN_NAME = 'AutoOpenTabs')
ALTER TABLE Users ADD AutoOpenTabs bit NOT NULL DEFAULT(1);
go
-- Display the status
IF (@@Error = 0) PRINT 'Altered table [Users] Succeeded for AutoOpenTabs'
ELSE PRINT 'Altered table [Users] Error on Alter for AutoOpenTabs'
go
/****** Object: StoredProcedure [dbo].[vesp_UpdateUserSettings] Script Date: 10/24/2024 11:29:44 AM ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vesp_UpdateUserSettings]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [vesp_UpdateUserSettings];
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: Matthew Schill
-- Create date: 10/24/2024
-- Description: Update User Settings
-- =============================================
CREATE PROCEDURE [dbo].[vesp_UpdateUserSettings]
(
@UID varchar(100),
@Remember bit = null,
@AutoOpen bit = null
)
WITH EXECUTE AS OWNER
AS
UPDATE Users SET
RememberOpenTabs = ISNULL(@Remember,RememberOpenTabs),
AutoOpenTabs = ISNULL(@AutoOpen,AutoOpenTabs)
WHERE UserID =@UID
RETURN
GO
IF (@@Error = 0) PRINT 'Running vesp_UpdateUserSettings Succeeded'
ELSE PRINT 'Running vesp_UpdateUserSettings Failed to Execute'
GO
/* /*
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
| ADD New Code Before this Block | | ADD New Code Before this Block |
@@ -24072,7 +24132,7 @@ BEGIN TRY -- Try Block
DECLARE @RevDate varchar(255) DECLARE @RevDate varchar(255)
DECLARE @RevDescription varchar(255) DECLARE @RevDescription varchar(255)
set @RevDate = '10/03/2024 11:24' set @RevDate = '10/28/2024 11:24'
set @RevDescription = 'Add the ability for PROMS to remember the procedure tabs that were open when you closed PROMS' set @RevDescription = 'Add the ability for PROMS to remember the procedure tabs that were open when you closed PROMS'
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription

View File

@@ -328,6 +328,18 @@ namespace VEPROMS.Properties {
} }
} }
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool cbShwRplWrdsColor {
get {
return ((bool)(this["cbShwRplWrdsColor"]));
}
set {
this["cbShwRplWrdsColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()] [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")] [global::System.Configuration.DefaultSettingValueAttribute("False")]

View File

@@ -80,6 +80,11 @@
<Setting Name="UpdateSettings" Type="System.Boolean" Scope="User"> <Setting Name="UpdateSettings" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value> <Value Profile="(Default)">True</Value>
</Setting> </Setting>
<Setting Name="cbShwRplWrdsColor" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="PasteNoReturns" Type="System.Boolean" Scope="User"> <Setting Name="PasteNoReturns" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value> <Value Profile="(Default)">False</Value>
</Setting> </Setting>

View File

@@ -674,7 +674,8 @@ CREATE PROCEDURE [dbo].[updateInfoAccidByRecid]
@RecID char(8), @RecID char(8),
@AccPageID char(32), @AccPageID char(32),
@Info nvarchar(max), @Info nvarchar(max),
@ModDateTime char(14) @ModDateTime char(14),
@ParentID varchar(8) = NULL
) )
WITH EXECUTE AS OWNER WITH EXECUTE AS OWNER
AS AS
@@ -684,7 +685,8 @@ BEGIN TRY -- Try Block
SET SET
[Info]=@Info, [Info]=@Info,
[ModDateTime]=@ModDateTime, [ModDateTime]=@ModDateTime,
[AccPageID]=@AccPageID [AccPageID]=@AccPageID,
[ParentID]=ISNULL(@ParentID, ParentID)
WHERE [ROTable]=@ROTable AND [RecID]=@RecID WHERE [ROTable]=@ROTable AND [RecID]=@RecID
IF @@ROWCOUNT = 0 IF @@ROWCOUNT = 0
BEGIN BEGIN

View File

@@ -163,6 +163,12 @@
<Compile Include="dlgCheckedOutProcedure.designer.cs"> <Compile Include="dlgCheckedOutProcedure.designer.cs">
<DependentUpon>dlgCheckedOutProcedure.cs</DependentUpon> <DependentUpon>dlgCheckedOutProcedure.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="dlgCheckOpenTabs.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="dlgCheckOpenTabs.Designer.cs">
<DependentUpon>dlgCheckOpenTabs.cs</DependentUpon>
</Compile>
<Compile Include="DlgCloseTabsOrExit.cs"> <Compile Include="DlgCloseTabsOrExit.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -324,6 +330,9 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<DependentUpon>AboutVEPROMS.cs</DependentUpon> <DependentUpon>AboutVEPROMS.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="dlgCheckOpenTabs.resx">
<DependentUpon>dlgCheckOpenTabs.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DlgCloseTabsOrExit.resx"> <EmbeddedResource Include="DlgCloseTabsOrExit.resx">
<DependentUpon>DlgCloseTabsOrExit.cs</DependentUpon> <DependentUpon>DlgCloseTabsOrExit.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@@ -626,4 +635,4 @@
<PropertyGroup> <PropertyGroup>
<PreBuildEvent>cmd /c "$(ProjectDir)FixRev.bat"</PreBuildEvent> <PreBuildEvent>cmd /c "$(ProjectDir)FixRev.bat"</PreBuildEvent>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@@ -0,0 +1,116 @@

namespace VEPROMS
{
partial class dlgCheckOpenTabs
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.labelX1 = new DevComponents.DotNetBar.LabelX();
this.cbRemember = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.btnOpenTabs = new DevComponents.DotNetBar.ButtonX();
this.btnNoTabs = new DevComponents.DotNetBar.ButtonX();
this.SuspendLayout();
//
// labelX1
//
//
//
//
this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.labelX1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelX1.Location = new System.Drawing.Point(23, 2);
this.labelX1.Name = "labelX1";
this.labelX1.Size = new System.Drawing.Size(363, 78);
this.labelX1.TabIndex = 0;
this.labelX1.Text = "Would you like for PROMS to reopen the tabs that you had open during your last se" +
"ssion?";
this.labelX1.WordWrap = true;
//
// cbRemember
//
//
//
//
this.cbRemember.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cbRemember.Location = new System.Drawing.Point(23, 75);
this.cbRemember.Name = "cbRemember";
this.cbRemember.Size = new System.Drawing.Size(376, 47);
this.cbRemember.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cbRemember.TabIndex = 1;
this.cbRemember.Text = "Check this box to not be prompted in the future when opening PROMS. \nNote that th" +
"ese settings can be adjusted at any time from the \nOPTIONS menu for PROMS.";
//
// btnOpenTabs
//
this.btnOpenTabs.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnOpenTabs.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnOpenTabs.DialogResult = System.Windows.Forms.DialogResult.Yes;
this.btnOpenTabs.Location = new System.Drawing.Point(23, 139);
this.btnOpenTabs.Name = "btnOpenTabs";
this.btnOpenTabs.Size = new System.Drawing.Size(150, 42);
this.btnOpenTabs.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnOpenTabs.TabIndex = 2;
this.btnOpenTabs.Text = "Yes, Open Tabs from Last Session";
this.btnOpenTabs.Click += new System.EventHandler(this.btnTabs_Click);
//
// btnNoTabs
//
this.btnNoTabs.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnNoTabs.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnNoTabs.DialogResult = System.Windows.Forms.DialogResult.No;
this.btnNoTabs.Location = new System.Drawing.Point(216, 139);
this.btnNoTabs.Name = "btnNoTabs";
this.btnNoTabs.Size = new System.Drawing.Size(150, 42);
this.btnNoTabs.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnNoTabs.TabIndex = 3;
this.btnNoTabs.Text = "No, Do Not Open Tabs from Previous Session";
this.btnNoTabs.Click += new System.EventHandler(this.btnTabs_Click);
//
// dlgCheckOpenTabs
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(411, 193);
this.ControlBox = false;
this.Controls.Add(this.btnNoTabs);
this.Controls.Add(this.btnOpenTabs);
this.Controls.Add(this.cbRemember);
this.Controls.Add(this.labelX1);
this.Name = "dlgCheckOpenTabs";
this.Text = "Open Tabs from Previous Session";
this.ResumeLayout(false);
}
#endregion
private DevComponents.DotNetBar.LabelX labelX1;
private DevComponents.DotNetBar.Controls.CheckBoxX cbRemember;
private DevComponents.DotNetBar.ButtonX btnOpenTabs;
private DevComponents.DotNetBar.ButtonX btnNoTabs;
}
}

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace VEPROMS
{
public partial class dlgCheckOpenTabs : Form
{
public dlgCheckOpenTabs()
{
InitializeComponent();
}
public bool Remember { get; set; } = false;
private void btnTabs_Click(object sender, EventArgs e)
{
Remember = this.cbRemember.Checked;
this.Close();
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,5 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing; using System.Drawing;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
@@ -10,7 +8,6 @@ using System.IO;
using Volian.Controls.Library; using Volian.Controls.Library;
using DevComponents.DotNetBar; using DevComponents.DotNetBar;
using JR.Utils.GUI.Forms; using JR.Utils.GUI.Forms;
using Volian.Controls.Library;
using System.Linq; using System.Linq;
namespace VEPROMS namespace VEPROMS
@@ -178,6 +175,8 @@ namespace VEPROMS
myDocVersions.Clear(); myDocVersions.Clear();
FolderInfo fi = FolderInfo.GetTop(); FolderInfo fi = FolderInfo.GetTop();
fi.RefreshChildFolders();
if (fi.ChildFolderCount > 0) if (fi.ChildFolderCount > 0)
{ {
TreeNode tn = new TreeNode(fi.Name); TreeNode tn = new TreeNode(fi.Name);
@@ -233,7 +232,7 @@ namespace VEPROMS
loadedWorkingDraft = true; loadedWorkingDraft = true;
} }
if (tn.Parent != null && !loadedWorkingDraft) if (tn.Parent != null && !loadedWorkingDraft && fi.FolderDocVersionCount == 0)
{ {
tn.Remove(); tn.Remove();
} }
@@ -340,6 +339,8 @@ namespace VEPROMS
pbProcess.PerformStep(); pbProcess.PerformStep();
Application.DoEvents(); Application.DoEvents();
} }
ClearCache();
} }
Application.DoEvents(); Application.DoEvents();
@@ -387,6 +388,23 @@ namespace VEPROMS
this.Cursor = Cursors.Default; this.Cursor = Cursors.Default;
} }
//C2025-011 RO Update Admin Tool Memory Enhancements
//Clear what we can from the cache
//runs after each section
private void ClearCache()
{
txtProcess.AppendText("Reclaiming memory used during previous sections.");
PartInfo.ClearPartInfoCache();
ItemInfo.ClearItemInfoCache();
Item.ClearItemCache();
ContentInfo.ClearContentInfoCache();
GridInfo.ClearGridInfoCache();
GC.Collect();
GC.WaitForPendingFinalizers();
}
//C2022-028 check for Bad RO Links - we will check all of the RO links found in procedure step text //C2022-028 check for Bad RO Links - we will check all of the RO links found in procedure step text
//B2022-144 Allow to check individual procedures for bad RO links //B2022-144 Allow to check individual procedures for bad RO links
private void CheckROLinks() private void CheckROLinks()
@@ -481,12 +499,14 @@ namespace VEPROMS
// B2018-002 - Invalid Transitions - Define Transition Refresh Statistics // B2018-002 - Invalid Transitions - Define Transition Refresh Statistics
private int numTransProcessed = 0; private int numTransProcessed = 0;
private int numTransFixed = 0; private int numTransFixed = 0;
private int numTransCantFix = 0;
private int numTransConverted = 0; private int numTransConverted = 0;
// B2018-002 - Invalid Transitions - Initialize Transition Refresh Statistics // B2018-002 - Invalid Transitions - Initialize Transition Refresh Statistics
private void ResetTransNumbers() private void ResetTransNumbers()
{ {
numTransProcessed = 0; numTransProcessed = 0;
numTransFixed = 0; numTransFixed = 0;
numTransCantFix = 0;
numTransConverted = 0; numTransConverted = 0;
} }
private void RefreshTransitions() private void RefreshTransitions()
@@ -535,11 +555,12 @@ namespace VEPROMS
numTransConverted += ProcedureInfo.TranConvertCount; numTransConverted += ProcedureInfo.TranConvertCount;
numTransProcessed += ProcedureInfo.TranCheckCount; numTransProcessed += ProcedureInfo.TranCheckCount;
numTransFixed += ProcedureInfo.TranFixCount; numTransFixed += ProcedureInfo.TranFixCount;
numTransCantFix += ProcedureInfo.TranCantFixCount; //Bad Transition Link
pbProcess.PerformStep(); pbProcess.PerformStep();
Application.DoEvents(); Application.DoEvents();
} }
} }
if (numTransFixed == 0 && numTransConverted == 0) if (numTransFixed == 0 && numTransConverted == 0 && numTransCantFix == 0)
{ {
txtResults.AppendText("No Transitions Needed Updated."); txtResults.AppendText("No Transitions Needed Updated.");
txtResults.AppendText(Environment.NewLine); txtResults.AppendText(Environment.NewLine);
@@ -551,16 +572,18 @@ namespace VEPROMS
txtProcess.AppendText(string.Format("Transitions Checked: {0}", numTransProcessed)); txtProcess.AppendText(string.Format("Transitions Checked: {0}", numTransProcessed));
txtProcess.AppendText(Environment.NewLine); txtProcess.AppendText(Environment.NewLine);
// B2018-002 - Invalid Transitions - Display Transition Refresh Statistics // B2018-002 - Invalid Transitions - Display Transition Refresh Statistics
txtProcess.AppendText(string.Format("Transitions Correct As Is: {0}", numTransProcessed - (numTransConverted + numTransFixed))); txtProcess.AppendText(string.Format("Transitions Correct As Is: {0}", numTransProcessed - (numTransConverted + numTransFixed + numTransCantFix)));
txtProcess.AppendText(Environment.NewLine); txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Transitions Modified: {0}", numTransFixed)); txtProcess.AppendText(string.Format("Transitions Modified: {0}", numTransFixed));
txtProcess.AppendText(Environment.NewLine); txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Transitions Converted to text: {0}", numTransConverted)); txtProcess.AppendText(string.Format("Transitions Converted to text: {0}", numTransConverted));
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Transitions Unable to be Automatically Fixed (Annotation: Bad Transition Link): {0}", numTransCantFix));
Application.DoEvents(); Application.DoEvents();
if (pil.Count > 0) if (pil.Count > 0)
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.AppendLine("The batch refresh process was not usccessful for all procedures selected."); sb.AppendLine("The batch refresh process was not successful for all procedures selected.");
sb.AppendLine("The following procedures were not able to be refreshed..."); sb.AppendLine("The following procedures were not able to be refreshed...");
sb.AppendLine(); sb.AppendLine();
sb.AppendLine(sbProcs.ToString()); sb.AppendLine(sbProcs.ToString());
@@ -579,11 +602,11 @@ namespace VEPROMS
} }
} }
this.Cursor = Cursors.Default; this.Cursor = Cursors.Default;
// B2018-002 - Invalid Transitions - Display Transition Refresh Statisitic // B2018-002 - Invalid Transitions - Display Transition Refresh Statistic
if (numTransFixed == 0 && numTransConverted == 0) if (numTransFixed == 0 && numTransConverted == 0 && numTransCantFix == 0)
MessageBox.Show(string.Format("{0} Transitions Checked.\n\nNo Transitions Modified.", numTransProcessed), "Refresh Transitions Completed"); MessageBox.Show(string.Format("{0} Transitions Checked.\n\nNo Transitions Modified.", numTransProcessed), "Refresh Transitions Completed");
else else
MessageBox.Show(string.Format("{0} Transitions Checked.\n\n {1} Correct as is.\n\n {2} Transitions modified.\n\n {3} Transitions converted to text.", numTransProcessed, numTransProcessed - (numTransFixed + numTransConverted), numTransFixed, numTransConverted), "Refresh Transitions Completed"); MessageBox.Show(string.Format("{0} Transitions Checked.\n\n {1} Correct as is.\n\n {2} Transitions modified.\n\n {3} Transitions converted to text.\n\n {4} Transitions unable to be automatically fixed (Annotation: Bad Transition Link).", numTransProcessed, numTransProcessed - (numTransFixed + numTransConverted + numTransCantFix), numTransFixed, numTransConverted, numTransCantFix), "Refresh Transitions Completed");
} }
// C2017-030 - new Admin Tools user interface // C2017-030 - new Admin Tools user interface
@@ -995,6 +1018,9 @@ namespace VEPROMS
txtResults.AppendText(Environment.NewLine); txtResults.AppendText(Environment.NewLine);
txtResults.AppendText(Environment.NewLine); txtResults.AppendText(Environment.NewLine);
} }
//C2025-011 RO Update Admin Tool Memory Enhancements
//clear the list since no longer using it
myItems.Clear();
DateTime pEnd = DateTime.Now; DateTime pEnd = DateTime.Now;
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm"))); txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine); txtProcess.AppendText(Environment.NewLine);
@@ -1081,6 +1107,7 @@ namespace VEPROMS
} }
roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
ROFst newrofst = ROFstInfo.RefreshROFst(dv, roFstInfo, DoProgressBarRefresh, txtProcess); ROFst newrofst = ROFstInfo.RefreshROFst(dv, roFstInfo, DoProgressBarRefresh, txtProcess);
//ROFst newrofst = ROFstInfo.RefreshROFst(dv, roFstInfo, DoProgressBarRefresh, null);
roFstInfo.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); roFstInfo.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
} }
@@ -1103,8 +1130,7 @@ namespace VEPROMS
ProcedureInfo.RefreshTransitions(pq);//, transitionsToDisconnected, transitionsToNonEditable); ProcedureInfo.RefreshTransitions(pq);//, transitionsToDisconnected, transitionsToNonEditable);
TimeSpan ts = DateTime.Now - start; TimeSpan ts = DateTime.Now - start;
// B2018-002 - Invalid Transitions - Display Transition Refresh Statistics // B2018-002 - Invalid Transitions - Display Transition Refresh Statistics
txtProcess.AppendText(string.Format("Procedure: {1}{0}Checked {2} Transitions{0}Fixed {3} Transitions{0}Converted to Text {4} Transitions{0}Elapsed Seconds:{5}{0}{0}", Environment.NewLine, pq.DisplayNumber, ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount, ProcedureInfo.TranConvertCount, ts.TotalSeconds)); txtProcess.AppendText(string.Format("Procedure: {1}{0}Checked {2} Transitions{0}Fixed {3} Transitions{0}Converted to Text {4} Transitions{0}Cant Fix (Annotation: Bad Transition Link) {5} Transitions{0}Elapsed Seconds:{6}{0}{0}", Environment.NewLine, pq.DisplayNumber, ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount, ProcedureInfo.TranConvertCount, ProcedureInfo.TranCantFixCount, ts.TotalSeconds));
//Console.WriteLine("\"{0}\"\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}", pq.DisplayNumber, ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount, ProcedureInfo.TranConvertCount, ts.TotalSeconds, numTransProcessed, numTransFixed, numTransConverted);
if (myFixes.Length > 0) if (myFixes.Length > 0)
{ {
txtResults.AppendText(myFixes.ToString()); txtResults.AppendText(myFixes.ToString());
@@ -1970,7 +1996,20 @@ namespace VEPROMS
pil.Add(myProcedures[tn]); pil.Add(myProcedures[tn]);
return pil; return pil;
} }
}
//C2025-011 RO Update Admin Tool Memory Enhancements
private void txtProcess_TextChanged(object sender, EventArgs e)
{
//clears the stack to help with memory - should never need to undo text changes to this.
txtProcess.ClearUndo();
}
private void txtResults_TextChanged(object sender, EventArgs e)
{
//clears the stack to help with memory - should never need to undo text changes to this.
txtResults.ClearUndo();
}
}
} }

View File

@@ -183,19 +183,19 @@ It is recommended that this be done during off hours.
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="warningBox5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="warningBox5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F
k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk
FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy /IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC
Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG
8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ
xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84 ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ
KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY
jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0
kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E
2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N
zJwL4b/EAAAAAElFTkSuQmCC ud8AKwnMnBpmYFAAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="swUpdateROVals.SuperTooltip" xml:space="preserve"> <data name="swUpdateROVals.SuperTooltip" xml:space="preserve">
@@ -230,36 +230,36 @@ If more than one procedure is selected, it is recommended that this be performed
</data> </data>
<data name="warningBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="warningBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F
k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk
FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy /IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC
Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG
8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ
xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84 ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ
KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY
jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0
kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E
2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N
zJwL4b/EAAAAAElFTkSuQmCC ud8AKwnMnBpmYFAAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="warningBox3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="warningBox3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F
k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk
FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy /IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC
Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG
8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ
xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84 ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ
KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY
jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0
kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E
2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N
zJwL4b/EAAAAAElFTkSuQmCC ud8AKwnMnBpmYFAAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="swCkObsoleteROData.SuperTooltip" xml:space="preserve"> <data name="swCkObsoleteROData.SuperTooltip" xml:space="preserve">
@@ -324,36 +324,36 @@ This function will remove all of the saved attachment PDFS stored in the databas
</data> </data>
<data name="warningBox4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="warningBox4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F
k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk
FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy /IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC
Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG
8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ
xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84 ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ
KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY
jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0
kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E
2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N
zJwL4b/EAAAAAElFTkSuQmCC ud8AKwnMnBpmYFAAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="warningBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="warningBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F
k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk
FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy /IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC
Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG
8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ
xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84 ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ
KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY
jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0
kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E
2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N
zJwL4b/EAAAAAElFTkSuQmCC ud8AKwnMnBpmYFAAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="swRmObsoleteROData.SuperTooltip" xml:space="preserve"> <data name="swRmObsoleteROData.SuperTooltip" xml:space="preserve">

View File

@@ -88,6 +88,12 @@ namespace VEPROMS
this.btnFormat = new DevComponents.DotNetBar.ButtonX(); this.btnFormat = new DevComponents.DotNetBar.ButtonX();
this.btnGeneral = new DevComponents.DotNetBar.ButtonX(); this.btnGeneral = new DevComponents.DotNetBar.ButtonX();
this.tcSectionProp = new DevComponents.DotNetBar.TabControl(); this.tcSectionProp = new DevComponents.DotNetBar.TabControl();
this.tcpFormat = new DevComponents.DotNetBar.TabControlPanel();
this.ppCbShowRplWords = new System.Windows.Forms.CheckBox();
this.rbWordSect = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.rbStepSect = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.ppGpbxSignoffCheckoff = new DevComponents.DotNetBar.Controls.GroupPanel();
this.tiFormat = new DevComponents.DotNetBar.TabItem(this.components);
this.tcpGeneral = new DevComponents.DotNetBar.TabControlPanel(); this.tcpGeneral = new DevComponents.DotNetBar.TabControlPanel();
this.ppCbAutoIndent = new System.Windows.Forms.CheckBox(); this.ppCbAutoIndent = new System.Windows.Forms.CheckBox();
this.ppCbEditableData = new System.Windows.Forms.CheckBox(); this.ppCbEditableData = new System.Windows.Forms.CheckBox();
@@ -95,11 +101,6 @@ namespace VEPROMS
this.ppSectNumberStpRTB = new Volian.Controls.Library.StepRTB(this.components); this.ppSectNumberStpRTB = new Volian.Controls.Library.StepRTB(this.components);
this.ppSectTitleStpRTB = new Volian.Controls.Library.StepRTB(this.components); this.ppSectTitleStpRTB = new Volian.Controls.Library.StepRTB(this.components);
this.tiGeneral = new DevComponents.DotNetBar.TabItem(this.components); this.tiGeneral = new DevComponents.DotNetBar.TabItem(this.components);
this.tcpFormat = new DevComponents.DotNetBar.TabControlPanel();
this.rbWordSect = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.rbStepSect = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.ppGpbxSignoffCheckoff = new DevComponents.DotNetBar.Controls.GroupPanel();
this.tiFormat = new DevComponents.DotNetBar.TabItem(this.components);
this.tcpAutomation = new DevComponents.DotNetBar.TabControlPanel(); this.tcpAutomation = new DevComponents.DotNetBar.TabControlPanel();
this.ppCbNoDuplexFoldout = new System.Windows.Forms.CheckBox(); this.ppCbNoDuplexFoldout = new System.Windows.Forms.CheckBox();
this.gpTOC = new DevComponents.DotNetBar.Controls.GroupPanel(); this.gpTOC = new DevComponents.DotNetBar.Controls.GroupPanel();
@@ -120,9 +121,9 @@ namespace VEPROMS
this.panSectBtns.SuspendLayout(); this.panSectBtns.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tcSectionProp)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tcSectionProp)).BeginInit();
this.tcSectionProp.SuspendLayout(); this.tcSectionProp.SuspendLayout();
this.tcpGeneral.SuspendLayout();
this.tcpFormat.SuspendLayout(); this.tcpFormat.SuspendLayout();
this.ppGpbxSignoffCheckoff.SuspendLayout(); this.ppGpbxSignoffCheckoff.SuspendLayout();
this.tcpGeneral.SuspendLayout();
this.tcpAutomation.SuspendLayout(); this.tcpAutomation.SuspendLayout();
this.gpTOC.SuspendLayout(); this.gpTOC.SuspendLayout();
this.grpLnkEnh.SuspendLayout(); this.grpLnkEnh.SuspendLayout();
@@ -871,8 +872,8 @@ namespace VEPROMS
this.tcSectionProp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.tcSectionProp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.tcSectionProp.BackColor = System.Drawing.Color.Transparent; this.tcSectionProp.BackColor = System.Drawing.Color.Transparent;
this.tcSectionProp.CanReorderTabs = true; this.tcSectionProp.CanReorderTabs = true;
this.tcSectionProp.Controls.Add(this.tcpGeneral);
this.tcSectionProp.Controls.Add(this.tcpFormat); this.tcSectionProp.Controls.Add(this.tcpFormat);
this.tcSectionProp.Controls.Add(this.tcpGeneral);
this.tcSectionProp.Controls.Add(this.tcpAutomation); this.tcSectionProp.Controls.Add(this.tcpAutomation);
this.tcSectionProp.Controls.Add(this.tcpLibDoc); this.tcSectionProp.Controls.Add(this.tcpLibDoc);
this.tcSectionProp.Controls.Add(this.tabControlPanel4); this.tcSectionProp.Controls.Add(this.tabControlPanel4);
@@ -892,6 +893,151 @@ namespace VEPROMS
this.tcSectionProp.TabsVisible = false; this.tcSectionProp.TabsVisible = false;
this.tcSectionProp.Text = "tabControl2"; this.tcSectionProp.Text = "tabControl2";
// //
// tcpFormat
//
this.tcpFormat.Controls.Add(this.ppCbShowRplWords);
this.tcpFormat.Controls.Add(this.cbIsFoldoutSection);
this.tcpFormat.Controls.Add(this.ppCbDefaultStepSection);
this.tcpFormat.Controls.Add(this.cbKeepWordDocMargins);
this.tcpFormat.Controls.Add(this.ppLblDefaultNumColumns);
this.tcpFormat.Controls.Add(this.ppLblDefPaginationStyle);
this.tcpFormat.Controls.Add(this.ppBtnDefaultNumColumns);
this.tcpFormat.Controls.Add(this.ppBtnDefaultPaginationStyle);
this.tcpFormat.Controls.Add(this.rbWordSect);
this.tcpFormat.Controls.Add(this.rbStepSect);
this.tcpFormat.Controls.Add(this.ppGpbxSignoffCheckoff);
this.tcpFormat.Controls.Add(this.lblFormat);
this.tcpFormat.Controls.Add(this.ppCmbxNumColumns);
this.tcpFormat.Controls.Add(this.lblColumns);
this.tcpFormat.Controls.Add(this.ppCmbxSectPagination);
this.tcpFormat.Controls.Add(this.lblSectType);
this.tcpFormat.Controls.Add(this.ppCmbxStyleSectionType);
this.tcpFormat.Controls.Add(this.lblPagination);
this.tcpFormat.Controls.Add(this.ppBtnDefaultFmt);
this.tcpFormat.Controls.Add(this.ppCmbxFormat);
this.tcpFormat.Controls.Add(this.ppLblFormatDefault);
this.tcpFormat.DisabledBackColor = System.Drawing.Color.Empty;
this.tcpFormat.Dock = System.Windows.Forms.DockStyle.Fill;
this.tcpFormat.Location = new System.Drawing.Point(0, 22);
this.tcpFormat.Margin = new System.Windows.Forms.Padding(2);
this.tcpFormat.Name = "tcpFormat";
this.tcpFormat.Padding = new System.Windows.Forms.Padding(1);
this.tcpFormat.Size = new System.Drawing.Size(557, 318);
this.tcpFormat.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254)))));
this.tcpFormat.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227)))));
this.tcpFormat.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.tcpFormat.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(165)))), ((int)(((byte)(199)))));
this.tcpFormat.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
| DevComponents.DotNetBar.eBorderSide.Bottom)));
this.tcpFormat.Style.GradientAngle = 90;
this.tcpFormat.TabIndex = 2;
this.tcpFormat.TabItem = this.tiFormat;
this.tcpFormat.Enter += new System.EventHandler(this.tabpage_Enter);
//
// ppCbShowRplWords
//
this.ppCbShowRplWords.AutoSize = true;
this.ppCbShowRplWords.BackColor = System.Drawing.Color.Transparent;
this.ppCbShowRplWords.Location = new System.Drawing.Point(272, 252);
this.ppCbShowRplWords.Name = "ppCbShowRplWords";
this.ppCbShowRplWords.Size = new System.Drawing.Size(130, 17);
this.ppCbShowRplWords.TabIndex = 62;
this.ppCbShowRplWords.Text = "Show Replace Words";
this.ppCbShowRplWords.UseVisualStyleBackColor = false;
this.ppCbShowRplWords.CheckedChanged += new System.EventHandler(this.ppCbShowRplWords_CheckedChanged);
//
// rbWordSect
//
this.rbWordSect.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.rbWordSect.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.rbWordSect.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
this.rbWordSect.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rbWordSect.Location = new System.Drawing.Point(247, 60);
this.rbWordSect.Margin = new System.Windows.Forms.Padding(2);
this.rbWordSect.Name = "rbWordSect";
this.rbWordSect.Size = new System.Drawing.Size(88, 19);
this.rbWordSect.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.rbWordSect.TabIndex = 23;
this.rbWordSect.TabStop = false;
this.rbWordSect.Text = "Word Section";
//
// rbStepSect
//
this.rbStepSect.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.rbStepSect.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.rbStepSect.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
this.rbStepSect.Checked = true;
this.rbStepSect.CheckState = System.Windows.Forms.CheckState.Checked;
this.rbStepSect.CheckValue = "Y";
this.rbStepSect.FocusCuesEnabled = false;
this.rbStepSect.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rbStepSect.Location = new System.Drawing.Point(138, 60);
this.rbStepSect.Margin = new System.Windows.Forms.Padding(2);
this.rbStepSect.Name = "rbStepSect";
this.rbStepSect.Size = new System.Drawing.Size(86, 19);
this.rbStepSect.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.rbStepSect.TabIndex = 22;
this.rbStepSect.TabStop = false;
this.rbStepSect.Text = "Step Section";
this.rbStepSect.CheckedChanged += new System.EventHandler(this.rbStepSect_CheckedChanged);
//
// ppGpbxSignoffCheckoff
//
this.ppGpbxSignoffCheckoff.BackColor = System.Drawing.Color.Transparent;
this.ppGpbxSignoffCheckoff.CanvasColor = System.Drawing.SystemColors.Control;
this.ppGpbxSignoffCheckoff.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.ppGpbxSignoffCheckoff.Controls.Add(this.ppCmbxCheckoffHeading);
this.ppGpbxSignoffCheckoff.Controls.Add(this.lblCheckoffType);
this.ppGpbxSignoffCheckoff.Controls.Add(this.ppCmbxCheckoffType);
this.ppGpbxSignoffCheckoff.Controls.Add(this.lblCheckoffHeading);
this.ppGpbxSignoffCheckoff.DisabledBackColor = System.Drawing.Color.Empty;
this.ppGpbxSignoffCheckoff.Location = new System.Drawing.Point(272, 123);
this.ppGpbxSignoffCheckoff.Margin = new System.Windows.Forms.Padding(2);
this.ppGpbxSignoffCheckoff.Name = "ppGpbxSignoffCheckoff";
this.ppGpbxSignoffCheckoff.Size = new System.Drawing.Size(206, 117);
//
//
//
this.ppGpbxSignoffCheckoff.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.ppGpbxSignoffCheckoff.Style.BackColorGradientAngle = 90;
this.ppGpbxSignoffCheckoff.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.ppGpbxSignoffCheckoff.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderBottomWidth = 1;
this.ppGpbxSignoffCheckoff.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.ppGpbxSignoffCheckoff.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderLeftWidth = 1;
this.ppGpbxSignoffCheckoff.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderRightWidth = 1;
this.ppGpbxSignoffCheckoff.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderTopWidth = 1;
this.ppGpbxSignoffCheckoff.Style.CornerDiameter = 4;
this.ppGpbxSignoffCheckoff.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.ppGpbxSignoffCheckoff.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.ppGpbxSignoffCheckoff.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.ppGpbxSignoffCheckoff.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
//
//
//
this.ppGpbxSignoffCheckoff.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
//
//
//
this.ppGpbxSignoffCheckoff.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.ppGpbxSignoffCheckoff.TabIndex = 51;
this.ppGpbxSignoffCheckoff.Text = "Signoffs / Checkoffs";
//
// tiFormat
//
this.tiFormat.AttachedControl = this.tcpFormat;
this.tiFormat.Name = "tiFormat";
this.tiFormat.Text = "Format";
//
// tcpGeneral // tcpGeneral
// //
this.tcpGeneral.Controls.Add(this.ppCbAutoIndent); this.tcpGeneral.Controls.Add(this.ppCbAutoIndent);
@@ -1046,138 +1192,6 @@ namespace VEPROMS
this.tiGeneral.Name = "tiGeneral"; this.tiGeneral.Name = "tiGeneral";
this.tiGeneral.Text = "General"; this.tiGeneral.Text = "General";
// //
// tcpFormat
//
this.tcpFormat.Controls.Add(this.cbIsFoldoutSection);
this.tcpFormat.Controls.Add(this.ppCbDefaultStepSection);
this.tcpFormat.Controls.Add(this.cbKeepWordDocMargins);
this.tcpFormat.Controls.Add(this.ppLblDefaultNumColumns);
this.tcpFormat.Controls.Add(this.ppLblDefPaginationStyle);
this.tcpFormat.Controls.Add(this.ppBtnDefaultNumColumns);
this.tcpFormat.Controls.Add(this.ppBtnDefaultPaginationStyle);
this.tcpFormat.Controls.Add(this.rbWordSect);
this.tcpFormat.Controls.Add(this.rbStepSect);
this.tcpFormat.Controls.Add(this.ppGpbxSignoffCheckoff);
this.tcpFormat.Controls.Add(this.lblFormat);
this.tcpFormat.Controls.Add(this.ppCmbxNumColumns);
this.tcpFormat.Controls.Add(this.lblColumns);
this.tcpFormat.Controls.Add(this.ppCmbxSectPagination);
this.tcpFormat.Controls.Add(this.lblSectType);
this.tcpFormat.Controls.Add(this.ppCmbxStyleSectionType);
this.tcpFormat.Controls.Add(this.lblPagination);
this.tcpFormat.Controls.Add(this.ppBtnDefaultFmt);
this.tcpFormat.Controls.Add(this.ppCmbxFormat);
this.tcpFormat.Controls.Add(this.ppLblFormatDefault);
this.tcpFormat.DisabledBackColor = System.Drawing.Color.Empty;
this.tcpFormat.Dock = System.Windows.Forms.DockStyle.Fill;
this.tcpFormat.Location = new System.Drawing.Point(0, 22);
this.tcpFormat.Margin = new System.Windows.Forms.Padding(2);
this.tcpFormat.Name = "tcpFormat";
this.tcpFormat.Padding = new System.Windows.Forms.Padding(1);
this.tcpFormat.Size = new System.Drawing.Size(557, 318);
this.tcpFormat.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254)))));
this.tcpFormat.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227)))));
this.tcpFormat.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.tcpFormat.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(165)))), ((int)(((byte)(199)))));
this.tcpFormat.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
| DevComponents.DotNetBar.eBorderSide.Bottom)));
this.tcpFormat.Style.GradientAngle = 90;
this.tcpFormat.TabIndex = 2;
this.tcpFormat.TabItem = this.tiFormat;
this.tcpFormat.Enter += new System.EventHandler(this.tabpage_Enter);
//
// rbWordSect
//
this.rbWordSect.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.rbWordSect.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.rbWordSect.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
this.rbWordSect.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rbWordSect.Location = new System.Drawing.Point(247, 60);
this.rbWordSect.Margin = new System.Windows.Forms.Padding(2);
this.rbWordSect.Name = "rbWordSect";
this.rbWordSect.Size = new System.Drawing.Size(88, 19);
this.rbWordSect.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.rbWordSect.TabIndex = 23;
this.rbWordSect.TabStop = false;
this.rbWordSect.Text = "Word Section";
//
// rbStepSect
//
this.rbStepSect.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.rbStepSect.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.rbStepSect.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
this.rbStepSect.Checked = true;
this.rbStepSect.CheckState = System.Windows.Forms.CheckState.Checked;
this.rbStepSect.CheckValue = "Y";
this.rbStepSect.FocusCuesEnabled = false;
this.rbStepSect.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rbStepSect.Location = new System.Drawing.Point(138, 60);
this.rbStepSect.Margin = new System.Windows.Forms.Padding(2);
this.rbStepSect.Name = "rbStepSect";
this.rbStepSect.Size = new System.Drawing.Size(86, 19);
this.rbStepSect.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.rbStepSect.TabIndex = 22;
this.rbStepSect.TabStop = false;
this.rbStepSect.Text = "Step Section";
this.rbStepSect.CheckedChanged += new System.EventHandler(this.rbStepSect_CheckedChanged);
//
// ppGpbxSignoffCheckoff
//
this.ppGpbxSignoffCheckoff.BackColor = System.Drawing.Color.Transparent;
this.ppGpbxSignoffCheckoff.CanvasColor = System.Drawing.SystemColors.Control;
this.ppGpbxSignoffCheckoff.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.ppGpbxSignoffCheckoff.Controls.Add(this.ppCmbxCheckoffHeading);
this.ppGpbxSignoffCheckoff.Controls.Add(this.lblCheckoffType);
this.ppGpbxSignoffCheckoff.Controls.Add(this.ppCmbxCheckoffType);
this.ppGpbxSignoffCheckoff.Controls.Add(this.lblCheckoffHeading);
this.ppGpbxSignoffCheckoff.DisabledBackColor = System.Drawing.Color.Empty;
this.ppGpbxSignoffCheckoff.Location = new System.Drawing.Point(272, 123);
this.ppGpbxSignoffCheckoff.Margin = new System.Windows.Forms.Padding(2);
this.ppGpbxSignoffCheckoff.Name = "ppGpbxSignoffCheckoff";
this.ppGpbxSignoffCheckoff.Size = new System.Drawing.Size(206, 117);
//
//
//
this.ppGpbxSignoffCheckoff.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.ppGpbxSignoffCheckoff.Style.BackColorGradientAngle = 90;
this.ppGpbxSignoffCheckoff.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.ppGpbxSignoffCheckoff.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderBottomWidth = 1;
this.ppGpbxSignoffCheckoff.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.ppGpbxSignoffCheckoff.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderLeftWidth = 1;
this.ppGpbxSignoffCheckoff.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderRightWidth = 1;
this.ppGpbxSignoffCheckoff.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderTopWidth = 1;
this.ppGpbxSignoffCheckoff.Style.CornerDiameter = 4;
this.ppGpbxSignoffCheckoff.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.ppGpbxSignoffCheckoff.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.ppGpbxSignoffCheckoff.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.ppGpbxSignoffCheckoff.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
//
//
//
this.ppGpbxSignoffCheckoff.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
//
//
//
this.ppGpbxSignoffCheckoff.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.ppGpbxSignoffCheckoff.TabIndex = 51;
this.ppGpbxSignoffCheckoff.Text = "Signoffs / Checkoffs";
//
// tiFormat
//
this.tiFormat.AttachedControl = this.tcpFormat;
this.tiFormat.Name = "tiFormat";
this.tiFormat.Text = "Format";
//
// tcpAutomation // tcpAutomation
// //
this.tcpAutomation.Controls.Add(this.ppCbNoDuplexFoldout); this.tcpAutomation.Controls.Add(this.ppCbNoDuplexFoldout);
@@ -1465,7 +1479,7 @@ namespace VEPROMS
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CaptionFont = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.CaptionFont = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ClientSize = new System.Drawing.Size(730, 398); this.ClientSize = new System.Drawing.Size(722, 390);
this.ControlBox = false; this.ControlBox = false;
this.Controls.Add(this.tcSectionProp); this.Controls.Add(this.tcSectionProp);
this.Controls.Add(this.panSectBtns); this.Controls.Add(this.panSectBtns);
@@ -1489,12 +1503,12 @@ namespace VEPROMS
this.panSectBtns.ResumeLayout(false); this.panSectBtns.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.tcSectionProp)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.tcSectionProp)).EndInit();
this.tcSectionProp.ResumeLayout(false); this.tcSectionProp.ResumeLayout(false);
this.tcpGeneral.ResumeLayout(false);
this.tcpGeneral.PerformLayout();
this.tcpFormat.ResumeLayout(false); this.tcpFormat.ResumeLayout(false);
this.tcpFormat.PerformLayout(); this.tcpFormat.PerformLayout();
this.ppGpbxSignoffCheckoff.ResumeLayout(false); this.ppGpbxSignoffCheckoff.ResumeLayout(false);
this.ppGpbxSignoffCheckoff.PerformLayout(); this.ppGpbxSignoffCheckoff.PerformLayout();
this.tcpGeneral.ResumeLayout(false);
this.tcpGeneral.PerformLayout();
this.tcpAutomation.ResumeLayout(false); this.tcpAutomation.ResumeLayout(false);
this.tcpAutomation.PerformLayout(); this.tcpAutomation.PerformLayout();
this.gpTOC.ResumeLayout(false); this.gpTOC.ResumeLayout(false);
@@ -1598,5 +1612,6 @@ namespace VEPROMS
private DevComponents.DotNetBar.ButtonX ppBtnConvertToDocX; private DevComponents.DotNetBar.ButtonX ppBtnConvertToDocX;
private System.Windows.Forms.CheckBox cbIsFoldoutSection; private System.Windows.Forms.CheckBox cbIsFoldoutSection;
private System.Windows.Forms.CheckBox ppCbNoDuplexFoldout; private System.Windows.Forms.CheckBox ppCbNoDuplexFoldout;
} private System.Windows.Forms.CheckBox ppCbShowRplWords;
}
} }

View File

@@ -523,6 +523,23 @@ namespace VEPROMS
else else
ppCbDefaultStepSection.Text = "Make this the Default Step Section"; ppCbDefaultStepSection.Text = "Make this the Default Step Section";
} }
// Show Replace Words
ppCbShowRplWords.Visible = false;
if (_isStepSection && _SectionConfig.MySection.MySectionInfo.MyActiveParent.IsProcedure)
{
ppCbShowRplWords.Visible = true;
ppCbShowRplWords.Checked = _SectionConfig.Section_ShwRplWords == "Y";
// Use checkbox text to clarify what is case for this section, i.e. is it already
// the default or can it be set. Note that this is used when printing of page numbers
// that use the 'WithSteps' numbering sequence.
if (_SectionConfig.Section_OriginalSteps == "Y")
{
ppCbShowRplWords.Text = "Show Replace Words"; // C2020-021 add the word "the"
_isDefaultStepSection = true;
}
else
ppCbShowRplWords.Text = "Show Replace Words";
}
// if the parent has enhanced documents (and is not an enhanced document, i.e. the test // if the parent has enhanced documents (and is not an enhanced document, i.e. the test
// ed.Type != 0 proves that) put up the group panel on the automation tab that allows for setting of // ed.Type != 0 proves that) put up the group panel on the automation tab that allows for setting of
@@ -1211,6 +1228,7 @@ namespace VEPROMS
ppGpbxSignoffCheckoff.Visible = _isStepSection; ppGpbxSignoffCheckoff.Visible = _isStepSection;
cbKeepWordDocMargins.Visible = !_isStepSection; cbKeepWordDocMargins.Visible = !_isStepSection;
ppCbDefaultStepSection.Visible = _isStepSection; ppCbDefaultStepSection.Visible = _isStepSection;
ppCbShowRplWords.Visible = _isStepSection;
} }
private void rbStepSect_CheckedChanged(object sender, EventArgs e) private void rbStepSect_CheckedChanged(object sender, EventArgs e)
@@ -1380,7 +1398,8 @@ namespace VEPROMS
_SectionConfig.Section_OriginalSteps = ppCbDefaultStepSection.Checked ? "Y" : "N"; _SectionConfig.Section_OriginalSteps = ppCbDefaultStepSection.Checked ? "Y" : "N";
} }
} }
private void ppBtnConvertToDocX_Click(object sender, EventArgs e)
private void ppBtnConvertToDocX_Click(object sender, EventArgs e)
{ {
// Get Document as file // Get Document as file
ItemInfo ii = ItemInfo.Get(_SectionConfig.MySection.ItemID); ItemInfo ii = ItemInfo.Get(_SectionConfig.MySection.ItemID);
@@ -1447,6 +1466,14 @@ namespace VEPROMS
{ {
_SectionConfig.Section_DontIncludeDuplexFoldout = ppCbNoDuplexFoldout.Checked; _SectionConfig.Section_DontIncludeDuplexFoldout = ppCbNoDuplexFoldout.Checked;
} }
// C2029-025 Show or hide replace words. Can highlight replace words in editor.
private void ppCbShowRplWords_CheckedChanged(object sender, EventArgs e)
{
if (!_Initializing)
{
_SectionConfig.Section_ShwRplWords = ppCbShowRplWords.Checked ? "Y" : "N";
}
}
//private void ppBtnDefaultPrintSize_Click(object sender, EventArgs e) //private void ppBtnDefaultPrintSize_Click(object sender, EventArgs e)
//{ //{

View File

@@ -142,8 +142,11 @@ When a format other than the inherited one is selected, a button labeled "Defaul
Pressing the "Default" button will revert back to using the inherited format for this section. Pressing the "Default" button will revert back to using the inherited format for this section.
</value> </value>
</data> </data>
<metadata name="sectionConfigBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>128, 18</value>
</metadata>
<data name="cbIsFoldoutSection.SuperTooltip" xml:space="preserve"> <data name="cbIsFoldoutSection.SuperTooltip" xml:space="preserve">
<value>If the format supports duplex Foldouts: <value>If the format supports duplex Foldouts:
- This can be used to turn On duplexing of the Foldout instead - This can be used to turn On duplexing of the Foldout instead
of using "FOLDOUT" as the section number of using "FOLDOUT" as the section number

File diff suppressed because it is too large Load Diff

View File

@@ -11,6 +11,7 @@ using DevComponents.DotNetBar;
using VEPROMS.Properties; using VEPROMS.Properties;
using Volian.Base.Library; using Volian.Base.Library;
using DescriptiveEnum; using DescriptiveEnum;
using VEPROMS.CSLA.Library;
namespace VEPROMS namespace VEPROMS
{ {
@@ -24,6 +25,9 @@ namespace VEPROMS
get { return _CanChangeSeparateWindowsSetting; } get { return _CanChangeSeparateWindowsSetting; }
set { _CanChangeSeparateWindowsSetting = value; } set { _CanChangeSeparateWindowsSetting = value; }
} }
private UserSettings _usersettings;
public frmSysOptions() public frmSysOptions()
{ {
_initializing = true; _initializing = true;
@@ -64,6 +68,7 @@ namespace VEPROMS
colorPickerButton1.SelectedColor = Settings.Default.TransitionRangeColor; colorPickerButton1.SelectedColor = Settings.Default.TransitionRangeColor;
cbAnnotationPopup.Checked = Settings.Default.AutoPopUpAnnotations; cbAnnotationPopup.Checked = Settings.Default.AutoPopUpAnnotations;
cbStepTypeToolTip.Checked = Settings.Default.StepTypeToolTip; cbStepTypeToolTip.Checked = Settings.Default.StepTypeToolTip;
cbShwRplWrdsColor.Checked = Settings.Default.cbShwRplWrdsColor;
cbTVExpand.Checked = Settings.Default.SaveTreeviewExpanded; cbTVExpand.Checked = Settings.Default.SaveTreeviewExpanded;
cbPasteNoReturns.Checked = Settings.Default.PasteNoReturns; cbPasteNoReturns.Checked = Settings.Default.PasteNoReturns;
cbPastePlainText.Checked = Settings.Default.PastePlainText; cbPastePlainText.Checked = Settings.Default.PastePlainText;
@@ -89,6 +94,13 @@ namespace VEPROMS
break; break;
} }
//CSM - C2024-031 - Getting User Settings
//and set checkboxes based on what they are set to
_usersettings = new UserSettings(VlnSettings.UserID);
cbOTRemember.Checked = _usersettings.UserSetting_OpenTabs_Remember;
cbOTAutoOpen.Enabled = cbOTAutoOpen.Visible = cbOTRemember.Checked;
cbOTAutoOpen.Checked = _usersettings.UserSetting_OpenTabs_AutoOpen || !cbOTRemember.Checked;
} }
private void cbEnhancedDocumentSync_CheckedChanged(object sender, System.EventArgs e) private void cbEnhancedDocumentSync_CheckedChanged(object sender, System.EventArgs e)
{ {
@@ -151,6 +163,15 @@ namespace VEPROMS
Settings.Default.PropPageStyle = 3; Settings.Default.PropPageStyle = 3;
Settings.Default.Save(); Settings.Default.Save();
//CSM - C2024-031 - Save User Settings
//based on what checkboxes are set to
bool? OTAuto = null;
if (cbOTRemember.Checked)
{
OTAuto = cbOTAutoOpen.Checked;
}
_usersettings.SetUserSettings(cbOTRemember.Checked, OTAuto);
this.DialogResult = DialogResult.OK; this.DialogResult = DialogResult.OK;
this.Close(); this.Close();
} }
@@ -160,6 +181,7 @@ namespace VEPROMS
private Color ss_TransRangeColor; private Color ss_TransRangeColor;
private bool ss_PopUPAnnotations; private bool ss_PopUPAnnotations;
private bool ss_StepTypeToolTip; private bool ss_StepTypeToolTip;
private bool ss_cbShwRplWrdsColor;
private bool ss_SaveTreeviewExpanded; private bool ss_SaveTreeviewExpanded;
private bool ss_PasteNoReturns; private bool ss_PasteNoReturns;
private bool ss_PastePlainText; private bool ss_PastePlainText;
@@ -175,6 +197,8 @@ namespace VEPROMS
ss_TransRangeColor = Settings.Default.TransitionRangeColor; ss_TransRangeColor = Settings.Default.TransitionRangeColor;
ss_PopUPAnnotations = Settings.Default.AutoPopUpAnnotations; ss_PopUPAnnotations = Settings.Default.AutoPopUpAnnotations;
ss_StepTypeToolTip = Settings.Default.StepTypeToolTip; ss_StepTypeToolTip = Settings.Default.StepTypeToolTip;
ss_cbShwRplWrdsColor = Settings.Default.cbShwRplWrdsColor;
ss_SaveTreeviewExpanded = Settings.Default.SaveTreeviewExpanded; ss_SaveTreeviewExpanded = Settings.Default.SaveTreeviewExpanded;
ss_PasteNoReturns = Settings.Default.PasteNoReturns; ss_PasteNoReturns = Settings.Default.PasteNoReturns;
ss_PastePlainText = Settings.Default.PastePlainText; ss_PastePlainText = Settings.Default.PastePlainText;
@@ -191,6 +215,7 @@ namespace VEPROMS
Settings.Default.TransitionRangeColor = ss_TransRangeColor; Settings.Default.TransitionRangeColor = ss_TransRangeColor;
Settings.Default.AutoPopUpAnnotations = ss_PopUPAnnotations; Settings.Default.AutoPopUpAnnotations = ss_PopUPAnnotations;
Settings.Default.StepTypeToolTip = ss_StepTypeToolTip; Settings.Default.StepTypeToolTip = ss_StepTypeToolTip;
Settings.Default.cbShwRplWrdsColor = ss_cbShwRplWrdsColor;
Settings.Default.SaveTreeviewExpanded = ss_SaveTreeviewExpanded; Settings.Default.SaveTreeviewExpanded = ss_SaveTreeviewExpanded;
Settings.Default.PasteNoReturns = ss_PasteNoReturns; Settings.Default.PasteNoReturns = ss_PasteNoReturns;
Settings.Default.PastePlainText = ss_PastePlainText; Settings.Default.PastePlainText = ss_PastePlainText;
@@ -324,5 +349,16 @@ namespace VEPROMS
Settings.Default.UCFImportOpt = 4; Settings.Default.UCFImportOpt = 4;
} }
} }
} private void cbOTRemember_CheckedChanged(object sender, EventArgs e)
{
cbOTAutoOpen.Enabled = cbOTAutoOpen.Visible = cbShwRplWrdsColor.Checked;
}
private void cbShwRplWrdsColor_CheckedChanged(object sender, EventArgs e)
{
Settings.Default.cbShwRplWrdsColor = cbShwRplWrdsColor.Checked;
VlnSettings.cbShwRplWrdsColor = cbShwRplWrdsColor.Checked;
Properties.Settings.Default.cbShwRplWrdsColor = cbShwRplWrdsColor.Checked; // update setting value
Properties.Settings.Default.Save(); // save settings
}
}
} }

View File

@@ -112,21 +112,20 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="colorPickerButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="colorPickerButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAScQAA JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAABJxAAAScQHz3HqOAAAAKklE
EnEB89x6jgAAACpJREFUOE9j+P//P0UYQgApcjCKASCaFDxqwKgBIDwcDSAHww0gH/9nAACxLJWH1IMf QVQ4T2P4//8/RRhCAClyMIoBIJoUPGrAqAEgPBwNIAfDDSAf/2cAALEslYfUgx+eAAAAAElFTkSuQmCC
ngAAAABJRU5ErkJggg==
</value> </value>
</data> </data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

View File

@@ -524,6 +524,7 @@ namespace VEPROMS
this.Activated += new EventHandler(frmVEPROMS_Activated); this.Activated += new EventHandler(frmVEPROMS_Activated);
VlnSettings.StepTypeToolType = Settings.Default.StepTypeToolTip; VlnSettings.StepTypeToolType = Settings.Default.StepTypeToolTip;
VlnSettings.cbShwRplWrdsColor = Settings.Default.cbShwRplWrdsColor;
displayLibDocs.PrintRequest += new DisplayLibDocEvent(displayLibDocs_PrintRequest); displayLibDocs.PrintRequest += new DisplayLibDocEvent(displayLibDocs_PrintRequest);
ContentInfo.InfoChanged += new ContentInfoEvent(RefreshDisplayHistory); ContentInfo.InfoChanged += new ContentInfoEvent(RefreshDisplayHistory);
AnnotationInfo.InfoChanged += new AnnotationInfoEvent(RefreshDisplayHistory); AnnotationInfo.InfoChanged += new AnnotationInfoEvent(RefreshDisplayHistory);
@@ -816,6 +817,11 @@ namespace VEPROMS
set { frmVEPROMS._ErrorLogFileName = value; } set { frmVEPROMS._ErrorLogFileName = value; }
} }
public static bool colorReplaceWords()
{
return Properties.Settings.Default.cbShwRplWrdsColor;
}
static bool ChangeLogFileName(string AppenderName, string NewFilename) static bool ChangeLogFileName(string AppenderName, string NewFilename)
{ {
log4net.Repository.ILoggerRepository RootRep; log4net.Repository.ILoggerRepository RootRep;
@@ -1654,6 +1660,10 @@ namespace VEPROMS
// B2017-214 added a null reference check // B2017-214 added a null reference check
// B2010-071 Since we cannot tell if the user click on the X in Word or the X in PROMS, ask if the current tab // B2010-071 Since we cannot tell if the user click on the X in Word or the X in PROMS, ask if the current tab
// should be closed or if we should exit PROMS or just Cancel to continue working // should be closed or if we should exit PROMS or just Cancel to continue working
if (tc._MyDisplayTabItems.Count < 1) // If all thabs are closed in the editor will indicate that in the database.
{
VEPROMS.CSLA.Library.Item.DeactivateStateDisplayTabTmp(MySessionInfo.UserID);
}
if (!_WeAreExitingPROMS && !ClosingWithError && tc.SelectedDisplayTabItem != null && tc._MyDisplayTabItems.Count > 0) if (!_WeAreExitingPROMS && !ClosingWithError && tc.SelectedDisplayTabItem != null && tc._MyDisplayTabItems.Count > 0)
{ {
// B2019-071 dialog to ask user if we are to close one tab or exit // B2019-071 dialog to ask user if we are to close one tab or exit
@@ -2349,18 +2359,49 @@ namespace VEPROMS
public void openDisplaytabstate() public void openDisplaytabstate()
{ {
// Retrieve edit tab state from database.
DataTable DisPlayTabState = VEPROMS.CSLA.Library.Item.GetDisplayTabs(VlnSettings.UserID); DataTable DisPlayTabState = VEPROMS.CSLA.Library.Item.GetDisplayTabs(VlnSettings.UserID);
if (DisPlayTabState.Rows.Count > 0) //CSM - C2024-031 - Getting User Settings
//and set checkboxes based on what they are set to
UserSettings usersettings = new UserSettings(VlnSettings.UserID);
if (DisPlayTabState.Rows.Count > 0 && (usersettings.UserSetting_OpenTabs_AutoOpen || !usersettings.UserSetting_OpenTabs_Remember))
{ {
foreach (DataRow TabState in DisPlayTabState.Rows) //will open tabs by default / ask by default
DialogResult result = DialogResult.Yes;
if (!usersettings.UserSetting_OpenTabs_Remember)
{ {
int _ItemID = (int)TabState["ItemID"]; dlgCheckOpenTabs checkOpenTabs = new dlgCheckOpenTabs();
//ItemInfoList _Procedures = ItemInfoList.GetList(_ItemID, (int)E_FromType.Procedure)); result = checkOpenTabs.ShowDialog();
ItemInfo _Procedure = ItemInfo.Get(_ItemID);
//ItemInfo.Get //if checkbox was checked in form, then update User Settings in database
//ItemInfo.Get if (checkOpenTabs.Remember)
OpenItem(_Procedure); usersettings.SetUserSettings(true, result == DialogResult.Yes);
}
if (result == DialogResult.Yes)
{
foreach (DataRow TabState in DisPlayTabState.Rows)
{
int _ItemID = (int)TabState["ItemID"];
ItemInfo _Procedure = ItemInfo.Get(_ItemID);
// Open procedure in the editor.
OpenItem(_Procedure);
// SelectedStepTabPanel needs to be set so the print buttons on the ribbon will work.
SelectedStepTabPanel = tc.MyEditItem.MyStepPanel.MyStepTabPanel;
//CSM B2024-090 - if last displaytab item,
//select the steptab panel for it
//and set the EditItem for Find/Replace
//otherwise will cause PROMS to crash if Find clicked before a Tab is given Focus
if ((DisPlayTabState.Rows.IndexOf(TabState) == DisPlayTabState.Rows.Count - 1))
{
SelectedStepTabPanel.Select();
dlgFindReplace.MyEditItem = tc.MyEditItem;
}
}
} }
} }
} }

View File

@@ -517,6 +517,57 @@ namespace VEPROMS.CSLA.Library
} }
} }
#endregion CheckOff #endregion CheckOff
#region ShwRplWds
[Serializable]
[TypeConverter(typeof(ExpandableObjectConverter))]
public class ShwRplWds
{
private string _MenuItem;
[XmlAttribute("MenuItem")]
[Browsable(false)]
public string MenuItem
{
get { return _MenuItem; }
set { _MenuItem = value; }
}
private string _Index;
[XmlAttribute("Index")]
[Browsable(false)] // Don't show in the property grid
public string Index
{
get { return _Index; }
set { _Index = value; }
}
private bool? _Active;
[DisplayName("Active ShwRplWds")]
[Description("Allow use of this ShwRplWds")]
public bool? Active
{
get { return _Active; }
set { _Active = value; }
}
private bool? _OrigActive;
[XmlIgnore]
[Browsable(false)]
public bool? OrigActive
{
get { return _OrigActive; }
set { _OrigActive = value; }
}
public ShwRplWds()
{
}
public string ConvertToString()
{
return GenericSerializer<ShwRplWds>.StringSerialize(this);
}
public override string ToString()
{
return MenuItem;
}
}
#endregion ShwRplWds
#region StepData (list) #region StepData (list)
[Serializable] [Serializable]
[TypeConverter(typeof(ExpandableObjectConverter))] [TypeConverter(typeof(ExpandableObjectConverter))]

View File

@@ -528,6 +528,24 @@ namespace VEPROMS.CSLA.Library
OnPropertyChanged("Section_OriginalSteps"); OnPropertyChanged("Section_OriginalSteps");
} }
} }
[Browsable(false)]
[DisplayName("Section ShowReplaceWords")]
[RefreshProperties(RefreshProperties.All)]
[Description("Section ShowReplaceWords")]
public string Section_ShwRplWords
{
get
{
//return _Xp["Section", "ShwRplWords"];
string tmp = _Xp["Section", "ShwRplWords"];
return tmp == null || tmp == "" ? "Y" : tmp;
}
set
{
_Xp["Section", "ShwRplWords"] = value;
OnPropertyChanged("Section_ShwRplWords");
}
}
[Category("Section")] [Category("Section")]
//PROPGRID: Hide Section NumPages //PROPGRID: Hide Section NumPages
[Browsable(false)] [Browsable(false)]

View File

@@ -474,6 +474,53 @@ namespace VEPROMS.CSLA.Library
OnPropertyChanged("Step_FixedTblForSrch"); OnPropertyChanged("Step_FixedTblForSrch");
} }
} }
//CSM F2024-080: For South Texas - Ability to toggle off Initial Line
public bool Step_DisableInitialLine
{
get
{
string s = _Xp["Step", "DisableInitialLine"];
if (s == string.Empty) return false;
if (s == "True") return true;
return false;
}
set
{
string s = _Xp["Step", "DisableInitialLine"];
if (value.ToString() == s) return;
_Xp["Step", "DisableInitialLine"] = value.ToString();
OnPropertyChanged("Step_DisableInitialLine");
}
}
//C2019-025 Ability to Toggle Replace Words
public int Step_ShwRplWdsIndex
{
get
{
string s = _Xp["Step", "ShwRplWdsIndex"];
if (s == string.Empty) return 0;
if (s == "0") return 0;
if (s == "1") return 1;
if (s == "2") return 2;
if (s == "3") return 3;
return 0;
}
set
{
string s = _Xp["Step", ""];
if (value.ToString() == s) return;
_Xp["Step", "ShwRplWdsIndex"] = value.ToString();
OnPropertyChanged("Step_ShwRplWdsIndex");
}
}
#region RO image sizing #region RO image sizing
// if the RO image (figure) is resized, save it in the step config, not in the ROImageConfig. If stored in ROImageConfig // if the RO image (figure) is resized, save it in the step config, not in the ROImageConfig. If stored in ROImageConfig
// the size is set for ALL uses. // the size is set for ALL uses.

View File

@@ -687,19 +687,46 @@ namespace VEPROMS.CSLA.Library
myLength += mg.Groups[3].Length; myLength += mg.Groups[3].Length;
} }
string gg = MyGrid.Data.Substring(myIndex, myLength); string gg = MyGrid.Data.Substring(myIndex, myLength);
//CSM B2024-003 Updating RO Values inside a text Grid, adding a karat
// and/or dash into the RO value changes to question marks in the UI,
if (newvalue.Contains(@"\u8209?")) if (newvalue.Contains(@"\u8209?"))
{ {
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)"); Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
if (m == null) if (m == null)
newvalue = newvalue.Replace(@"\u8209?", "-"); newvalue = newvalue.Replace(@"\u8209?", "-");
else if (m.Groups[1].Value == "")
newvalue = newvalue.Replace(@"\u8209?", "-");
else else
newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value); newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value);
} }
int indx_to_addfont = -1;
if (newvalue.Contains(@"\u916?"))
{
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
if (m == null)
newvalue = newvalue.Replace(@"\u916?", "^");
else if (m.Groups[1].Value == "" && !ContentItems[0].MyItem.MyItemInfo.MyDocVersion.MyFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta)
newvalue = newvalue.Replace(@"\u916?", "^");
else if (m.Groups[1].Value == "")
{
//B2024-003, B2023-113, B2024-093 - Updating RO Values inside a text Grid,
// adding a caret and/or dash into the RO value and then updating RO values changed to question marks in the UI.
// This is to handle if ConvertCaretToDelta is true
// since delta is not part of the standard ascii
// may need to add a font to handle it.
newvalue = newvalue.Replace(@"\u916?", @"\f9\u916?\f0 ");
indx_to_addfont = GetLocationToInsertFontInGrid(myIndex);
}
else
newvalue = newvalue.Replace(@"\u916?", m.Groups[1].Value + @"\u916?" + m.Groups[3].Value);
}
if (newvalue.Contains(@"\u8593?")) if (newvalue.Contains(@"\u8593?"))
{ {
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)"); Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
if (m == null) if (m == null)
newvalue = newvalue.Replace(@"\u8593?", "^"); newvalue = newvalue.Replace(@"\u8593?", "^");
else if (m.Groups[1].Value == "")
newvalue = newvalue.Replace(@"\u8593?", "^");
else else
newvalue = newvalue.Replace(@"\u8593?", m.Groups[1].Value + @"\u8593?" + m.Groups[3].Value); newvalue = newvalue.Replace(@"\u8593?", m.Groups[1].Value + @"\u8593?" + m.Groups[3].Value);
} }
@@ -708,6 +735,8 @@ namespace VEPROMS.CSLA.Library
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)"); Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
if (m == null) if (m == null)
newvalue = newvalue.Replace(@"\u9586?", @"\\"); newvalue = newvalue.Replace(@"\u9586?", @"\\");
else if (m.Groups[1].Value == "")
newvalue = newvalue.Replace(@"\u9586?", @"\\");
else else
newvalue = newvalue.Replace(@"\u9586?", m.Groups[1].Value + @"\u9586?" + m.Groups[3].Value); newvalue = newvalue.Replace(@"\u9586?", m.Groups[1].Value + @"\u9586?" + m.Groups[3].Value);
} }
@@ -719,7 +748,17 @@ namespace VEPROMS.CSLA.Library
if (gg != newvalue) if (gg != newvalue)
{ {
retval = gg; retval = gg;
MyGrid.Data = MyGrid.Data.Substring(0, myIndex) + newvalue + MyGrid.Data.Substring(myIndex + myLength); //B2024-003, B2023-113, B2024-093 - Updating RO Values inside a text Grid,
// adding a caret and/or dash into the RO value and then updating RO values changed to question marks in the UI.
// This is to handle if ConvertCaretToDelta is true
// since delta is not part of the standard ascii
// may need to add a font to handle it.
string begin_str = MyGrid.Data.Substring(0, myIndex);
if (indx_to_addfont > -1)
begin_str = begin_str.Insert(indx_to_addfont, @"{\f9\fnil\fcharset0 FreeMono;}");
MyGrid.Data = begin_str + newvalue + MyGrid.Data.Substring(myIndex + myLength);
MyGrid.Save();
break; break;
} }
} }
@@ -729,6 +768,64 @@ namespace VEPROMS.CSLA.Library
return retval; return retval;
} }
//B2024-003, B2023-113, B2024-093 - Updating RO Values inside a text Grid,
// adding a caret and/or dash into the RO value and then updating RO values changed to question marks in the UI.
// This is to handle if ConvertCaretToDelta is true
// since delta is not part of the standard ascii
// may need to add a font to handle it.
// startIndex = Index in the Grid at which the text we want to replace is starting
//basic Grid data partitioning using the variables in this sub is as follows:
//
// [indexOfPrefix] [indx]
// | |
// [text before last occurrence of prefix] {prefix} [rest of fonts] [text after fonts]
private int GetLocationToInsertFontInGrid(int startIndex)
{
//searches backwards from the srtIndex for the last previous occurrence of the prefix
string prefix = @"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{";
int indexOfPrefix = MyGrid.Data.LastIndexOf(prefix, startIndex);
//find the end of the font section
//by passing in the Grid data
//with the following removed:
// - Everything before the last occurrence of the prefix
// - the prefix itself removed
int indx = GetIndexOfCloseBracket(MyGrid.Data.Substring(indexOfPrefix + prefix.Length, startIndex - indexOfPrefix - prefix.Length));
if (indx > -1)
{
indx += indexOfPrefix;
indx += prefix.Length;
}
//indx will contain last spot inside the font section
return indx;
}
//B2024-003, B2023-113, B2024-093 - Updating RO Values inside a text Grid,
// this function will find the corresponding occurrence of a closing bracket :
// usage is you pass in some text after an opening bracket, and it will tell you what the index is for it closing
private int GetIndexOfCloseBracket(string text)
{
int indx = 0;
Stack<char> stk = new System.Collections.Generic.Stack<char>();
foreach (char c in text)
{
if (c == '{')
stk.Push('{');
else if (c == '}' && stk.Count == 0)
return indx;
else if (c == '}')
stk.Pop();
indx++;
}
return -1;
}
public static string MakeConsistentFormat(string gg) public static string MakeConsistentFormat(string gg)
{ {
// replace degree, bullet dash, hardspace // replace degree, bullet dash, hardspace
@@ -1255,6 +1352,16 @@ namespace VEPROMS.CSLA.Library
{ {
gg = ItemInfo.ConvertToDisplayText(gg); gg = ItemInfo.ConvertToDisplayText(gg);
newvalue = ItemInfo.ConvertToDisplayText(newvalue); newvalue = ItemInfo.ConvertToDisplayText(newvalue);
//CSM B2024-094 - Carats (as Deltas) print as question marks in tables when unit <u> is used in RO Definition Value
//If there is a grid, need to keep these as the \u code
//Otherwise they will not use the correct font and end up as question marks
if (MyGrid != null)
{
gg = gg.Replace($"{(char)916}", @"\u916?");
newvalue = newvalue.Replace($"{(char)916}", @"\u916?");
}
// Debug - jsj 5-19-2017 - left in for initial check-in // Debug - jsj 5-19-2017 - left in for initial check-in
//string xx_gg = gg_org.Replace(@"\'b0", @"\'B0").Replace(@"\u8209?", "-").Replace(@"\u160?", " ").Replace("\xA0", " "); //string xx_gg = gg_org.Replace(@"\'b0", @"\'B0").Replace(@"\u8209?", "-").Replace(@"\u160?", " ").Replace("\xA0", " ");
//string xx_nv = newval_org.Replace(@"\'b0", @"\'B0").Replace(@"\u8209?", "-").Replace(@"\u160?", " ").Replace("\xA0", " "); //string xx_nv = newval_org.Replace(@"\'b0", @"\'B0").Replace(@"\u8209?", "-").Replace(@"\u160?", " ").Replace("\xA0", " ");
@@ -1307,7 +1414,19 @@ namespace VEPROMS.CSLA.Library
else else
newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value); newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value);
} }
//B2024-003, B2023-113, B2024-093 - Updating RO Values inside a text Grid,
// This will handle if there is a delta and the column/row of the grid is removed
//then restored from history
if (newvalue.Contains(@"\u916?"))
{
Match m = Regex.Match(gg, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
if (m.Groups.Count < 3 && !ContentItems[0].MyDocVersion.MyFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta)
newvalue = newvalue.Replace(@"\u916?", "^");
else if (m.Groups.Count < 3)
newvalue = newvalue.Replace(@"\u916?", $"{(char)916}");
else
newvalue = newvalue.Replace(@"\u916?", m.Groups[1].Value + @"\u916?" + m.Groups[3].Value);
}
if (newvalue.Contains(@"\u8593?")) if (newvalue.Contains(@"\u8593?"))
{ {
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)"); Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");

View File

@@ -6,11 +6,18 @@ using System.Text.RegularExpressions;
using System.Drawing; using System.Drawing;
using Volian.Base.Library; using Volian.Base.Library;
using JR.Utils.GUI.Forms; using JR.Utils.GUI.Forms;
//using VEPROMS.colorReplaceWords;
// This was moved from volian.controls.library // This was moved from volian.controls.library
namespace VEPROMS.CSLA.Library namespace VEPROMS.CSLA.Library
{ {
public enum E_FieldToEdit { StepText, Text, Number, PSI }; public enum E_FieldToEdit { StepText, Text, Number, PSI };
public enum ReplaceWords
{
Inherit = 0,
Show = 1,
DoNotShow = 2
}
public class DisplayText public class DisplayText
{ {
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@@ -46,6 +53,45 @@ namespace VEPROMS.CSLA.Library
return string.Empty; return string.Empty;
} }
} }
private string ShwRplWords(ItemInfo _MyItemInfo)
{
//if (_Initalizing) return "N";
//_MyItemInfo.
SectionConfig sc = _MyItemInfo.MyConfig as SectionConfig;
if (sc == null) return "N";
return sc.Section_ShwRplWords;
}
// C2019-025 c2025-010 Ability-to-Toggle-Replace-Words
private bool ShwRplWdsIndex(ItemInfo _MyItemInfo)
{
StepConfig sc = _MyItemInfo.MyConfig as StepConfig;
int setting = sc.Step_ShwRplWdsIndex;
switch (setting)
{
case (int)ReplaceWords.DoNotShow:
return false;
break;
case (int)ReplaceWords.Show:
return true;
break;
case (int)ReplaceWords.Inherit:
//SectionConfig sc2 = _MyItemInfo.ActiveParent.MyConfig as SectionConfig;
SectionConfig sc2 = _MyItemInfo.ActiveSection.MyConfig as SectionConfig;
if (sc2 == null || sc2.Section_ShwRplWords == "Y")
{
return true;
}
else
{
return false;
}
break;
default:
return false;
break;
}
}
private Item _MyItem; private Item _MyItem;
private string EditText private string EditText
{ {
@@ -357,9 +403,34 @@ namespace VEPROMS.CSLA.Library
// But don't do ReplaceWords if the TurnOffReplaceWords format flag is set // But don't do ReplaceWords if the TurnOffReplaceWords format flag is set
if (wordsShouldBeReplaced && !_MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.TurnOffReplaceWords) if (wordsShouldBeReplaced && !_MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.TurnOffReplaceWords)
{ {
int profileDepth1 = ProfileTimer.Push(">>>> DoReplaceWords2"); int profileDepth1 = ProfileTimer.Push(">>>> DoReplaceWords2");
text = DoReplaceWords2(text); // C2029-025 Show or hide replace words. Can highlight replace words in editor.
if (_MyItemInfo.IsSection)
{
string ShwRplWrds = ShwRplWords(_MyItemInfo);
if (ShwRplWrds == "Y")
{
text = DoReplaceWords2(text, epMode);
}
}
if (_MyItemInfo.IsStep)
{
bool ShwRplWrds = ShwRplWdsIndex(_MyItemInfo);
if (ShwRplWrds == true)
{
text = DoReplaceWords2(text, epMode);
}
}
if (_MyItemInfo.IsFolder || _MyItemInfo.IsProcedure)
{
text = DoReplaceWords2(text, epMode);
}
ProfileTimer.Pop(profileDepth1); ProfileTimer.Pop(profileDepth1);
} }
if (_MyItemInfo != null && ROsShouldBeAdjusted) // B2017-019 - added check for ROsShouldBeAdjusted so that these token are not "cooked" on property pages if (_MyItemInfo != null && ROsShouldBeAdjusted) // B2017-019 - added check for ROsShouldBeAdjusted so that these token are not "cooked" on property pages
@@ -1165,13 +1236,17 @@ namespace VEPROMS.CSLA.Library
{ {
int sp = odte.Link.IndexOf(" ") + 1; // get past tran type int sp = odte.Link.IndexOf(" ") + 1; // get past tran type
string srecid = odte.Link.Substring(sp, odte.Link.IndexOf(" ", sp) - sp); string srecid = odte.Link.Substring(sp, odte.Link.IndexOf(" ", sp) - sp);
recid = System.Convert.ToInt32(srecid);
foreach (ContentTransition ct in itm.MyContent.ContentTransitions) //CSM B2024-078 - when a bad transition link / does not contain a number, simply return the text as-is
if (int.TryParse(srecid, out recid))
{ {
if (ct.TransitionID == recid) foreach (ContentTransition ct in itm.MyContent.ContentTransitions)
{ {
itm.MyContent.ContentTransitions.Remove(ct); if (ct.TransitionID == recid)
break; {
itm.MyContent.ContentTransitions.Remove(ct);
break;
}
} }
} }
} }
@@ -1656,7 +1731,15 @@ namespace VEPROMS.CSLA.Library
private string FixTransition(string link, string text) private string FixTransition(string link, string text)
{ {
if (link.IndexOf("<NewID>") != -1) return text; if (link.IndexOf("<NewID>") != -1) return text;
int transitionID = Convert.ToInt32(link.Split(" ".ToCharArray())[1]);
//CSM B2024-078 - when a bad transition link / does not contain a number, simply return the text as-is
int transitionID;
string[] splt_link = link.Split(' ');
if (splt_link.Length < 2 || !int.TryParse(splt_link[1], out transitionID))
{
return text;
}
// Find the transition // Find the transition
if (_MyItemInfo.MyContent.ContentTransitionCount <= 0) if (_MyItemInfo.MyContent.ContentTransitionCount <= 0)
{ {
@@ -2089,7 +2172,7 @@ namespace VEPROMS.CSLA.Library
return (bool) _ProcessReplaceWords; return (bool) _ProcessReplaceWords;
} }
} }
private string DoReplaceWords2(string Text) private string DoReplaceWords2(string Text, E_EditPrintMode epMode)
{ {
if(!ProcessReplaceWords) return Text; if(!ProcessReplaceWords) return Text;
// F2021-053: BNPP Alarm - need ability to have super/sub scripts in the text of Alarm Tables (ROs). // F2021-053: BNPP Alarm - need ability to have super/sub scripts in the text of Alarm Tables (ROs).
@@ -2150,6 +2233,7 @@ namespace VEPROMS.CSLA.Library
// CASEINSENS: Do ReplaceWords for all words that match, regardless of case, and replace with the ReplaceWith string as is // CASEINSENS: Do ReplaceWords for all words that match, regardless of case, and replace with the ReplaceWith string as is
//RegexOptions myOptions = (rs.Flag & E_ReplaceFlags.CaseInsens) == E_ReplaceFlags.CaseInsens ? RegexOptions.IgnoreCase & RegexOptions.Singleline : RegexOptions.None & RegexOptions.Singleline; //RegexOptions myOptions = (rs.Flag & E_ReplaceFlags.CaseInsens) == E_ReplaceFlags.CaseInsens ? RegexOptions.IgnoreCase & RegexOptions.Singleline : RegexOptions.None & RegexOptions.Singleline;
string replaceWord = Regex.Replace(rs.ReplaceWord, @"[[\]\\()]", @"\$0"); string replaceWord = Regex.Replace(rs.ReplaceWord, @"[[\]\\()]", @"\$0");
// if first or last character in replaceword is a non-word character, for example, ',', ')', or '.', // if first or last character in replaceword is a non-word character, for example, ',', ')', or '.',
// don't use the \W, i.e. don't bother to look for a non-word character. // don't use the \W, i.e. don't bother to look for a non-word character.
string wordMatchBeg = Regex.IsMatch(replaceWord.Substring(0, 1), @"\W") ? "" : @"(?<=\W|^)"; string wordMatchBeg = Regex.IsMatch(replaceWord.Substring(0, 1), @"\W") ? "" : @"(?<=\W|^)";
@@ -2176,7 +2260,7 @@ namespace VEPROMS.CSLA.Library
} }
//ProfileTimer.Pop(profileDepth); //ProfileTimer.Pop(profileDepth);
//int profileDepth5 = ProfileTimer.Push(">>>> DoReplaceWords2.ReplaceMatches"); //int profileDepth5 = ProfileTimer.Push(">>>> DoReplaceWords2.ReplaceMatches");
Text = myMatches.ReplaceMatches(); Text = myMatches.ReplaceMatches(epMode);
//ProfileTimer.Pop(profileDepth5); //ProfileTimer.Pop(profileDepth5);
Text = Text.Replace(@"\xA0", @"\u160?"); //replace hard space Text = Text.Replace(@"\xA0", @"\u160?"); //replace hard space
return Text; return Text;
@@ -2468,7 +2552,8 @@ namespace VEPROMS.CSLA.Library
if (str.Length == index && str == text.Substring(0, str.Length)) return true; if (str.Length == index && str == text.Substring(0, str.Length)) return true;
return false; return false;
} }
public string ReplaceMatches()
public string ReplaceMatches(E_EditPrintMode epMode)
{ {
int offset = 0; int offset = 0;
string text = _Text; string text = _Text;
@@ -2560,6 +2645,11 @@ namespace VEPROMS.CSLA.Library
with = with.Replace(@"\ul ", ""); with = with.Replace(@"\ul ", "");
with = with.Replace(@"\ulnone ", ""); with = with.Replace(@"\ulnone ", "");
} }
//if (Properties.Settings.Default.cbShwRplWrdsColor && !(epMode == E_EditPrintMode.Print))
if (Properties.Settings.Default.cbShwRplWrdsColor && !(epMode == E_EditPrintMode.Print))
{
with = $@"\cf2{with}\cf0 ";
}
text = text.Substring(0, offset + foundMatch.MyMatch.Index) + with + text.Substring(offset + foundMatch.MyMatch.Index + foundMatch.MyMatch.Length); text = text.Substring(0, offset + foundMatch.MyMatch.Index) + with + text.Substring(offset + foundMatch.MyMatch.Index + foundMatch.MyMatch.Length);
//offset += foundMatch.MyWord.ReplaceWith.Length - foundMatch.MyMatch.Length; //offset += foundMatch.MyWord.ReplaceWith.Length - foundMatch.MyMatch.Length;

View File

@@ -49,29 +49,35 @@ namespace VEPROMS.CSLA.Library
{ {
if (DocVersionAssociations == null || DocVersionAssociations.Count == 0) return false; if (DocVersionAssociations == null || DocVersionAssociations.Count == 0) return false;
ROFstInfo roFstInfo = ROFstInfo.GetJustROFst(DocVersionAssociations[0].ROFstID); using (ROFstInfo roFstInfo = ROFstInfo.GetJustROFst(DocVersionAssociations[0].ROFstID))
{
using (RODbInfo rdi = RODbInfo.GetJustRODB(roFstInfo.RODbID))
{
string rofstPath = rdi.FolderPath + @"\ro.fst";
if (!File.Exists(rofstPath)) return false;
RODbInfo rdi = RODbInfo.GetJustRODB(roFstInfo.RODbID); FileInfo fiRofst = new FileInfo(rofstPath);
string rofstPath = rdi.FolderPath + @"\ro.fst";
if (!File.Exists(rofstPath)) return false;
FileInfo fiRofst = new FileInfo(rofstPath); // if the database Ro.Fst is newer or if the files have identical DTS,
// assume that they are the same file.
if (roFstInfo.DTS >= fiRofst.LastWriteTimeUtc) return false;
// if the database Ro.Fst is newer or if the files have identical DTS, // next see if the data is the same size, i.e. byte count of record and byte count
// assume that they are the same file. // of file. If different sizes, the date/time stamp check will hold.
if (roFstInfo.DTS >= fiRofst.LastWriteTimeUtc) return false; // B2022-026 RO Memory reduction - new logic
var bytes = ROFSTLookup.GetRofstLookupBytes(roFstInfo.ROFstID);
// next see if the data is the same size, i.e. byte count of record and byte count if (bytes != null && fiRofst.Length != bytes.Length)
// of file. If different sizes, the date/time stamp check will hold. return fiRofst.LastWriteTimeUtc > roFstInfo.DTS;
// B2022-026 RO Memory reduction - new logic
var bytes = ROFSTLookup.GetRofstLookupBytes(roFstInfo.ROFstID); // if we can't tell by the DTS or size, compare the contents. Get all of the rodb's
// rofsts of the size of the file & compare bytes.
return ROFstInfoList.ROFstDiffBySize(rofstPath, rdi.RODbID, (int)fiRofst.Length);
}
}
if (bytes != null && fiRofst.Length != bytes.Length)
return fiRofst.LastWriteTimeUtc > roFstInfo.DTS;
// if we can't tell by the DTS or size, compare the contents. Get all of the rodb's
// rofsts of the size of the file & compare bytes.
return ROFstInfoList.ROFstDiffBySize(rofstPath, rdi.RODbID, (int)fiRofst.Length);
} }
} }
public bool ROfstLastCompleted public bool ROfstLastCompleted

File diff suppressed because it is too large Load Diff

View File

@@ -2650,97 +2650,174 @@ namespace VEPROMS.CSLA.Library
firstTrans = false; firstTrans = false;
if (!CanDeleteObject()) if (!CanDeleteObject())
throw new System.Security.SecurityException("User not authorized to remove a Item"); throw new System.Security.SecurityException("User not authorized to remove a Item");
// B2016-009 check source and desintation types and display message box if needed // B2016-009 check source and destination types and display message box if needed
// C2022-017 moved the CheckSourceDestinationType call to btnPasteReplace_Click in StepTabRibbon // C2022-017 moved the CheckSourceDestinationType call to btnPasteReplace_Click in StepTabRibbon
// B2023-101 Handle Paste Replace when procedure to be replaced has Incoming Transitions, i.e. do a separate try/catch for this case // B2023-101 Handle Paste Replace when procedure to be replaced has Incoming Transitions, i.e. do a separate try/catch for this case
ItemInfo newItemInfo = null; ItemInfo newItemInfo = null;
try using (ItemInfo copyItemInfo = ItemInfo.Get(copyStartID))
{ {
// C2017-031: Support for paste/replace an enhanced step, if this is replacing enhanced, do a specific query try
if (itemInfo.IsEnhancedStep)
{ {
newItemInfo = ItemInfo.CopyPasteReplaceEnhancedItemInfoFetch(copyStartID, itemInfo); // C2017-031: Support for paste/replace an enhanced step, if this is replacing enhanced, do a specific query
if (newItemInfo == null) return null; if (itemInfo.IsEnhancedStep)
{
newItemInfo = ItemInfo.CopyPasteReplaceEnhancedItemInfoFetch(copyStartID, itemInfo);
if (newItemInfo == null) return null;
}
//C2025-003 Enhanced Copy/Paste Upgrade - Added support for paste/replace on a master step
else if (itemInfo.HasEnhancedLinkedStep || copyItemInfo.HasEnhancedLinkedStep)
{
DialogResult rslt = DialogResult.No;
SectionConfig secCfg = itemInfo.ActiveSection.MyConfig as SectionConfig;
if (copyItemInfo.HasEnhancedLinkedStep && secCfg.MyEnhancedDocuments.Count > 0)
rslt = FlexibleMessageBox.Show("The step you are copying contains linked background documents." +
"\r\n\r\nDo you also wish to make a copy of the background documents?",
"Paste background documents", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
//unlink and remove any background documents attached to where you are copying to
//and then delete them
//if selected want to replace BG step (DialogResult.Yes)
if (itemInfo.HasEnhancedLinkedStep && rslt == DialogResult.Yes)
{
foreach (EnhancedDocument ed in itemInfo.GetMyEnhancedDocuments())
{
using (ItemInfo exEnh = ItemInfo.Get(ed.ItemID))
{
exEnh.DoUnlinkEnhanced(exEnh, 0, false);
DeleteItemAndChildren(exEnh);
}
}
}
//do copy/paste replace of the master step
newItemInfo = ItemInfo.CopyPasteReplaceItemInfoFetch(copyStartID, itemInfo);
if (newItemInfo == null) return null;
//copy any background documents
//if selected want to replace BG step (DialogResult.Yes)
if (copyItemInfo.HasEnhancedLinkedStep && rslt == DialogResult.Yes)
{
foreach (EnhancedDocument ed in copyItemInfo.GetMyEnhancedDocuments())
{
using (ItemInfo exEnh = newItemInfo.DoAddMissingEnhancedItems(ed.Type))
{
PasteReplace(exEnh, ed.ItemID, chgid, ref firstTrans);
}
}
}
else if (rslt == DialogResult.No)
{
//if selected didn't want to copy BG documents (DialogResult.No)
//need to unlink BG doc from old removed content (what was pasted over top of)
//re-link BG document to new paste replace master doc
//this should also auto update the text of the main linked item
//to match the new master doc wording
//get original BG documents
EnhancedDocuments orig_eds = itemInfo.GetMyEnhancedDocuments();
//remove link from pre-existing BG docs
foreach (EnhancedDocument ed in orig_eds)
{
using (ItemInfo exEnh = ItemInfo.Get(ed.ItemID))
{ exEnh.DoUnlinkEnhanced(exEnh, 0, false); }
}
//remove link from steps just copied
ItemInfo.PasteClearEnhanced(newItemInfo);
//re-link pre-existing BG docs to newly replaced master step
foreach (EnhancedDocument ed in orig_eds)
{
using (ItemInfo orig_ed_item = ItemInfo.Get(ed.ItemID))
{ newItemInfo.DoCreateLinksEnhancedSingleItem(orig_ed_item, ed.Type); }
}
}
}
else
{
newItemInfo = ItemInfo.CopyPasteReplaceItemInfoFetch(copyStartID, itemInfo); if (newItemInfo == null) return null;
}
} }
else catch (Exception ex1)
{ {
newItemInfo = ItemInfo.CopyPasteReplaceItemInfoFetch(copyStartID, itemInfo); if (newItemInfo == null) return null; if (ex1.Message.Contains("has External Transitions and has no next step")
}
}
catch (Exception ex1)
{
if (ex1.Message.Contains("has External Transitions and has no next step")
|| ex1.Message.Contains("has External Transitions to Procedure") || ex1.Message.Contains("has External Transitions to Procedure")
|| ex1.Message.Contains("has External Transitions to it's children")) || ex1.Message.Contains("has External Transitions to it's children"))
{ {
FlexibleMessageBox.Show("This procedure has external transition references to it that must be resolved before doing the Paste/Replace.\r\nRight Click on the procedure and select the Incoming Transitions menu option to find these references and resolve them.", "Paste Replace Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); FlexibleMessageBox.Show("This procedure has external transition references to it that must be resolved before doing the Paste/Replace.\r\nRight Click on the procedure and select the Incoming Transitions menu option to find these references and resolve them.", "Paste Replace Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
return null; return null;
}
} }
} try
try {
{ // Delete business objects, including remove from tree
// Delete business objects, including remove from tree ItemInfo.DeleteItemInfoAndChildren(itemInfo.ItemID); // Dispose ItemInfo and Children
ItemInfo.DeleteItemInfoAndChildren(itemInfo.ItemID); // Dispose ItemInfo and Children using (Item item = Get(newItemInfo.ItemID)) ItemInfo.Refresh(item);
using (Item item = Get(newItemInfo.ItemID)) ItemInfo.Refresh(item); ItemInfo.PasteSetChangeId(newItemInfo, chgid);
ItemInfo.PasteSetChangeId(newItemInfo, chgid); if (!copyItemInfo.HasEnhancedLinkedStep && !itemInfo.HasEnhancedLinkedStep) ItemInfo.PasteClearEnhanced(newItemInfo);
ItemInfo.PasteClearEnhanced(newItemInfo); if (newItemInfo.NextItem != null) using (Item item = newItemInfo.NextItem.Get()) ItemInfo.Refresh(item);
if (newItemInfo.NextItem != null) using (Item item = newItemInfo.NextItem.Get()) ItemInfo.Refresh(item); newItemInfo.RefreshNextItems();
newItemInfo.RefreshNextItems(); // if inserting after a caution or note, refreshes tabs. This will adjust bullets
// if inserting after a caution or note, refreshes tabs. This will adjust bullets // of any previous cautions or notes.
// of any previous cautions or notes. if (newItemInfo.IsCaution || newItemInfo.IsNote) newItemInfo.ResetOrdinal();
if (newItemInfo.IsCaution || newItemInfo.IsNote) newItemInfo.ResetOrdinal(); newItemInfo.UpdateTransitionText();
newItemInfo.UpdateTransitionText(); newItemInfo.UpdateROText();
newItemInfo.UpdateROText(); newItemInfo.UpdatePastedStepTransitionText();
newItemInfo.UpdatePastedStepTransitionText();
// Add to tree // Add to tree
if (newItemInfo.NextItem != null) if (newItemInfo.NextItem != null)
{
using (ItemInfo itm = ItemInfo.GetNonCached(newItemInfo.NextItem.ItemID))
{ {
itm.OnNewSiblingBefore(new ItemInfoInsertEventArgs(newItemInfo, ItemInfo.EAddpingPart.Before)); using (ItemInfo itm = ItemInfo.GetNonCached(newItemInfo.NextItem.ItemID))
{
itm.OnNewSiblingBefore(new ItemInfoInsertEventArgs(newItemInfo, ItemInfo.EAddpingPart.Before));
}
} }
} else if (newItemInfo.PreviousID != null)
else if (newItemInfo.PreviousID != null)
{
using (ItemInfo itm2 = ItemInfo.GetNonCached((int)newItemInfo.PreviousID))
{ {
itm2.OnNewSiblingAfter(new ItemInfoInsertEventArgs(newItemInfo, ItemInfo.EAddpingPart.After)); using (ItemInfo itm2 = ItemInfo.GetNonCached((int)newItemInfo.PreviousID))
{
itm2.OnNewSiblingAfter(new ItemInfoInsertEventArgs(newItemInfo, ItemInfo.EAddpingPart.After));
}
} }
else
{
// B2024-045, 049 and 050: if not a single procedure replace, update user interface by using the 'OnNewChild'. Single
// procedure's MyParent is null because its parent is a working draft (docversion) since MyParent's type is iteminfo.
// For the single procedure case, the user interface code in vlntreeview will update the tree.
if (newItemInfo.MyParent != null)
newItemInfo.MyParent.OnNewChild(new ItemInfoInsertEventArgs(newItemInfo, ItemInfo.EAddpingPart.Child));
}
return newItemInfo;
} }
else catch (Exception ex)
{ {
// B2024-045, 049 and 050: if not a single procedure replace, update user interface by using the 'OnNewChild'. Single ItemInfo iii = itemInfo.HandleSqlExceptionOnDelete(ex);
// procedure's MyParent is null because its parent is a working draft (docversion) since MyParent's type is iteminfo. if (iii == itemInfo) return null;// If self returned then return null
// For the single procedure case, the user interface code in vlntreeview will update the tree. if (iii != null)
if (newItemInfo.MyParent != null) {
newItemInfo.MyParent.OnNewChild(new ItemInfoInsertEventArgs(newItemInfo, ItemInfo.EAddpingPart.Child)); firstTrans = true; // B2017-179 set the firstTrans to true and return the itminfo of the first transition location that needs resolved
return iii;
}
if (!HandleSqlExceptionOnCopy(ex))
{
if (ex.Message.Contains("has External Transitions and has no next step")
|| ex.Message.Contains("has External Transitions to Procedure")
|| ex.Message.Contains("has External Transitions to it's children")
|| ex.Message.Contains("This step has been deleted"))
throw ex;
FlexibleMessageBox.Show("Details were written to the Error Log.", "Paste Replace Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
return itemInfo;
}
else
return itemInfo;
} }
return newItemInfo;
}
catch (Exception ex)
{
ItemInfo iii = itemInfo.HandleSqlExceptionOnDelete(ex);
if (iii == itemInfo) return null;// If self returned then return null
if (iii != null)
{
firstTrans = true; // B2017-179 set the firstTrans to true and return the itminfo of the first transition location that needs resolved
return iii;
}
if (!HandleSqlExceptionOnCopy(ex))
{
if (ex.Message.Contains("has External Transitions and has no next step")
|| ex.Message.Contains("has External Transitions to Procedure")
|| ex.Message.Contains("has External Transitions to it's children")
|| ex.Message.Contains("This step has been deleted")
)
throw ex;
FlexibleMessageBox.Show("Details were written to the Error Log.", "Paste Replace Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
return itemInfo;
}
else
return itemInfo;
} }
} }
#endregion #endregion

View File

@@ -84,7 +84,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("LastChanged", true);
return _LastChanged; return _LastChanged;
} }
set { _LastChanged = value; } set { _LastChanged = value; }

View File

@@ -80,7 +80,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("LastChanged", true);
return _LastChanged; return _LastChanged;
} }
set { _LastChanged = value; } set { _LastChanged = value; }

View File

@@ -676,37 +676,47 @@ namespace VEPROMS.CSLA.Library
} }
public void AppendPrefix() public void AppendPrefix()
{ {
if (HasText && Prefix != null) if (Prefix == null) return; // no Prefix text to add
if (HasText)
{ {
if (!_Results.ToString().EndsWith(_Prefix)) if (!_Results.ToString().EndsWith(_Prefix)) //existing transition text does not end with Prefix text, OK to append
_Results.Append(Prefix); _Results.Append(Prefix);
_Prefix = null; _Prefix = null;
} }
else if (_TranType == 4 && _ToItem.MoreThanOneStepSection()) else if (_TranType == 4 && _ToItem.MoreThanOneStepSection())
{ {
if (!HasText && Prefix != null && Prefix.ToUpper().StartsWith(", STEP") // WEP (Point Beach) is no longer a customer - commented out
&& _FromItem.ActiveFormat.Name.StartsWith("WEP")) //if (!HasText && Prefix.ToUpper().StartsWith(", STEP")
{ // && _FromItem.ActiveFormat.Name.StartsWith("WEP"))
Console.WriteLine("Format,'{0}'", _FromItem.ActiveFormat.Name); //{
_Prefix = null; // Console.WriteLine("Format,'{0}'", _FromItem.ActiveFormat.Name);
return; // _Prefix = null;
} // return;
//}
_Results.Append(Prefix); _Results.Append(Prefix);
_Prefix = null; _Prefix = null;
} }
else if (_TranType == 5 && Prefix != null)
{
if (!HasText && Prefix.StartsWith(", "))
_Results.Append(Prefix.TrimStart(", ".ToCharArray()));
else
_Results.Append(Prefix);
_Prefix = null;
}
// If the prefix contains an open paren, we want to add the open paren regardless // If the prefix contains an open paren, we want to add the open paren regardless
// of whether there already is text in the resulting string. // of whether there already is text in the resulting string.
else if (!HasText && Prefix != null && Prefix.Contains("(")) else if (!HasText && Prefix.Contains("("))
{ {
_Results.Append(Prefix.TrimStart(" ".ToCharArray())); // since no text in result, trim starting space. _Results.Append(Prefix.TrimStart(" ".ToCharArray())); // since no text in result, trim starting space.
_Prefix = null;
}
else if (!HasText && Prefix.StartsWith(", "))
{
_Results.Append(Prefix.TrimStart(", ".ToCharArray()));// no preceeding text, remove comma and space
_Prefix = null;
}
else if (!HasText && Prefix.StartsWith(","))
{
_Results.Append(Prefix.TrimStart(",".ToCharArray())); // no preceeding text, remove comma
_Prefix = null;
}
else
{
_Results.Append(Prefix); // append prefix as is
_Prefix = null;
} }
} }
public string OverridePrefix public string OverridePrefix

View File

@@ -2173,6 +2173,7 @@ namespace VEPROMS.CSLA.Library
} }
} }
} }
#endregion #endregion
#region CheckOff #region CheckOff
[TypeConverter(typeof(ExpandableObjectConverter))] [TypeConverter(typeof(ExpandableObjectConverter))]
@@ -2284,6 +2285,49 @@ namespace VEPROMS.CSLA.Library
} }
} }
#endregion #endregion
#region ShwRplWds
// C2029-025 Show or hide replace words. Can highlight replace words in editor.
public class ShwRplWds : vlnFormatItem, IVlnIndexedFormatItem
{
public ShwRplWds(XmlNode xmlNode) : base(xmlNode) { }
public ShwRplWds() : base() { }
private LazyLoad<int?> _Index;
public int? Index
{
get
{
return LazyLoad(ref _Index, "@Index");
}
}
// User Interface Mark (UIMark) is the deimal number of an ASCII character that is desplayed in the step editor
// to indicate the selected checkoff
private LazyLoad<int?> _UIMark;
public int? UIMark
{
get
{
return LazyLoad(ref _UIMark, "@UIMark");
}
}
//Descriptive text shown in the checkoff selection list
private LazyLoad<string> _MenuItem;
public string MenuItem
{
get
{
return LazyLoad(ref _MenuItem, "@MenuItem");
}
}
public override string ToString()
{
return MenuItem;
}
}
#endregion
#region CheckOffList #region CheckOffList
[TypeConverter(typeof(vlnIndexedListConverter<CheckOffList, CheckOff>))] [TypeConverter(typeof(vlnIndexedListConverter<CheckOffList, CheckOff>))]
public class CheckOffList : vlnIndexedFormatList<CheckOff> public class CheckOffList : vlnIndexedFormatList<CheckOff>
@@ -3175,6 +3219,17 @@ namespace VEPROMS.CSLA.Library
return LazyLoad(ref _ChangeFontUpperCaseIinArial, "@ChangeFontUpperCaseIinArial"); return LazyLoad(ref _ChangeFontUpperCaseIinArial, "@ChangeFontUpperCaseIinArial");
} }
} }
// F2024-080 South Texas
// Used to show if "Initial Line Disable" checkbox should show in the DisplayTab
private LazyLoad<bool> _ShowInitialLineDisable;
public bool ShowInitialLineDisable
{
get
{
return LazyLoad(ref _ShowInitialLineDisable, "@ShowInitialLineDisable");
}
}
} }
#endregion - StepSectionData #endregion - StepSectionData
#region TextTypeValue #region TextTypeValue
@@ -6202,6 +6257,36 @@ public StepData Equation // equation has a parent of embedded object.
} }
} }
// F2024-078 adjusts the the spacing before the Note/Caution tab - the space betwee the top of the box and the tab text
private LazyLoad<float?> _AdjSpB4Tab;
public float? AdjSpB4Tab
{
get
{
return LazyLoad(ref _AdjSpB4Tab, "@AdjSpB4Tab");
}
}
// F2024-078 adjusts the the spacing after the Note/Caution tab - the space betwee the tab text and the first line of of Note/Caution text
private LazyLoad<float?> _AdjSpAftTab;
public float? AdjSpAftTab
{
get
{
return LazyLoad(ref _AdjSpAftTab, "@AdjSpAftTab");
}
}
// F2024-078 adjusts the the spacing after the last line of Note/Caution text - between the last line of text and the bottom of the box
private LazyLoad<float?> _AdjLastBlnkLn;
public float? AdjLastBlnkLn
{
get
{
return LazyLoad(ref _AdjLastBlnkLn, "@AdjLastBlnkLn");
}
}
// this will adjust the line spacing when an extra thick line is used for a box, so that the text below the box doesn't hit up against the bottom of the box // this will adjust the line spacing when an extra thick line is used for a box, so that the text below the box doesn't hit up against the bottom of the box
private LazyLoad<bool> _ThickDouble; // F2021-026: Barakah single column 2 thick double lines around Warnings private LazyLoad<bool> _ThickDouble; // F2021-026: Barakah single column 2 thick double lines around Warnings
public bool ThickDouble public bool ThickDouble
@@ -6396,7 +6481,7 @@ public StepData Equation // equation has a parent of embedded object.
} }
public TransData(XmlNode xmlNode) : base(xmlNode) { } public TransData(XmlNode xmlNode) : base(xmlNode) { }
// a character that is placed before and after the title that's in the transition text // a character that is placed before and after the procedure title that's in the transition text
private LazyLoad<string> _DelimiterForTransitionTitle; private LazyLoad<string> _DelimiterForTransitionTitle;
public string DelimiterForTransitionTitle public string DelimiterForTransitionTitle
{ {
@@ -6673,7 +6758,9 @@ public StepData Equation // equation has a parent of embedded object.
} }
} }
// holdover from 16bit, used to define whether transitions are range (types 2 & 3). this is used in the logic for transitions with page numbers // Holdover from 16bit, used to define whether transitions are range (types 2 & 3).
// This is used in the logic for transitions with page numbers. This gets defined as "Type" in the code for the transition class.
// NOTE: the TransType you see in the code is actually the index into the list of transition definitions for given format.
private LazyLoad<int?> _Type; private LazyLoad<int?> _Type;
public int? Type public int? Type
{ {

View File

@@ -108,7 +108,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AnnotationID", true);
return _AnnotationID; return _AnnotationID;
} }
} }
@@ -118,7 +117,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("ItemID", true);
if (_MyItem != null) _ItemID = _MyItem.ItemID; if (_MyItem != null) _ItemID = _MyItem.ItemID;
return _ItemID; return _ItemID;
} }
@@ -129,14 +127,12 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("MyItem", true);
if (_MyItem == null && _ItemID != 0) _MyItem = Item.Get(_ItemID); if (_MyItem == null && _ItemID != 0) _MyItem = Item.Get(_ItemID);
return _MyItem; return _MyItem;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("MyItem", true);
if (_MyItem != value) if (_MyItem != value)
{ {
_MyItem = value; _MyItem = value;
@@ -151,7 +147,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("TypeID", true);
if (_MyAnnotationType != null) _TypeID = _MyAnnotationType.TypeID; if (_MyAnnotationType != null) _TypeID = _MyAnnotationType.TypeID;
return _TypeID; return _TypeID;
} }
@@ -162,14 +157,12 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("MyAnnotationType", true);
if (_MyAnnotationType == null && _TypeID != 0) _MyAnnotationType = AnnotationType.Get(_TypeID); if (_MyAnnotationType == null && _TypeID != 0) _MyAnnotationType = AnnotationType.Get(_TypeID);
return _MyAnnotationType; return _MyAnnotationType;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("MyAnnotationType", true);
if (_MyAnnotationType != value) if (_MyAnnotationType != value)
{ {
_MyAnnotationType = value; _MyAnnotationType = value;
@@ -184,13 +177,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("RtfText", true);
return _RtfText; return _RtfText;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("RtfText", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_RtfText != value) if (_RtfText != value)
{ {
@@ -205,13 +196,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("SearchText", true);
return _SearchText; return _SearchText;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("SearchText", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_SearchText != value) if (_SearchText != value)
{ {
@@ -226,13 +215,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Config", true);
return _Config; return _Config;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("Config", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_Config != value) if (_Config != value)
{ {
@@ -247,13 +234,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DTS", true);
return _DTS; return _DTS;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("DTS", true);
if (_DTS != value) if (_DTS != value)
{ {
_DTS = value; _DTS = value;
@@ -267,13 +252,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("UserID", true);
return _UserID; return _UserID;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("UserID", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_UserID != value) if (_UserID != value)
{ {

View File

@@ -106,7 +106,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AuditID", true);
return _AuditID; return _AuditID;
} }
} }
@@ -116,13 +115,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AnnotationID", true);
return _AnnotationID; return _AnnotationID;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("AnnotationID", true);
if (_AnnotationID != value) if (_AnnotationID != value)
{ {
_AnnotationID = value; _AnnotationID = value;
@@ -136,13 +133,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("ItemID", true);
return _ItemID; return _ItemID;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("ItemID", true);
if (_ItemID != value) if (_ItemID != value)
{ {
_ItemID = value; _ItemID = value;
@@ -156,13 +151,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("TypeID", true);
return _TypeID; return _TypeID;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("TypeID", true);
if (_TypeID != value) if (_TypeID != value)
{ {
_TypeID = value; _TypeID = value;
@@ -176,13 +169,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("RtfText", true);
return _RtfText; return _RtfText;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("RtfText", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_RtfText != value) if (_RtfText != value)
{ {
@@ -197,13 +188,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("SearchText", true);
return _SearchText; return _SearchText;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("SearchText", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_SearchText != value) if (_SearchText != value)
{ {
@@ -218,13 +207,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Config", true);
return _Config; return _Config;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("Config", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_Config != value) if (_Config != value)
{ {
@@ -239,13 +226,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DTS", true);
return _DTS; return _DTS;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("DTS", true);
if (_DTS != value) if (_DTS != value)
{ {
_DTS = value; _DTS = value;
@@ -259,13 +244,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("UserID", true);
return _UserID; return _UserID;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("UserID", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_UserID != value) if (_UserID != value)
{ {
@@ -280,13 +263,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DeleteStatus", true);
return _DeleteStatus; return _DeleteStatus;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("DeleteStatus", true);
if (_DeleteStatus != value) if (_DeleteStatus != value)
{ {
_DeleteStatus = value; _DeleteStatus = value;

View File

@@ -96,7 +96,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AuditID", true);
return _AuditID; return _AuditID;
} }
} }
@@ -106,7 +105,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AnnotationID", true);
return _AnnotationID; return _AnnotationID;
} }
} }
@@ -116,7 +114,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("ItemID", true);
return _ItemID; return _ItemID;
} }
} }
@@ -126,7 +123,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("TypeID", true);
return _TypeID; return _TypeID;
} }
} }
@@ -136,7 +132,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("RtfText", true);
return _RtfText; return _RtfText;
} }
} }
@@ -146,7 +141,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("SearchText", true);
return _SearchText; return _SearchText;
} }
} }
@@ -156,7 +150,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Config", true);
return _Config; return _Config;
} }
} }
@@ -166,7 +159,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DTS", true);
return _DTS; return _DTS;
} }
} }
@@ -176,7 +168,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("UserID", true);
return _UserID; return _UserID;
} }
} }
@@ -186,7 +177,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DeleteStatus", true);
return _DeleteStatus; return _DeleteStatus;
} }
} }

View File

@@ -109,7 +109,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AnnotationID", true);
return _AnnotationID; return _AnnotationID;
} }
} }
@@ -119,7 +118,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("ItemID", true);
if (_MyItem != null) _ItemID = _MyItem.ItemID; if (_MyItem != null) _ItemID = _MyItem.ItemID;
return _ItemID; return _ItemID;
} }
@@ -130,7 +128,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("MyItem", true);
if (_MyItem == null && _ItemID != 0) _MyItem = ItemInfo.Get(_ItemID); if (_MyItem == null && _ItemID != 0) _MyItem = ItemInfo.Get(_ItemID);
return _MyItem; return _MyItem;
} }
@@ -141,7 +138,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("TypeID", true);
if (_MyAnnotationType != null) _TypeID = _MyAnnotationType.TypeID; if (_MyAnnotationType != null) _TypeID = _MyAnnotationType.TypeID;
return _TypeID; return _TypeID;
} }
@@ -152,7 +148,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("MyAnnotationType", true);
if (_MyAnnotationType == null && _TypeID != 0) _MyAnnotationType = AnnotationTypeInfo.Get(_TypeID); if (_MyAnnotationType == null && _TypeID != 0) _MyAnnotationType = AnnotationTypeInfo.Get(_TypeID);
return _MyAnnotationType; return _MyAnnotationType;
} }
@@ -163,7 +158,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("RtfText", true);
return _RtfText; return _RtfText;
} }
} }
@@ -173,7 +167,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("SearchText", true);
return _SearchText; return _SearchText;
} }
} }
@@ -183,7 +176,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Config", true);
return _Config; return _Config;
} }
} }
@@ -193,7 +185,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DTS", true);
return _DTS; return _DTS;
} }
} }
@@ -203,7 +194,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("UserID", true);
return _UserID; return _UserID;
} }
} }

View File

@@ -129,7 +129,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("TypeID", true);
return _TypeID; return _TypeID;
} }
} }
@@ -139,13 +138,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Name", true);
return _Name; return _Name;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("Name", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_Name != value) if (_Name != value)
{ {
@@ -160,13 +157,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Config", true);
return _Config; return _Config;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("Config", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_Config != value) if (_Config != value)
{ {
@@ -181,13 +176,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DTS", true);
return _DTS; return _DTS;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("DTS", true);
if (_DTS != value) if (_DTS != value)
{ {
_DTS = value; _DTS = value;
@@ -201,13 +194,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("UserID", true);
return _UserID; return _UserID;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("UserID", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_UserID != value) if (_UserID != value)
{ {
@@ -226,7 +217,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AnnotationTypeAnnotationCount", true);
return _AnnotationTypeAnnotationCount; return _AnnotationTypeAnnotationCount;
} }
} }
@@ -240,7 +230,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AnnotationTypeAnnotations", true);
if (_AnnotationTypeAnnotationCount < 0 || (_AnnotationTypeAnnotationCount > 0 && _AnnotationTypeAnnotations == null)) if (_AnnotationTypeAnnotationCount < 0 || (_AnnotationTypeAnnotationCount > 0 && _AnnotationTypeAnnotations == null))
_AnnotationTypeAnnotations = AnnotationTypeAnnotations.GetByTypeID(TypeID); _AnnotationTypeAnnotations = AnnotationTypeAnnotations.GetByTypeID(TypeID);
if (_AnnotationTypeAnnotationCount < 0 ) if (_AnnotationTypeAnnotationCount < 0 )

View File

@@ -43,7 +43,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AnnotationID", true);
if (_MyAnnotation != null) _AnnotationID = _MyAnnotation.AnnotationID; if (_MyAnnotation != null) _AnnotationID = _MyAnnotation.AnnotationID;
return _AnnotationID; return _AnnotationID;
} }
@@ -55,7 +54,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("MyAnnotation", true);
if (_MyAnnotation == null && _AnnotationID != 0) _MyAnnotation = Annotation.Get(_AnnotationID); if (_MyAnnotation == null && _AnnotationID != 0) _MyAnnotation = Annotation.Get(_AnnotationID);
return _MyAnnotation; return _MyAnnotation;
} }
@@ -66,7 +64,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("ItemID", true);
if (_MyItem != null) _ItemID = _MyItem.ItemID; if (_MyItem != null) _ItemID = _MyItem.ItemID;
return _ItemID; return _ItemID;
} }
@@ -77,14 +74,12 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("MyItem", true);
if (_MyItem == null && _ItemID != 0) _MyItem = Item.Get(_ItemID); if (_MyItem == null && _ItemID != 0) _MyItem = Item.Get(_ItemID);
return _MyItem; return _MyItem;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("MyItem", true);
if (_MyItem != value) if (_MyItem != value)
{ {
_MyItem = value; _MyItem = value;
@@ -99,13 +94,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("RtfText", true);
return _RtfText; return _RtfText;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("RtfText", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_RtfText != value) if (_RtfText != value)
{ {
@@ -120,13 +113,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("SearchText", true);
return _SearchText; return _SearchText;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("SearchText", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_SearchText != value) if (_SearchText != value)
{ {
@@ -141,13 +132,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Config", true);
return _Config; return _Config;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("Config", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_Config != value) if (_Config != value)
{ {
@@ -162,13 +151,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DTS", true);
return _DTS; return _DTS;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("DTS", true);
if (_DTS != value) if (_DTS != value)
{ {
_DTS = value; _DTS = value;
@@ -182,13 +169,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("UserID", true);
return _UserID; return _UserID;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("UserID", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_UserID != value) if (_UserID != value)
{ {
@@ -204,7 +189,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Item_PreviousID", true);
return _Item_PreviousID; return _Item_PreviousID;
} }
} }
@@ -214,7 +198,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Item_ContentID", true);
return _Item_ContentID; return _Item_ContentID;
} }
} }
@@ -224,7 +207,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Item_DTS", true);
return _Item_DTS; return _Item_DTS;
} }
} }
@@ -234,7 +216,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Item_UserID", true);
return _Item_UserID; return _Item_UserID;
} }
} }

View File

@@ -96,7 +96,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("TypeID", true);
return _TypeID; return _TypeID;
} }
} }
@@ -106,7 +105,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Name", true);
return _Name; return _Name;
} }
} }
@@ -116,7 +114,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Config", true);
return _Config; return _Config;
} }
} }
@@ -126,7 +123,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DTS", true);
return _DTS; return _DTS;
} }
} }
@@ -136,7 +132,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("UserID", true);
return _UserID; return _UserID;
} }
} }
@@ -149,7 +144,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AnnotationTypeAnnotationCount", true);
if (_AnnotationTypeAnnotationCount < 0) if (_AnnotationTypeAnnotationCount < 0)
_AnnotationTypeAnnotationCount = AnnotationTypeAnnotations.Count; _AnnotationTypeAnnotationCount = AnnotationTypeAnnotations.Count;
return _AnnotationTypeAnnotationCount; return _AnnotationTypeAnnotationCount;
@@ -162,7 +156,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AnnotationTypeAnnotations", true);
if (_AnnotationTypeAnnotationCount < 0 || (_AnnotationTypeAnnotationCount > 0 && _AnnotationTypeAnnotations == null)) if (_AnnotationTypeAnnotationCount < 0 || (_AnnotationTypeAnnotationCount > 0 && _AnnotationTypeAnnotations == null))
_AnnotationTypeAnnotations = AnnotationInfoList.GetByTypeID(_TypeID); _AnnotationTypeAnnotations = AnnotationInfoList.GetByTypeID(_TypeID);
if (_AnnotationTypeAnnotationCount < 0) if (_AnnotationTypeAnnotationCount < 0)

View File

@@ -109,7 +109,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AID", true);
return _AID; return _AID;
} }
} }
@@ -119,7 +118,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("GID", true);
if (_MyGroup != null) _GID = _MyGroup.GID; if (_MyGroup != null) _GID = _MyGroup.GID;
return _GID; return _GID;
} }
@@ -130,14 +128,12 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("MyGroup", true);
if (_MyGroup == null && _GID != 0) _MyGroup = Group.Get(_GID); if (_MyGroup == null && _GID != 0) _MyGroup = Group.Get(_GID);
return _MyGroup; return _MyGroup;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("MyGroup", true);
if (_MyGroup != value) if (_MyGroup != value)
{ {
_MyGroup = value; _MyGroup = value;
@@ -152,7 +148,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("RID", true);
if (_MyRole != null) _RID = _MyRole.RID; if (_MyRole != null) _RID = _MyRole.RID;
return _RID; return _RID;
} }
@@ -163,14 +158,12 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("MyRole", true);
if (_MyRole == null && _RID != 0) _MyRole = Role.Get(_RID); if (_MyRole == null && _RID != 0) _MyRole = Role.Get(_RID);
return _MyRole; return _MyRole;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("MyRole", true);
if (_MyRole != value) if (_MyRole != value)
{ {
_MyRole = value; _MyRole = value;
@@ -185,7 +178,6 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("FolderID", true);
if (_MyFolder != null) _FolderID = _MyFolder.FolderID; if (_MyFolder != null) _FolderID = _MyFolder.FolderID;
return _FolderID; return _FolderID;
} }
@@ -196,14 +188,12 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("MyFolder", true);
if (_MyFolder == null && _FolderID != 0) _MyFolder = Folder.Get(_FolderID); if (_MyFolder == null && _FolderID != 0) _MyFolder = Folder.Get(_FolderID);
return _MyFolder; return _MyFolder;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("MyFolder", true);
if (_MyFolder != value) if (_MyFolder != value)
{ {
_MyFolder = value; _MyFolder = value;
@@ -218,13 +208,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("StartDate", true);
return _StartDate; return _StartDate;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("StartDate", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
_StartDate = value; _StartDate = value;
try try
@@ -248,13 +236,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("EndDate", true);
return _EndDate; return _EndDate;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("EndDate", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
_EndDate = value; _EndDate = value;
try try
@@ -278,13 +264,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DTS", true);
return _DTS; return _DTS;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("DTS", true);
if (_DTS != value) if (_DTS != value)
{ {
_DTS = value; _DTS = value;
@@ -298,13 +282,11 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("UsrID", true);
return _UsrID; return _UsrID;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("UsrID", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_UsrID != value) if (_UsrID != value)
{ {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -19,432 +19,424 @@ using System.ComponentModel;
using System.Collections.Generic; using System.Collections.Generic;
namespace VEPROMS.CSLA.Library namespace VEPROMS.CSLA.Library
{ {
public delegate void AssociationInfoEvent(object sender); public delegate void AssociationInfoEvent(object sender);
/// <summary> /// <summary>
/// AssociationInfo Generated by MyGeneration using the CSLA Object Mapping template /// AssociationInfo Generated by MyGeneration using the CSLA Object Mapping template
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(AssociationInfoConverter))] [TypeConverter(typeof(AssociationInfoConverter))]
public partial class AssociationInfo : ReadOnlyBase<AssociationInfo>, IDisposable public partial class AssociationInfo : ReadOnlyBase<AssociationInfo>, IDisposable
{ {
public event AssociationInfoEvent Changed; public event AssociationInfoEvent Changed;
private void OnChange() private void OnChange()
{ {
if (Changed != null) Changed(this); if (Changed != null) Changed(this);
} }
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion #endregion
#region Collection #region Collection
private static List<AssociationInfo> _CacheList = new List<AssociationInfo>(); private static List<AssociationInfo> _CacheList = new List<AssociationInfo>();
protected static void AddToCache(AssociationInfo associationInfo) protected static void AddToCache(AssociationInfo associationInfo)
{ {
if (!_CacheList.Contains(associationInfo)) _CacheList.Add(associationInfo); // In AddToCache if (!_CacheList.Contains(associationInfo)) _CacheList.Add(associationInfo); // In AddToCache
} }
protected static void RemoveFromCache(AssociationInfo associationInfo) protected static void RemoveFromCache(AssociationInfo associationInfo)
{ {
while (_CacheList.Contains(associationInfo)) _CacheList.Remove(associationInfo); // In RemoveFromCache while (_CacheList.Contains(associationInfo)) _CacheList.Remove(associationInfo); // In RemoveFromCache
} }
private static Dictionary<string, List<AssociationInfo>> _CacheByPrimaryKey = new Dictionary<string, List<AssociationInfo>>(); private static Dictionary<string, List<AssociationInfo>> _CacheByPrimaryKey = new Dictionary<string, List<AssociationInfo>>();
private static void ConvertListToDictionary() private static void ConvertListToDictionary()
{ {
while (_CacheList.Count > 0) // Move AssociationInfo(s) from temporary _CacheList to _CacheByPrimaryKey while (_CacheList.Count > 0) // Move AssociationInfo(s) from temporary _CacheList to _CacheByPrimaryKey
{ {
AssociationInfo tmp = _CacheList[0]; // Get the first AssociationInfo AssociationInfo tmp = _CacheList[0]; // Get the first AssociationInfo
string pKey = tmp.AssociationID.ToString(); string pKey = tmp.AssociationID.ToString();
if (!_CacheByPrimaryKey.ContainsKey(pKey)) if (!_CacheByPrimaryKey.ContainsKey(pKey))
{ {
_CacheByPrimaryKey[pKey] = new List<AssociationInfo>(); // Add new list for PrimaryKey _CacheByPrimaryKey[pKey] = new List<AssociationInfo>(); // Add new list for PrimaryKey
} }
_CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list _CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list
_CacheList.RemoveAt(0); // Remove the first AssociationInfo _CacheList.RemoveAt(0); // Remove the first AssociationInfo
} }
} }
internal static void AddList(AssociationInfoList lst) internal static void AddList(AssociationInfoList lst)
{ {
foreach (AssociationInfo item in lst) AddToCache(item); foreach (AssociationInfo item in lst) AddToCache(item);
} }
protected static AssociationInfo GetCachedByPrimaryKey(int associationID) protected static AssociationInfo GetCachedByPrimaryKey(int associationID)
{ {
ConvertListToDictionary(); ConvertListToDictionary();
string key = associationID.ToString(); string key = associationID.ToString();
if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0]; if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0];
return null; return null;
} }
#endregion #endregion
#region Business Methods #region Business Methods
private string _ErrorMessage = string.Empty; private string _ErrorMessage = string.Empty;
public string ErrorMessage public string ErrorMessage
{ {
get { return _ErrorMessage; } get { return _ErrorMessage; }
} }
protected Association _Editable; protected Association _Editable;
private IVEHasBrokenRules HasBrokenRules private IVEHasBrokenRules HasBrokenRules
{ {
get get
{ {
IVEHasBrokenRules hasBrokenRules = null; IVEHasBrokenRules hasBrokenRules = null;
if (_Editable != null) if (_Editable != null)
hasBrokenRules = _Editable.HasBrokenRules; hasBrokenRules = _Editable.HasBrokenRules;
return hasBrokenRules; return hasBrokenRules;
} }
} }
private int _AssociationID; private int _AssociationID;
[System.ComponentModel.DataObjectField(true, true)] [System.ComponentModel.DataObjectField(true, true)]
public int AssociationID public int AssociationID
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AssociationID", true); return _AssociationID;
return _AssociationID; }
} }
} private int _VersionID;
private int _VersionID; public int VersionID
public int VersionID {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get
get {
{ if (_MyDocVersion != null) _VersionID = _MyDocVersion.VersionID;
CanReadProperty("VersionID", true); return _VersionID;
if (_MyDocVersion != null) _VersionID = _MyDocVersion.VersionID; }
return _VersionID; }
} private DocVersionInfo _MyDocVersion;
} public DocVersionInfo MyDocVersion
private DocVersionInfo _MyDocVersion; {
public DocVersionInfo MyDocVersion [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get if (_MyDocVersion == null && _VersionID != 0) _MyDocVersion = DocVersionInfo.Get(_VersionID);
{ return _MyDocVersion;
CanReadProperty("MyDocVersion", true); }
if (_MyDocVersion == null && _VersionID != 0) _MyDocVersion = DocVersionInfo.Get(_VersionID); }
return _MyDocVersion; private int _ROFstID;
} public int ROFstID
} {
private int _ROFstID; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
public int ROFstID get
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] if (_MyROFst != null) _ROFstID = _MyROFst.ROFstID;
get return _ROFstID;
{ }
CanReadProperty("ROFstID", true); }
if (_MyROFst != null) _ROFstID = _MyROFst.ROFstID; private ROFstInfo _MyROFst;
return _ROFstID; public ROFstInfo MyROFst
} {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
private ROFstInfo _MyROFst; get
public ROFstInfo MyROFst {
{ //if (_MyROFst == null && _ROFstID != 0) _MyROFst = ROFstInfo.Get(_ROFstID);
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] if (_MyROFst == null && _ROFstID != 0) _MyROFst = ROFstInfo.GetJustROFst(_ROFstID);// Improve performance by not loading all ROImages
get return _MyROFst;
{ }
CanReadProperty("MyROFst", true); }
//if (_MyROFst == null && _ROFstID != 0) _MyROFst = ROFstInfo.Get(_ROFstID); private string _Config = string.Empty;
if (_MyROFst == null && _ROFstID != 0) _MyROFst = ROFstInfo.GetJustROFst(_ROFstID);// Improve performance by not loading all ROImages public string Config
return _MyROFst; {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
private string _Config = string.Empty; {
public string Config return _Config;
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get private DateTime _DTS = new DateTime();
{ public DateTime DTS
CanReadProperty("Config", true); {
return _Config; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
} {
private DateTime _DTS = new DateTime(); return _DTS;
public DateTime DTS }
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] private string _UserID = string.Empty;
get public string UserID
{ {
CanReadProperty("DTS", true); [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
return _DTS; get
} {
} return _UserID;
private string _UserID = string.Empty; }
public string UserID }
{ // CSLATODO: Replace base AssociationInfo.ToString function as necessary
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] /// <summary>
get /// Overrides Base ToString
{ /// </summary>
CanReadProperty("UserID", true); /// <returns>A string representation of current AssociationInfo</returns>
return _UserID; //public override string ToString()
} //{
} // return base.ToString();
// CSLATODO: Replace base AssociationInfo.ToString function as necessary //}
/// <summary> // CSLATODO: Check AssociationInfo.GetIdValue to assure that the ID returned is unique
/// Overrides Base ToString /// <summary>
/// </summary> /// Overrides Base GetIdValue - Used internally by CSLA to determine equality
/// <returns>A string representation of current AssociationInfo</returns> /// </summary>
//public override string ToString() /// <returns>A Unique ID for the current AssociationInfo</returns>
//{ protected override object GetIdValue()
// return base.ToString(); {
//} return MyAssociationInfoUnique; // Absolutely Unique ID
// CSLATODO: Check AssociationInfo.GetIdValue to assure that the ID returned is unique }
/// <summary> #endregion
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality #region Factory Methods
/// </summary> private static int _AssociationInfoUnique = 0;
/// <returns>A Unique ID for the current AssociationInfo</returns> private static int AssociationInfoUnique
protected override object GetIdValue() { get { return ++_AssociationInfoUnique; } }
{ private int _MyAssociationInfoUnique = AssociationInfoUnique;
return MyAssociationInfoUnique; // Absolutely Unique ID public int MyAssociationInfoUnique // Absolutely Unique ID - Info
} { get { return _MyAssociationInfoUnique; } }
#endregion protected AssociationInfo()
#region Factory Methods {/* require use of factory methods */
private static int _AssociationInfoUnique = 0; AddToCache(this);
private static int AssociationInfoUnique }
{ get { return ++_AssociationInfoUnique; } } private bool _Disposed = false;
private int _MyAssociationInfoUnique = AssociationInfoUnique; private static int _CountCreated = 0;
public int MyAssociationInfoUnique // Absolutely Unique ID - Info private static int _CountDisposed = 0;
{ get { return _MyAssociationInfoUnique; } } private static int _CountFinalized = 0;
protected AssociationInfo() private static int IncrementCountCreated
{/* require use of factory methods */ { get { return ++_CountCreated; } }
AddToCache(this); private int _CountWhenCreated = IncrementCountCreated;
} public static int CountCreated
private bool _Disposed = false; { get { return _CountCreated; } }
private static int _CountCreated = 0; public static int CountNotDisposed
private static int _CountDisposed = 0; { get { return _CountCreated - _CountDisposed; } }
private static int _CountFinalized = 0; public static int CountNotFinalized
private static int IncrementCountCreated { get { return _CountCreated - _CountFinalized; } }
{ get { return ++_CountCreated; } } ~AssociationInfo()
private int _CountWhenCreated = IncrementCountCreated; {
public static int CountCreated _CountFinalized++;
{ get { return _CountCreated; } } }
public static int CountNotDisposed public void Dispose()
{ get { return _CountCreated - _CountDisposed; } } {
public static int CountNotFinalized if (_Disposed) return;
{ get { return _CountCreated - _CountFinalized; } } _CountDisposed++;
~AssociationInfo() _Disposed = true;
{ RemoveFromCache(this);
_CountFinalized++; if (!_CacheByPrimaryKey.ContainsKey(AssociationID.ToString())) return;
} List<AssociationInfo> listAssociationInfo = _CacheByPrimaryKey[AssociationID.ToString()]; // Get the list of items
public void Dispose() while (listAssociationInfo.Contains(this)) listAssociationInfo.Remove(this); // Remove the item from the list
{ if (listAssociationInfo.Count == 0) // If there are no items left in the list
if (_Disposed) return; _CacheByPrimaryKey.Remove(AssociationID.ToString()); // remove the list
_CountDisposed++; }
_Disposed = true; public virtual Association Get()
RemoveFromCache(this); {
if (!_CacheByPrimaryKey.ContainsKey(AssociationID.ToString())) return; return _Editable = Association.Get(_AssociationID);
List<AssociationInfo> listAssociationInfo = _CacheByPrimaryKey[AssociationID.ToString()]; // Get the list of items }
while (listAssociationInfo.Contains(this)) listAssociationInfo.Remove(this); // Remove the item from the list public static void Refresh(Association tmp)
if (listAssociationInfo.Count == 0) // If there are no items left in the list {
_CacheByPrimaryKey.Remove(AssociationID.ToString()); // remove the list string key = tmp.AssociationID.ToString();
} ConvertListToDictionary();
public virtual Association Get() if (_CacheByPrimaryKey.ContainsKey(key))
{ foreach (AssociationInfo tmpInfo in _CacheByPrimaryKey[key])
return _Editable = Association.Get(_AssociationID); tmpInfo.RefreshFields(tmp);
} }
public static void Refresh(Association tmp) protected virtual void RefreshFields(Association tmp)
{ {
string key = tmp.AssociationID.ToString(); if (_VersionID != tmp.VersionID)
ConvertListToDictionary(); {
if (_CacheByPrimaryKey.ContainsKey(key)) if (MyDocVersion != null) MyDocVersion.RefreshDocVersionAssociations(); // Update List for old value
foreach (AssociationInfo tmpInfo in _CacheByPrimaryKey[key]) _VersionID = tmp.VersionID; // Update the value
tmpInfo.RefreshFields(tmp); }
} _MyDocVersion = null; // Reset list so that the next line gets a new list
protected virtual void RefreshFields(Association tmp) if (MyDocVersion != null) MyDocVersion.RefreshDocVersionAssociations(); // Update List for new value
{ if (_ROFstID != tmp.ROFstID)
if (_VersionID != tmp.VersionID) {
{ if (MyROFst != null) MyROFst.RefreshROFstAssociations(); // Update List for old value
if (MyDocVersion != null) MyDocVersion.RefreshDocVersionAssociations(); // Update List for old value _ROFstID = tmp.ROFstID; // Update the value
_VersionID = tmp.VersionID; // Update the value }
} _MyROFst = null; // Reset list so that the next line gets a new list
_MyDocVersion = null; // Reset list so that the next line gets a new list if (MyROFst != null) MyROFst.RefreshROFstAssociations(); // Update List for new value
if (MyDocVersion != null) MyDocVersion.RefreshDocVersionAssociations(); // Update List for new value _Config = tmp.Config;
if (_ROFstID != tmp.ROFstID) _DTS = tmp.DTS;
{ _UserID = tmp.UserID;
if (MyROFst != null) MyROFst.RefreshROFstAssociations(); // Update List for old value _AssociationInfoExtension.Refresh(this);
_ROFstID = tmp.ROFstID; // Update the value OnChange();// raise an event
} }
_MyROFst = null; // Reset list so that the next line gets a new list public static void Refresh(DocVersionAssociation tmp)
if (MyROFst != null) MyROFst.RefreshROFstAssociations(); // Update List for new value {
_Config = tmp.Config; string key = tmp.AssociationID.ToString();
_DTS = tmp.DTS; ConvertListToDictionary();
_UserID = tmp.UserID; if (_CacheByPrimaryKey.ContainsKey(key))
_AssociationInfoExtension.Refresh(this); foreach (AssociationInfo tmpInfo in _CacheByPrimaryKey[key])
OnChange();// raise an event tmpInfo.RefreshFields(tmp);
} }
public static void Refresh(DocVersionAssociation tmp) protected virtual void RefreshFields(DocVersionAssociation tmp)
{ {
string key = tmp.AssociationID.ToString(); if (_ROFstID != tmp.ROFstID)
ConvertListToDictionary(); {
if (_CacheByPrimaryKey.ContainsKey(key)) if (MyROFst != null) MyROFst.RefreshROFstAssociations(); // Update List for old value
foreach (AssociationInfo tmpInfo in _CacheByPrimaryKey[key]) _ROFstID = tmp.ROFstID; // Update the value
tmpInfo.RefreshFields(tmp); }
} _MyROFst = null; // Reset list so that the next line gets a new list
protected virtual void RefreshFields(DocVersionAssociation tmp) if (MyROFst != null) MyROFst.RefreshROFstAssociations(); // Update List for new value
{ _Config = tmp.Config;
if (_ROFstID != tmp.ROFstID) _DTS = tmp.DTS;
{ _UserID = tmp.UserID;
if (MyROFst != null) MyROFst.RefreshROFstAssociations(); // Update List for old value _AssociationInfoExtension.Refresh(this);
_ROFstID = tmp.ROFstID; // Update the value OnChange();// raise an event
} }
_MyROFst = null; // Reset list so that the next line gets a new list public static void Refresh(ROFstAssociation tmp)
if (MyROFst != null) MyROFst.RefreshROFstAssociations(); // Update List for new value {
_Config = tmp.Config; string key = tmp.AssociationID.ToString();
_DTS = tmp.DTS; ConvertListToDictionary();
_UserID = tmp.UserID; if (_CacheByPrimaryKey.ContainsKey(key))
_AssociationInfoExtension.Refresh(this); foreach (AssociationInfo tmpInfo in _CacheByPrimaryKey[key])
OnChange();// raise an event tmpInfo.RefreshFields(tmp);
} }
public static void Refresh(ROFstAssociation tmp) protected virtual void RefreshFields(ROFstAssociation tmp)
{ {
string key = tmp.AssociationID.ToString(); if (_VersionID != tmp.VersionID)
ConvertListToDictionary(); {
if (_CacheByPrimaryKey.ContainsKey(key)) if (MyDocVersion != null) MyDocVersion.RefreshDocVersionAssociations(); // Update List for old value
foreach (AssociationInfo tmpInfo in _CacheByPrimaryKey[key]) _VersionID = tmp.VersionID; // Update the value
tmpInfo.RefreshFields(tmp); }
} _MyDocVersion = null; // Reset list so that the next line gets a new list
protected virtual void RefreshFields(ROFstAssociation tmp) if (MyDocVersion != null) MyDocVersion.RefreshDocVersionAssociations(); // Update List for new value
{ _Config = tmp.Config;
if (_VersionID != tmp.VersionID) _DTS = tmp.DTS;
{ _UserID = tmp.UserID;
if (MyDocVersion != null) MyDocVersion.RefreshDocVersionAssociations(); // Update List for old value _AssociationInfoExtension.Refresh(this);
_VersionID = tmp.VersionID; // Update the value OnChange();// raise an event
} }
_MyDocVersion = null; // Reset list so that the next line gets a new list public static AssociationInfo Get(int associationID)
if (MyDocVersion != null) MyDocVersion.RefreshDocVersionAssociations(); // Update List for new value {
_Config = tmp.Config; //if (!CanGetObject())
_DTS = tmp.DTS; // throw new System.Security.SecurityException("User not authorized to view a Association");
_UserID = tmp.UserID; try
_AssociationInfoExtension.Refresh(this); {
OnChange();// raise an event AssociationInfo tmp = GetCachedByPrimaryKey(associationID);
} if (tmp == null)
public static AssociationInfo Get(int associationID) {
{ tmp = DataPortal.Fetch<AssociationInfo>(new PKCriteria(associationID));
//if (!CanGetObject()) AddToCache(tmp);
// throw new System.Security.SecurityException("User not authorized to view a Association"); }
try if (tmp.ErrorMessage == "No Record Found")
{ {
AssociationInfo tmp = GetCachedByPrimaryKey(associationID); tmp.Dispose(); // Clean-up AssociationInfo
if (tmp == null) tmp = null;
{ }
tmp = DataPortal.Fetch<AssociationInfo>(new PKCriteria(associationID)); return tmp;
AddToCache(tmp); }
} catch (Exception ex)
if (tmp.ErrorMessage == "No Record Found") {
{ throw new DbCslaException("Error on AssociationInfo.Get", ex);
tmp.Dispose(); // Clean-up AssociationInfo }
tmp = null; }
} #endregion
return tmp; #region Data Access Portal
} internal AssociationInfo(SafeDataReader dr)
catch (Exception ex) {
{ if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AssociationInfo.Constructor", GetHashCode());
throw new DbCslaException("Error on AssociationInfo.Get", ex); try
} {
} ReadData(dr);
#endregion }
#region Data Access Portal catch (Exception ex)
internal AssociationInfo(SafeDataReader dr) {
{ if (_MyLog.IsErrorEnabled) _MyLog.Error("AssociationInfo.Constructor", ex);
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AssociationInfo.Constructor", GetHashCode()); throw new DbCslaException("AssociationInfo.Constructor", ex);
try }
{ }
ReadData(dr); [Serializable()]
} protected class PKCriteria
catch (Exception ex) {
{ private int _AssociationID;
if (_MyLog.IsErrorEnabled) _MyLog.Error("AssociationInfo.Constructor", ex); public int AssociationID
throw new DbCslaException("AssociationInfo.Constructor", ex); { get { return _AssociationID; } }
} public PKCriteria(int associationID)
} {
[Serializable()] _AssociationID = associationID;
protected class PKCriteria }
{ }
private int _AssociationID; private void ReadData(SafeDataReader dr)
public int AssociationID {
{ get { return _AssociationID; } } if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AssociationInfo.ReadData", GetHashCode());
public PKCriteria(int associationID) try
{ {
_AssociationID = associationID; _AssociationID = dr.GetInt32("AssociationID");
} _VersionID = dr.GetInt32("VersionID");
} _ROFstID = dr.GetInt32("ROFstID");
private void ReadData(SafeDataReader dr) _Config = dr.GetString("Config");
{ _DTS = dr.GetDateTime("DTS");
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AssociationInfo.ReadData", GetHashCode()); _UserID = dr.GetString("UserID");
try }
{ catch (Exception ex)
_AssociationID = dr.GetInt32("AssociationID"); {
_VersionID = dr.GetInt32("VersionID"); if (_MyLog.IsErrorEnabled) _MyLog.Error("AssociationInfo.ReadData", ex);
_ROFstID = dr.GetInt32("ROFstID"); _ErrorMessage = ex.Message;
_Config = dr.GetString("Config"); throw new DbCslaException("AssociationInfo.ReadData", ex);
_DTS = dr.GetDateTime("DTS"); }
_UserID = dr.GetString("UserID"); }
} private void DataPortal_Fetch(PKCriteria criteria)
catch (Exception ex) {
{ if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AssociationInfo.DataPortal_Fetch", GetHashCode());
if (_MyLog.IsErrorEnabled) _MyLog.Error("AssociationInfo.ReadData", ex); try
_ErrorMessage = ex.Message; {
throw new DbCslaException("AssociationInfo.ReadData", ex); using (SqlConnection cn = Database.VEPROMS_SqlConnection)
} {
} ApplicationContext.LocalContext["cn"] = cn;
private void DataPortal_Fetch(PKCriteria criteria) using (SqlCommand cm = cn.CreateCommand())
{ {
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AssociationInfo.DataPortal_Fetch", GetHashCode()); cm.CommandType = CommandType.StoredProcedure;
try cm.CommandText = "getAssociation";
{ cm.Parameters.AddWithValue("@AssociationID", criteria.AssociationID);
using (SqlConnection cn = Database.VEPROMS_SqlConnection) cm.CommandTimeout = Database.DefaultTimeout;
{ using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
ApplicationContext.LocalContext["cn"] = cn; {
using (SqlCommand cm = cn.CreateCommand()) if (!dr.Read())
{ {
cm.CommandType = CommandType.StoredProcedure; _ErrorMessage = "No Record Found";
cm.CommandText = "getAssociation"; return;
cm.Parameters.AddWithValue("@AssociationID", criteria.AssociationID); }
cm.CommandTimeout = Database.DefaultTimeout; ReadData(dr);
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) }
{ }
if (!dr.Read()) // removing of item only needed for local data portal
{ if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client)
_ErrorMessage = "No Record Found"; ApplicationContext.LocalContext.Remove("cn");
return; }
} }
ReadData(dr); catch (Exception ex)
} {
} if (_MyLog.IsErrorEnabled) _MyLog.Error("AssociationInfo.DataPortal_Fetch", ex);
// removing of item only needed for local data portal _ErrorMessage = ex.Message;
if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client) throw new DbCslaException("AssociationInfo.DataPortal_Fetch", ex);
ApplicationContext.LocalContext.Remove("cn"); }
} }
} #endregion
catch (Exception ex) // Standard Refresh
{ #region extension
if (_MyLog.IsErrorEnabled) _MyLog.Error("AssociationInfo.DataPortal_Fetch", ex); AssociationInfoExtension _AssociationInfoExtension = new AssociationInfoExtension();
_ErrorMessage = ex.Message; [Serializable()]
throw new DbCslaException("AssociationInfo.DataPortal_Fetch", ex); partial class AssociationInfoExtension : extensionBase { }
} [Serializable()]
} class extensionBase
#endregion {
// Standard Refresh // Default Refresh
#region extension public virtual void Refresh(AssociationInfo tmp) { }
AssociationInfoExtension _AssociationInfoExtension = new AssociationInfoExtension(); }
[Serializable()] #endregion
partial class AssociationInfoExtension : extensionBase { } } // Class
[Serializable()] #region Converter
class extensionBase internal class AssociationInfoConverter : ExpandableObjectConverter
{ {
// Default Refresh public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
public virtual void Refresh(AssociationInfo tmp) { } {
} if (destType == typeof(string) && value is AssociationInfo)
#endregion {
} // Class // Return the ToString value
#region Converter return ((AssociationInfo)value).ToString();
internal class AssociationInfoConverter : ExpandableObjectConverter }
{ return base.ConvertTo(context, culture, value, destType);
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType) }
{ }
if (destType == typeof(string) && value is AssociationInfo) #endregion
{
// Return the ToString value
return ((AssociationInfo)value).ToString();
}
return base.ConvertTo(context, culture, value, destType);
}
}
#endregion
} // Namespace } // Namespace

File diff suppressed because it is too large Load Diff

View File

@@ -19,431 +19,423 @@ using System.ComponentModel;
using System.Collections.Generic; using System.Collections.Generic;
namespace VEPROMS.CSLA.Library namespace VEPROMS.CSLA.Library
{ {
public delegate void CheckInfoEvent(object sender); public delegate void CheckInfoEvent(object sender);
/// <summary> /// <summary>
/// CheckInfo Generated by MyGeneration using the CSLA Object Mapping template /// CheckInfo Generated by MyGeneration using the CSLA Object Mapping template
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(CheckInfoConverter))] [TypeConverter(typeof(CheckInfoConverter))]
public partial class CheckInfo : ReadOnlyBase<CheckInfo>, IDisposable public partial class CheckInfo : ReadOnlyBase<CheckInfo>, IDisposable
{ {
public event CheckInfoEvent Changed; public event CheckInfoEvent Changed;
private void OnChange() private void OnChange()
{ {
if (Changed != null) Changed(this); if (Changed != null) Changed(this);
} }
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion #endregion
#region Collection #region Collection
private static List<CheckInfo> _CacheList = new List<CheckInfo>(); private static List<CheckInfo> _CacheList = new List<CheckInfo>();
protected static void AddToCache(CheckInfo checkInfo) protected static void AddToCache(CheckInfo checkInfo)
{ {
if (!_CacheList.Contains(checkInfo)) _CacheList.Add(checkInfo); // In AddToCache if (!_CacheList.Contains(checkInfo)) _CacheList.Add(checkInfo); // In AddToCache
} }
protected static void RemoveFromCache(CheckInfo checkInfo) protected static void RemoveFromCache(CheckInfo checkInfo)
{ {
while (_CacheList.Contains(checkInfo)) _CacheList.Remove(checkInfo); // In RemoveFromCache while (_CacheList.Contains(checkInfo)) _CacheList.Remove(checkInfo); // In RemoveFromCache
} }
private static Dictionary<string, List<CheckInfo>> _CacheByPrimaryKey = new Dictionary<string, List<CheckInfo>>(); private static Dictionary<string, List<CheckInfo>> _CacheByPrimaryKey = new Dictionary<string, List<CheckInfo>>();
private static void ConvertListToDictionary() private static void ConvertListToDictionary()
{ {
while (_CacheList.Count > 0) // Move CheckInfo(s) from temporary _CacheList to _CacheByPrimaryKey while (_CacheList.Count > 0) // Move CheckInfo(s) from temporary _CacheList to _CacheByPrimaryKey
{ {
CheckInfo tmp = _CacheList[0]; // Get the first CheckInfo CheckInfo tmp = _CacheList[0]; // Get the first CheckInfo
string pKey = tmp.CheckID.ToString(); string pKey = tmp.CheckID.ToString();
if (!_CacheByPrimaryKey.ContainsKey(pKey)) if (!_CacheByPrimaryKey.ContainsKey(pKey))
{ {
_CacheByPrimaryKey[pKey] = new List<CheckInfo>(); // Add new list for PrimaryKey _CacheByPrimaryKey[pKey] = new List<CheckInfo>(); // Add new list for PrimaryKey
} }
_CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list _CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list
_CacheList.RemoveAt(0); // Remove the first CheckInfo _CacheList.RemoveAt(0); // Remove the first CheckInfo
} }
} }
internal static void AddList(CheckInfoList lst) internal static void AddList(CheckInfoList lst)
{ {
foreach (CheckInfo item in lst) AddToCache(item); foreach (CheckInfo item in lst) AddToCache(item);
} }
protected static CheckInfo GetCachedByPrimaryKey(int checkID) protected static CheckInfo GetCachedByPrimaryKey(int checkID)
{ {
ConvertListToDictionary(); ConvertListToDictionary();
string key = checkID.ToString(); string key = checkID.ToString();
if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0]; if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0];
return null; return null;
} }
#endregion #endregion
#region Business Methods #region Business Methods
private string _ErrorMessage = string.Empty; private string _ErrorMessage = string.Empty;
public string ErrorMessage public string ErrorMessage
{ {
get { return _ErrorMessage; } get { return _ErrorMessage; }
} }
protected Check _Editable; protected Check _Editable;
private IVEHasBrokenRules HasBrokenRules private IVEHasBrokenRules HasBrokenRules
{ {
get get
{ {
IVEHasBrokenRules hasBrokenRules = null; IVEHasBrokenRules hasBrokenRules = null;
if (_Editable != null) if (_Editable != null)
hasBrokenRules = _Editable.HasBrokenRules; hasBrokenRules = _Editable.HasBrokenRules;
return hasBrokenRules; return hasBrokenRules;
} }
} }
private int _CheckID; private int _CheckID;
[System.ComponentModel.DataObjectField(true, true)] [System.ComponentModel.DataObjectField(true, true)]
public int CheckID public int CheckID
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("CheckID", true); return _CheckID;
return _CheckID; }
} }
} private int _RevisionID;
private int _RevisionID; public int RevisionID
public int RevisionID {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get
get {
{ if (_MyRevision != null) _RevisionID = _MyRevision.RevisionID;
CanReadProperty("RevisionID", true); return _RevisionID;
if (_MyRevision != null) _RevisionID = _MyRevision.RevisionID; }
return _RevisionID; }
} private RevisionInfo _MyRevision;
} public RevisionInfo MyRevision
private RevisionInfo _MyRevision; {
public RevisionInfo MyRevision [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get if (_MyRevision == null && _RevisionID != 0) _MyRevision = RevisionInfo.Get(_RevisionID);
{ return _MyRevision;
CanReadProperty("MyRevision", true); }
if (_MyRevision == null && _RevisionID != 0) _MyRevision = RevisionInfo.Get(_RevisionID); }
return _MyRevision; private int _StageID;
} public int StageID
} {
private int _StageID; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
public int StageID get
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] if (_MyStage != null) _StageID = _MyStage.StageID;
get return _StageID;
{ }
CanReadProperty("StageID", true); }
if (_MyStage != null) _StageID = _MyStage.StageID; private StageInfo _MyStage;
return _StageID; public StageInfo MyStage
} {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
private StageInfo _MyStage; get
public StageInfo MyStage {
{ if (_MyStage == null && _StageID != 0) _MyStage = StageInfo.GetJustStage(_StageID);
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] return _MyStage;
get }
{ }
CanReadProperty("MyStage", true); private string _ConsistencyChecks = string.Empty;
if (_MyStage == null && _StageID != 0) _MyStage = StageInfo.GetJustStage(_StageID); public string ConsistencyChecks
return _MyStage; {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
private string _ConsistencyChecks = string.Empty; {
public string ConsistencyChecks return _ConsistencyChecks;
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get private DateTime _DTS = new DateTime();
{ public DateTime DTS
CanReadProperty("ConsistencyChecks", true); {
return _ConsistencyChecks; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
} {
private DateTime _DTS = new DateTime(); return _DTS;
public DateTime DTS }
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] private string _UserID = string.Empty;
get public string UserID
{ {
CanReadProperty("DTS", true); [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
return _DTS; get
} {
} return _UserID;
private string _UserID = string.Empty; }
public string UserID }
{ // CSLATODO: Replace base CheckInfo.ToString function as necessary
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] /// <summary>
get /// Overrides Base ToString
{ /// </summary>
CanReadProperty("UserID", true); /// <returns>A string representation of current CheckInfo</returns>
return _UserID; //public override string ToString()
} //{
} // return base.ToString();
// CSLATODO: Replace base CheckInfo.ToString function as necessary //}
/// <summary> // CSLATODO: Check CheckInfo.GetIdValue to assure that the ID returned is unique
/// Overrides Base ToString /// <summary>
/// </summary> /// Overrides Base GetIdValue - Used internally by CSLA to determine equality
/// <returns>A string representation of current CheckInfo</returns> /// </summary>
//public override string ToString() /// <returns>A Unique ID for the current CheckInfo</returns>
//{ protected override object GetIdValue()
// return base.ToString(); {
//} return MyCheckInfoUnique; // Absolutely Unique ID
// CSLATODO: Check CheckInfo.GetIdValue to assure that the ID returned is unique }
/// <summary> #endregion
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality #region Factory Methods
/// </summary> private static int _CheckInfoUnique = 0;
/// <returns>A Unique ID for the current CheckInfo</returns> private static int CheckInfoUnique
protected override object GetIdValue() { get { return ++_CheckInfoUnique; } }
{ private int _MyCheckInfoUnique = CheckInfoUnique;
return MyCheckInfoUnique; // Absolutely Unique ID public int MyCheckInfoUnique // Absolutely Unique ID - Info
} { get { return _MyCheckInfoUnique; } }
#endregion protected CheckInfo()
#region Factory Methods {/* require use of factory methods */
private static int _CheckInfoUnique = 0; AddToCache(this);
private static int CheckInfoUnique }
{ get { return ++_CheckInfoUnique; } } private bool _Disposed = false;
private int _MyCheckInfoUnique = CheckInfoUnique; private static int _CountCreated = 0;
public int MyCheckInfoUnique // Absolutely Unique ID - Info private static int _CountDisposed = 0;
{ get { return _MyCheckInfoUnique; } } private static int _CountFinalized = 0;
protected CheckInfo() private static int IncrementCountCreated
{/* require use of factory methods */ { get { return ++_CountCreated; } }
AddToCache(this); private int _CountWhenCreated = IncrementCountCreated;
} public static int CountCreated
private bool _Disposed = false; { get { return _CountCreated; } }
private static int _CountCreated = 0; public static int CountNotDisposed
private static int _CountDisposed = 0; { get { return _CountCreated - _CountDisposed; } }
private static int _CountFinalized = 0; public static int CountNotFinalized
private static int IncrementCountCreated { get { return _CountCreated - _CountFinalized; } }
{ get { return ++_CountCreated; } } ~CheckInfo()
private int _CountWhenCreated = IncrementCountCreated; {
public static int CountCreated _CountFinalized++;
{ get { return _CountCreated; } } }
public static int CountNotDisposed public void Dispose()
{ get { return _CountCreated - _CountDisposed; } } {
public static int CountNotFinalized if (_Disposed) return;
{ get { return _CountCreated - _CountFinalized; } } _CountDisposed++;
~CheckInfo() _Disposed = true;
{ RemoveFromCache(this);
_CountFinalized++; if (!_CacheByPrimaryKey.ContainsKey(CheckID.ToString())) return;
} List<CheckInfo> listCheckInfo = _CacheByPrimaryKey[CheckID.ToString()]; // Get the list of items
public void Dispose() while (listCheckInfo.Contains(this)) listCheckInfo.Remove(this); // Remove the item from the list
{ if (listCheckInfo.Count == 0) // If there are no items left in the list
if (_Disposed) return; _CacheByPrimaryKey.Remove(CheckID.ToString()); // remove the list
_CountDisposed++; }
_Disposed = true; public virtual Check Get()
RemoveFromCache(this); {
if (!_CacheByPrimaryKey.ContainsKey(CheckID.ToString())) return; return _Editable = Check.Get(_CheckID);
List<CheckInfo> listCheckInfo = _CacheByPrimaryKey[CheckID.ToString()]; // Get the list of items }
while (listCheckInfo.Contains(this)) listCheckInfo.Remove(this); // Remove the item from the list public static void Refresh(Check tmp)
if (listCheckInfo.Count == 0) // If there are no items left in the list {
_CacheByPrimaryKey.Remove(CheckID.ToString()); // remove the list string key = tmp.CheckID.ToString();
} ConvertListToDictionary();
public virtual Check Get() if (_CacheByPrimaryKey.ContainsKey(key))
{ foreach (CheckInfo tmpInfo in _CacheByPrimaryKey[key])
return _Editable = Check.Get(_CheckID); tmpInfo.RefreshFields(tmp);
} }
public static void Refresh(Check tmp) protected virtual void RefreshFields(Check tmp)
{ {
string key = tmp.CheckID.ToString(); if (_RevisionID != tmp.RevisionID)
ConvertListToDictionary(); {
if (_CacheByPrimaryKey.ContainsKey(key)) if (MyRevision != null) MyRevision.RefreshRevisionChecks(); // Update List for old value
foreach (CheckInfo tmpInfo in _CacheByPrimaryKey[key]) _RevisionID = tmp.RevisionID; // Update the value
tmpInfo.RefreshFields(tmp); }
} _MyRevision = null; // Reset list so that the next line gets a new list
protected virtual void RefreshFields(Check tmp) if (MyRevision != null) MyRevision.RefreshRevisionChecks(); // Update List for new value
{ if (_StageID != tmp.StageID)
if (_RevisionID != tmp.RevisionID) {
{ if (MyStage != null) MyStage.RefreshStageChecks(); // Update List for old value
if (MyRevision != null) MyRevision.RefreshRevisionChecks(); // Update List for old value _StageID = tmp.StageID; // Update the value
_RevisionID = tmp.RevisionID; // Update the value }
} _MyStage = null; // Reset list so that the next line gets a new list
_MyRevision = null; // Reset list so that the next line gets a new list if (MyStage != null) MyStage.RefreshStageChecks(); // Update List for new value
if (MyRevision != null) MyRevision.RefreshRevisionChecks(); // Update List for new value _ConsistencyChecks = tmp.ConsistencyChecks;
if (_StageID != tmp.StageID) _DTS = tmp.DTS;
{ _UserID = tmp.UserID;
if (MyStage != null) MyStage.RefreshStageChecks(); // Update List for old value _CheckInfoExtension.Refresh(this);
_StageID = tmp.StageID; // Update the value OnChange();// raise an event
} }
_MyStage = null; // Reset list so that the next line gets a new list public static void Refresh(RevisionCheck tmp)
if (MyStage != null) MyStage.RefreshStageChecks(); // Update List for new value {
_ConsistencyChecks = tmp.ConsistencyChecks; string key = tmp.CheckID.ToString();
_DTS = tmp.DTS; ConvertListToDictionary();
_UserID = tmp.UserID; if (_CacheByPrimaryKey.ContainsKey(key))
_CheckInfoExtension.Refresh(this); foreach (CheckInfo tmpInfo in _CacheByPrimaryKey[key])
OnChange();// raise an event tmpInfo.RefreshFields(tmp);
} }
public static void Refresh(RevisionCheck tmp) protected virtual void RefreshFields(RevisionCheck tmp)
{ {
string key = tmp.CheckID.ToString(); if (_StageID != tmp.StageID)
ConvertListToDictionary(); {
if (_CacheByPrimaryKey.ContainsKey(key)) if (MyStage != null) MyStage.RefreshStageChecks(); // Update List for old value
foreach (CheckInfo tmpInfo in _CacheByPrimaryKey[key]) _StageID = tmp.StageID; // Update the value
tmpInfo.RefreshFields(tmp); }
} _MyStage = null; // Reset list so that the next line gets a new list
protected virtual void RefreshFields(RevisionCheck tmp) if (MyStage != null) MyStage.RefreshStageChecks(); // Update List for new value
{ _ConsistencyChecks = tmp.ConsistencyChecks;
if (_StageID != tmp.StageID) _DTS = tmp.DTS;
{ _UserID = tmp.UserID;
if (MyStage != null) MyStage.RefreshStageChecks(); // Update List for old value _CheckInfoExtension.Refresh(this);
_StageID = tmp.StageID; // Update the value OnChange();// raise an event
} }
_MyStage = null; // Reset list so that the next line gets a new list public static void Refresh(StageCheck tmp)
if (MyStage != null) MyStage.RefreshStageChecks(); // Update List for new value {
_ConsistencyChecks = tmp.ConsistencyChecks; string key = tmp.CheckID.ToString();
_DTS = tmp.DTS; ConvertListToDictionary();
_UserID = tmp.UserID; if (_CacheByPrimaryKey.ContainsKey(key))
_CheckInfoExtension.Refresh(this); foreach (CheckInfo tmpInfo in _CacheByPrimaryKey[key])
OnChange();// raise an event tmpInfo.RefreshFields(tmp);
} }
public static void Refresh(StageCheck tmp) protected virtual void RefreshFields(StageCheck tmp)
{ {
string key = tmp.CheckID.ToString(); if (_RevisionID != tmp.RevisionID)
ConvertListToDictionary(); {
if (_CacheByPrimaryKey.ContainsKey(key)) if (MyRevision != null) MyRevision.RefreshRevisionChecks(); // Update List for old value
foreach (CheckInfo tmpInfo in _CacheByPrimaryKey[key]) _RevisionID = tmp.RevisionID; // Update the value
tmpInfo.RefreshFields(tmp); }
} _MyRevision = null; // Reset list so that the next line gets a new list
protected virtual void RefreshFields(StageCheck tmp) if (MyRevision != null) MyRevision.RefreshRevisionChecks(); // Update List for new value
{ _ConsistencyChecks = tmp.ConsistencyChecks;
if (_RevisionID != tmp.RevisionID) _DTS = tmp.DTS;
{ _UserID = tmp.UserID;
if (MyRevision != null) MyRevision.RefreshRevisionChecks(); // Update List for old value _CheckInfoExtension.Refresh(this);
_RevisionID = tmp.RevisionID; // Update the value OnChange();// raise an event
} }
_MyRevision = null; // Reset list so that the next line gets a new list public static CheckInfo Get(int checkID)
if (MyRevision != null) MyRevision.RefreshRevisionChecks(); // Update List for new value {
_ConsistencyChecks = tmp.ConsistencyChecks; //if (!CanGetObject())
_DTS = tmp.DTS; // throw new System.Security.SecurityException("User not authorized to view a Check");
_UserID = tmp.UserID; try
_CheckInfoExtension.Refresh(this); {
OnChange();// raise an event CheckInfo tmp = GetCachedByPrimaryKey(checkID);
} if (tmp == null)
public static CheckInfo Get(int checkID) {
{ tmp = DataPortal.Fetch<CheckInfo>(new PKCriteria(checkID));
//if (!CanGetObject()) AddToCache(tmp);
// throw new System.Security.SecurityException("User not authorized to view a Check"); }
try if (tmp.ErrorMessage == "No Record Found")
{ {
CheckInfo tmp = GetCachedByPrimaryKey(checkID); tmp.Dispose(); // Clean-up CheckInfo
if (tmp == null) tmp = null;
{ }
tmp = DataPortal.Fetch<CheckInfo>(new PKCriteria(checkID)); return tmp;
AddToCache(tmp); }
} catch (Exception ex)
if (tmp.ErrorMessage == "No Record Found") {
{ throw new DbCslaException("Error on CheckInfo.Get", ex);
tmp.Dispose(); // Clean-up CheckInfo }
tmp = null; }
} #endregion
return tmp; #region Data Access Portal
} internal CheckInfo(SafeDataReader dr)
catch (Exception ex) {
{ if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] CheckInfo.Constructor", GetHashCode());
throw new DbCslaException("Error on CheckInfo.Get", ex); try
} {
} ReadData(dr);
#endregion }
#region Data Access Portal catch (Exception ex)
internal CheckInfo(SafeDataReader dr) {
{ if (_MyLog.IsErrorEnabled) _MyLog.Error("CheckInfo.Constructor", ex);
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] CheckInfo.Constructor", GetHashCode()); throw new DbCslaException("CheckInfo.Constructor", ex);
try }
{ }
ReadData(dr); [Serializable()]
} protected class PKCriteria
catch (Exception ex) {
{ private int _CheckID;
if (_MyLog.IsErrorEnabled) _MyLog.Error("CheckInfo.Constructor", ex); public int CheckID
throw new DbCslaException("CheckInfo.Constructor", ex); { get { return _CheckID; } }
} public PKCriteria(int checkID)
} {
[Serializable()] _CheckID = checkID;
protected class PKCriteria }
{ }
private int _CheckID; private void ReadData(SafeDataReader dr)
public int CheckID {
{ get { return _CheckID; } } if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] CheckInfo.ReadData", GetHashCode());
public PKCriteria(int checkID) try
{ {
_CheckID = checkID; _CheckID = dr.GetInt32("CheckID");
} _RevisionID = dr.GetInt32("RevisionID");
} _StageID = dr.GetInt32("StageID");
private void ReadData(SafeDataReader dr) _ConsistencyChecks = dr.GetString("ConsistencyChecks");
{ _DTS = dr.GetDateTime("DTS");
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] CheckInfo.ReadData", GetHashCode()); _UserID = dr.GetString("UserID");
try }
{ catch (Exception ex)
_CheckID = dr.GetInt32("CheckID"); {
_RevisionID = dr.GetInt32("RevisionID"); if (_MyLog.IsErrorEnabled) _MyLog.Error("CheckInfo.ReadData", ex);
_StageID = dr.GetInt32("StageID"); _ErrorMessage = ex.Message;
_ConsistencyChecks = dr.GetString("ConsistencyChecks"); throw new DbCslaException("CheckInfo.ReadData", ex);
_DTS = dr.GetDateTime("DTS"); }
_UserID = dr.GetString("UserID"); }
} private void DataPortal_Fetch(PKCriteria criteria)
catch (Exception ex) {
{ if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] CheckInfo.DataPortal_Fetch", GetHashCode());
if (_MyLog.IsErrorEnabled) _MyLog.Error("CheckInfo.ReadData", ex); try
_ErrorMessage = ex.Message; {
throw new DbCslaException("CheckInfo.ReadData", ex); using (SqlConnection cn = Database.VEPROMS_SqlConnection)
} {
} ApplicationContext.LocalContext["cn"] = cn;
private void DataPortal_Fetch(PKCriteria criteria) using (SqlCommand cm = cn.CreateCommand())
{ {
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] CheckInfo.DataPortal_Fetch", GetHashCode()); cm.CommandType = CommandType.StoredProcedure;
try cm.CommandText = "getCheck";
{ cm.Parameters.AddWithValue("@CheckID", criteria.CheckID);
using (SqlConnection cn = Database.VEPROMS_SqlConnection) cm.CommandTimeout = Database.DefaultTimeout;
{ using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
ApplicationContext.LocalContext["cn"] = cn; {
using (SqlCommand cm = cn.CreateCommand()) if (!dr.Read())
{ {
cm.CommandType = CommandType.StoredProcedure; _ErrorMessage = "No Record Found";
cm.CommandText = "getCheck"; return;
cm.Parameters.AddWithValue("@CheckID", criteria.CheckID); }
cm.CommandTimeout = Database.DefaultTimeout; ReadData(dr);
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) }
{ }
if (!dr.Read()) // removing of item only needed for local data portal
{ if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client)
_ErrorMessage = "No Record Found"; ApplicationContext.LocalContext.Remove("cn");
return; }
} }
ReadData(dr); catch (Exception ex)
} {
} if (_MyLog.IsErrorEnabled) _MyLog.Error("CheckInfo.DataPortal_Fetch", ex);
// removing of item only needed for local data portal _ErrorMessage = ex.Message;
if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client) throw new DbCslaException("CheckInfo.DataPortal_Fetch", ex);
ApplicationContext.LocalContext.Remove("cn"); }
} }
} #endregion
catch (Exception ex) // Standard Refresh
{ #region extension
if (_MyLog.IsErrorEnabled) _MyLog.Error("CheckInfo.DataPortal_Fetch", ex); CheckInfoExtension _CheckInfoExtension = new CheckInfoExtension();
_ErrorMessage = ex.Message; [Serializable()]
throw new DbCslaException("CheckInfo.DataPortal_Fetch", ex); partial class CheckInfoExtension : extensionBase { }
} [Serializable()]
} class extensionBase
#endregion {
// Standard Refresh // Default Refresh
#region extension public virtual void Refresh(CheckInfo tmp) { }
CheckInfoExtension _CheckInfoExtension = new CheckInfoExtension(); }
[Serializable()] #endregion
partial class CheckInfoExtension : extensionBase { } } // Class
[Serializable()] #region Converter
class extensionBase internal class CheckInfoConverter : ExpandableObjectConverter
{ {
// Default Refresh public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
public virtual void Refresh(CheckInfo tmp) { } {
} if (destType == typeof(string) && value is CheckInfo)
#endregion {
} // Class // Return the ToString value
#region Converter return ((CheckInfo)value).ToString();
internal class CheckInfoConverter : ExpandableObjectConverter }
{ return base.ConvertTo(context, culture, value, destType);
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType) }
{ }
if (destType == typeof(string) && value is CheckInfo) #endregion
{
// Return the ToString value
return ((CheckInfo)value).ToString();
}
return base.ConvertTo(context, culture, value, destType);
}
}
#endregion
} // Namespace } // Namespace

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -19,415 +19,405 @@ using System.ComponentModel;
using System.Collections.Generic; using System.Collections.Generic;
namespace VEPROMS.CSLA.Library namespace VEPROMS.CSLA.Library
{ {
public delegate void ConnectionInfoEvent(object sender); public delegate void ConnectionInfoEvent(object sender);
/// <summary> /// <summary>
/// ConnectionInfo Generated by MyGeneration using the CSLA Object Mapping template /// ConnectionInfo Generated by MyGeneration using the CSLA Object Mapping template
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ConnectionInfoConverter))] [TypeConverter(typeof(ConnectionInfoConverter))]
public partial class ConnectionInfo : ReadOnlyBase<ConnectionInfo>, IDisposable public partial class ConnectionInfo : ReadOnlyBase<ConnectionInfo>, IDisposable
{ {
public event ConnectionInfoEvent Changed; public event ConnectionInfoEvent Changed;
private void OnChange() private void OnChange()
{ {
if (Changed != null) Changed(this); if (Changed != null) Changed(this);
} }
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion #endregion
#region Collection #region Collection
private static List<ConnectionInfo> _CacheList = new List<ConnectionInfo>(); private static List<ConnectionInfo> _CacheList = new List<ConnectionInfo>();
protected static void AddToCache(ConnectionInfo connectionInfo) protected static void AddToCache(ConnectionInfo connectionInfo)
{ {
if (!_CacheList.Contains(connectionInfo)) _CacheList.Add(connectionInfo); // In AddToCache if (!_CacheList.Contains(connectionInfo)) _CacheList.Add(connectionInfo); // In AddToCache
} }
protected static void RemoveFromCache(ConnectionInfo connectionInfo) protected static void RemoveFromCache(ConnectionInfo connectionInfo)
{ {
while (_CacheList.Contains(connectionInfo)) _CacheList.Remove(connectionInfo); // In RemoveFromCache while (_CacheList.Contains(connectionInfo)) _CacheList.Remove(connectionInfo); // In RemoveFromCache
} }
private static Dictionary<string, List<ConnectionInfo>> _CacheByPrimaryKey = new Dictionary<string, List<ConnectionInfo>>(); private static Dictionary<string, List<ConnectionInfo>> _CacheByPrimaryKey = new Dictionary<string, List<ConnectionInfo>>();
private static void ConvertListToDictionary() private static void ConvertListToDictionary()
{ {
while (_CacheList.Count > 0) // Move ConnectionInfo(s) from temporary _CacheList to _CacheByPrimaryKey while (_CacheList.Count > 0) // Move ConnectionInfo(s) from temporary _CacheList to _CacheByPrimaryKey
{ {
ConnectionInfo tmp = _CacheList[0]; // Get the first ConnectionInfo ConnectionInfo tmp = _CacheList[0]; // Get the first ConnectionInfo
string pKey = tmp.DBID.ToString(); string pKey = tmp.DBID.ToString();
if (!_CacheByPrimaryKey.ContainsKey(pKey)) if (!_CacheByPrimaryKey.ContainsKey(pKey))
{ {
_CacheByPrimaryKey[pKey] = new List<ConnectionInfo>(); // Add new list for PrimaryKey _CacheByPrimaryKey[pKey] = new List<ConnectionInfo>(); // Add new list for PrimaryKey
} }
_CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list _CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list
_CacheList.RemoveAt(0); // Remove the first ConnectionInfo _CacheList.RemoveAt(0); // Remove the first ConnectionInfo
} }
} }
internal static void AddList(ConnectionInfoList lst) internal static void AddList(ConnectionInfoList lst)
{ {
foreach (ConnectionInfo item in lst) AddToCache(item); foreach (ConnectionInfo item in lst) AddToCache(item);
} }
protected static ConnectionInfo GetCachedByPrimaryKey(int dbid) protected static ConnectionInfo GetCachedByPrimaryKey(int dbid)
{ {
ConvertListToDictionary(); ConvertListToDictionary();
string key = dbid.ToString(); string key = dbid.ToString();
if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0]; if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0];
return null; return null;
} }
#endregion #endregion
#region Business Methods #region Business Methods
private string _ErrorMessage = string.Empty; private string _ErrorMessage = string.Empty;
public string ErrorMessage public string ErrorMessage
{ {
get { return _ErrorMessage; } get { return _ErrorMessage; }
} }
protected Connection _Editable; protected Connection _Editable;
private IVEHasBrokenRules HasBrokenRules private IVEHasBrokenRules HasBrokenRules
{ {
get get
{ {
IVEHasBrokenRules hasBrokenRules = null; IVEHasBrokenRules hasBrokenRules = null;
if (_Editable != null) if (_Editable != null)
hasBrokenRules = _Editable.HasBrokenRules; hasBrokenRules = _Editable.HasBrokenRules;
return hasBrokenRules; return hasBrokenRules;
} }
} }
private int _DBID; private int _DBID;
[System.ComponentModel.DataObjectField(true, true)] [System.ComponentModel.DataObjectField(true, true)]
public int DBID public int DBID
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DBID", true); return _DBID;
return _DBID; }
} }
} private string _Name = string.Empty;
private string _Name = string.Empty; public string Name
public string Name {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get
get {
{ return _Name;
CanReadProperty("Name", true); }
return _Name; }
} private string _Title = string.Empty;
} public string Title
private string _Title = string.Empty; {
public string Title [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get return _Title;
{ }
CanReadProperty("Title", true); }
return _Title; private string _ConnectionString = string.Empty;
} public string ConnectionString
} {
private string _ConnectionString = string.Empty; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
public string ConnectionString get
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] return _ConnectionString;
get }
{ }
CanReadProperty("ConnectionString", true); private int _ServerType;
return _ConnectionString; /// <summary>
} /// 0 SQL Server
} /// </summary>
private int _ServerType; public int ServerType
/// <summary> {
/// 0 SQL Server [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
/// </summary> get
public int ServerType {
{ return _ServerType;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get }
{ private string _Config = string.Empty;
CanReadProperty("ServerType", true); public string Config
return _ServerType; {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
private string _Config = string.Empty; {
public string Config return _Config;
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get private DateTime _DTS = new DateTime();
{ public DateTime DTS
CanReadProperty("Config", true); {
return _Config; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
} {
private DateTime _DTS = new DateTime(); return _DTS;
public DateTime DTS }
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] private string _UsrID = string.Empty;
get public string UsrID
{ {
CanReadProperty("DTS", true); [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
return _DTS; get
} {
} return _UsrID;
private string _UsrID = string.Empty; }
public string UsrID }
{ private int _ConnectionFolderCount = 0;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] /// <summary>
get /// Count of ConnectionFolders for this Connection
{ /// </summary>
CanReadProperty("UsrID", true); public int ConnectionFolderCount
return _UsrID; {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
private int _ConnectionFolderCount = 0; {
/// <summary> if (_ConnectionFolderCount < 0)
/// Count of ConnectionFolders for this Connection _ConnectionFolderCount = ConnectionFolders.Count;
/// </summary> return _ConnectionFolderCount;
public int ConnectionFolderCount }
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] private FolderInfoList _ConnectionFolders = null;
get [TypeConverter(typeof(FolderInfoListConverter))]
{ public FolderInfoList ConnectionFolders
CanReadProperty("ConnectionFolderCount", true); {
if (_ConnectionFolderCount < 0) [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
_ConnectionFolderCount = ConnectionFolders.Count; get
return _ConnectionFolderCount; {
} if (_ConnectionFolderCount < 0 || (_ConnectionFolderCount > 0 && _ConnectionFolders == null))
} _ConnectionFolders = FolderInfoList.GetByDBID(_DBID);
private FolderInfoList _ConnectionFolders = null; if (_ConnectionFolderCount < 0)
[TypeConverter(typeof(FolderInfoListConverter))] _ConnectionFolderCount = _ConnectionFolders.Count;
public FolderInfoList ConnectionFolders return _ConnectionFolders;
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get public void RefreshConnectionFolders()
{ {
CanReadProperty("ConnectionFolders", true); _ConnectionFolderCount = -1;
if (_ConnectionFolderCount < 0 || (_ConnectionFolderCount > 0 && _ConnectionFolders == null)) ConvertListToDictionary();
_ConnectionFolders = FolderInfoList.GetByDBID(_DBID); if (_CacheByPrimaryKey.ContainsKey(_DBID.ToString()))
if (_ConnectionFolderCount < 0) foreach (ConnectionInfo tmp in _CacheByPrimaryKey[_DBID.ToString()])
_ConnectionFolderCount = _ConnectionFolders.Count; tmp._ConnectionFolderCount = -1; // This will cause the data to be requeried
return _ConnectionFolders; }
} // CSLATODO: Replace base ConnectionInfo.ToString function as necessary
} /// <summary>
public void RefreshConnectionFolders() /// Overrides Base ToString
{ /// </summary>
_ConnectionFolderCount = -1; /// <returns>A string representation of current ConnectionInfo</returns>
ConvertListToDictionary(); //public override string ToString()
if (_CacheByPrimaryKey.ContainsKey(_DBID.ToString())) //{
foreach (ConnectionInfo tmp in _CacheByPrimaryKey[_DBID.ToString()]) // return base.ToString();
tmp._ConnectionFolderCount = -1; // This will cause the data to be requeried //}
} // CSLATODO: Check ConnectionInfo.GetIdValue to assure that the ID returned is unique
// CSLATODO: Replace base ConnectionInfo.ToString function as necessary /// <summary>
/// <summary> /// Overrides Base GetIdValue - Used internally by CSLA to determine equality
/// Overrides Base ToString /// </summary>
/// </summary> /// <returns>A Unique ID for the current ConnectionInfo</returns>
/// <returns>A string representation of current ConnectionInfo</returns> protected override object GetIdValue()
//public override string ToString() {
//{ return MyConnectionInfoUnique; // Absolutely Unique ID
// return base.ToString(); }
//} #endregion
// CSLATODO: Check ConnectionInfo.GetIdValue to assure that the ID returned is unique #region Factory Methods
/// <summary> private static int _ConnectionInfoUnique = 0;
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality private static int ConnectionInfoUnique
/// </summary> { get { return ++_ConnectionInfoUnique; } }
/// <returns>A Unique ID for the current ConnectionInfo</returns> private int _MyConnectionInfoUnique = ConnectionInfoUnique;
protected override object GetIdValue() public int MyConnectionInfoUnique // Absolutely Unique ID - Info
{ { get { return _MyConnectionInfoUnique; } }
return MyConnectionInfoUnique; // Absolutely Unique ID protected ConnectionInfo()
} {/* require use of factory methods */
#endregion AddToCache(this);
#region Factory Methods }
private static int _ConnectionInfoUnique = 0; private bool _Disposed = false;
private static int ConnectionInfoUnique private static int _CountCreated = 0;
{ get { return ++_ConnectionInfoUnique; } } private static int _CountDisposed = 0;
private int _MyConnectionInfoUnique = ConnectionInfoUnique; private static int _CountFinalized = 0;
public int MyConnectionInfoUnique // Absolutely Unique ID - Info private static int IncrementCountCreated
{ get { return _MyConnectionInfoUnique; } } { get { return ++_CountCreated; } }
protected ConnectionInfo() private int _CountWhenCreated = IncrementCountCreated;
{/* require use of factory methods */ public static int CountCreated
AddToCache(this); { get { return _CountCreated; } }
} public static int CountNotDisposed
private bool _Disposed = false; { get { return _CountCreated - _CountDisposed; } }
private static int _CountCreated = 0; public static int CountNotFinalized
private static int _CountDisposed = 0; { get { return _CountCreated - _CountFinalized; } }
private static int _CountFinalized = 0; ~ConnectionInfo()
private static int IncrementCountCreated {
{ get { return ++_CountCreated; } } _CountFinalized++;
private int _CountWhenCreated = IncrementCountCreated; }
public static int CountCreated public void Dispose()
{ get { return _CountCreated; } } {
public static int CountNotDisposed if (_Disposed) return;
{ get { return _CountCreated - _CountDisposed; } } _CountDisposed++;
public static int CountNotFinalized _Disposed = true;
{ get { return _CountCreated - _CountFinalized; } } RemoveFromCache(this);
~ConnectionInfo() if (!_CacheByPrimaryKey.ContainsKey(DBID.ToString())) return;
{ List<ConnectionInfo> listConnectionInfo = _CacheByPrimaryKey[DBID.ToString()]; // Get the list of items
_CountFinalized++; while (listConnectionInfo.Contains(this)) listConnectionInfo.Remove(this); // Remove the item from the list
} if (listConnectionInfo.Count == 0) // If there are no items left in the list
public void Dispose() _CacheByPrimaryKey.Remove(DBID.ToString()); // remove the list
{ }
if (_Disposed) return; public virtual Connection Get()
_CountDisposed++; {
_Disposed = true; return _Editable = Connection.Get(_DBID);
RemoveFromCache(this); }
if (!_CacheByPrimaryKey.ContainsKey(DBID.ToString())) return; public static void Refresh(Connection tmp)
List<ConnectionInfo> listConnectionInfo = _CacheByPrimaryKey[DBID.ToString()]; // Get the list of items {
while (listConnectionInfo.Contains(this)) listConnectionInfo.Remove(this); // Remove the item from the list string key = tmp.DBID.ToString();
if (listConnectionInfo.Count == 0) // If there are no items left in the list ConvertListToDictionary();
_CacheByPrimaryKey.Remove(DBID.ToString()); // remove the list if (_CacheByPrimaryKey.ContainsKey(key))
} foreach (ConnectionInfo tmpInfo in _CacheByPrimaryKey[key])
public virtual Connection Get() tmpInfo.RefreshFields(tmp);
{ }
return _Editable = Connection.Get(_DBID); protected virtual void RefreshFields(Connection tmp)
} {
public static void Refresh(Connection tmp) _Name = tmp.Name;
{ _Title = tmp.Title;
string key = tmp.DBID.ToString(); _ConnectionString = tmp.ConnectionString;
ConvertListToDictionary(); _ServerType = tmp.ServerType;
if (_CacheByPrimaryKey.ContainsKey(key)) _Config = tmp.Config;
foreach (ConnectionInfo tmpInfo in _CacheByPrimaryKey[key]) _DTS = tmp.DTS;
tmpInfo.RefreshFields(tmp); _UsrID = tmp.UsrID;
} _ConnectionInfoExtension.Refresh(this);
protected virtual void RefreshFields(Connection tmp) OnChange();// raise an event
{ }
_Name = tmp.Name; public static ConnectionInfo Get(int dbid)
_Title = tmp.Title; {
_ConnectionString = tmp.ConnectionString; //if (!CanGetObject())
_ServerType = tmp.ServerType; // throw new System.Security.SecurityException("User not authorized to view a Connection");
_Config = tmp.Config; try
_DTS = tmp.DTS; {
_UsrID = tmp.UsrID; ConnectionInfo tmp = GetCachedByPrimaryKey(dbid);
_ConnectionInfoExtension.Refresh(this); if (tmp == null)
OnChange();// raise an event {
} tmp = DataPortal.Fetch<ConnectionInfo>(new PKCriteria(dbid));
public static ConnectionInfo Get(int dbid) AddToCache(tmp);
{ }
//if (!CanGetObject()) if (tmp.ErrorMessage == "No Record Found")
// throw new System.Security.SecurityException("User not authorized to view a Connection"); {
try tmp.Dispose(); // Clean-up ConnectionInfo
{ tmp = null;
ConnectionInfo tmp = GetCachedByPrimaryKey(dbid); }
if (tmp == null) return tmp;
{ }
tmp = DataPortal.Fetch<ConnectionInfo>(new PKCriteria(dbid)); catch (Exception ex)
AddToCache(tmp); {
} throw new DbCslaException("Error on ConnectionInfo.Get", ex);
if (tmp.ErrorMessage == "No Record Found") }
{ }
tmp.Dispose(); // Clean-up ConnectionInfo #endregion
tmp = null; #region Data Access Portal
} internal ConnectionInfo(SafeDataReader dr)
return tmp; {
} if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ConnectionInfo.Constructor", GetHashCode());
catch (Exception ex) try
{ {
throw new DbCslaException("Error on ConnectionInfo.Get", ex); ReadData(dr);
} }
} catch (Exception ex)
#endregion {
#region Data Access Portal if (_MyLog.IsErrorEnabled) _MyLog.Error("ConnectionInfo.Constructor", ex);
internal ConnectionInfo(SafeDataReader dr) throw new DbCslaException("ConnectionInfo.Constructor", ex);
{ }
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ConnectionInfo.Constructor", GetHashCode()); }
try [Serializable()]
{ protected class PKCriteria
ReadData(dr); {
} private int _DBID;
catch (Exception ex) public int DBID
{ { get { return _DBID; } }
if (_MyLog.IsErrorEnabled) _MyLog.Error("ConnectionInfo.Constructor", ex); public PKCriteria(int dbid)
throw new DbCslaException("ConnectionInfo.Constructor", ex); {
} _DBID = dbid;
} }
[Serializable()] }
protected class PKCriteria private void ReadData(SafeDataReader dr)
{ {
private int _DBID; if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ConnectionInfo.ReadData", GetHashCode());
public int DBID try
{ get { return _DBID; } } {
public PKCriteria(int dbid) _DBID = dr.GetInt32("DBID");
{ _Name = dr.GetString("Name");
_DBID = dbid; _Title = dr.GetString("Title");
} _ConnectionString = dr.GetString("ConnectionString");
} _ServerType = dr.GetInt32("ServerType");
private void ReadData(SafeDataReader dr) _Config = dr.GetString("Config");
{ _DTS = dr.GetDateTime("DTS");
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ConnectionInfo.ReadData", GetHashCode()); _UsrID = dr.GetString("UsrID");
try _ConnectionFolderCount = dr.GetInt32("FolderCount");
{ }
_DBID = dr.GetInt32("DBID"); catch (Exception ex)
_Name = dr.GetString("Name"); {
_Title = dr.GetString("Title"); if (_MyLog.IsErrorEnabled) _MyLog.Error("ConnectionInfo.ReadData", ex);
_ConnectionString = dr.GetString("ConnectionString"); _ErrorMessage = ex.Message;
_ServerType = dr.GetInt32("ServerType"); throw new DbCslaException("ConnectionInfo.ReadData", ex);
_Config = dr.GetString("Config"); }
_DTS = dr.GetDateTime("DTS"); }
_UsrID = dr.GetString("UsrID"); private void DataPortal_Fetch(PKCriteria criteria)
_ConnectionFolderCount = dr.GetInt32("FolderCount"); {
} if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ConnectionInfo.DataPortal_Fetch", GetHashCode());
catch (Exception ex) try
{ {
if (_MyLog.IsErrorEnabled) _MyLog.Error("ConnectionInfo.ReadData", ex); using (SqlConnection cn = Database.VEPROMS_SqlConnection)
_ErrorMessage = ex.Message; {
throw new DbCslaException("ConnectionInfo.ReadData", ex); ApplicationContext.LocalContext["cn"] = cn;
} using (SqlCommand cm = cn.CreateCommand())
} {
private void DataPortal_Fetch(PKCriteria criteria) cm.CommandType = CommandType.StoredProcedure;
{ cm.CommandText = "getConnection";
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ConnectionInfo.DataPortal_Fetch", GetHashCode()); cm.Parameters.AddWithValue("@DBID", criteria.DBID);
try cm.CommandTimeout = Database.DefaultTimeout;
{ using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
using (SqlConnection cn = Database.VEPROMS_SqlConnection) {
{ if (!dr.Read())
ApplicationContext.LocalContext["cn"] = cn; {
using (SqlCommand cm = cn.CreateCommand()) _ErrorMessage = "No Record Found";
{ return;
cm.CommandType = CommandType.StoredProcedure; }
cm.CommandText = "getConnection"; ReadData(dr);
cm.Parameters.AddWithValue("@DBID", criteria.DBID); }
cm.CommandTimeout = Database.DefaultTimeout; }
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) // removing of item only needed for local data portal
{ if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client)
if (!dr.Read()) ApplicationContext.LocalContext.Remove("cn");
{ }
_ErrorMessage = "No Record Found"; }
return; catch (Exception ex)
} {
ReadData(dr); if (_MyLog.IsErrorEnabled) _MyLog.Error("ConnectionInfo.DataPortal_Fetch", ex);
} _ErrorMessage = ex.Message;
} throw new DbCslaException("ConnectionInfo.DataPortal_Fetch", ex);
// removing of item only needed for local data portal }
if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client) }
ApplicationContext.LocalContext.Remove("cn"); #endregion
} // Standard Refresh
} #region extension
catch (Exception ex) ConnectionInfoExtension _ConnectionInfoExtension = new ConnectionInfoExtension();
{ [Serializable()]
if (_MyLog.IsErrorEnabled) _MyLog.Error("ConnectionInfo.DataPortal_Fetch", ex); partial class ConnectionInfoExtension : extensionBase { }
_ErrorMessage = ex.Message; [Serializable()]
throw new DbCslaException("ConnectionInfo.DataPortal_Fetch", ex); class extensionBase
} {
} // Default Refresh
#endregion public virtual void Refresh(ConnectionInfo tmp) { }
// Standard Refresh }
#region extension #endregion
ConnectionInfoExtension _ConnectionInfoExtension = new ConnectionInfoExtension(); } // Class
[Serializable()] #region Converter
partial class ConnectionInfoExtension : extensionBase { } internal class ConnectionInfoConverter : ExpandableObjectConverter
[Serializable()] {
class extensionBase public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
{ {
// Default Refresh if (destType == typeof(string) && value is ConnectionInfo)
public virtual void Refresh(ConnectionInfo tmp) { } {
} // Return the ToString value
#endregion return ((ConnectionInfo)value).ToString();
} // Class }
#region Converter return base.ConvertTo(context, culture, value, destType);
internal class ConnectionInfoConverter : ExpandableObjectConverter }
{ }
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType) #endregion
{
if (destType == typeof(string) && value is ConnectionInfo)
{
// Return the ToString value
return ((ConnectionInfo)value).ToString();
}
return base.ConvertTo(context, culture, value, destType);
}
}
#endregion
} // Namespace } // Namespace

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -19,397 +19,387 @@ using System.ComponentModel;
using System.Collections.Generic; using System.Collections.Generic;
namespace VEPROMS.CSLA.Library namespace VEPROMS.CSLA.Library
{ {
public delegate void ContentAuditInfoEvent(object sender); public delegate void ContentAuditInfoEvent(object sender);
/// <summary> /// <summary>
/// ContentAuditInfo Generated by MyGeneration using the CSLA Object Mapping template /// ContentAuditInfo Generated by MyGeneration using the CSLA Object Mapping template
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ContentAuditInfoConverter))] [TypeConverter(typeof(ContentAuditInfoConverter))]
public partial class ContentAuditInfo : ReadOnlyBase<ContentAuditInfo>, IDisposable public partial class ContentAuditInfo : ReadOnlyBase<ContentAuditInfo>, IDisposable
{ {
public event ContentAuditInfoEvent Changed; public event ContentAuditInfoEvent Changed;
private void OnChange() private void OnChange()
{ {
if (Changed != null) Changed(this); if (Changed != null) Changed(this);
} }
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion #endregion
#region Collection #region Collection
private static List<ContentAuditInfo> _CacheList = new List<ContentAuditInfo>(); private static List<ContentAuditInfo> _CacheList = new List<ContentAuditInfo>();
protected static void AddToCache(ContentAuditInfo contentAuditInfo) protected static void AddToCache(ContentAuditInfo contentAuditInfo)
{ {
if (!_CacheList.Contains(contentAuditInfo)) _CacheList.Add(contentAuditInfo); // In AddToCache if (!_CacheList.Contains(contentAuditInfo)) _CacheList.Add(contentAuditInfo); // In AddToCache
} }
protected static void RemoveFromCache(ContentAuditInfo contentAuditInfo) protected static void RemoveFromCache(ContentAuditInfo contentAuditInfo)
{ {
while (_CacheList.Contains(contentAuditInfo)) _CacheList.Remove(contentAuditInfo); // In RemoveFromCache while (_CacheList.Contains(contentAuditInfo)) _CacheList.Remove(contentAuditInfo); // In RemoveFromCache
} }
private static Dictionary<string, List<ContentAuditInfo>> _CacheByPrimaryKey = new Dictionary<string, List<ContentAuditInfo>>(); private static Dictionary<string, List<ContentAuditInfo>> _CacheByPrimaryKey = new Dictionary<string, List<ContentAuditInfo>>();
private static void ConvertListToDictionary() private static void ConvertListToDictionary()
{ {
while (_CacheList.Count > 0) // Move ContentAuditInfo(s) from temporary _CacheList to _CacheByPrimaryKey while (_CacheList.Count > 0) // Move ContentAuditInfo(s) from temporary _CacheList to _CacheByPrimaryKey
{ {
ContentAuditInfo tmp = _CacheList[0]; // Get the first ContentAuditInfo ContentAuditInfo tmp = _CacheList[0]; // Get the first ContentAuditInfo
string pKey = tmp.AuditID.ToString(); string pKey = tmp.AuditID.ToString();
if (!_CacheByPrimaryKey.ContainsKey(pKey)) if (!_CacheByPrimaryKey.ContainsKey(pKey))
{ {
_CacheByPrimaryKey[pKey] = new List<ContentAuditInfo>(); // Add new list for PrimaryKey _CacheByPrimaryKey[pKey] = new List<ContentAuditInfo>(); // Add new list for PrimaryKey
} }
_CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list _CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list
_CacheList.RemoveAt(0); // Remove the first ContentAuditInfo _CacheList.RemoveAt(0); // Remove the first ContentAuditInfo
} }
} }
internal static void AddList(ContentAuditInfoList lst) internal static void AddList(ContentAuditInfoList lst)
{ {
foreach (ContentAuditInfo item in lst) AddToCache(item); foreach (ContentAuditInfo item in lst) AddToCache(item);
} }
protected static ContentAuditInfo GetCachedByPrimaryKey(long auditID) protected static ContentAuditInfo GetCachedByPrimaryKey(long auditID)
{ {
ConvertListToDictionary(); ConvertListToDictionary();
string key = auditID.ToString(); string key = auditID.ToString();
if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0]; if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0];
return null; return null;
} }
#endregion #endregion
#region Business Methods #region Business Methods
private string _ErrorMessage = string.Empty; private string _ErrorMessage = string.Empty;
public string ErrorMessage public string ErrorMessage
{ {
get { return _ErrorMessage; } get { return _ErrorMessage; }
} }
protected ContentAudit _Editable; protected ContentAudit _Editable;
private IVEHasBrokenRules HasBrokenRules private IVEHasBrokenRules HasBrokenRules
{ {
get get
{ {
IVEHasBrokenRules hasBrokenRules = null; IVEHasBrokenRules hasBrokenRules = null;
if (_Editable != null) if (_Editable != null)
hasBrokenRules = _Editable.HasBrokenRules; hasBrokenRules = _Editable.HasBrokenRules;
return hasBrokenRules; return hasBrokenRules;
} }
} }
private long _AuditID; private long _AuditID;
[System.ComponentModel.DataObjectField(true, true)] [System.ComponentModel.DataObjectField(true, true)]
public long AuditID public long AuditID
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AuditID", true); return _AuditID;
return _AuditID; }
} }
} private int _ContentID;
private int _ContentID; public int ContentID
public int ContentID {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get
get {
{ return _ContentID;
CanReadProperty("ContentID", true); }
return _ContentID; }
} private string _Number = string.Empty;
} public string Number
private string _Number = string.Empty; {
public string Number [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get return _Number;
{ }
CanReadProperty("Number", true); }
return _Number; private string _Text = string.Empty;
} public string Text
} {
private string _Text = string.Empty; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
public string Text get
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] return _Text;
get }
{ }
CanReadProperty("Text", true); private int? _Type;
return _Text; public int? Type
} {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
private int? _Type; get
public int? Type {
{ return _Type;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get }
{ private int? _FormatID;
CanReadProperty("Type", true); public int? FormatID
return _Type; {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
private int? _FormatID; {
public int? FormatID return _FormatID;
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get private string _Config = string.Empty;
{ public string Config
CanReadProperty("FormatID", true); {
return _FormatID; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
} {
private string _Config = string.Empty; return _Config;
public string Config }
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] private DateTime _DTS = new DateTime();
get public DateTime DTS
{ {
CanReadProperty("Config", true); [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
return _Config; get
} {
} return _DTS;
private DateTime _DTS = new DateTime(); }
public DateTime DTS }
{ private string _UserID = string.Empty;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] public string UserID
get {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
CanReadProperty("DTS", true); get
return _DTS; {
} return _UserID;
} }
private string _UserID = string.Empty; }
public string UserID private int _DeleteStatus;
{ public int DeleteStatus
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
CanReadProperty("UserID", true); {
return _UserID; return _DeleteStatus;
} }
} }
private int _DeleteStatus; // CSLATODO: Replace base ContentAuditInfo.ToString function as necessary
public int DeleteStatus /// <summary>
{ /// Overrides Base ToString
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] /// </summary>
get /// <returns>A string representation of current ContentAuditInfo</returns>
{ //public override string ToString()
CanReadProperty("DeleteStatus", true); //{
return _DeleteStatus; // return base.ToString();
} //}
} // CSLATODO: Check ContentAuditInfo.GetIdValue to assure that the ID returned is unique
// CSLATODO: Replace base ContentAuditInfo.ToString function as necessary /// <summary>
/// <summary> /// Overrides Base GetIdValue - Used internally by CSLA to determine equality
/// Overrides Base ToString /// </summary>
/// </summary> /// <returns>A Unique ID for the current ContentAuditInfo</returns>
/// <returns>A string representation of current ContentAuditInfo</returns> protected override object GetIdValue()
//public override string ToString() {
//{ return MyContentAuditInfoUnique; // Absolutely Unique ID
// return base.ToString(); }
//} #endregion
// CSLATODO: Check ContentAuditInfo.GetIdValue to assure that the ID returned is unique #region Factory Methods
/// <summary> private static int _ContentAuditInfoUnique = 0;
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality private static int ContentAuditInfoUnique
/// </summary> { get { return ++_ContentAuditInfoUnique; } }
/// <returns>A Unique ID for the current ContentAuditInfo</returns> private int _MyContentAuditInfoUnique = ContentAuditInfoUnique;
protected override object GetIdValue() public int MyContentAuditInfoUnique // Absolutely Unique ID - Info
{ { get { return _MyContentAuditInfoUnique; } }
return MyContentAuditInfoUnique; // Absolutely Unique ID protected ContentAuditInfo()
} {/* require use of factory methods */
#endregion AddToCache(this);
#region Factory Methods }
private static int _ContentAuditInfoUnique = 0; private bool _Disposed = false;
private static int ContentAuditInfoUnique private static int _CountCreated = 0;
{ get { return ++_ContentAuditInfoUnique; } } private static int _CountDisposed = 0;
private int _MyContentAuditInfoUnique = ContentAuditInfoUnique; private static int _CountFinalized = 0;
public int MyContentAuditInfoUnique // Absolutely Unique ID - Info private static int IncrementCountCreated
{ get { return _MyContentAuditInfoUnique; } } { get { return ++_CountCreated; } }
protected ContentAuditInfo() private int _CountWhenCreated = IncrementCountCreated;
{/* require use of factory methods */ public static int CountCreated
AddToCache(this); { get { return _CountCreated; } }
} public static int CountNotDisposed
private bool _Disposed = false; { get { return _CountCreated - _CountDisposed; } }
private static int _CountCreated = 0; public static int CountNotFinalized
private static int _CountDisposed = 0; { get { return _CountCreated - _CountFinalized; } }
private static int _CountFinalized = 0; ~ContentAuditInfo()
private static int IncrementCountCreated {
{ get { return ++_CountCreated; } } _CountFinalized++;
private int _CountWhenCreated = IncrementCountCreated; }
public static int CountCreated public void Dispose()
{ get { return _CountCreated; } } {
public static int CountNotDisposed if (_Disposed) return;
{ get { return _CountCreated - _CountDisposed; } } _CountDisposed++;
public static int CountNotFinalized _Disposed = true;
{ get { return _CountCreated - _CountFinalized; } } RemoveFromCache(this);
~ContentAuditInfo() if (!_CacheByPrimaryKey.ContainsKey(AuditID.ToString())) return;
{ List<ContentAuditInfo> listContentAuditInfo = _CacheByPrimaryKey[AuditID.ToString()]; // Get the list of items
_CountFinalized++; while (listContentAuditInfo.Contains(this)) listContentAuditInfo.Remove(this); // Remove the item from the list
} if (listContentAuditInfo.Count == 0) // If there are no items left in the list
public void Dispose() _CacheByPrimaryKey.Remove(AuditID.ToString()); // remove the list
{ }
if (_Disposed) return; public virtual ContentAudit Get()
_CountDisposed++; {
_Disposed = true; return _Editable = ContentAudit.Get(_AuditID);
RemoveFromCache(this); }
if (!_CacheByPrimaryKey.ContainsKey(AuditID.ToString())) return; public static void Refresh(ContentAudit tmp)
List<ContentAuditInfo> listContentAuditInfo = _CacheByPrimaryKey[AuditID.ToString()]; // Get the list of items {
while (listContentAuditInfo.Contains(this)) listContentAuditInfo.Remove(this); // Remove the item from the list string key = tmp.AuditID.ToString();
if (listContentAuditInfo.Count == 0) // If there are no items left in the list ConvertListToDictionary();
_CacheByPrimaryKey.Remove(AuditID.ToString()); // remove the list if (_CacheByPrimaryKey.ContainsKey(key))
} foreach (ContentAuditInfo tmpInfo in _CacheByPrimaryKey[key])
public virtual ContentAudit Get() tmpInfo.RefreshFields(tmp);
{ }
return _Editable = ContentAudit.Get(_AuditID); protected virtual void RefreshFields(ContentAudit tmp)
} {
public static void Refresh(ContentAudit tmp) _ContentID = tmp.ContentID;
{ _Number = tmp.Number;
string key = tmp.AuditID.ToString(); _Text = tmp.Text;
ConvertListToDictionary(); _Type = tmp.Type;
if (_CacheByPrimaryKey.ContainsKey(key)) _FormatID = tmp.FormatID;
foreach (ContentAuditInfo tmpInfo in _CacheByPrimaryKey[key]) _Config = tmp.Config;
tmpInfo.RefreshFields(tmp); _DTS = tmp.DTS;
} _UserID = tmp.UserID;
protected virtual void RefreshFields(ContentAudit tmp) _DeleteStatus = tmp.DeleteStatus;
{ _ContentAuditInfoExtension.Refresh(this);
_ContentID = tmp.ContentID; OnChange();// raise an event
_Number = tmp.Number; }
_Text = tmp.Text; public static ContentAuditInfo Get(long auditID)
_Type = tmp.Type; {
_FormatID = tmp.FormatID; //if (!CanGetObject())
_Config = tmp.Config; // throw new System.Security.SecurityException("User not authorized to view a ContentAudit");
_DTS = tmp.DTS; try
_UserID = tmp.UserID; {
_DeleteStatus = tmp.DeleteStatus; ContentAuditInfo tmp = GetCachedByPrimaryKey(auditID);
_ContentAuditInfoExtension.Refresh(this); if (tmp == null)
OnChange();// raise an event {
} tmp = DataPortal.Fetch<ContentAuditInfo>(new PKCriteria(auditID));
public static ContentAuditInfo Get(long auditID) AddToCache(tmp);
{ }
//if (!CanGetObject()) if (tmp.ErrorMessage == "No Record Found")
// throw new System.Security.SecurityException("User not authorized to view a ContentAudit"); {
try tmp.Dispose(); // Clean-up ContentAuditInfo
{ tmp = null;
ContentAuditInfo tmp = GetCachedByPrimaryKey(auditID); }
if (tmp == null) return tmp;
{ }
tmp = DataPortal.Fetch<ContentAuditInfo>(new PKCriteria(auditID)); catch (Exception ex)
AddToCache(tmp); {
} throw new DbCslaException("Error on ContentAuditInfo.Get", ex);
if (tmp.ErrorMessage == "No Record Found") }
{ }
tmp.Dispose(); // Clean-up ContentAuditInfo #endregion
tmp = null; #region Data Access Portal
} internal ContentAuditInfo(SafeDataReader dr)
return tmp; {
} if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentAuditInfo.Constructor", GetHashCode());
catch (Exception ex) try
{ {
throw new DbCslaException("Error on ContentAuditInfo.Get", ex); ReadData(dr);
} }
} catch (Exception ex)
#endregion {
#region Data Access Portal if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentAuditInfo.Constructor", ex);
internal ContentAuditInfo(SafeDataReader dr) throw new DbCslaException("ContentAuditInfo.Constructor", ex);
{ }
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentAuditInfo.Constructor", GetHashCode()); }
try [Serializable()]
{ protected class PKCriteria
ReadData(dr); {
} private long _AuditID;
catch (Exception ex) public long AuditID
{ { get { return _AuditID; } }
if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentAuditInfo.Constructor", ex); public PKCriteria(long auditID)
throw new DbCslaException("ContentAuditInfo.Constructor", ex); {
} _AuditID = auditID;
} }
[Serializable()] }
protected class PKCriteria private void ReadData(SafeDataReader dr)
{ {
private long _AuditID; if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentAuditInfo.ReadData", GetHashCode());
public long AuditID try
{ get { return _AuditID; } } {
public PKCriteria(long auditID) _AuditID = dr.GetInt64("AuditID");
{ _ContentID = dr.GetInt32("ContentID");
_AuditID = auditID; _Number = dr.GetString("Number");
} _Text = dr.GetString("Text");
} _Type = (int?)dr.GetValue("Type");
private void ReadData(SafeDataReader dr) _FormatID = (int?)dr.GetValue("FormatID");
{ _Config = dr.GetString("Config");
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentAuditInfo.ReadData", GetHashCode()); _DTS = dr.GetDateTime("DTS");
try _UserID = dr.GetString("UserID");
{ _DeleteStatus = dr.GetInt32("DeleteStatus");
_AuditID = dr.GetInt64("AuditID"); }
_ContentID = dr.GetInt32("ContentID"); catch (Exception ex)
_Number = dr.GetString("Number"); {
_Text = dr.GetString("Text"); if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentAuditInfo.ReadData", ex);
_Type = (int?)dr.GetValue("Type"); _ErrorMessage = ex.Message;
_FormatID = (int?)dr.GetValue("FormatID"); throw new DbCslaException("ContentAuditInfo.ReadData", ex);
_Config = dr.GetString("Config"); }
_DTS = dr.GetDateTime("DTS"); }
_UserID = dr.GetString("UserID"); private void DataPortal_Fetch(PKCriteria criteria)
_DeleteStatus = dr.GetInt32("DeleteStatus"); {
} if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentAuditInfo.DataPortal_Fetch", GetHashCode());
catch (Exception ex) try
{ {
if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentAuditInfo.ReadData", ex); using (SqlConnection cn = Database.VEPROMS_SqlConnection)
_ErrorMessage = ex.Message; {
throw new DbCslaException("ContentAuditInfo.ReadData", ex); ApplicationContext.LocalContext["cn"] = cn;
} using (SqlCommand cm = cn.CreateCommand())
} {
private void DataPortal_Fetch(PKCriteria criteria) cm.CommandType = CommandType.StoredProcedure;
{ cm.CommandText = "getContentAudit";
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentAuditInfo.DataPortal_Fetch", GetHashCode()); cm.Parameters.AddWithValue("@AuditID", criteria.AuditID);
try cm.CommandTimeout = Database.DefaultTimeout;
{ using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
using (SqlConnection cn = Database.VEPROMS_SqlConnection) {
{ if (!dr.Read())
ApplicationContext.LocalContext["cn"] = cn; {
using (SqlCommand cm = cn.CreateCommand()) _ErrorMessage = "No Record Found";
{ return;
cm.CommandType = CommandType.StoredProcedure; }
cm.CommandText = "getContentAudit"; ReadData(dr);
cm.Parameters.AddWithValue("@AuditID", criteria.AuditID); }
cm.CommandTimeout = Database.DefaultTimeout; }
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) // removing of item only needed for local data portal
{ if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client)
if (!dr.Read()) ApplicationContext.LocalContext.Remove("cn");
{ }
_ErrorMessage = "No Record Found"; }
return; catch (Exception ex)
} {
ReadData(dr); if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentAuditInfo.DataPortal_Fetch", ex);
} _ErrorMessage = ex.Message;
} throw new DbCslaException("ContentAuditInfo.DataPortal_Fetch", ex);
// removing of item only needed for local data portal }
if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client) }
ApplicationContext.LocalContext.Remove("cn"); #endregion
} // Standard Refresh
} #region extension
catch (Exception ex) ContentAuditInfoExtension _ContentAuditInfoExtension = new ContentAuditInfoExtension();
{ [Serializable()]
if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentAuditInfo.DataPortal_Fetch", ex); partial class ContentAuditInfoExtension : extensionBase { }
_ErrorMessage = ex.Message; [Serializable()]
throw new DbCslaException("ContentAuditInfo.DataPortal_Fetch", ex); class extensionBase
} {
} // Default Refresh
#endregion public virtual void Refresh(ContentAuditInfo tmp) { }
// Standard Refresh }
#region extension #endregion
ContentAuditInfoExtension _ContentAuditInfoExtension = new ContentAuditInfoExtension(); } // Class
[Serializable()] #region Converter
partial class ContentAuditInfoExtension : extensionBase { } internal class ContentAuditInfoConverter : ExpandableObjectConverter
[Serializable()] {
class extensionBase public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
{ {
// Default Refresh if (destType == typeof(string) && value is ContentAuditInfo)
public virtual void Refresh(ContentAuditInfo tmp) { } {
} // Return the ToString value
#endregion return ((ContentAuditInfo)value).ToString();
} // Class }
#region Converter return base.ConvertTo(context, culture, value, destType);
internal class ContentAuditInfoConverter : ExpandableObjectConverter }
{ }
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType) #endregion
{
if (destType == typeof(string) && value is ContentAuditInfo)
{
// Return the ToString value
return ((ContentAuditInfo)value).ToString();
}
return base.ConvertTo(context, culture, value, destType);
}
}
#endregion
} // Namespace } // Namespace

View File

@@ -20,456 +20,444 @@ using System.Collections.Generic;
using Csla.Validation; using Csla.Validation;
namespace VEPROMS.CSLA.Library namespace VEPROMS.CSLA.Library
{ {
/// <summary> /// <summary>
/// ContentDetail Generated by MyGeneration using the CSLA Object Mapping template /// ContentDetail Generated by MyGeneration using the CSLA Object Mapping template
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ContentDetailConverter))] [TypeConverter(typeof(ContentDetailConverter))]
public partial class ContentDetail : BusinessBase<ContentDetail>, IVEHasBrokenRules, IDisposable public partial class ContentDetail : BusinessBase<ContentDetail>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion #endregion
#region Business Methods #region Business Methods
private string _ErrorMessage = string.Empty; private string _ErrorMessage = string.Empty;
public string ErrorMessage public string ErrorMessage
{ {
get { return _ErrorMessage; } get { return _ErrorMessage; }
} }
private int _DetailID; private int _DetailID;
[System.ComponentModel.DataObjectField(true, true)] [System.ComponentModel.DataObjectField(true, true)]
public int DetailID public int DetailID
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DetailID", true); if (_MyDetail != null) _DetailID = _MyDetail.DetailID;
if (_MyDetail != null) _DetailID = _MyDetail.DetailID; return _DetailID;
return _DetailID; }
} }
} private Detail _MyDetail;
private Detail _MyDetail; [System.ComponentModel.DataObjectField(true, true)]
[System.ComponentModel.DataObjectField(true, true)] public Detail MyDetail
public Detail MyDetail {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get
get {
{ if (_MyDetail == null && _DetailID != 0) _MyDetail = Detail.Get(_DetailID);
CanReadProperty("MyDetail", true); return _MyDetail;
if (_MyDetail == null && _DetailID != 0) _MyDetail = Detail.Get(_DetailID); }
return _MyDetail; }
} private int _ItemType;
} public int ItemType
private int _ItemType; {
public int ItemType [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get return _ItemType;
{ }
CanReadProperty("ItemType", true); [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
return _ItemType; set
} {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] if (_ItemType != value)
set {
{ _ItemType = value;
CanWriteProperty("ItemType", true); PropertyHasChanged();
if (_ItemType != value) }
{ }
_ItemType = value; }
PropertyHasChanged(); private string _Text = string.Empty;
} public string Text
} {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
private string _Text = string.Empty; get
public string Text {
{ return _Text;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ set
CanReadProperty("Text", true); {
return _Text; if (value == null) value = string.Empty;
} if (_Text != value)
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
set _Text = value;
{ PropertyHasChanged();
CanWriteProperty("Text", true); }
if (value == null) value = string.Empty; }
if (_Text != value) }
{ private string _Config = string.Empty;
_Text = value; public string Config
PropertyHasChanged(); {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
} {
private string _Config = string.Empty; return _Config;
public string Config }
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] set
get {
{ if (value == null) value = string.Empty;
CanReadProperty("Config", true); if (_Config != value)
return _Config; {
} _Config = value;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] PropertyHasChanged();
set }
{ }
CanWriteProperty("Config", true); }
if (value == null) value = string.Empty; private DateTime _DTS = new DateTime();
if (_Config != value) public DateTime DTS
{ {
_Config = value; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
PropertyHasChanged(); get
} {
} return _DTS;
} }
private DateTime _DTS = new DateTime(); [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
public DateTime DTS set
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] if (_DTS != value)
get {
{ _DTS = value;
CanReadProperty("DTS", true); PropertyHasChanged();
return _DTS; }
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
set private string _UserID = string.Empty;
{ public string UserID
CanWriteProperty("DTS", true); {
if (_DTS != value) [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
_DTS = value; {
PropertyHasChanged(); return _UserID;
} }
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} set
private string _UserID = string.Empty; {
public string UserID if (value == null) value = string.Empty;
{ if (_UserID != value)
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get _UserID = value;
{ PropertyHasChanged();
CanReadProperty("UserID", true); }
return _UserID; }
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] private byte[] _LastChanged = new byte[8];//timestamp
set // CSLATODO: Check ContentDetail.GetIdValue to assure that the ID returned is unique
{ /// <summary>
CanWriteProperty("UserID", true); /// Overrides Base GetIdValue - Used internally by CSLA to determine equality
if (value == null) value = string.Empty; /// </summary>
if (_UserID != value) /// <returns>A Unique ID for the current ContentDetail</returns>
{ protected override object GetIdValue()
_UserID = value; {
PropertyHasChanged(); return MyContentDetailUnique; // Absolutely Unique ID
} }
} // CSLATODO: Replace base ContentDetail.ToString function as necessary
} /// <summary>
private byte[] _LastChanged = new byte[8];//timestamp /// Overrides Base ToString
// CSLATODO: Check ContentDetail.GetIdValue to assure that the ID returned is unique /// </summary>
/// <summary> /// <returns>A string representation of current ContentDetail</returns>
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality //public override string ToString()
/// </summary> //{
/// <returns>A Unique ID for the current ContentDetail</returns> // return base.ToString();
protected override object GetIdValue() //}
{ public override bool IsDirty
return MyContentDetailUnique; // Absolutely Unique ID {
} get { return base.IsDirty; }
// CSLATODO: Replace base ContentDetail.ToString function as necessary }
/// <summary> public bool IsDirtyList(List<object> list)
/// Overrides Base ToString {
/// </summary> return base.IsDirty;
/// <returns>A string representation of current ContentDetail</returns> }
//public override string ToString() public override bool IsValid
//{ {
// return base.ToString(); get { return (IsNew && !IsDirty) ? true : base.IsValid; }
//} }
public override bool IsDirty public bool IsValidList(List<object> list)
{ {
get { return base.IsDirty; } return (IsNew && !IsDirty) ? true : base.IsValid;
} }
public bool IsDirtyList(List<object> list) #endregion
{ #region ValidationRules
return base.IsDirty; [NonSerialized]
} private bool _CheckingBrokenRules = false;
public override bool IsValid public IVEHasBrokenRules HasBrokenRules
{ {
get { return (IsNew && !IsDirty) ? true : base.IsValid; } get
} {
public bool IsValidList(List<object> list) if (_CheckingBrokenRules) return null;
{ if (BrokenRulesCollection.Count > 0) return this;
return (IsNew && !IsDirty) ? true : base.IsValid; try
} {
#endregion _CheckingBrokenRules = true;
#region ValidationRules IVEHasBrokenRules hasBrokenRules = null;
[NonSerialized] return hasBrokenRules;
private bool _CheckingBrokenRules = false; }
public IVEHasBrokenRules HasBrokenRules finally
{ {
get _CheckingBrokenRules = false;
{ }
if (_CheckingBrokenRules) return null; }
if (BrokenRulesCollection.Count > 0) return this; }
try public BrokenRulesCollection BrokenRules
{ {
_CheckingBrokenRules = true; get
IVEHasBrokenRules hasBrokenRules = null; {
return hasBrokenRules; IVEHasBrokenRules hasBrokenRules = HasBrokenRules;
} if (this.Equals(hasBrokenRules)) return BrokenRulesCollection;
finally return (hasBrokenRules != null ? hasBrokenRules.BrokenRules : null);
{ }
_CheckingBrokenRules = false; }
} protected override void AddBusinessRules()
} {
} ValidationRules.AddRule(
public BrokenRulesCollection BrokenRules Csla.Validation.CommonRules.StringRequired, "Text");
{ ValidationRules.AddRule(
get Csla.Validation.CommonRules.StringMaxLength,
{ new Csla.Validation.CommonRules.MaxLengthRuleArgs("Text", 1073741823));
IVEHasBrokenRules hasBrokenRules = HasBrokenRules; ValidationRules.AddRule(
if (this.Equals(hasBrokenRules)) return BrokenRulesCollection; Csla.Validation.CommonRules.StringMaxLength,
return (hasBrokenRules != null ? hasBrokenRules.BrokenRules : null); new Csla.Validation.CommonRules.MaxLengthRuleArgs("Config", 1073741823));
} ValidationRules.AddRule(
} Csla.Validation.CommonRules.StringRequired, "UserID");
protected override void AddBusinessRules() ValidationRules.AddRule(
{ Csla.Validation.CommonRules.StringMaxLength,
ValidationRules.AddRule( new Csla.Validation.CommonRules.MaxLengthRuleArgs("UserID", 100));
Csla.Validation.CommonRules.StringRequired, "Text"); // CSLATODO: Add other validation rules
ValidationRules.AddRule( }
Csla.Validation.CommonRules.StringMaxLength, // Sample data comparison validation rule
new Csla.Validation.CommonRules.MaxLengthRuleArgs("Text", 1073741823)); //private bool StartDateGTEndDate(object target, Csla.Validation.RuleArgs e)
ValidationRules.AddRule( //{
Csla.Validation.CommonRules.StringMaxLength, // if (_started > _ended)
new Csla.Validation.CommonRules.MaxLengthRuleArgs("Config", 1073741823)); // {
ValidationRules.AddRule( // e.Description = "Start date can't be after end date";
Csla.Validation.CommonRules.StringRequired, "UserID"); // return false;
ValidationRules.AddRule( // }
Csla.Validation.CommonRules.StringMaxLength, // else
new Csla.Validation.CommonRules.MaxLengthRuleArgs("UserID", 100)); // return true;
// CSLATODO: Add other validation rules //}
} #endregion
// Sample data comparison validation rule #region Authorization Rules
//private bool StartDateGTEndDate(object target, Csla.Validation.RuleArgs e) protected override void AddAuthorizationRules()
//{ {
// if (_started > _ended) //CSLATODO: Who can read/write which fields
// { //AuthorizationRules.AllowRead(DetailID, "<Role(s)>");
// e.Description = "Start date can't be after end date"; //AuthorizationRules.AllowRead(ItemType, "<Role(s)>");
// return false; //AuthorizationRules.AllowWrite(ItemType, "<Role(s)>");
// } //AuthorizationRules.AllowRead(Text, "<Role(s)>");
// else //AuthorizationRules.AllowWrite(Text, "<Role(s)>");
// return true; //AuthorizationRules.AllowRead(Config, "<Role(s)>");
//} //AuthorizationRules.AllowWrite(Config, "<Role(s)>");
#endregion //AuthorizationRules.AllowRead(DTS, "<Role(s)>");
#region Authorization Rules //AuthorizationRules.AllowWrite(DTS, "<Role(s)>");
protected override void AddAuthorizationRules() //AuthorizationRules.AllowRead(UserID, "<Role(s)>");
{ //AuthorizationRules.AllowWrite(UserID, "<Role(s)>");
//CSLATODO: Who can read/write which fields }
//AuthorizationRules.AllowRead(DetailID, "<Role(s)>"); public static bool CanAddObject()
//AuthorizationRules.AllowRead(ItemType, "<Role(s)>"); {
//AuthorizationRules.AllowWrite(ItemType, "<Role(s)>"); // CSLATODO: Can Add Authorization
//AuthorizationRules.AllowRead(Text, "<Role(s)>"); //return Csla.ApplicationContext.User.IsInRole("ProjectManager");
//AuthorizationRules.AllowWrite(Text, "<Role(s)>"); return true;
//AuthorizationRules.AllowRead(Config, "<Role(s)>"); }
//AuthorizationRules.AllowWrite(Config, "<Role(s)>"); public static bool CanGetObject()
//AuthorizationRules.AllowRead(DTS, "<Role(s)>"); {
//AuthorizationRules.AllowWrite(DTS, "<Role(s)>"); // CSLATODO: CanGet Authorization
//AuthorizationRules.AllowRead(UserID, "<Role(s)>"); return true;
//AuthorizationRules.AllowWrite(UserID, "<Role(s)>"); }
} public static bool CanDeleteObject()
public static bool CanAddObject() {
{ // CSLATODO: CanDelete Authorization
// CSLATODO: Can Add Authorization //bool result = false;
//return Csla.ApplicationContext.User.IsInRole("ProjectManager"); //if (Csla.ApplicationContext.User.IsInRole("ProjectManager"))result = true;
return true; //if (Csla.ApplicationContext.User.IsInRole("Administrator"))result = true;
} //return result;
public static bool CanGetObject() return true;
{ }
// CSLATODO: CanGet Authorization public static bool CanEditObject()
return true; {
} // CSLATODO: CanEdit Authorization
public static bool CanDeleteObject() //return Csla.ApplicationContext.User.IsInRole("ProjectManager");
{ return true;
// CSLATODO: CanDelete Authorization }
//bool result = false; #endregion
//if (Csla.ApplicationContext.User.IsInRole("ProjectManager"))result = true; #region Factory Methods
//if (Csla.ApplicationContext.User.IsInRole("Administrator"))result = true; public int CurrentEditLevel
//return result; { get { return EditLevel; } }
return true; private static int _ContentDetailUnique = 0;
} private static int ContentDetailUnique
public static bool CanEditObject() { get { return ++_ContentDetailUnique; } }
{ private int _MyContentDetailUnique = ContentDetailUnique;
// CSLATODO: CanEdit Authorization public int MyContentDetailUnique // Absolutely Unique ID - Editable FK
//return Csla.ApplicationContext.User.IsInRole("ProjectManager"); { get { return _MyContentDetailUnique; } }
return true; internal static ContentDetail New(int itemType, string text)
} {
#endregion return new ContentDetail(itemType, text);
#region Factory Methods }
public int CurrentEditLevel internal static ContentDetail Get(SafeDataReader dr)
{ get { return EditLevel; } } {
private static int _ContentDetailUnique = 0; return new ContentDetail(dr);
private static int ContentDetailUnique }
{ get { return ++_ContentDetailUnique; } } public ContentDetail()
private int _MyContentDetailUnique = ContentDetailUnique; {
public int MyContentDetailUnique // Absolutely Unique ID - Editable FK MarkAsChild();
{ get { return _MyContentDetailUnique; } } _DetailID = Detail.NextDetailID;
internal static ContentDetail New(int itemType, string text) _DTS = _ContentDetailExtension.DefaultDTS;
{ _UserID = _ContentDetailExtension.DefaultUserID;
return new ContentDetail(itemType, text); ValidationRules.CheckRules();
} }
internal static ContentDetail Get(SafeDataReader dr) private ContentDetail(int itemType, string text)
{ {
return new ContentDetail(dr); MarkAsChild();
} // CSLATODO: Add any initialization & defaults
public ContentDetail() _DetailID = Detail.NextDetailID;
{ _DTS = _ContentDetailExtension.DefaultDTS;
MarkAsChild(); _UserID = _ContentDetailExtension.DefaultUserID;
_DetailID = Detail.NextDetailID; _ItemType = itemType;
_DTS = _ContentDetailExtension.DefaultDTS; _Text = text;
_UserID = _ContentDetailExtension.DefaultUserID; ValidationRules.CheckRules();
ValidationRules.CheckRules(); }
} internal ContentDetail(SafeDataReader dr)
private ContentDetail(int itemType, string text) {
{ MarkAsChild();
MarkAsChild(); Fetch(dr);
// CSLATODO: Add any initialization & defaults }
_DetailID = Detail.NextDetailID; private bool _Disposed = false;
_DTS = _ContentDetailExtension.DefaultDTS; private static int _CountCreated = 0;
_UserID = _ContentDetailExtension.DefaultUserID; private static int _CountDisposed = 0;
_ItemType = itemType; private static int _CountFinalized = 0;
_Text = text; private static int IncrementCountCreated
ValidationRules.CheckRules(); { get { return ++_CountCreated; } }
} private int _CountWhenCreated = IncrementCountCreated;
internal ContentDetail(SafeDataReader dr) public static int CountCreated
{ { get { return _CountCreated; } }
MarkAsChild(); public static int CountNotDisposed
Fetch(dr); { get { return _CountCreated - _CountDisposed; } }
} public static int CountNotFinalized
private bool _Disposed = false; { get { return _CountCreated - _CountFinalized; } }
private static int _CountCreated = 0; ~ContentDetail()
private static int _CountDisposed = 0; {
private static int _CountFinalized = 0; _CountFinalized++;
private static int IncrementCountCreated }
{ get { return ++_CountCreated; } } public void Dispose()
private int _CountWhenCreated = IncrementCountCreated; {
public static int CountCreated if (_Disposed) return;
{ get { return _CountCreated; } } _CountDisposed++;
public static int CountNotDisposed _Disposed = true;
{ get { return _CountCreated - _CountDisposed; } } }
public static int CountNotFinalized #endregion
{ get { return _CountCreated - _CountFinalized; } } #region Data Access Portal
~ContentDetail() private void Fetch(SafeDataReader dr)
{ {
_CountFinalized++; if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentDetail.FetchDR", GetHashCode());
} try
public void Dispose() {
{ _DetailID = dr.GetInt32("DetailID");
if (_Disposed) return; _ItemType = dr.GetInt32("ItemType");
_CountDisposed++; _Text = dr.GetString("Text");
_Disposed = true; _Config = dr.GetString("Config");
} _DTS = dr.GetDateTime("DTS");
#endregion _UserID = dr.GetString("UserID");
#region Data Access Portal dr.GetBytes("LastChanged", 0, _LastChanged, 0, 8);
private void Fetch(SafeDataReader dr) }
{ catch (Exception ex) // FKItem Fetch
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentDetail.FetchDR", GetHashCode()); {
try if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentDetail.FetchDR", ex);
{ throw new DbCslaException("ContentDetail.Fetch", ex);
_DetailID = dr.GetInt32("DetailID"); }
_ItemType = dr.GetInt32("ItemType"); MarkOld();
_Text = dr.GetString("Text"); }
_Config = dr.GetString("Config"); internal void Insert(Content myContent)
_DTS = dr.GetDateTime("DTS"); {
_UserID = dr.GetString("UserID"); // if we're not dirty then don't update the database
dr.GetBytes("LastChanged", 0, _LastChanged, 0, 8); if (!this.IsDirty) return;
} SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
catch (Exception ex) // FKItem Fetch _LastChanged = Detail.Add(cn, ref _DetailID, myContent, _ItemType, _Text, _Config, _DTS, _UserID);
{ MarkOld();
if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentDetail.FetchDR", ex); }
throw new DbCslaException("ContentDetail.Fetch", ex); internal void Update(Content myContent)
} {
MarkOld(); // if we're not dirty then don't update the database
} if (!this.IsDirty) return;
internal void Insert(Content myContent) SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
{ _LastChanged = Detail.Update(cn, ref _DetailID, myContent.ContentID, _ItemType, _Text, _Config, _DTS, _UserID, ref _LastChanged);
// if we're not dirty then don't update the database MarkOld();
if (!this.IsDirty) return; }
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"]; internal void DeleteSelf(Content myContent)
_LastChanged = Detail.Add(cn, ref _DetailID, myContent, _ItemType, _Text, _Config, _DTS, _UserID); {
MarkOld(); // if we're not dirty then don't update the database
} if (!this.IsDirty) return;
internal void Update(Content myContent) // if we're new then don't update the database
{ if (this.IsNew) return;
// if we're not dirty then don't update the database SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
if (!this.IsDirty) return; Detail.Remove(cn, _DetailID);
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"]; MarkNew();
_LastChanged = Detail.Update(cn, ref _DetailID, myContent.ContentID, _ItemType, _Text, _Config, _DTS, _UserID, ref _LastChanged); }
MarkOld(); #endregion
} // Standard Default Code
internal void DeleteSelf(Content myContent) #region extension
{ ContentDetailExtension _ContentDetailExtension = new ContentDetailExtension();
// if we're not dirty then don't update the database [Serializable()]
if (!this.IsDirty) return; partial class ContentDetailExtension : extensionBase
// if we're new then don't update the database {
if (this.IsNew) return; }
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"]; [Serializable()]
Detail.Remove(cn, _DetailID); class extensionBase
MarkNew(); {
} // Default Values
#endregion public virtual DateTime DefaultDTS
// Standard Default Code {
#region extension get { return DateTime.Now; }
ContentDetailExtension _ContentDetailExtension = new ContentDetailExtension(); }
[Serializable()] public virtual string DefaultUserID
partial class ContentDetailExtension : extensionBase {
{ get { return Volian.Base.Library.VlnSettings.UserID; }
} }
[Serializable()] // Authorization Rules
class extensionBase public virtual void AddAuthorizationRules(Csla.Security.AuthorizationRules rules)
{ {
// Default Values // Needs to be overriden to add new authorization rules
public virtual DateTime DefaultDTS }
{ // Instance Authorization Rules
get { return DateTime.Now; } public virtual void AddInstanceAuthorizationRules(Csla.Security.AuthorizationRules rules)
} {
public virtual string DefaultUserID // Needs to be overriden to add new authorization rules
{ }
get { return Volian.Base.Library.VlnSettings.UserID; } // Validation Rules
} public virtual void AddValidationRules(Csla.Validation.ValidationRules rules)
// Authorization Rules {
public virtual void AddAuthorizationRules(Csla.Security.AuthorizationRules rules) // Needs to be overriden to add new validation rules
{ }
// Needs to be overriden to add new authorization rules // InstanceValidation Rules
} public virtual void AddInstanceValidationRules(Csla.Validation.ValidationRules rules)
// Instance Authorization Rules {
public virtual void AddInstanceAuthorizationRules(Csla.Security.AuthorizationRules rules) // Needs to be overriden to add new validation rules
{ }
// Needs to be overriden to add new authorization rules }
} #endregion
// Validation Rules } // Class
public virtual void AddValidationRules(Csla.Validation.ValidationRules rules) #region Converter
{ internal class ContentDetailConverter : ExpandableObjectConverter
// Needs to be overriden to add new validation rules {
} public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
// InstanceValidation Rules {
public virtual void AddInstanceValidationRules(Csla.Validation.ValidationRules rules) if (destType == typeof(string) && value is ContentDetail)
{ {
// Needs to be overriden to add new validation rules // Return the ToString value
} return ((ContentDetail)value).ToString();
} }
#endregion return base.ConvertTo(context, culture, value, destType);
} // Class }
#region Converter }
internal class ContentDetailConverter : ExpandableObjectConverter #endregion
{
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
{
if (destType == typeof(string) && value is ContentDetail)
{
// Return the ToString value
return ((ContentDetail)value).ToString();
}
return base.ConvertTo(context, culture, value, destType);
}
}
#endregion
} // Namespace } // Namespace

File diff suppressed because it is too large Load Diff

View File

@@ -20,403 +20,394 @@ using System.Collections.Generic;
using Csla.Validation; using Csla.Validation;
namespace VEPROMS.CSLA.Library namespace VEPROMS.CSLA.Library
{ {
/// <summary> /// <summary>
/// ContentItem Generated by MyGeneration using the CSLA Object Mapping template /// ContentItem Generated by MyGeneration using the CSLA Object Mapping template
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ContentItemConverter))] [TypeConverter(typeof(ContentItemConverter))]
public partial class ContentItem : BusinessBase<ContentItem>, IVEHasBrokenRules, IDisposable public partial class ContentItem : BusinessBase<ContentItem>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion #endregion
#region Business Methods #region Business Methods
private string _ErrorMessage = string.Empty; private string _ErrorMessage = string.Empty;
public string ErrorMessage public string ErrorMessage
{ {
get { return _ErrorMessage; } get { return _ErrorMessage; }
} }
private int _ItemID; private int _ItemID;
[System.ComponentModel.DataObjectField(true, true)] [System.ComponentModel.DataObjectField(true, true)]
public int ItemID public int ItemID
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("ItemID", true); if (_MyItem != null) _ItemID = _MyItem.ItemID;
if (_MyItem != null) _ItemID = _MyItem.ItemID; return _ItemID;
return _ItemID; }
} }
} private Item _MyItem;
private Item _MyItem; [System.ComponentModel.DataObjectField(true, true)]
[System.ComponentModel.DataObjectField(true, true)] public Item MyItem
public Item MyItem {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get
get {
{ if (_MyItem == null && _ItemID != 0) _MyItem = Item.Get(_ItemID);
CanReadProperty("MyItem", true); return _MyItem;
if (_MyItem == null && _ItemID != 0) _MyItem = Item.Get(_ItemID); }
return _MyItem; }
} private int? _PreviousID;
} public int? PreviousID
private int? _PreviousID; {
public int? PreviousID [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get if (_MyPrevious != null) _PreviousID = _MyPrevious.ItemID;
{ return _PreviousID;
CanReadProperty("PreviousID", true); }
if (_MyPrevious != null) _PreviousID = _MyPrevious.ItemID; }
return _PreviousID; private Item _MyPrevious;
} public Item MyPrevious
} {
private Item _MyPrevious; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
public Item MyPrevious get
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] if (_MyPrevious == null && _PreviousID != null) _MyPrevious = Item.Get((int)_PreviousID);
get return _MyPrevious;
{ }
CanReadProperty("MyPrevious", true); [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
if (_MyPrevious == null && _PreviousID != null) _MyPrevious = Item.Get((int)_PreviousID); set
return _MyPrevious; {
} if ((_MyPrevious == null ? _PreviousID : (int?)_MyPrevious.ItemID) != (value == null ? null : (int?)value.ItemID))
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
set _MyPrevious = value;
{ _PreviousID = (value == null ? null : (int?)value.ItemID);
CanWriteProperty("MyPrevious", true); PropertyHasChanged();
if ((_MyPrevious == null ? _PreviousID : (int?)_MyPrevious.ItemID) != (value == null ? null : (int?)value.ItemID)) }
{ }
_MyPrevious = value; }
_PreviousID = (value == null ? null : (int?)value.ItemID); private DateTime _DTS = new DateTime();
PropertyHasChanged(); public DateTime DTS
} {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
private DateTime _DTS = new DateTime(); {
public DateTime DTS return _DTS;
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get set
{ {
CanReadProperty("DTS", true); if (_DTS != value)
return _DTS; {
} _DTS = value;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] PropertyHasChanged();
set }
{ }
CanWriteProperty("DTS", true); }
if (_DTS != value) private string _UserID = string.Empty;
{ public string UserID
_DTS = value; {
PropertyHasChanged(); [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
} {
} return _UserID;
private string _UserID = string.Empty; }
public string UserID [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ set
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get if (value == null) value = string.Empty;
{ if (_UserID != value)
CanReadProperty("UserID", true); {
return _UserID; _UserID = value;
} PropertyHasChanged();
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
set }
{ }
CanWriteProperty("UserID", true); private byte[] _LastChanged = new byte[8];//timestamp
if (value == null) value = string.Empty; // CSLATODO: Check ContentItem.GetIdValue to assure that the ID returned is unique
if (_UserID != value) /// <summary>
{ /// Overrides Base GetIdValue - Used internally by CSLA to determine equality
_UserID = value; /// </summary>
PropertyHasChanged(); /// <returns>A Unique ID for the current ContentItem</returns>
} protected override object GetIdValue()
} {
} return MyContentItemUnique; // Absolutely Unique ID
private byte[] _LastChanged = new byte[8];//timestamp }
// CSLATODO: Check ContentItem.GetIdValue to assure that the ID returned is unique // CSLATODO: Replace base ContentItem.ToString function as necessary
/// <summary> /// <summary>
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality /// Overrides Base ToString
/// </summary> /// </summary>
/// <returns>A Unique ID for the current ContentItem</returns> /// <returns>A string representation of current ContentItem</returns>
protected override object GetIdValue() //public override string ToString()
{ //{
return MyContentItemUnique; // Absolutely Unique ID // return base.ToString();
} //}
// CSLATODO: Replace base ContentItem.ToString function as necessary public override bool IsDirty
/// <summary> {
/// Overrides Base ToString get { return base.IsDirty; }
/// </summary> }
/// <returns>A string representation of current ContentItem</returns> public bool IsDirtyList(List<object> list)
//public override string ToString() {
//{ return base.IsDirty;
// return base.ToString(); }
//} public override bool IsValid
public override bool IsDirty {
{ get { return (IsNew && !IsDirty) ? true : base.IsValid; }
get { return base.IsDirty; } }
} public bool IsValidList(List<object> list)
public bool IsDirtyList(List<object> list) {
{ return (IsNew && !IsDirty) ? true : base.IsValid;
return base.IsDirty; }
} #endregion
public override bool IsValid #region ValidationRules
{ [NonSerialized]
get { return (IsNew && !IsDirty) ? true : base.IsValid; } private bool _CheckingBrokenRules = false;
} public IVEHasBrokenRules HasBrokenRules
public bool IsValidList(List<object> list) {
{ get
return (IsNew && !IsDirty) ? true : base.IsValid; {
} if (_CheckingBrokenRules) return null;
#endregion if (BrokenRulesCollection.Count > 0) return this;
#region ValidationRules try
[NonSerialized] {
private bool _CheckingBrokenRules = false; _CheckingBrokenRules = true;
public IVEHasBrokenRules HasBrokenRules IVEHasBrokenRules hasBrokenRules = null;
{ if (_MyItem != null && (hasBrokenRules = _MyItem.HasBrokenRules) != null) return hasBrokenRules;
get return hasBrokenRules;
{ }
if (_CheckingBrokenRules) return null; finally
if (BrokenRulesCollection.Count > 0) return this; {
try _CheckingBrokenRules = false;
{ }
_CheckingBrokenRules = true; }
IVEHasBrokenRules hasBrokenRules = null; }
if (_MyItem != null && (hasBrokenRules = _MyItem.HasBrokenRules) != null) return hasBrokenRules; public BrokenRulesCollection BrokenRules
return hasBrokenRules; {
} get
finally {
{ IVEHasBrokenRules hasBrokenRules = HasBrokenRules;
_CheckingBrokenRules = false; if (this.Equals(hasBrokenRules)) return BrokenRulesCollection;
} return (hasBrokenRules != null ? hasBrokenRules.BrokenRules : null);
} }
} }
public BrokenRulesCollection BrokenRules protected override void AddBusinessRules()
{ {
get ValidationRules.AddRule(
{ Csla.Validation.CommonRules.StringRequired, "UserID");
IVEHasBrokenRules hasBrokenRules = HasBrokenRules; ValidationRules.AddRule(
if (this.Equals(hasBrokenRules)) return BrokenRulesCollection; Csla.Validation.CommonRules.StringMaxLength,
return (hasBrokenRules != null ? hasBrokenRules.BrokenRules : null); new Csla.Validation.CommonRules.MaxLengthRuleArgs("UserID", 100));
} // CSLATODO: Add other validation rules
} }
protected override void AddBusinessRules() // Sample data comparison validation rule
{ //private bool StartDateGTEndDate(object target, Csla.Validation.RuleArgs e)
ValidationRules.AddRule( //{
Csla.Validation.CommonRules.StringRequired, "UserID"); // if (_started > _ended)
ValidationRules.AddRule( // {
Csla.Validation.CommonRules.StringMaxLength, // e.Description = "Start date can't be after end date";
new Csla.Validation.CommonRules.MaxLengthRuleArgs("UserID", 100)); // return false;
// CSLATODO: Add other validation rules // }
} // else
// Sample data comparison validation rule // return true;
//private bool StartDateGTEndDate(object target, Csla.Validation.RuleArgs e) //}
//{ #endregion
// if (_started > _ended) #region Authorization Rules
// { protected override void AddAuthorizationRules()
// e.Description = "Start date can't be after end date"; {
// return false; //CSLATODO: Who can read/write which fields
// } //AuthorizationRules.AllowRead(ItemID, "<Role(s)>");
// else //AuthorizationRules.AllowRead(PreviousID, "<Role(s)>");
// return true; //AuthorizationRules.AllowWrite(PreviousID, "<Role(s)>");
//} //AuthorizationRules.AllowRead(DTS, "<Role(s)>");
#endregion //AuthorizationRules.AllowWrite(DTS, "<Role(s)>");
#region Authorization Rules //AuthorizationRules.AllowRead(UserID, "<Role(s)>");
protected override void AddAuthorizationRules() //AuthorizationRules.AllowWrite(UserID, "<Role(s)>");
{ }
//CSLATODO: Who can read/write which fields public static bool CanAddObject()
//AuthorizationRules.AllowRead(ItemID, "<Role(s)>"); {
//AuthorizationRules.AllowRead(PreviousID, "<Role(s)>"); // CSLATODO: Can Add Authorization
//AuthorizationRules.AllowWrite(PreviousID, "<Role(s)>"); //return Csla.ApplicationContext.User.IsInRole("ProjectManager");
//AuthorizationRules.AllowRead(DTS, "<Role(s)>"); return true;
//AuthorizationRules.AllowWrite(DTS, "<Role(s)>"); }
//AuthorizationRules.AllowRead(UserID, "<Role(s)>"); public static bool CanGetObject()
//AuthorizationRules.AllowWrite(UserID, "<Role(s)>"); {
} // CSLATODO: CanGet Authorization
public static bool CanAddObject() return true;
{ }
// CSLATODO: Can Add Authorization public static bool CanDeleteObject()
//return Csla.ApplicationContext.User.IsInRole("ProjectManager"); {
return true; // CSLATODO: CanDelete Authorization
} //bool result = false;
public static bool CanGetObject() //if (Csla.ApplicationContext.User.IsInRole("ProjectManager"))result = true;
{ //if (Csla.ApplicationContext.User.IsInRole("Administrator"))result = true;
// CSLATODO: CanGet Authorization //return result;
return true; return true;
} }
public static bool CanDeleteObject() public static bool CanEditObject()
{ {
// CSLATODO: CanDelete Authorization // CSLATODO: CanEdit Authorization
//bool result = false; //return Csla.ApplicationContext.User.IsInRole("ProjectManager");
//if (Csla.ApplicationContext.User.IsInRole("ProjectManager"))result = true; return true;
//if (Csla.ApplicationContext.User.IsInRole("Administrator"))result = true; }
//return result; #endregion
return true; #region Factory Methods
} public int CurrentEditLevel
public static bool CanEditObject() { get { return EditLevel; } }
{ private static int _ContentItemUnique = 0;
// CSLATODO: CanEdit Authorization private static int ContentItemUnique
//return Csla.ApplicationContext.User.IsInRole("ProjectManager"); { get { return ++_ContentItemUnique; } }
return true; private int _MyContentItemUnique = ContentItemUnique;
} public int MyContentItemUnique // Absolutely Unique ID - Editable FK
#endregion { get { return _MyContentItemUnique; } }
#region Factory Methods internal static ContentItem New()
public int CurrentEditLevel {
{ get { return EditLevel; } } return new ContentItem();
private static int _ContentItemUnique = 0; }
private static int ContentItemUnique internal static ContentItem Get(SafeDataReader dr)
{ get { return ++_ContentItemUnique; } } {
private int _MyContentItemUnique = ContentItemUnique; return new ContentItem(dr);
public int MyContentItemUnique // Absolutely Unique ID - Editable FK }
{ get { return _MyContentItemUnique; } } public ContentItem()
internal static ContentItem New() {
{ MarkAsChild();
return new ContentItem(); _ItemID = Item.NextItemID;
} _DTS = _ContentItemExtension.DefaultDTS;
internal static ContentItem Get(SafeDataReader dr) _UserID = _ContentItemExtension.DefaultUserID;
{ ValidationRules.CheckRules();
return new ContentItem(dr); }
} internal ContentItem(SafeDataReader dr)
public ContentItem() {
{ MarkAsChild();
MarkAsChild(); Fetch(dr);
_ItemID = Item.NextItemID; }
_DTS = _ContentItemExtension.DefaultDTS; private bool _Disposed = false;
_UserID = _ContentItemExtension.DefaultUserID; private static int _CountCreated = 0;
ValidationRules.CheckRules(); private static int _CountDisposed = 0;
} private static int _CountFinalized = 0;
internal ContentItem(SafeDataReader dr) private static int IncrementCountCreated
{ { get { return ++_CountCreated; } }
MarkAsChild(); private int _CountWhenCreated = IncrementCountCreated;
Fetch(dr); public static int CountCreated
} { get { return _CountCreated; } }
private bool _Disposed = false; public static int CountNotDisposed
private static int _CountCreated = 0; { get { return _CountCreated - _CountDisposed; } }
private static int _CountDisposed = 0; public static int CountNotFinalized
private static int _CountFinalized = 0; { get { return _CountCreated - _CountFinalized; } }
private static int IncrementCountCreated ~ContentItem()
{ get { return ++_CountCreated; } } {
private int _CountWhenCreated = IncrementCountCreated; _CountFinalized++;
public static int CountCreated }
{ get { return _CountCreated; } } public void Dispose()
public static int CountNotDisposed {
{ get { return _CountCreated - _CountDisposed; } } if (_Disposed) return;
public static int CountNotFinalized _CountDisposed++;
{ get { return _CountCreated - _CountFinalized; } } _Disposed = true;
~ContentItem() }
{ #endregion
_CountFinalized++; #region Data Access Portal
} private void Fetch(SafeDataReader dr)
public void Dispose() {
{ if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentItem.FetchDR", GetHashCode());
if (_Disposed) return; try
_CountDisposed++; {
_Disposed = true; _ItemID = dr.GetInt32("ItemID");
} _PreviousID = (int?)dr.GetValue("PreviousID");
#endregion _DTS = dr.GetDateTime("DTS");
#region Data Access Portal _UserID = dr.GetString("UserID");
private void Fetch(SafeDataReader dr) dr.GetBytes("LastChanged", 0, _LastChanged, 0, 8);
{ }
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentItem.FetchDR", GetHashCode()); catch (Exception ex) // FKItem Fetch
try {
{ if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentItem.FetchDR", ex);
_ItemID = dr.GetInt32("ItemID"); throw new DbCslaException("ContentItem.Fetch", ex);
_PreviousID = (int?)dr.GetValue("PreviousID"); }
_DTS = dr.GetDateTime("DTS"); MarkOld();
_UserID = dr.GetString("UserID"); }
dr.GetBytes("LastChanged", 0, _LastChanged, 0, 8); internal void Insert(Content myContent)
} {
catch (Exception ex) // FKItem Fetch // if we're not dirty then don't update the database
{ if (!this.IsDirty) return;
if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentItem.FetchDR", ex); SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
throw new DbCslaException("ContentItem.Fetch", ex); _LastChanged = Item.Add(cn, ref _ItemID, Item.Get((int)_PreviousID), myContent, _DTS, _UserID);
} MarkOld();
MarkOld(); }
} internal void Update(Content myContent)
internal void Insert(Content myContent) {
{ // if we're not dirty then don't update the database
// if we're not dirty then don't update the database if (!this.IsDirty) return;
if (!this.IsDirty) return; SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"]; _LastChanged = Item.Update(cn, ref _ItemID, _PreviousID, myContent.ContentID, _DTS, _UserID, ref _LastChanged);
_LastChanged = Item.Add(cn, ref _ItemID, Item.Get((int)_PreviousID), myContent, _DTS, _UserID); MarkOld();
MarkOld(); }
} internal void DeleteSelf(Content myContent)
internal void Update(Content myContent) {
{ // if we're not dirty then don't update the database
// if we're not dirty then don't update the database if (!this.IsDirty) return;
if (!this.IsDirty) return; // if we're new then don't update the database
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"]; if (this.IsNew) return;
_LastChanged = Item.Update(cn, ref _ItemID, _PreviousID, myContent.ContentID, _DTS, _UserID, ref _LastChanged); SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
MarkOld(); Item.Remove(cn, _ItemID);
} MarkNew();
internal void DeleteSelf(Content myContent) }
{ #endregion
// if we're not dirty then don't update the database // Standard Default Code
if (!this.IsDirty) return; #region extension
// if we're new then don't update the database ContentItemExtension _ContentItemExtension = new ContentItemExtension();
if (this.IsNew) return; [Serializable()]
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"]; partial class ContentItemExtension : extensionBase
Item.Remove(cn, _ItemID); {
MarkNew(); }
} [Serializable()]
#endregion class extensionBase
// Standard Default Code {
#region extension // Default Values
ContentItemExtension _ContentItemExtension = new ContentItemExtension(); public virtual DateTime DefaultDTS
[Serializable()] {
partial class ContentItemExtension : extensionBase get { return DateTime.Now; }
{ }
} public virtual string DefaultUserID
[Serializable()] {
class extensionBase get { return Volian.Base.Library.VlnSettings.UserID; }
{ }
// Default Values // Authorization Rules
public virtual DateTime DefaultDTS public virtual void AddAuthorizationRules(Csla.Security.AuthorizationRules rules)
{ {
get { return DateTime.Now; } // Needs to be overriden to add new authorization rules
} }
public virtual string DefaultUserID // Instance Authorization Rules
{ public virtual void AddInstanceAuthorizationRules(Csla.Security.AuthorizationRules rules)
get { return Volian.Base.Library.VlnSettings.UserID; } {
} // Needs to be overriden to add new authorization rules
// Authorization Rules }
public virtual void AddAuthorizationRules(Csla.Security.AuthorizationRules rules) // Validation Rules
{ public virtual void AddValidationRules(Csla.Validation.ValidationRules rules)
// Needs to be overriden to add new authorization rules {
} // Needs to be overriden to add new validation rules
// Instance Authorization Rules }
public virtual void AddInstanceAuthorizationRules(Csla.Security.AuthorizationRules rules) // InstanceValidation Rules
{ public virtual void AddInstanceValidationRules(Csla.Validation.ValidationRules rules)
// Needs to be overriden to add new authorization rules {
} // Needs to be overriden to add new validation rules
// Validation Rules }
public virtual void AddValidationRules(Csla.Validation.ValidationRules rules) }
{ #endregion
// Needs to be overriden to add new validation rules } // Class
} #region Converter
// InstanceValidation Rules internal class ContentItemConverter : ExpandableObjectConverter
public virtual void AddInstanceValidationRules(Csla.Validation.ValidationRules rules) {
{ public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
// Needs to be overriden to add new validation rules {
} if (destType == typeof(string) && value is ContentItem)
} {
#endregion // Return the ToString value
} // Class return ((ContentItem)value).ToString();
#region Converter }
internal class ContentItemConverter : ExpandableObjectConverter return base.ConvertTo(context, culture, value, destType);
{ }
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType) }
{ #endregion
if (destType == typeof(string) && value is ContentItem)
{
// Return the ToString value
return ((ContentItem)value).ToString();
}
return base.ConvertTo(context, culture, value, destType);
}
}
#endregion
} // Namespace } // Namespace

View File

@@ -20,470 +20,458 @@ using System.Collections.Generic;
using Csla.Validation; using Csla.Validation;
namespace VEPROMS.CSLA.Library namespace VEPROMS.CSLA.Library
{ {
/// <summary> /// <summary>
/// ContentPart Generated by MyGeneration using the CSLA Object Mapping template /// ContentPart Generated by MyGeneration using the CSLA Object Mapping template
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ContentPartConverter))] [TypeConverter(typeof(ContentPartConverter))]
public partial class ContentPart : BusinessBase<ContentPart>, IVEHasBrokenRules, IDisposable public partial class ContentPart : BusinessBase<ContentPart>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion #endregion
#region Business Methods #region Business Methods
private string _ErrorMessage = string.Empty; private string _ErrorMessage = string.Empty;
public string ErrorMessage public string ErrorMessage
{ {
get { return _ErrorMessage; } get { return _ErrorMessage; }
} }
private int _FromType; private int _FromType;
[System.ComponentModel.DataObjectField(true, true)] [System.ComponentModel.DataObjectField(true, true)]
public int FromType public int FromType
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("FromType", true); return _FromType;
return _FromType; }
} }
} private int _ItemID;
private int _ItemID; public int ItemID
public int ItemID {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get
get {
{ if (_MyItem != null) _ItemID = _MyItem.ItemID;
CanReadProperty("ItemID", true); return _ItemID;
if (_MyItem != null) _ItemID = _MyItem.ItemID; }
return _ItemID; }
} private Item _MyItem;
} public Item MyItem
private Item _MyItem; {
public Item MyItem [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get if (_MyItem == null && _ItemID != 0) _MyItem = Item.Get(_ItemID);
{ return _MyItem;
CanReadProperty("MyItem", true); }
if (_MyItem == null && _ItemID != 0) _MyItem = Item.Get(_ItemID); [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
return _MyItem; set
} {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] if (_MyItem != value)
set {
{ _MyItem = value;
CanWriteProperty("MyItem", true); _ItemID = value.ItemID;// Update underlying data field
if (_MyItem != value) PropertyHasChanged();
{ }
_MyItem = value; }
_ItemID = value.ItemID;// Update underlying data field }
PropertyHasChanged(); private DateTime _DTS = new DateTime();
} public DateTime DTS
} {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
private DateTime _DTS = new DateTime(); get
public DateTime DTS {
{ return _DTS;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ set
CanReadProperty("DTS", true); {
return _DTS; if (_DTS != value)
} {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] _DTS = value;
set PropertyHasChanged();
{ }
CanWriteProperty("DTS", true); }
if (_DTS != value) }
{ private string _UserID = string.Empty;
_DTS = value; public string UserID
PropertyHasChanged(); {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
} {
private string _UserID = string.Empty; return _UserID;
public string UserID }
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] set
get {
{ if (value == null) value = string.Empty;
CanReadProperty("UserID", true); if (_UserID != value)
return _UserID; {
} _UserID = value;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] PropertyHasChanged();
set }
{ }
CanWriteProperty("UserID", true); }
if (value == null) value = string.Empty; private byte[] _LastChanged = new byte[8];//timestamp
if (_UserID != value) private int? _Item_PreviousID;
{ public int? Item_PreviousID
_UserID = value; {
PropertyHasChanged(); [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
} {
} return _Item_PreviousID;
private byte[] _LastChanged = new byte[8];//timestamp }
private int? _Item_PreviousID; }
public int? Item_PreviousID private int _Item_ContentID;
{ public int Item_ContentID
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
CanReadProperty("Item_PreviousID", true); {
return _Item_PreviousID; return _Item_ContentID;
} }
} }
private int _Item_ContentID; private DateTime _Item_DTS = new DateTime();
public int Item_ContentID public DateTime Item_DTS
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Item_ContentID", true); return _Item_DTS;
return _Item_ContentID; }
} }
} private string _Item_UserID = string.Empty;
private DateTime _Item_DTS = new DateTime(); public string Item_UserID
public DateTime Item_DTS {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get
get {
{ return _Item_UserID;
CanReadProperty("Item_DTS", true); }
return _Item_DTS; }
} // CSLATODO: Check ContentPart.GetIdValue to assure that the ID returned is unique
} /// <summary>
private string _Item_UserID = string.Empty; /// Overrides Base GetIdValue - Used internally by CSLA to determine equality
public string Item_UserID /// </summary>
{ /// <returns>A Unique ID for the current ContentPart</returns>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] protected override object GetIdValue()
get {
{ return MyContentPartUnique; // Absolutely Unique ID
CanReadProperty("Item_UserID", true); }
return _Item_UserID; // CSLATODO: Replace base ContentPart.ToString function as necessary
} /// <summary>
} /// Overrides Base ToString
// CSLATODO: Check ContentPart.GetIdValue to assure that the ID returned is unique /// </summary>
/// <summary> /// <returns>A string representation of current ContentPart</returns>
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality //public override string ToString()
/// </summary> //{
/// <returns>A Unique ID for the current ContentPart</returns> // return base.ToString();
protected override object GetIdValue() //}
{ public override bool IsDirty
return MyContentPartUnique; // Absolutely Unique ID {
} get
// CSLATODO: Replace base ContentPart.ToString function as necessary {
/// <summary> if (base.IsDirty)
/// Overrides Base ToString return true;
/// </summary> return IsDirtyList(new List<object>());
/// <returns>A string representation of current ContentPart</returns> }
//public override string ToString() }
//{ public bool IsDirtyList(List<object> list)
// return base.ToString(); {
//} if (base.IsDirty || list.Contains(this))
public override bool IsDirty return base.IsDirty;
{ list.Add(this);
get return base.IsDirty || (_MyItem == null ? false : _MyItem.IsDirtyList(list));
{ }
if ( base.IsDirty ) public override bool IsValid
return true; {
return IsDirtyList(new List<object>()); get { return IsValidList(new List<object>()); }
} }
} public bool IsValidList(List<object> list)
public bool IsDirtyList(List<object> list) {
{ if (list.Contains(this))
if (base.IsDirty || list.Contains(this)) return (IsNew && !IsDirty) ? true : base.IsValid;
return base.IsDirty; list.Add(this);
list.Add(this); return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyItem == null ? true : _MyItem.IsValidList(list));
return base.IsDirty || (_MyItem == null ? false : _MyItem.IsDirtyList(list)); }
} #endregion
public override bool IsValid #region ValidationRules
{ [NonSerialized]
get { return IsValidList(new List<object>()); } private bool _CheckingBrokenRules = false;
} public IVEHasBrokenRules HasBrokenRules
public bool IsValidList(List<object> list) {
{ get
if(list.Contains(this)) {
return (IsNew && !IsDirty) ? true : base.IsValid; if (_CheckingBrokenRules) return null;
list.Add(this); if (BrokenRulesCollection.Count > 0) return this;
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyItem == null ? true : _MyItem.IsValidList(list)); try
} {
#endregion _CheckingBrokenRules = true;
#region ValidationRules IVEHasBrokenRules hasBrokenRules = null;
[NonSerialized] if (_MyItem != null && (hasBrokenRules = _MyItem.HasBrokenRules) != null) return hasBrokenRules;
private bool _CheckingBrokenRules = false; return hasBrokenRules;
public IVEHasBrokenRules HasBrokenRules }
{ finally
get {
{ _CheckingBrokenRules = false;
if (_CheckingBrokenRules) return null; }
if (BrokenRulesCollection.Count > 0) return this; }
try }
{ public BrokenRulesCollection BrokenRules
_CheckingBrokenRules = true; {
IVEHasBrokenRules hasBrokenRules = null; get
if (_MyItem != null && (hasBrokenRules = _MyItem.HasBrokenRules) != null) return hasBrokenRules; {
return hasBrokenRules; IVEHasBrokenRules hasBrokenRules = HasBrokenRules;
} if (this.Equals(hasBrokenRules)) return BrokenRulesCollection;
finally return (hasBrokenRules != null ? hasBrokenRules.BrokenRules : null);
{ }
_CheckingBrokenRules = false; }
} protected override void AddBusinessRules()
} {
} ValidationRules.AddRule<ContentPart>(MyItemRequired, "MyItem");
public BrokenRulesCollection BrokenRules ValidationRules.AddRule(
{ Csla.Validation.CommonRules.StringRequired, "UserID");
get ValidationRules.AddRule(
{ Csla.Validation.CommonRules.StringMaxLength,
IVEHasBrokenRules hasBrokenRules = HasBrokenRules; new Csla.Validation.CommonRules.MaxLengthRuleArgs("UserID", 100));
if (this.Equals(hasBrokenRules)) return BrokenRulesCollection; // CSLATODO: Add other validation rules
return (hasBrokenRules != null ? hasBrokenRules.BrokenRules : null); }
} private static bool MyItemRequired(ContentPart target, Csla.Validation.RuleArgs e)
} {
protected override void AddBusinessRules() if (target._ItemID == 0 && target._MyItem == null) // Required field missing
{ {
ValidationRules.AddRule<ContentPart>(MyItemRequired, "MyItem"); e.Description = "Required";
ValidationRules.AddRule( return false;
Csla.Validation.CommonRules.StringRequired, "UserID"); }
ValidationRules.AddRule( return true;
Csla.Validation.CommonRules.StringMaxLength, }
new Csla.Validation.CommonRules.MaxLengthRuleArgs("UserID", 100)); // Sample data comparison validation rule
// CSLATODO: Add other validation rules //private bool StartDateGTEndDate(object target, Csla.Validation.RuleArgs e)
} //{
private static bool MyItemRequired(ContentPart target, Csla.Validation.RuleArgs e) // if (_started > _ended)
{ // {
if (target._ItemID == 0 && target._MyItem == null) // Required field missing // e.Description = "Start date can't be after end date";
{ // return false;
e.Description = "Required"; // }
return false; // else
} // return true;
return true; //}
} #endregion
// Sample data comparison validation rule #region Authorization Rules
//private bool StartDateGTEndDate(object target, Csla.Validation.RuleArgs e) protected override void AddAuthorizationRules()
//{ {
// if (_started > _ended) //CSLATODO: Who can read/write which fields
// { //AuthorizationRules.AllowRead(FromType, "<Role(s)>");
// e.Description = "Start date can't be after end date"; //AuthorizationRules.AllowRead(ItemID, "<Role(s)>");
// return false; //AuthorizationRules.AllowWrite(ItemID, "<Role(s)>");
// } //AuthorizationRules.AllowRead(DTS, "<Role(s)>");
// else //AuthorizationRules.AllowWrite(DTS, "<Role(s)>");
// return true; //AuthorizationRules.AllowRead(UserID, "<Role(s)>");
//} //AuthorizationRules.AllowWrite(UserID, "<Role(s)>");
#endregion }
#region Authorization Rules public static bool CanAddObject()
protected override void AddAuthorizationRules() {
{ // CSLATODO: Can Add Authorization
//CSLATODO: Who can read/write which fields //return Csla.ApplicationContext.User.IsInRole("ProjectManager");
//AuthorizationRules.AllowRead(FromType, "<Role(s)>"); return true;
//AuthorizationRules.AllowRead(ItemID, "<Role(s)>"); }
//AuthorizationRules.AllowWrite(ItemID, "<Role(s)>"); public static bool CanGetObject()
//AuthorizationRules.AllowRead(DTS, "<Role(s)>"); {
//AuthorizationRules.AllowWrite(DTS, "<Role(s)>"); // CSLATODO: CanGet Authorization
//AuthorizationRules.AllowRead(UserID, "<Role(s)>"); return true;
//AuthorizationRules.AllowWrite(UserID, "<Role(s)>"); }
} public static bool CanDeleteObject()
public static bool CanAddObject() {
{ // CSLATODO: CanDelete Authorization
// CSLATODO: Can Add Authorization //bool result = false;
//return Csla.ApplicationContext.User.IsInRole("ProjectManager"); //if (Csla.ApplicationContext.User.IsInRole("ProjectManager"))result = true;
return true; //if (Csla.ApplicationContext.User.IsInRole("Administrator"))result = true;
} //return result;
public static bool CanGetObject() return true;
{ }
// CSLATODO: CanGet Authorization public static bool CanEditObject()
return true; {
} // CSLATODO: CanEdit Authorization
public static bool CanDeleteObject() //return Csla.ApplicationContext.User.IsInRole("ProjectManager");
{ return true;
// CSLATODO: CanDelete Authorization }
//bool result = false; #endregion
//if (Csla.ApplicationContext.User.IsInRole("ProjectManager"))result = true; #region Factory Methods
//if (Csla.ApplicationContext.User.IsInRole("Administrator"))result = true; public int CurrentEditLevel
//return result; { get { return EditLevel; } }
return true; private static int _ContentPartUnique = 0;
} private static int ContentPartUnique
public static bool CanEditObject() { get { return ++_ContentPartUnique; } }
{ private int _MyContentPartUnique = ContentPartUnique;
// CSLATODO: CanEdit Authorization public int MyContentPartUnique // Absolutely Unique ID - Editable FK
//return Csla.ApplicationContext.User.IsInRole("ProjectManager"); { get { return _MyContentPartUnique; } }
return true; internal static ContentPart New(int fromType, Item myItem)
} {
#endregion return new ContentPart(fromType, myItem);
#region Factory Methods }
public int CurrentEditLevel internal static ContentPart Get(SafeDataReader dr)
{ get { return EditLevel; } } {
private static int _ContentPartUnique = 0; return new ContentPart(dr);
private static int ContentPartUnique }
{ get { return ++_ContentPartUnique; } } public ContentPart()
private int _MyContentPartUnique = ContentPartUnique; {
public int MyContentPartUnique // Absolutely Unique ID - Editable FK MarkAsChild();
{ get { return _MyContentPartUnique; } }
internal static ContentPart New(int fromType, Item myItem)
{
return new ContentPart(fromType, myItem);
}
internal static ContentPart Get(SafeDataReader dr)
{
return new ContentPart(dr);
}
public ContentPart()
{
MarkAsChild();
_DTS = _ContentPartExtension.DefaultDTS; _DTS = _ContentPartExtension.DefaultDTS;
_UserID = _ContentPartExtension.DefaultUserID; _UserID = _ContentPartExtension.DefaultUserID;
ValidationRules.CheckRules(); ValidationRules.CheckRules();
} }
private ContentPart(int fromType, Item myItem) private ContentPart(int fromType, Item myItem)
{ {
MarkAsChild(); MarkAsChild();
// CSLATODO: Add any initialization & defaults // CSLATODO: Add any initialization & defaults
_DTS = _ContentPartExtension.DefaultDTS; _DTS = _ContentPartExtension.DefaultDTS;
_UserID = _ContentPartExtension.DefaultUserID; _UserID = _ContentPartExtension.DefaultUserID;
_FromType = fromType; _FromType = fromType;
_MyItem = myItem; _MyItem = myItem;
ValidationRules.CheckRules(); ValidationRules.CheckRules();
} }
internal ContentPart(SafeDataReader dr) internal ContentPart(SafeDataReader dr)
{ {
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false; private bool _Disposed = false;
private static int _CountCreated = 0; private static int _CountCreated = 0;
private static int _CountDisposed = 0; private static int _CountDisposed = 0;
private static int _CountFinalized = 0; private static int _CountFinalized = 0;
private static int IncrementCountCreated private static int IncrementCountCreated
{ get { return ++_CountCreated; } } { get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated; private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated public static int CountCreated
{ get { return _CountCreated; } } { get { return _CountCreated; } }
public static int CountNotDisposed public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } } { get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } } { get { return _CountCreated - _CountFinalized; } }
~ContentPart() ~ContentPart()
{ {
_CountFinalized++; _CountFinalized++;
} }
public void Dispose() public void Dispose()
{ {
if (_Disposed) return; if (_Disposed) return;
_CountDisposed++; _CountDisposed++;
_Disposed = true; _Disposed = true;
if (_MyItem != null) if (_MyItem != null)
{ {
_MyItem.Dispose(); _MyItem.Dispose();
_MyItem = null; _MyItem = null;
} }
} }
#endregion #endregion
#region Data Access Portal #region Data Access Portal
private void Fetch(SafeDataReader dr) private void Fetch(SafeDataReader dr)
{ {
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentPart.FetchDR", GetHashCode()); if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentPart.FetchDR", GetHashCode());
try try
{ {
_FromType = dr.GetInt32("FromType"); _FromType = dr.GetInt32("FromType");
_ItemID = dr.GetInt32("ItemID"); _ItemID = dr.GetInt32("ItemID");
_DTS = dr.GetDateTime("DTS"); _DTS = dr.GetDateTime("DTS");
_UserID = dr.GetString("UserID"); _UserID = dr.GetString("UserID");
dr.GetBytes("LastChanged", 0, _LastChanged, 0, 8); dr.GetBytes("LastChanged", 0, _LastChanged, 0, 8);
_Item_PreviousID = (int?)dr.GetValue("Item_PreviousID"); _Item_PreviousID = (int?)dr.GetValue("Item_PreviousID");
_Item_ContentID = dr.GetInt32("Item_ContentID"); _Item_ContentID = dr.GetInt32("Item_ContentID");
_Item_DTS = dr.GetDateTime("Item_DTS"); _Item_DTS = dr.GetDateTime("Item_DTS");
_Item_UserID = dr.GetString("Item_UserID"); _Item_UserID = dr.GetString("Item_UserID");
} }
catch (Exception ex) // FKItem Fetch catch (Exception ex) // FKItem Fetch
{ {
if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentPart.FetchDR", ex); if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentPart.FetchDR", ex);
throw new DbCslaException("ContentPart.Fetch", ex); throw new DbCslaException("ContentPart.Fetch", ex);
} }
MarkOld(); MarkOld();
} }
internal void Insert(Content myContent) internal void Insert(Content myContent)
{ {
// if we're not dirty then don't update the database // if we're not dirty then don't update the database
if (!this.IsDirty) return; if (!this.IsDirty) return;
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"]; SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
_LastChanged = Part.Add(cn, myContent, _FromType, _MyItem, _DTS, _UserID); _LastChanged = Part.Add(cn, myContent, _FromType, _MyItem, _DTS, _UserID);
MarkOld(); MarkOld();
} }
internal void Update(Content myContent) internal void Update(Content myContent)
{ {
// if we're not dirty then don't update the database // if we're not dirty then don't update the database
if (!this.IsDirty) return; if (!this.IsDirty) return;
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"]; SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
_LastChanged = Part.Update(cn, myContent.ContentID, _FromType, _ItemID, _DTS, _UserID, ref _LastChanged); _LastChanged = Part.Update(cn, myContent.ContentID, _FromType, _ItemID, _DTS, _UserID, ref _LastChanged);
MarkOld(); MarkOld();
} }
internal void DeleteSelf(Content myContent) internal void DeleteSelf(Content myContent)
{ {
// if we're not dirty then don't update the database // if we're not dirty then don't update the database
if (!this.IsDirty) return; if (!this.IsDirty) return;
// if we're new then don't update the database // if we're new then don't update the database
if (this.IsNew) return; if (this.IsNew) return;
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"]; SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
Part.Remove(cn, myContent.ContentID, _FromType); Part.Remove(cn, myContent.ContentID, _FromType);
MarkNew(); MarkNew();
} }
#endregion #endregion
// Standard Default Code // Standard Default Code
#region extension #region extension
ContentPartExtension _ContentPartExtension = new ContentPartExtension(); ContentPartExtension _ContentPartExtension = new ContentPartExtension();
[Serializable()] [Serializable()]
partial class ContentPartExtension : extensionBase partial class ContentPartExtension : extensionBase
{ {
} }
[Serializable()] [Serializable()]
class extensionBase class extensionBase
{ {
// Default Values // Default Values
public virtual DateTime DefaultDTS public virtual DateTime DefaultDTS
{ {
get { return DateTime.Now; } get { return DateTime.Now; }
} }
public virtual string DefaultUserID public virtual string DefaultUserID
{ {
get { return Volian.Base.Library.VlnSettings.UserID; } get { return Volian.Base.Library.VlnSettings.UserID; }
} }
// Authorization Rules // Authorization Rules
public virtual void AddAuthorizationRules(Csla.Security.AuthorizationRules rules) public virtual void AddAuthorizationRules(Csla.Security.AuthorizationRules rules)
{ {
// Needs to be overriden to add new authorization rules // Needs to be overriden to add new authorization rules
} }
// Instance Authorization Rules // Instance Authorization Rules
public virtual void AddInstanceAuthorizationRules(Csla.Security.AuthorizationRules rules) public virtual void AddInstanceAuthorizationRules(Csla.Security.AuthorizationRules rules)
{ {
// Needs to be overriden to add new authorization rules // Needs to be overriden to add new authorization rules
} }
// Validation Rules // Validation Rules
public virtual void AddValidationRules(Csla.Validation.ValidationRules rules) public virtual void AddValidationRules(Csla.Validation.ValidationRules rules)
{ {
// Needs to be overriden to add new validation rules // Needs to be overriden to add new validation rules
} }
// InstanceValidation Rules // InstanceValidation Rules
public virtual void AddInstanceValidationRules(Csla.Validation.ValidationRules rules) public virtual void AddInstanceValidationRules(Csla.Validation.ValidationRules rules)
{ {
// Needs to be overriden to add new validation rules // Needs to be overriden to add new validation rules
} }
} }
#endregion #endregion
} // Class } // Class
#region Converter #region Converter
internal class ContentPartConverter : ExpandableObjectConverter internal class ContentPartConverter : ExpandableObjectConverter
{ {
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType) public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
{ {
if (destType == typeof(string) && value is ContentPart) if (destType == typeof(string) && value is ContentPart)
{ {
// Return the ToString value // Return the ToString value
return ((ContentPart)value).ToString(); return ((ContentPart)value).ToString();
} }
return base.ConvertTo(context, culture, value, destType); return base.ConvertTo(context, culture, value, destType);
} }
} }
#endregion #endregion
} // Namespace } // Namespace

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -19,376 +19,366 @@ using System.ComponentModel;
using System.Collections.Generic; using System.Collections.Generic;
namespace VEPROMS.CSLA.Library namespace VEPROMS.CSLA.Library
{ {
public delegate void AnnotationAuditInfoEvent(object sender); public delegate void AnnotationAuditInfoEvent(object sender);
/// <summary> /// <summary>
/// AnnotationAuditInfo Generated by MyGeneration using the CSLA Object Mapping template /// AnnotationAuditInfo Generated by MyGeneration using the CSLA Object Mapping template
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(AnnotationAuditInfoConverter))] [TypeConverter(typeof(AnnotationAuditInfoConverter))]
public partial class AnnotationAuditInfo : ReadOnlyBase<AnnotationAuditInfo>, IDisposable public partial class AnnotationAuditInfo : ReadOnlyBase<AnnotationAuditInfo>, IDisposable
{ {
public event AnnotationAuditInfoEvent Changed; public event AnnotationAuditInfoEvent Changed;
private void OnChange() private void OnChange()
{ {
if (Changed != null) Changed(this); if (Changed != null) Changed(this);
} }
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion #endregion
#region Collection #region Collection
private static List<AnnotationAuditInfo> _CacheList = new List<AnnotationAuditInfo>(); private static List<AnnotationAuditInfo> _CacheList = new List<AnnotationAuditInfo>();
protected static void AddToCache(AnnotationAuditInfo annotationAuditInfo) protected static void AddToCache(AnnotationAuditInfo annotationAuditInfo)
{ {
if (!_CacheList.Contains(annotationAuditInfo)) _CacheList.Add(annotationAuditInfo); // In AddToCache if (!_CacheList.Contains(annotationAuditInfo)) _CacheList.Add(annotationAuditInfo); // In AddToCache
} }
protected static void RemoveFromCache(AnnotationAuditInfo annotationAuditInfo) protected static void RemoveFromCache(AnnotationAuditInfo annotationAuditInfo)
{ {
while (_CacheList.Contains(annotationAuditInfo)) _CacheList.Remove(annotationAuditInfo); // In RemoveFromCache while (_CacheList.Contains(annotationAuditInfo)) _CacheList.Remove(annotationAuditInfo); // In RemoveFromCache
} }
private static Dictionary<string, List<AnnotationAuditInfo>> _CacheByPrimaryKey = new Dictionary<string, List<AnnotationAuditInfo>>(); private static Dictionary<string, List<AnnotationAuditInfo>> _CacheByPrimaryKey = new Dictionary<string, List<AnnotationAuditInfo>>();
private static void ConvertListToDictionary() private static void ConvertListToDictionary()
{ {
while (_CacheList.Count > 0) // Move AnnotationAuditInfo(s) from temporary _CacheList to _CacheByPrimaryKey while (_CacheList.Count > 0) // Move AnnotationAuditInfo(s) from temporary _CacheList to _CacheByPrimaryKey
{ {
AnnotationAuditInfo tmp = _CacheList[0]; // Get the first AnnotationAuditInfo AnnotationAuditInfo tmp = _CacheList[0]; // Get the first AnnotationAuditInfo
string pKey = tmp.AuditID.ToString(); string pKey = tmp.AuditID.ToString();
if (!_CacheByPrimaryKey.ContainsKey(pKey)) if (!_CacheByPrimaryKey.ContainsKey(pKey))
{ {
_CacheByPrimaryKey[pKey] = new List<AnnotationAuditInfo>(); // Add new list for PrimaryKey _CacheByPrimaryKey[pKey] = new List<AnnotationAuditInfo>(); // Add new list for PrimaryKey
} }
_CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list _CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list
_CacheList.RemoveAt(0); // Remove the first AnnotationAuditInfo _CacheList.RemoveAt(0); // Remove the first AnnotationAuditInfo
} }
} }
internal static void AddList(AnnotationAuditInfoList lst) internal static void AddList(AnnotationAuditInfoList lst)
{ {
foreach (AnnotationAuditInfo item in lst) AddToCache(item); foreach (AnnotationAuditInfo item in lst) AddToCache(item);
} }
protected static AnnotationAuditInfo GetCachedByPrimaryKey(long auditID) protected static AnnotationAuditInfo GetCachedByPrimaryKey(long auditID)
{ {
ConvertListToDictionary(); ConvertListToDictionary();
string key = auditID.ToString(); string key = auditID.ToString();
if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0]; if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0];
return null; return null;
} }
#endregion #endregion
#region Business Methods #region Business Methods
private string _ErrorMessage = string.Empty; private string _ErrorMessage = string.Empty;
public string ErrorMessage public string ErrorMessage
{ {
get { return _ErrorMessage; } get { return _ErrorMessage; }
} }
protected AnnotationAudit _Editable; protected AnnotationAudit _Editable;
private IVEHasBrokenRules HasBrokenRules private IVEHasBrokenRules HasBrokenRules
{ {
get get
{ {
IVEHasBrokenRules hasBrokenRules = null; IVEHasBrokenRules hasBrokenRules = null;
if (_Editable != null) if (_Editable != null)
hasBrokenRules = _Editable.HasBrokenRules; hasBrokenRules = _Editable.HasBrokenRules;
return hasBrokenRules; return hasBrokenRules;
} }
} }
private long _AuditID; private long _AuditID;
[System.ComponentModel.DataObjectField(true, true)] [System.ComponentModel.DataObjectField(true, true)]
public long AuditID public long AuditID
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AuditID", true); return _AuditID;
return _AuditID; }
} }
} private int _AnnotationID;
private int _AnnotationID; public int AnnotationID
public int AnnotationID {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get
get {
{ return _AnnotationID;
CanReadProperty("AnnotationID", true); }
return _AnnotationID; }
} private int _ItemID;
} public int ItemID
private int _ItemID; {
public int ItemID [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get return _ItemID;
{ }
CanReadProperty("ItemID", true); }
return _ItemID; private int _TypeID;
} public int TypeID
} {
private int _TypeID; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
public int TypeID get
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] return _TypeID;
get }
{ }
CanReadProperty("TypeID", true); private string _RtfText = string.Empty;
return _TypeID; public string RtfText
} {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
private string _RtfText = string.Empty; get
public string RtfText {
{ return _RtfText;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get }
{ private string _SearchText = string.Empty;
CanReadProperty("RtfText", true); public string SearchText
return _RtfText; {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
private string _SearchText = string.Empty; {
public string SearchText return _SearchText;
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get private string _Config = string.Empty;
{ public string Config
CanReadProperty("SearchText", true); {
return _SearchText; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
} {
private string _Config = string.Empty; return _Config;
public string Config }
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] private DateTime _DTS = new DateTime();
get public DateTime DTS
{ {
CanReadProperty("Config", true); [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
return _Config; get
} {
} return _DTS;
private DateTime _DTS = new DateTime(); }
public DateTime DTS }
{ private string _UserID = string.Empty;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] public string UserID
get {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
CanReadProperty("DTS", true); get
return _DTS; {
} return _UserID;
} }
private string _UserID = string.Empty; }
public string UserID private int _DeleteStatus;
{ public int DeleteStatus
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
CanReadProperty("UserID", true); {
return _UserID; return _DeleteStatus;
} }
} }
private int _DeleteStatus; // CSLATODO: Replace base AnnotationAuditInfo.ToString function as necessary
public int DeleteStatus /// <summary>
{ /// Overrides Base ToString
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] /// </summary>
get /// <returns>A string representation of current AnnotationAuditInfo</returns>
{ //public override string ToString()
CanReadProperty("DeleteStatus", true); //{
return _DeleteStatus; // return base.ToString();
} //}
} // CSLATODO: Check AnnotationAuditInfo.GetIdValue to assure that the ID returned is unique
// CSLATODO: Replace base AnnotationAuditInfo.ToString function as necessary /// <summary>
/// <summary> /// Overrides Base GetIdValue - Used internally by CSLA to determine equality
/// Overrides Base ToString /// </summary>
/// </summary> /// <returns>A Unique ID for the current AnnotationAuditInfo</returns>
/// <returns>A string representation of current AnnotationAuditInfo</returns> protected override object GetIdValue()
//public override string ToString() {
//{ return MyAnnotationAuditInfoUnique; // Absolutely Unique ID
// return base.ToString(); }
//} #endregion
// CSLATODO: Check AnnotationAuditInfo.GetIdValue to assure that the ID returned is unique #region Factory Methods
/// <summary> private static int _AnnotationAuditInfoUnique = 0;
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality private static int AnnotationAuditInfoUnique
/// </summary> { get { return ++_AnnotationAuditInfoUnique; } }
/// <returns>A Unique ID for the current AnnotationAuditInfo</returns> private int _MyAnnotationAuditInfoUnique = AnnotationAuditInfoUnique;
protected override object GetIdValue() public int MyAnnotationAuditInfoUnique // Absolutely Unique ID - Info
{ { get { return _MyAnnotationAuditInfoUnique; } }
return MyAnnotationAuditInfoUnique; // Absolutely Unique ID protected AnnotationAuditInfo()
} {/* require use of factory methods */
#endregion AddToCache(this);
#region Factory Methods }
private static int _AnnotationAuditInfoUnique = 0; public void Dispose()
private static int AnnotationAuditInfoUnique {
{ get { return ++_AnnotationAuditInfoUnique; } } RemoveFromCache(this);
private int _MyAnnotationAuditInfoUnique = AnnotationAuditInfoUnique; if (!_CacheByPrimaryKey.ContainsKey(AuditID.ToString())) return;
public int MyAnnotationAuditInfoUnique // Absolutely Unique ID - Info List<AnnotationAuditInfo> listAnnotationAuditInfo = _CacheByPrimaryKey[AuditID.ToString()]; // Get the list of items
{ get { return _MyAnnotationAuditInfoUnique; } } while (listAnnotationAuditInfo.Contains(this)) listAnnotationAuditInfo.Remove(this); // Remove the item from the list
protected AnnotationAuditInfo() if (listAnnotationAuditInfo.Count == 0) // If there are no items left in the list
{/* require use of factory methods */ _CacheByPrimaryKey.Remove(AuditID.ToString()); // remove the list
AddToCache(this); }
} public virtual AnnotationAudit Get()
public void Dispose() {
{ return _Editable = AnnotationAudit.Get(_AuditID);
RemoveFromCache(this); }
if (!_CacheByPrimaryKey.ContainsKey(AuditID.ToString())) return; public static void Refresh(AnnotationAudit tmp)
List<AnnotationAuditInfo> listAnnotationAuditInfo = _CacheByPrimaryKey[AuditID.ToString()]; // Get the list of items {
while (listAnnotationAuditInfo.Contains(this)) listAnnotationAuditInfo.Remove(this); // Remove the item from the list string key = tmp.AuditID.ToString();
if (listAnnotationAuditInfo.Count == 0) // If there are no items left in the list ConvertListToDictionary();
_CacheByPrimaryKey.Remove(AuditID.ToString()); // remove the list if (_CacheByPrimaryKey.ContainsKey(key))
} foreach (AnnotationAuditInfo tmpInfo in _CacheByPrimaryKey[key])
public virtual AnnotationAudit Get() tmpInfo.RefreshFields(tmp);
{ }
return _Editable = AnnotationAudit.Get(_AuditID); protected virtual void RefreshFields(AnnotationAudit tmp)
} {
public static void Refresh(AnnotationAudit tmp) _AnnotationID = tmp.AnnotationID;
{ _ItemID = tmp.ItemID;
string key = tmp.AuditID.ToString(); _TypeID = tmp.TypeID;
ConvertListToDictionary(); _RtfText = tmp.RtfText;
if (_CacheByPrimaryKey.ContainsKey(key)) _SearchText = tmp.SearchText;
foreach (AnnotationAuditInfo tmpInfo in _CacheByPrimaryKey[key]) _Config = tmp.Config;
tmpInfo.RefreshFields(tmp); _DTS = tmp.DTS;
} _UserID = tmp.UserID;
protected virtual void RefreshFields(AnnotationAudit tmp) _DeleteStatus = tmp.DeleteStatus;
{ _AnnotationAuditInfoExtension.Refresh(this);
_AnnotationID = tmp.AnnotationID; OnChange();// raise an event
_ItemID = tmp.ItemID; }
_TypeID = tmp.TypeID; public static AnnotationAuditInfo Get(long auditID)
_RtfText = tmp.RtfText; {
_SearchText = tmp.SearchText; //if (!CanGetObject())
_Config = tmp.Config; // throw new System.Security.SecurityException("User not authorized to view a AnnotationAudit");
_DTS = tmp.DTS; try
_UserID = tmp.UserID; {
_DeleteStatus = tmp.DeleteStatus; AnnotationAuditInfo tmp = GetCachedByPrimaryKey(auditID);
_AnnotationAuditInfoExtension.Refresh(this); if (tmp == null)
OnChange();// raise an event {
} tmp = DataPortal.Fetch<AnnotationAuditInfo>(new PKCriteria(auditID));
public static AnnotationAuditInfo Get(long auditID) AddToCache(tmp);
{ }
//if (!CanGetObject()) if (tmp.ErrorMessage == "No Record Found")
// throw new System.Security.SecurityException("User not authorized to view a AnnotationAudit"); {
try tmp.Dispose(); // Clean-up AnnotationAuditInfo
{ tmp = null;
AnnotationAuditInfo tmp = GetCachedByPrimaryKey(auditID); }
if (tmp == null) return tmp;
{ }
tmp = DataPortal.Fetch<AnnotationAuditInfo>(new PKCriteria(auditID)); catch (Exception ex)
AddToCache(tmp); {
} throw new DbCslaException("Error on AnnotationAuditInfo.Get", ex);
if (tmp.ErrorMessage == "No Record Found") }
{ }
tmp.Dispose(); // Clean-up AnnotationAuditInfo #endregion
tmp = null; #region Data Access Portal
} internal AnnotationAuditInfo(SafeDataReader dr)
return tmp; {
} if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AnnotationAuditInfo.Constructor", GetHashCode());
catch (Exception ex) try
{ {
throw new DbCslaException("Error on AnnotationAuditInfo.Get", ex); ReadData(dr);
} }
} catch (Exception ex)
#endregion {
#region Data Access Portal if (_MyLog.IsErrorEnabled) _MyLog.Error("AnnotationAuditInfo.Constructor", ex);
internal AnnotationAuditInfo(SafeDataReader dr) throw new DbCslaException("AnnotationAuditInfo.Constructor", ex);
{ }
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AnnotationAuditInfo.Constructor", GetHashCode()); }
try [Serializable()]
{ protected class PKCriteria
ReadData(dr); {
} private long _AuditID;
catch (Exception ex) public long AuditID
{ { get { return _AuditID; } }
if (_MyLog.IsErrorEnabled) _MyLog.Error("AnnotationAuditInfo.Constructor", ex); public PKCriteria(long auditID)
throw new DbCslaException("AnnotationAuditInfo.Constructor", ex); {
} _AuditID = auditID;
} }
[Serializable()] }
protected class PKCriteria private void ReadData(SafeDataReader dr)
{ {
private long _AuditID; if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AnnotationAuditInfo.ReadData", GetHashCode());
public long AuditID try
{ get { return _AuditID; } } {
public PKCriteria(long auditID) _AuditID = dr.GetInt64("AuditID");
{ _AnnotationID = dr.GetInt32("AnnotationID");
_AuditID = auditID; _ItemID = dr.GetInt32("ItemID");
} _TypeID = dr.GetInt32("TypeID");
} _RtfText = dr.GetString("RtfText");
private void ReadData(SafeDataReader dr) _SearchText = dr.GetString("SearchText");
{ _Config = dr.GetString("Config");
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AnnotationAuditInfo.ReadData", GetHashCode()); _DTS = dr.GetDateTime("DTS");
try _UserID = dr.GetString("UserID");
{ _DeleteStatus = dr.GetInt32("DeleteStatus");
_AuditID = dr.GetInt64("AuditID"); }
_AnnotationID = dr.GetInt32("AnnotationID"); catch (Exception ex)
_ItemID = dr.GetInt32("ItemID"); {
_TypeID = dr.GetInt32("TypeID"); if (_MyLog.IsErrorEnabled) _MyLog.Error("AnnotationAuditInfo.ReadData", ex);
_RtfText = dr.GetString("RtfText"); _ErrorMessage = ex.Message;
_SearchText = dr.GetString("SearchText"); throw new DbCslaException("AnnotationAuditInfo.ReadData", ex);
_Config = dr.GetString("Config"); }
_DTS = dr.GetDateTime("DTS"); }
_UserID = dr.GetString("UserID"); private void DataPortal_Fetch(PKCriteria criteria)
_DeleteStatus = dr.GetInt32("DeleteStatus"); {
} if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AnnotationAuditInfo.DataPortal_Fetch", GetHashCode());
catch (Exception ex) try
{ {
if (_MyLog.IsErrorEnabled) _MyLog.Error("AnnotationAuditInfo.ReadData", ex); using (SqlConnection cn = Database.VEPROMS_SqlConnection)
_ErrorMessage = ex.Message; {
throw new DbCslaException("AnnotationAuditInfo.ReadData", ex); ApplicationContext.LocalContext["cn"] = cn;
} using (SqlCommand cm = cn.CreateCommand())
} {
private void DataPortal_Fetch(PKCriteria criteria) cm.CommandType = CommandType.StoredProcedure;
{ cm.CommandText = "getAnnotationAudit";
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AnnotationAuditInfo.DataPortal_Fetch", GetHashCode()); cm.Parameters.AddWithValue("@AuditID", criteria.AuditID);
try using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
{ {
using (SqlConnection cn = Database.VEPROMS_SqlConnection) if (!dr.Read())
{ {
ApplicationContext.LocalContext["cn"] = cn; _ErrorMessage = "No Record Found";
using (SqlCommand cm = cn.CreateCommand()) return;
{ }
cm.CommandType = CommandType.StoredProcedure; ReadData(dr);
cm.CommandText = "getAnnotationAudit"; }
cm.Parameters.AddWithValue("@AuditID", criteria.AuditID); }
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) // removing of item only needed for local data portal
{ if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client)
if (!dr.Read()) ApplicationContext.LocalContext.Remove("cn");
{ }
_ErrorMessage = "No Record Found"; }
return; catch (Exception ex)
} {
ReadData(dr); if (_MyLog.IsErrorEnabled) _MyLog.Error("AnnotationAuditInfo.DataPortal_Fetch", ex);
} _ErrorMessage = ex.Message;
} throw new DbCslaException("AnnotationAuditInfo.DataPortal_Fetch", ex);
// removing of item only needed for local data portal }
if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client) }
ApplicationContext.LocalContext.Remove("cn"); #endregion
} // Standard Refresh
} #region extension
catch (Exception ex) AnnotationAuditInfoExtension _AnnotationAuditInfoExtension = new AnnotationAuditInfoExtension();
{ [Serializable()]
if (_MyLog.IsErrorEnabled) _MyLog.Error("AnnotationAuditInfo.DataPortal_Fetch", ex); partial class AnnotationAuditInfoExtension : extensionBase { }
_ErrorMessage = ex.Message; [Serializable()]
throw new DbCslaException("AnnotationAuditInfo.DataPortal_Fetch", ex); class extensionBase
} {
} // Default Refresh
#endregion public virtual void Refresh(AnnotationAuditInfo tmp) { }
// Standard Refresh }
#region extension #endregion
AnnotationAuditInfoExtension _AnnotationAuditInfoExtension = new AnnotationAuditInfoExtension(); } // Class
[Serializable()] #region Converter
partial class AnnotationAuditInfoExtension : extensionBase { } internal class AnnotationAuditInfoConverter : ExpandableObjectConverter
[Serializable()] {
class extensionBase public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
{ {
// Default Refresh if (destType == typeof(string) && value is AnnotationAuditInfo)
public virtual void Refresh(AnnotationAuditInfo tmp) { } {
} // Return the ToString value
#endregion return ((AnnotationAuditInfo)value).ToString();
} // Class }
#region Converter return base.ConvertTo(context, culture, value, destType);
internal class AnnotationAuditInfoConverter : ExpandableObjectConverter }
{ }
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType) #endregion
{
if (destType == typeof(string) && value is AnnotationAuditInfo)
{
// Return the ToString value
return ((AnnotationAuditInfo)value).ToString();
}
return base.ConvertTo(context, culture, value, destType);
}
}
#endregion
} // Namespace } // Namespace

Some files were not shown because too many files have changed in this diff Show More