eddbaz3

sonarqube

Feb 17th, 2017
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 126.79 KB | None | 0 0
  1. 2017.02.16 11:06:27 INFO web[jruby.rack] keeping custom (config.logger) Rails logger instance
  2. 2017.02.16 11:06:28 INFO web[o.a.c.h.Http11NioProtocol] Starting ProtocolHandler ["http-nio-0.0.0.0-9000"]
  3. 2017.02.16 11:06:28 INFO web[o.s.s.a.TomcatAccessLog] Web server is started
  4. 2017.02.16 11:06:28 INFO web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
  5. 2017.02.16 11:06:28 INFO app[o.s.p.m.Monitor] Process[web] is up
  6. 2017.02.16 11:06:28 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[ce]: C:\Program Files (x86)\Java\jre1.8.0_111\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=C:\sonarqube-5.6.5\temp -javaagent:C:\Program Files (x86)\Java\jre1.8.0_111\lib\management-agent.jar -cp ./lib/common/*;./lib/server/*;./lib/ce/*;C:\sonarqube-5.6.5\lib\jdbc\mysql\mysql-connector-java-5.1.35.jar org.sonar.ce.app.CeServer C:\sonarqube-5.6.5\temp\sq-process4016449006423887821properties
  7. (unknown):0 warning: already initialized constant Input
  8. 2017.02.16 11:06:30 INFO ce[o.s.p.ProcessEntryPoint] Starting ce
  9. 2017.02.16 11:06:30 INFO ce[o.s.c.a.WebServerWatcherImpl] Waiting for Web Server to be operational...
  10. 2017.02.16 11:06:31 INFO ce[o.s.c.a.WebServerWatcherImpl] Still waiting for WebServer...
  11. 2017.02.16 11:06:33 INFO ce[o.s.c.a.WebServerWatcherImpl] Still waiting for WebServer...
  12. 2017.02.16 11:06:38 INFO ce[o.s.c.a.WebServerWatcherImpl] Still waiting for WebServer...
  13. 2017.02.16 11:06:51 INFO ce[o.s.c.a.WebServerWatcherImpl] Still waiting for WebServer...
  14. 2017.02.16 11:06:56 INFO web[o.s.s.d.m.PlatformDatabaseMigration] Starting DB Migration
  15. 2017.02.16 11:06:56 INFO web[DbMigration] == CreateAnalysisReports: migrating ==========================================
  16. 2017.02.16 11:06:56 INFO web[DbMigration] -- create_table(:analysis_reports, {})
  17. 2017.02.16 11:06:56 INFO web[DbMigration] -> 0.0860s
  18. 2017.02.16 11:06:56 INFO web[DbMigration] -> 0 rows
  19. 2017.02.16 11:06:56 INFO web[DbMigration] == CreateAnalysisReports: migrated (0.0880s) =================================
  20. 2017.02.16 11:06:56 INFO web[DbMigration]
  21. 2017.02.16 11:06:56 INFO web[DbMigration] == AddProjectNameToAnalysisReports: migrating ================================
  22. 2017.02.16 11:06:56 INFO web[DbMigration] -- columns("analysis_reports")
  23. 2017.02.16 11:06:56 INFO web[DbMigration] -> 0.0150s
  24. 2017.02.16 11:06:56 INFO web[DbMigration] -- add_column("analysis_reports", :project_name, :string, {:limit=>256, :null=>true})
  25. 2017.02.16 11:06:57 INFO web[DbMigration] -> 0.1040s
  26. 2017.02.16 11:06:57 INFO web[DbMigration] -> 0 rows
  27. 2017.02.16 11:06:57 INFO web[DbMigration] == AddProjectNameToAnalysisReports: migrated (0.1210s) =======================
  28. 2017.02.16 11:06:57 INFO web[DbMigration]
  29. 2017.02.16 11:06:57 INFO web[DbMigration] == AddProjectUuidColumns: migrating ==========================================
  30. 2017.02.16 11:06:57 INFO web[DbMigration] -- columns("projects")
  31. 2017.02.16 11:06:57 INFO web[DbMigration] -> 0.0110s
  32. 2017.02.16 11:06:57 INFO web[DbMigration] -- add_column("projects", :uuid, :string, {:limit=>50, :null=>true})
  33. 2017.02.16 11:07:04 INFO web[DbMigration] -> 7.6550s
  34. 2017.02.16 11:07:04 INFO web[DbMigration] -> 0 rows
  35. 2017.02.16 11:07:04 INFO web[DbMigration] -- columns("projects")
  36. 2017.02.16 11:07:04 INFO web[DbMigration] -> 0.0240s
  37. 2017.02.16 11:07:04 INFO web[DbMigration] -- add_column("projects", :project_uuid, :string, {:limit=>50, :null=>true})
  38. 2017.02.16 11:07:11 INFO web[DbMigration] -> 7.0970s
  39. 2017.02.16 11:07:11 INFO web[DbMigration] -> 0 rows
  40. 2017.02.16 11:07:11 INFO web[DbMigration] -- columns("projects")
  41. 2017.02.16 11:07:11 INFO web[DbMigration] -> 0.0340s
  42. 2017.02.16 11:07:11 INFO web[DbMigration] -- add_column("projects", :module_uuid, :string, {:limit=>50, :null=>true})
  43. 2017.02.16 11:07:19 INFO web[DbMigration] -> 7.4150s
  44. 2017.02.16 11:07:19 INFO web[DbMigration] -> 0 rows
  45. 2017.02.16 11:07:19 INFO web[DbMigration] -- columns("projects")
  46. 2017.02.16 11:07:19 INFO web[DbMigration] -> 0.0200s
  47. 2017.02.16 11:07:19 INFO web[DbMigration] -- add_column("projects", :module_uuid_path, :string, {:limit=>4000, :null=>true})
  48. 2017.02.16 11:07:25 INFO ce[o.s.c.a.WebServerWatcherImpl] Still waiting for WebServer...
  49. 2017.02.16 11:07:25 INFO web[DbMigration] -> 6.6780s
  50. 2017.02.16 11:07:25 INFO web[DbMigration] -> 0 rows
  51. 2017.02.16 11:07:25 INFO web[DbMigration] == AddProjectUuidColumns: migrated (28.9410s) ================================
  52. 2017.02.16 11:07:25 INFO web[DbMigration]
  53. 2017.02.16 11:07:25 INFO web[DbMigration] == PopulateProjectsUuidColumns: migrating ====================================
  54. 2017.02.16 11:08:25 INFO web[o.s.d.v.v.PopulateProjectsUuidColumnsMigrationStep] 19121 rows processed (318 items/sec)
  55. 2017.02.16 11:08:53 INFO web[o.s.d.v.v.PopulateProjectsUuidColumnsMigrationStep] 68143 rows processed (817 items/sec)
  56. 2017.02.16 11:08:53 INFO web[DbMigration] == PopulateProjectsUuidColumns: migrated (87.5670s) ==========================
  57. 2017.02.16 11:08:53 INFO web[DbMigration]
  58. 2017.02.16 11:08:53 INFO web[DbMigration] == AddSnapshotIdToAnalysisReports: migrating =================================
  59. 2017.02.16 11:08:53 INFO web[DbMigration] -- columns("analysis_reports")
  60. 2017.02.16 11:08:53 INFO web[DbMigration] -> 0.0140s
  61. 2017.02.16 11:08:53 INFO web[DbMigration] -- add_column("analysis_reports", :snapshot_id, :integer, {:null=>false})
  62. 2017.02.16 11:08:53 INFO web[DbMigration] -> 0.2950s
  63. 2017.02.16 11:08:53 INFO web[DbMigration] -> 0 rows
  64. 2017.02.16 11:08:53 INFO web[DbMigration] == AddSnapshotIdToAnalysisReports: migrated (0.3160s) ========================
  65. 2017.02.16 11:08:53 INFO web[DbMigration]
  66. 2017.02.16 11:08:53 INFO web[DbMigration] == AddBusinessDatesToAnalysisReports: migrating ==============================
  67. 2017.02.16 11:08:53 INFO web[DbMigration] -- columns("analysis_reports")
  68. 2017.02.16 11:08:53 INFO web[DbMigration] -> 0.0110s
  69. 2017.02.16 11:08:53 INFO web[DbMigration] -- add_column("analysis_reports", :started_at, :datetime, {:null=>true})
  70. 2017.02.16 11:08:54 INFO web[DbMigration] -> 0.0920s
  71. 2017.02.16 11:08:54 INFO web[DbMigration] -> 0 rows
  72. 2017.02.16 11:08:54 INFO web[DbMigration] -- columns("analysis_reports")
  73. 2017.02.16 11:08:54 INFO web[DbMigration] -> 0.0100s
  74. 2017.02.16 11:08:54 INFO web[DbMigration] -- add_column("analysis_reports", :finished_at, :datetime, {:null=>true})
  75. 2017.02.16 11:08:54 INFO web[DbMigration] -> 0.0920s
  76. 2017.02.16 11:08:54 INFO web[DbMigration] -> 0 rows
  77. 2017.02.16 11:08:54 INFO web[DbMigration] == AddBusinessDatesToAnalysisReports: migrated (0.2080s) =====================
  78. 2017.02.16 11:08:54 INFO web[DbMigration]
  79. 2017.02.16 11:08:54 INFO web[DbMigration] == AddProjectUuidIndex: migrating ============================================
  80. 2017.02.16 11:08:54 INFO web[DbMigration] -- index_exists?("projects", "uuid", {:name=>"projects_uuid"})
  81. 2017.02.16 11:08:54 INFO web[DbMigration] -> 0.0060s
  82. 2017.02.16 11:08:54 INFO web[DbMigration] -- add_index("projects", "uuid", {:name=>"projects_uuid", :unique=>true})
  83. 2017.02.16 11:08:57 INFO web[DbMigration] -> 3.4200s
  84. 2017.02.16 11:08:57 INFO web[DbMigration] -> 0 rows
  85. 2017.02.16 11:08:57 INFO web[DbMigration] -- index_exists?("projects", "project_uuid", {:name=>"projects_project_uuid"})
  86. 2017.02.16 11:08:57 INFO web[DbMigration] -> 0.0030s
  87. 2017.02.16 11:08:57 INFO web[DbMigration] -- add_index("projects", "project_uuid", {:name=>"projects_project_uuid"})
  88. 2017.02.16 11:08:59 INFO ce[o.s.c.a.WebServerWatcherImpl] Still waiting for WebServer...
  89. 2017.02.16 11:09:00 INFO web[DbMigration] -> 2.9510s
  90. 2017.02.16 11:09:00 INFO web[DbMigration] -> 0 rows
  91. 2017.02.16 11:09:00 INFO web[DbMigration] == AddProjectUuidIndex: migrated (6.3840s) ===================================
  92. 2017.02.16 11:09:00 INFO web[DbMigration]
  93. 2017.02.16 11:09:00 INFO web[DbMigration] == AddIssueUpdatedAtIndex: migrating =========================================
  94. 2017.02.16 11:09:00 INFO web[DbMigration] -- index_exists?("issues", "updated_at", {:name=>"issues_updated_at"})
  95. 2017.02.16 11:09:00 INFO web[DbMigration] -> 0.0070s
  96. 2017.02.16 11:09:00 INFO web[DbMigration] -- add_index("issues", "updated_at", {:name=>"issues_updated_at"})
  97. 2017.02.16 11:09:25 INFO web[DbMigration] -> 25.1170s
  98. 2017.02.16 11:09:25 INFO web[DbMigration] -> 0 rows
  99. 2017.02.16 11:09:25 INFO web[DbMigration] == AddIssueUpdatedAtIndex: migrated (25.1250s) ===============================
  100. 2017.02.16 11:09:25 INFO web[DbMigration]
  101. 2017.02.16 11:09:25 INFO web[DbMigration] == ReplaceIssueFiltersProjectKeyByUuid: migrating ============================
  102. 2017.02.16 11:09:25 INFO web[o.s.d.v.MassUpdate] 0 rows processed (0 items/sec)
  103. 2017.02.16 11:09:25 INFO web[DbMigration] == ReplaceIssueFiltersProjectKeyByUuid: migrated (0.0250s) ===================
  104. 2017.02.16 11:09:25 INFO web[DbMigration]
  105. 2017.02.16 11:09:25 INFO web[DbMigration] == AddUpdatedAtToSnapshotSources: migrating ==================================
  106. 2017.02.16 11:09:25 INFO web[DbMigration] -- columns("snapshot_sources")
  107. 2017.02.16 11:09:25 INFO web[DbMigration] -> 0.0120s
  108. 2017.02.16 11:09:25 INFO web[DbMigration] -- add_column("snapshot_sources", :updated_at, :datetime, {:null=>true})
  109. 2017.02.16 11:13:15 INFO ce[o.s.c.a.WebServerWatcherImpl] Still waiting for WebServer...
  110. 2017.02.16 11:24:50 INFO ce[o.s.c.a.WebServerWatcherImpl] Still waiting for WebServer...
  111. 2017.02.16 11:56:17 INFO ce[o.s.c.a.WebServerWatcherImpl] Still waiting for WebServer...
  112. 2017.02.16 12:24:31 INFO web[DbMigration] -> 4505.6500s
  113. 2017.02.16 12:24:31 INFO web[DbMigration] -> 0 rows
  114. 2017.02.16 12:24:31 INFO web[DbMigration] == AddUpdatedAtToSnapshotSources: migrated (4505.6640s) ======================
  115. 2017.02.16 12:24:31 INFO web[DbMigration]
  116. 2017.02.16 12:24:31 INFO web[DbMigration] == FeedSnapshotSourcesUpdatedAt: migrating ===================================
  117. 2017.02.16 12:25:31 INFO web[o.s.d.v.MassUpdate] 14749 rows processed (245 items/sec)
  118. 2017.02.16 12:26:31 INFO web[o.s.d.v.MassUpdate] 35999 rows processed (354 items/sec)
  119. 2017.02.16 12:27:31 INFO web[o.s.d.v.MassUpdate] 61749 rows processed (429 items/sec)
  120. 2017.02.16 12:28:31 INFO web[o.s.d.v.MassUpdate] 92999 rows processed (520 items/sec)
  121. 2017.02.16 12:29:31 INFO web[o.s.d.v.MassUpdate] 126499 rows processed (558 items/sec)
  122. 2017.02.16 12:30:31 INFO web[o.s.d.v.MassUpdate] 160749 rows processed (570 items/sec)
  123. 2017.02.16 12:31:31 INFO web[o.s.d.v.MassUpdate] 192499 rows processed (529 items/sec)
  124. 2017.02.16 12:32:31 INFO web[o.s.d.v.MassUpdate] 227749 rows processed (587 items/sec)
  125. 2017.02.16 12:33:31 INFO web[o.s.d.v.MassUpdate] 261499 rows processed (562 items/sec)
  126. 2017.02.16 12:34:31 INFO web[o.s.d.v.MassUpdate] 297999 rows processed (608 items/sec)
  127. 2017.02.16 12:35:31 INFO web[o.s.d.v.MassUpdate] 331499 rows processed (558 items/sec)
  128. 2017.02.16 12:36:31 INFO web[o.s.d.v.MassUpdate] 365749 rows processed (570 items/sec)
  129. 2017.02.16 12:37:31 INFO web[o.s.d.v.MassUpdate] 402249 rows processed (608 items/sec)
  130. 2017.02.16 12:38:31 INFO web[o.s.d.v.MassUpdate] 437249 rows processed (583 items/sec)
  131. 2017.02.16 12:39:31 INFO web[o.s.d.v.MassUpdate] 473749 rows processed (608 items/sec)
  132. 2017.02.16 12:40:31 INFO web[o.s.d.v.MassUpdate] 505999 rows processed (537 items/sec)
  133. 2017.02.16 12:41:31 INFO web[o.s.d.v.MassUpdate] 537999 rows processed (533 items/sec)
  134. 2017.02.16 12:42:31 INFO web[o.s.d.v.MassUpdate] 566499 rows processed (475 items/sec)
  135. 2017.02.16 12:43:31 INFO web[o.s.d.v.MassUpdate] 597249 rows processed (512 items/sec)
  136. 2017.02.16 12:44:31 INFO web[o.s.d.v.MassUpdate] 623499 rows processed (437 items/sec)
  137. 2017.02.16 12:45:31 INFO web[o.s.d.v.MassUpdate] 649499 rows processed (433 items/sec)
  138. 2017.02.16 12:46:31 INFO web[o.s.d.v.MassUpdate] 674999 rows processed (425 items/sec)
  139. 2017.02.16 12:47:31 INFO web[o.s.d.v.MassUpdate] 701999 rows processed (450 items/sec)
  140. 2017.02.16 12:48:31 INFO web[o.s.d.v.MassUpdate] 726249 rows processed (404 items/sec)
  141. 2017.02.16 12:49:31 INFO web[o.s.d.v.MassUpdate] 752249 rows processed (433 items/sec)
  142. 2017.02.16 12:50:31 INFO web[o.s.d.v.MassUpdate] 776499 rows processed (404 items/sec)
  143. 2017.02.16 12:51:31 INFO web[o.s.d.v.MassUpdate] 804249 rows processed (462 items/sec)
  144. 2017.02.16 12:52:31 INFO web[o.s.d.v.MassUpdate] 828249 rows processed (400 items/sec)
  145. 2017.02.16 12:53:31 INFO web[o.s.d.v.MassUpdate] 851999 rows processed (395 items/sec)
  146. 2017.02.16 12:54:31 INFO web[o.s.d.v.MassUpdate] 878249 rows processed (437 items/sec)
  147. 2017.02.16 12:55:31 INFO web[o.s.d.v.MassUpdate] 904249 rows processed (433 items/sec)
  148. 2017.02.16 12:56:31 INFO web[o.s.d.v.MassUpdate] 931749 rows processed (458 items/sec)
  149. 2017.02.16 12:57:31 INFO web[o.s.d.v.MassUpdate] 955999 rows processed (404 items/sec)
  150. 2017.02.16 12:58:31 INFO web[o.s.d.v.MassUpdate] 982749 rows processed (445 items/sec)
  151. 2017.02.16 12:59:31 INFO web[o.s.d.v.MassUpdate] 1007249 rows processed (408 items/sec)
  152. 2017.02.16 13:00:31 INFO web[o.s.d.v.MassUpdate] 1034249 rows processed (450 items/sec)
  153. 2017.02.16 13:01:31 INFO web[o.s.d.v.MassUpdate] 1057999 rows processed (395 items/sec)
  154. 2017.02.16 13:02:31 INFO web[o.s.d.v.MassUpdate] 1080499 rows processed (375 items/sec)
  155. 2017.02.16 13:03:31 INFO web[o.s.d.v.MassUpdate] 1107999 rows processed (458 items/sec)
  156. 2017.02.16 13:04:31 INFO web[o.s.d.v.MassUpdate] 1132999 rows processed (416 items/sec)
  157. 2017.02.16 13:05:31 INFO web[o.s.d.v.MassUpdate] 1158749 rows processed (429 items/sec)
  158. 2017.02.16 13:06:31 INFO web[o.s.d.v.MassUpdate] 1187499 rows processed (479 items/sec)
  159. 2017.02.16 13:07:31 INFO web[o.s.d.v.MassUpdate] 1203999 rows processed (275 items/sec)
  160. 2017.02.16 13:08:31 INFO web[o.s.d.v.MassUpdate] 1226749 rows processed (379 items/sec)
  161. 2017.02.16 13:09:31 INFO web[o.s.d.v.MassUpdate] 1252249 rows processed (425 items/sec)
  162. 2017.02.16 13:10:31 INFO web[o.s.d.v.MassUpdate] 1276999 rows processed (412 items/sec)
  163. 2017.02.16 13:11:31 INFO web[o.s.d.v.MassUpdate] 1302499 rows processed (425 items/sec)
  164. 2017.02.16 13:12:31 INFO web[o.s.d.v.MassUpdate] 1328249 rows processed (429 items/sec)
  165. 2017.02.16 13:13:31 INFO web[o.s.d.v.MassUpdate] 1352749 rows processed (408 items/sec)
  166. 2017.02.16 13:13:39 INFO web[o.s.d.v.MassUpdate] 1358274 rows processed (92 items/sec)
  167. 2017.02.16 13:13:39 INFO web[DbMigration] == FeedSnapshotSourcesUpdatedAt: migrated (2948.4480s) =======================
  168. 2017.02.16 13:13:39 INFO web[DbMigration]
  169. 2017.02.16 13:13:39 INFO web[DbMigration] == CreateFileSources: migrating ==============================================
  170. 2017.02.16 13:13:39 INFO web[DbMigration] -- create_table(:file_sources, {})
  171. 2017.02.16 13:13:39 INFO web[DbMigration] -> 0.0690s
  172. 2017.02.16 13:13:39 INFO web[DbMigration] -> 0 rows
  173. 2017.02.16 13:13:39 INFO web[DbMigration] -- index_exists?("file_sources", "file_uuid", {:name=>"file_sources_file_uuid_uniq"})
  174. 2017.02.16 13:13:40 INFO web[DbMigration] -> 0.0030s
  175. 2017.02.16 13:13:40 INFO web[DbMigration] -- add_index("file_sources", "file_uuid", {:unique=>true, :name=>"file_sources_file_uuid_uniq"})
  176. 2017.02.16 13:13:40 INFO web[DbMigration] -> 0.0580s
  177. 2017.02.16 13:13:40 INFO web[DbMigration] -> 0 rows
  178. 2017.02.16 13:13:40 INFO web[DbMigration] -- index_exists?("file_sources", "project_uuid", {:name=>"file_sources_project_uuid"})
  179. 2017.02.16 13:13:40 INFO web[DbMigration] -> 0.0040s
  180. 2017.02.16 13:13:40 INFO web[DbMigration] -- add_index("file_sources", "project_uuid", {:name=>"file_sources_project_uuid"})
  181. 2017.02.16 13:13:40 INFO web[DbMigration] -> 0.0500s
  182. 2017.02.16 13:13:40 INFO web[DbMigration] -> 0 rows
  183. 2017.02.16 13:13:40 INFO web[DbMigration] -- index_exists?("file_sources", "updated_at", {:name=>"file_sources_updated_at"})
  184. 2017.02.16 13:13:40 INFO web[DbMigration] -> 0.0040s
  185. 2017.02.16 13:13:40 INFO web[DbMigration] -- add_index("file_sources", "updated_at", {:name=>"file_sources_updated_at"})
  186. 2017.02.16 13:13:40 INFO web[DbMigration] -> 0.0470s
  187. 2017.02.16 13:13:40 INFO web[DbMigration] -> 0 rows
  188. 2017.02.16 13:13:40 INFO web[DbMigration] == CreateFileSources: migrated (0.2650s) =====================================
  189. 2017.02.16 13:13:40 INFO web[DbMigration]
  190. 2017.02.16 13:13:40 INFO web[DbMigration] == FeedFileSources: migrating ================================================
  191. 2017.02.16 13:14:40 INFO web[o.s.d.v.MassUpdate] 0 files processed (0 items/sec)
  192. 2017.02.16 13:15:40 INFO web[o.s.d.v.MassUpdate] 0 files processed (0 items/sec)
  193. 2017.02.16 13:16:40 INFO web[o.s.d.v.MassUpdate] 0 files processed (0 items/sec)
  194. 2017.02.16 13:17:40 INFO web[o.s.d.v.MassUpdate] 402 files processed (6 items/sec)
  195. 2017.02.16 13:18:40 INFO web[o.s.d.v.MassUpdate] 749 files processed (5 items/sec)
  196. 2017.02.16 13:18:43 ERROR web[o.s.s.d.m.DatabaseMigrator] Fail to execute database migration: org.sonar.db.version.v50.FeedFileSources
  197. java.lang.IllegalStateException: Error during processing of row: [uuid=AVpHrbhU29-XDi5QdhtN,uuid=AVpHrbk629-XDi5Qdh0r,data=using System;
  198. using System.Collections;
  199. using System.ComponentModel;
  200. using System.Drawing;
  201. using System.Data;
  202. using System.Text;
  203. using System.Windows.Forms;
  204.  
  205. using DevExpress.XtraGrid.Views.Grid;
  206. using DevExpress.XtraEditors.Controls;
  207. using DevExpress.XtraEditors.Repository;
  208.  
  209. using Com.Taxware.Atlas.Common.Security;
  210. using Com.Taxware.Atlas.Common;
  211. using Com.Taxware.Atlas.Common.Util;
  212. using Com.Taxware.Platform;
  213. using Com.Taxware.Windows;
  214. using Com.Taxware.DataServices;
  215.  
  216.  
  217. namespace Com.Taxware.Atlas.TaxRule
  218. {
  219. public class VersionPane : System.Windows.Forms.UserControl, IDataConsumerControl, IEditorPane
  220. {
  221. #region Constants
  222. private const string VALUE_RATE_THRESHOLD_FLAG_YES = "Y";
  223. private const string DISPLAY_RATE_THRESHOLD_FLAG_YES = "Y";
  224. private const string VALUE_RATE_THRESHOLD_FLAG_NO = "N";
  225. private const string DISPLAY_RATE_THRESHOLD_FLAG_NO = "N";
  226. private const string VALUE_RATE_THRESHOLD_TYPE_NA = "0";
  227. private const string DISPLAY_RATE_THRESHOLD_TYPE_NA = "N/A";
  228. private const string VALUE_AMT_THRESHOLD_TYPE_NA = "0";
  229. private const string DISPLAY_AMT_THRESHOLD_TYPE_NA = "N/A";
  230. private const string LABEL_RATE_DEFAULT = "Rate";
  231. private const string LABEL_RATE_FEE = "Fee Amount";
  232. private const string LABEL_RATE_TAX_AMOUNT_LIMITATION = "Amount Limit";
  233. private const string LABEL_RATE_TAXABLE_AMOUNT_LIMITATION = "Amount Limit";
  234. private const string LABEL_RATE_TAXABLE_AMOUNT_THRESHOLD = "Threshold Amount";
  235. private const string LABEL_RATE_TAX_RATE_LIMITATION = "Rate Limit";
  236. private const string LABEL_RATE_TAXABLE_AMOUNT_DECREASE = "Decrease Amount";
  237. private const string LABEL_RATE_TAXABLE_AMOUNT_INCREASE = "Increase Amount";
  238. private const string COL_THRESHOLD_TAX_RATE_THRESHOLD_ID = "TAX_RATE_THRESHOLD_ID";
  239. private const string COL_THRESHOLD_MIN_VALUE = "MIN_VALUE";
  240. private const string COL_THRESHOLD_MAX_VALUE = "MAX_VALUE";
  241. private const string COL_THRESHOLD_RATE = "TAX_RATE_VALUE";
  242. private const string COL_THRESHOLD_RATE_FLAG = "IS_STANDARD_RATE_FLAG";
  243. private const string COL_THRESHOLD_IS_POSTED = "IS_POSTED";
  244.  
  245. private const string MSG_INVALID_ERROR_HEADER = "Threshold Error.";
  246. private const string MSG_INVALID_THRESHOLD_DELETE = "The threshold selected has already been posted and may not be deleted.";
  247. #endregion Constants
  248.  
  249. #region Private Members
  250. private DataTable m_dsRateFlag = null;
  251. private int m_versionListIndex = 0;
  252. private ExemptAlgTypeCollection m_dsAmtThreshold = null;
  253. private TaxRateThreshAlgTypeCollection m_dsRateThreshold = null;
  254. private TaxRuleVersionCollection m_scratchPad = null;
  255. private TaxRuleEditMode m_editMode = TaxRuleEditMode.EDIT_MODE_EDIT_RULE;
  256. private Com.Taxware.Platform.TaxRule m_dataSource = null;
  257. private RadioButtonGroup m_useCommonRulesGroup = null;
  258. private RadioButtonGroup m_itemDocumentGroup = null;
  259. private CheckBoxGroup m_commonRulesGroup = null;
  260. #endregion Private Members
  261.  
  262. #region User Interface Elements
  263.  
  264. private System.Windows.Forms.Label m_lblVersionList;
  265. private System.Windows.Forms.GroupBox m_lblVersionDetails;
  266. private System.Windows.Forms.ComboBox m_guiAmtThresholdType;
  267. private System.Windows.Forms.Label m_lblAmountThresholdType;
  268. private System.Windows.Forms.GroupBox m_lblItemDocIndicator;
  269. private System.Windows.Forms.RadioButton m_guiDocumentIndicator;
  270. private System.Windows.Forms.RadioButton m_guiItemIndicator;
  271. private System.Windows.Forms.Label m_lblUseCommonRules;
  272. private System.Windows.Forms.RadioButton m_guiUseCommonRulesNo;
  273. private System.Windows.Forms.RadioButton m_guiUseCommonRulesYes;
  274. private System.Windows.Forms.Label m_lblComments;
  275. private System.Windows.Forms.Label m_lblRate;
  276. private System.Windows.Forms.GroupBox m_lblCommonRules;
  277. private System.Windows.Forms.CheckBox m_guiApplyState;
  278. private System.Windows.Forms.CheckBox m_guiApplySelf;
  279. private System.Windows.Forms.CheckBox m_guiApplyCity;
  280. private System.Windows.Forms.CheckBox m_guiApplyCounty;
  281. private System.Windows.Forms.TextBox m_guiComments;
  282. private System.Windows.Forms.TextBox m_guiRate;
  283. private System.Windows.Forms.Label m_lblSunset;
  284. private System.Windows.Forms.Label m_lblEffective;
  285. private System.Windows.Forms.ComboBox m_guiRateThresholdType;
  286. private System.Windows.Forms.Label m_lblRateThresholdType;
  287. private System.Windows.Forms.Label m_lblThresholds;
  288. private System.Windows.Forms.TextBox m_guiTaxRuleId;
  289. private System.Windows.Forms.Label m_lblTaxRuleId;
  290. private System.Windows.Forms.TextBox m_guiVersionId;
  291. private System.Windows.Forms.Label m_lblVersionId;
  292. private System.Windows.Forms.TextBox m_guiIsPosted;
  293. private System.Windows.Forms.TextBox m_guiRecordStatus;
  294. private System.Windows.Forms.Label m_lblIsPosted;
  295. private System.Windows.Forms.Label m_lblRecordStatus;
  296. private System.Windows.Forms.TextBox m_guiUpdateDate;
  297. private System.Windows.Forms.TextBox m_guiUpdateUser;
  298. private System.Windows.Forms.Label m_lblUpdateDate;
  299. private System.Windows.Forms.Label m_lblUpdateUser;
  300. private System.Windows.Forms.TextBox m_guiCreateDate;
  301. private System.Windows.Forms.TextBox m_guiCreateUser;
  302. private System.Windows.Forms.Label m_lblCreateDate;
  303. private System.Windows.Forms.Label m_lblCreateUser;
  304. private DevExpress.XtraEditors.DateEdit m_guiEffective;
  305. private DevExpress.XtraEditors.DateEdit m_guiSunset;
  306. private System.Windows.Forms.CheckBox m_guiApplyDistrict;
  307. private System.Windows.Forms.ColumnHeader m_colVersionId;
  308. private System.Windows.Forms.ColumnHeader m_colTaxRuleId;
  309. private System.Windows.Forms.ColumnHeader m_colItemDocInd;
  310. private System.Windows.Forms.ColumnHeader m_colRate;
  311. private System.Windows.Forms.ColumnHeader m_colUseCommonRules;
  312. private System.Windows.Forms.ColumnHeader m_colApplyToSelf;
  313. private System.Windows.Forms.ColumnHeader m_colApplyToState;
  314. private System.Windows.Forms.ColumnHeader m_colApplyToCounty;
  315. private System.Windows.Forms.ColumnHeader m_colApplyToCity;
  316. private System.Windows.Forms.ColumnHeader m_colApplyToDistrict;
  317. private System.Windows.Forms.ColumnHeader m_colEffectiveDate;
  318. private System.Windows.Forms.ColumnHeader m_colSunsetDate;
  319. private System.Windows.Forms.ColumnHeader m_colRecordStatus;
  320. private System.Windows.Forms.ColumnHeader m_colIsPosted;
  321. private System.Windows.Forms.ListView m_guiVersionList;
  322. private System.Windows.Forms.Panel m_panelAuditInfo;
  323. private System.Windows.Forms.Panel m_panelThresholds;
  324. private DevExpress.XtraEditors.Repository.PersistentRepository persistentRepository1;
  325. private DevExpress.XtraEditors.Repository.RepositoryItemComboBox m_editorComboBox;
  326. private System.Windows.Forms.Button m_guiNewVersion;
  327. private System.Windows.Forms.Button m_guiApprove;
  328. private System.Windows.Forms.Button m_guiReject;
  329. private System.Windows.Forms.ColumnHeader m_colThresMin;
  330. private System.Windows.Forms.ColumnHeader m_colThresMax;
  331. private System.Windows.Forms.ColumnHeader m_colThresRate;
  332. private System.Windows.Forms.ListView m_guiThresholdList;
  333. private System.Windows.Forms.Button m_guiNewThreshold;
  334. private System.Windows.Forms.GroupBox m_lblThresholdDetails;
  335. private System.Windows.Forms.Label m_lblThresRate;
  336. private System.Windows.Forms.Label m_lblThresMax;
  337. private System.Windows.Forms.Label m_lblThresMin;
  338. private System.Windows.Forms.TextBox m_guiThresRate;
  339. private System.Windows.Forms.TextBox m_guiThresMax;
  340. private System.Windows.Forms.TextBox m_guiThresMin;
  341. private System.Windows.Forms.Button m_guiResetStatus;
  342. /// <summary>
  343. /// Required designer variable.
  344. /// </summary>
  345. private System.ComponentModel.Container components = null;
  346. #endregion User Interface Elements
  347.  
  348. #region Constructors and Destructors
  349.  
  350. public VersionPane()
  351. {
  352. InitializeComponent();
  353. Initialize();
  354. InitRegisterEvents();
  355. }
  356.  
  357. /// <summary>
  358. /// Clean up any resources being used.
  359. /// </summary>
  360. protected override void Dispose( bool disposing )
  361. {
  362. if( disposing )
  363. {
  364. if(components != null)
  365. {
  366. components.Dispose();
  367. }
  368. }
  369. base.Dispose( disposing );
  370. }
  371. #endregion Constructors and Destructors
  372.  
  373. #region Component Designer generated code
  374. /// <summary>
  375. /// Required method for Designer support - do not modify
  376. /// the contents of this method with the code editor.
  377. /// </summary>
  378. private void InitializeComponent()
  379. {
  380. this.m_guiNewVersion = new System.Windows.Forms.Button();
  381. this.m_guiApprove = new System.Windows.Forms.Button();
  382. this.m_lblVersionList = new System.Windows.Forms.Label();
  383. this.m_guiReject = new System.Windows.Forms.Button();
  384. this.m_lblVersionDetails = new System.Windows.Forms.GroupBox();
  385. this.m_guiSunset = new DevExpress.XtraEditors.DateEdit();
  386. this.m_guiEffective = new DevExpress.XtraEditors.DateEdit();
  387. this.m_panelAuditInfo = new System.Windows.Forms.Panel();
  388. this.m_guiTaxRuleId = new System.Windows.Forms.TextBox();
  389. this.m_lblTaxRuleId = new System.Windows.Forms.Label();
  390. this.m_guiVersionId = new System.Windows.Forms.TextBox();
  391. this.m_lblVersionId = new System.Windows.Forms.Label();
  392. this.m_guiIsPosted = new System.Windows.Forms.TextBox();
  393. this.m_guiRecordStatus = new System.Windows.Forms.TextBox();
  394. this.m_lblIsPosted = new System.Windows.Forms.Label();
  395. this.m_lblRecordStatus = new System.Windows.Forms.Label();
  396. this.m_guiUpdateDate = new System.Windows.Forms.TextBox();
  397. this.m_guiUpdateUser = new System.Windows.Forms.TextBox();
  398. this.m_lblUpdateDate = new System.Windows.Forms.Label();
  399. this.m_lblUpdateUser = new System.Windows.Forms.Label();
  400. this.m_guiCreateDate = new System.Windows.Forms.TextBox();
  401. this.m_guiCreateUser = new System.Windows.Forms.TextBox();
  402. this.m_lblCreateDate = new System.Windows.Forms.Label();
  403. this.m_lblCreateUser = new System.Windows.Forms.Label();
  404. this.m_guiComments = new System.Windows.Forms.TextBox();
  405. this.m_panelThresholds = new System.Windows.Forms.Panel();
  406. this.m_lblThresholdDetails = new System.Windows.Forms.GroupBox();
  407. this.m_guiThresRate = new System.Windows.Forms.TextBox();
  408. this.m_guiThresMin = new System.Windows.Forms.TextBox();
  409. this.m_guiThresMax = new System.Windows.Forms.TextBox();
  410. this.m_lblThresMin = new System.Windows.Forms.Label();
  411. this.m_lblThresMax = new System.Windows.Forms.Label();
  412. this.m_lblThresRate = new System.Windows.Forms.Label();
  413. this.m_lblRateThresholdType = new System.Windows.Forms.Label();
  414. this.m_guiRateThresholdType = new System.Windows.Forms.ComboBox();
  415. this.m_guiNewThreshold = new System.Windows.Forms.Button();
  416. this.m_guiThresholdList = new System.Windows.Forms.ListView();
  417. this.m_colThresMin = new System.Windows.Forms.ColumnHeader();
  418. this.m_colThresMax = new System.Windows.Forms.ColumnHeader();
  419. this.m_colThresRate = new System.Windows.Forms.ColumnHeader();
  420. this.m_lblThresholds = new System.Windows.Forms.Label();
  421. this.m_guiAmtThresholdType = new System.Windows.Forms.ComboBox();
  422. this.m_lblAmountThresholdType = new System.Windows.Forms.Label();
  423. this.m_lblItemDocIndicator = new System.Windows.Forms.GroupBox();
  424. this.m_guiDocumentIndicator = new System.Windows.Forms.RadioButton();
  425. this.m_guiItemIndicator = new System.Windows.Forms.RadioButton();
  426. this.m_lblUseCommonRules = new System.Windows.Forms.Label();
  427. this.m_guiUseCommonRulesNo = new System.Windows.Forms.RadioButton();
  428. this.m_guiUseCommonRulesYes = new System.Windows.Forms.RadioButton();
  429. this.m_lblComments = new System.Windows.Forms.Label();
  430. this.m_lblRate = new System.Windows.Forms.Label();
  431. this.m_lblCommonRules = new System.Windows.Forms.GroupBox();
  432. this.m_guiApplyDistrict = new System.Windows.Forms.CheckBox();
  433. this.m_guiApplyState = new System.Windows.Forms.CheckBox();
  434. this.m_guiApplySelf = new System.Windows.Forms.CheckBox();
  435. this.m_guiApplyCity = new System.Windows.Forms.CheckBox();
  436. this.m_guiApplyCounty = new System.Windows.Forms.CheckBox();
  437. this.m_guiRate = new System.Windows.Forms.TextBox();
  438. this.m_lblSunset = new System.Windows.Forms.Label();
  439. this.m_lblEffective = new System.Windows.Forms.Label();
  440. this.persistentRepository1 = new DevExpress.XtraEditors.Repository.PersistentRepository();
  441. this.m_editorComboBox = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox();
  442. this.m_guiVersionList = new System.Windows.Forms.ListView();
  443. this.m_colVersionId = new System.Windows.Forms.ColumnHeader();
  444. this.m_colEffectiveDate = new System.Windows.Forms.ColumnHeader();
  445. this.m_colSunsetDate = new System.Windows.Forms.ColumnHeader();
  446. this.m_colItemDocInd = new System.Windows.Forms.ColumnHeader();
  447. this.m_colRate = new System.Windows.Forms.ColumnHeader();
  448. this.m_colUseCommonRules = new System.Windows.Forms.ColumnHeader();
  449. this.m_colApplyToSelf = new System.Windows.Forms.ColumnHeader();
  450. this.m_colApplyToState = new System.Windows.Forms.ColumnHeader();
  451. this.m_colApplyToCounty = new System.Windows.Forms.ColumnHeader();
  452. this.m_colApplyToCity = new System.Windows.Forms.ColumnHeader();
  453. this.m_colApplyToDistrict = new System.Windows.Forms.ColumnHeader();
  454. this.m_colRecordStatus = new System.Windows.Forms.ColumnHeader();
  455. this.m_colIsPosted = new System.Windows.Forms.ColumnHeader();
  456. this.m_colTaxRuleId = new System.Windows.Forms.ColumnHeader();
  457. this.m_guiResetStatus = new System.Windows.Forms.Button();
  458. this.m_lblVersionDetails.SuspendLayout();
  459. ((System.ComponentModel.ISupportInitialize)(this.m_guiSunset)).BeginInit();
  460. ((System.ComponentModel.ISupportInitialize)(this.m_guiEffective)).BeginInit();
  461. this.m_panelAuditInfo.SuspendLayout();
  462. this.m_panelThresholds.SuspendLayout();
  463. this.m_lblThresholdDetails.SuspendLayout();
  464. this.m_lblItemDocIndicator.SuspendLayout();
  465. this.m_lblCommonRules.SuspendLayout();
  466. ((System.ComponentModel.ISupportInitialize)(this.m_editorComboBox)).BeginInit();
  467. this.SuspendLayout();
  468. //
  469. // m_guiNewVersion
  470. //
  471. this.m_guiNewVersion.Location = new System.Drawing.Point(456, 560);
  472. this.m_guiNewVersion.Name = "m_guiNewVersion";
  473. this.m_guiNewVersion.Size = new System.Drawing.Size(88, 24);
  474. this.m_guiNewVersion.TabIndex = 220;
  475. this.m_guiNewVersion.Text = "New Version";
  476. this.m_guiNewVersion.Click += new System.EventHandler(this.m_guiNewVersion_Click);
  477. //
  478. // m_guiApprove
  479. //
  480. this.m_guiApprove.Location = new System.Drawing.Point(552, 560);
  481. this.m_guiApprove.Name = "m_guiApprove";
  482. this.m_guiApprove.Size = new System.Drawing.Size(88, 24);
  483. this.m_guiApprove.TabIndex = 230;
  484. this.m_guiApprove.Text = "Approve";
  485. this.m_guiApprove.Click += new System.EventHandler(this.m_guiApprove_Click);
  486. //
  487. // m_lblVersionList
  488. //
  489. this.m_lblVersionList.Location = new System.Drawing.Point(17, 16);
  490. this.m_lblVersionList.Name = "m_lblVersionList";
  491. this.m_lblVersionList.Size = new System.Drawing.Size(160, 16);
  492. this.m_lblVersionList.TabIndex = 31;
  493. this.m_lblVersionList.Text = "Versions List";
  494. //
  495. // m_guiReject
  496. //
  497. this.m_guiReject.Location = new System.Drawing.Point(648, 560);
  498. this.m_guiReject.Name = "m_guiReject";
  499. this.m_guiReject.Size = new System.Drawing.Size(88, 24);
  500. this.m_guiReject.TabIndex = 240;
  501. this.m_guiReject.Text = "Reject";
  502. this.m_guiReject.Click += new System.EventHandler(this.m_guiReject_Click);
  503. //
  504. // m_lblVersionDetails
  505. //
  506. this.m_lblVersionDetails.Controls.Add(this.m_guiSunset);
  507. this.m_lblVersionDetails.Controls.Add(this.m_guiEffective);
  508. this.m_lblVersionDetails.Controls.Add(this.m_panelAuditInfo);
  509. this.m_lblVersionDetails.Controls.Add(this.m_guiComments);
  510. this.m_lblVersionDetails.Controls.Add(this.m_panelThresholds);
  511. this.m_lblVersionDetails.Controls.Add(this.m_guiAmtThresholdType);
  512. this.m_lblVersionDetails.Controls.Add(this.m_lblAmountThresholdType);
  513. this.m_lblVersionDetails.Controls.Add(this.m_lblItemDocIndicator);
  514. this.m_lblVersionDetails.Controls.Add(this.m_lblUseCommonRules);
  515. this.m_lblVersionDetails.Controls.Add(this.m_guiUseCommonRulesNo);
  516. this.m_lblVersionDetails.Controls.Add(this.m_guiUseCommonRulesYes);
  517. this.m_lblVersionDetails.Controls.Add(this.m_lblComments);
  518. this.m_lblVersionDetails.Controls.Add(this.m_lblRate);
  519. this.m_lblVersionDetails.Controls.Add(this.m_lblCommonRules);
  520. this.m_lblVersionDetails.Controls.Add(this.m_guiRate);
  521. this.m_lblVersionDetails.Controls.Add(this.m_lblSunset);
  522. this.m_lblVersionDetails.Controls.Add(this.m_lblEffective);
  523. this.m_lblVersionDetails.Location = new System.Drawing.Point(17, 136);
  524. this.m_lblVersionDetails.Name = "m_lblVersionDetails";
  525. this.m_lblVersionDetails.Size = new System.Drawing.Size(816, 400);
  526. this.m_lblVersionDetails.TabIndex = 28;
  527. this.m_lblVersionDetails.TabStop = false;
  528. this.m_lblVersionDetails.Text = "Version Details";
  529. //
  530. // m_guiSunset
  531. //
  532. this.m_guiSunset.DateTime = new System.DateTime(((long)(0)));
  533. this.m_guiSunset.Location = new System.Drawing.Point(240, 96);
  534. this.m_guiSunset.Name = "m_guiSunset";
  535. this.m_guiSunset.Properties.Buttons.Add(new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo));
  536. this.m_guiSunset.Properties.Format = null;
  537. this.m_guiSunset.Properties.FormatString = "MMMM dd, yyyy";
  538. this.m_guiSunset.Size = new System.Drawing.Size(192, 21);
  539. this.m_guiSunset.TabIndex = 100;
  540. //
  541. // m_guiEffective
  542. //
  543. this.m_guiEffective.DateTime = new System.DateTime(((long)(0)));
  544. this.m_guiEffective.Location = new System.Drawing.Point(240, 64);
  545. this.m_guiEffective.Name = "m_guiEffective";
  546. this.m_guiEffective.Properties.Buttons.Add(new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo));
  547. this.m_guiEffective.Properties.Format = null;
  548. this.m_guiEffective.Properties.FormatString = "MMMM dd, yyyy";
  549. this.m_guiEffective.Size = new System.Drawing.Size(192, 21);
  550. this.m_guiEffective.TabIndex = 90;
  551. //
  552. // m_panelAuditInfo
  553. //
  554. this.m_panelAuditInfo.Controls.Add(this.m_guiTaxRuleId);
  555. this.m_panelAuditInfo.Controls.Add(this.m_lblTaxRuleId);
  556. this.m_panelAuditInfo.Controls.Add(this.m_guiVersionId);
  557. this.m_panelAuditInfo.Controls.Add(this.m_lblVersionId);
  558. this.m_panelAuditInfo.Controls.Add(this.m_guiIsPosted);
  559. this.m_panelAuditInfo.Controls.Add(this.m_guiRecordStatus);
  560. this.m_panelAuditInfo.Controls.Add(this.m_lblIsPosted);
  561. this.m_panelAuditInfo.Controls.Add(this.m_lblRecordStatus);
  562. this.m_panelAuditInfo.Controls.Add(this.m_guiUpdateDate);
  563. this.m_panelAuditInfo.Controls.Add(this.m_guiUpdateUser);
  564. this.m_panelAuditInfo.Controls.Add(this.m_lblUpdateDate);
  565. this.m_panelAuditInfo.Controls.Add(this.m_lblUpdateUser);
  566. this.m_panelAuditInfo.Controls.Add(this.m_guiCreateDate);
  567. this.m_panelAuditInfo.Controls.Add(this.m_guiCreateUser);
  568. this.m_panelAuditInfo.Controls.Add(this.m_lblCreateDate);
  569. this.m_panelAuditInfo.Controls.Add(this.m_lblCreateUser);
  570. this.m_panelAuditInfo.Location = new System.Drawing.Point(16, 304);
  571. this.m_panelAuditInfo.Name = "m_panelAuditInfo";
  572. this.m_panelAuditInfo.Size = new System.Drawing.Size(784, 80);
  573. this.m_panelAuditInfo.TabIndex = 40;
  574. //
  575. // m_guiTaxRuleId
  576. //
  577. this.m_guiTaxRuleId.BackColor = System.Drawing.SystemColors.Control;
  578. this.m_guiTaxRuleId.Location = new System.Drawing.Point(80, 46);
  579. this.m_guiTaxRuleId.Name = "m_guiTaxRuleId";
  580. this.m_guiTaxRuleId.ReadOnly = true;
  581. this.m_guiTaxRuleId.Size = new System.Drawing.Size(88, 20);
  582. this.m_guiTaxRuleId.TabIndex = 74;
  583. this.m_guiTaxRuleId.TabStop = false;
  584. this.m_guiTaxRuleId.Text = "";
  585. //
  586. // m_lblTaxRuleId
  587. //
  588. this.m_lblTaxRuleId.Location = new System.Drawing.Point(8, 46);
  589. this.m_lblTaxRuleId.Name = "m_lblTaxRuleId";
  590. this.m_lblTaxRuleId.Size = new System.Drawing.Size(64, 16);
  591. this.m_lblTaxRuleId.TabIndex = 73;
  592. this.m_lblTaxRuleId.Text = "Tax Rule Id";
  593. this.m_lblTaxRuleId.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  594. //
  595. // m_guiVersionId
  596. //
  597. this.m_guiVersionId.BackColor = System.Drawing.SystemColors.Control;
  598. this.m_guiVersionId.Location = new System.Drawing.Point(80, 14);
  599. this.m_guiVersionId.Name = "m_guiVersionId";
  600. this.m_guiVersionId.ReadOnly = true;
  601. this.m_guiVersionId.Size = new System.Drawing.Size(88, 20);
  602. this.m_guiVersionId.TabIndex = 72;
  603. this.m_guiVersionId.TabStop = false;
  604. this.m_guiVersionId.Text = "";
  605. //
  606. // m_lblVersionId
  607. //
  608. this.m_lblVersionId.Location = new System.Drawing.Point(8, 14);
  609. this.m_lblVersionId.Name = "m_lblVersionId";
  610. this.m_lblVersionId.Size = new System.Drawing.Size(56, 16);
  611. this.m_lblVersionId.TabIndex = 71;
  612. this.m_lblVersionId.Text = "Version Id";
  613. this.m_lblVersionId.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  614. //
  615. // m_guiIsPosted
  616. //
  617. this.m_guiIsPosted.BackColor = System.Drawing.SystemColors.Control;
  618. this.m_guiIsPosted.Location = new System.Drawing.Point(672, 46);
  619. this.m_guiIsPosted.Name = "m_guiIsPosted";
  620. this.m_guiIsPosted.ReadOnly = true;
  621. this.m_guiIsPosted.Size = new System.Drawing.Size(104, 20);
  622. this.m_guiIsPosted.TabIndex = 70;
  623. this.m_guiIsPosted.TabStop = false;
  624. this.m_guiIsPosted.Text = "";
  625. //
  626. // m_guiRecordStatus
  627. //
  628. this.m_guiRecordStatus.BackColor = System.Drawing.SystemColors.Control;
  629. this.m_guiRecordStatus.Location = new System.Drawing.Point(672, 14);
  630. this.m_guiRecordStatus.Name = "m_guiRecordStatus";
  631. this.m_guiRecordStatus.ReadOnly = true;
  632. this.m_guiRecordStatus.Size = new System.Drawing.Size(104, 20);
  633. this.m_guiRecordStatus.TabIndex = 69;
  634. this.m_guiRecordStatus.TabStop = false;
  635. this.m_guiRecordStatus.Text = "";
  636. //
  637. // m_lblIsPosted
  638. //
  639. this.m_lblIsPosted.Location = new System.Drawing.Point(584, 46);
  640. this.m_lblIsPosted.Name = "m_lblIsPosted";
  641. this.m_lblIsPosted.Size = new System.Drawing.Size(72, 16);
  642. this.m_lblIsPosted.TabIndex = 68;
  643. this.m_lblIsPosted.Text = "Is Posted";
  644. this.m_lblIsPosted.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  645. //
  646. // m_lblRecordStatus
  647. //
  648. this.m_lblRecordStatus.Location = new System.Drawing.Point(584, 14);
  649. this.m_lblRecordStatus.Name = "m_lblRecordStatus";
  650. this.m_lblRecordStatus.Size = new System.Drawing.Size(88, 16);
  651. this.m_lblRecordStatus.TabIndex = 67;
  652. this.m_lblRecordStatus.Text = "Record Status";
  653. this.m_lblRecordStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  654. //
  655. // m_guiUpdateDate
  656. //
  657. this.m_guiUpdateDate.BackColor = System.Drawing.SystemColors.Control;
  658. this.m_guiUpdateDate.Location = new System.Drawing.Point(464, 46);
  659. this.m_guiUpdateDate.Name = "m_guiUpdateDate";
  660. this.m_guiUpdateDate.ReadOnly = true;
  661. this.m_guiUpdateDate.Size = new System.Drawing.Size(96, 20);
  662. this.m_guiUpdateDate.TabIndex = 66;
  663. this.m_guiUpdateDate.TabStop = false;
  664. this.m_guiUpdateDate.Text = "";
  665. //
  666. // m_guiUpdateUser
  667. //
  668. this.m_guiUpdateUser.BackColor = System.Drawing.SystemColors.Control;
  669. this.m_guiUpdateUser.Location = new System.Drawing.Point(464, 14);
  670. this.m_guiUpdateUser.Name = "m_guiUpdateUser";
  671. this.m_guiUpdateUser.ReadOnly = true;
  672. this.m_guiUpdateUser.Size = new System.Drawing.Size(96, 20);
  673. this.m_guiUpdateUser.TabIndex = 65;
  674. this.m_guiUpdateUser.TabStop = false;
  675. this.m_guiUpdateUser.Text = "";
  676. //
  677. // m_lblUpdateDate
  678. //
  679. this.m_lblUpdateDate.Location = new System.Drawing.Point(392, 46);
  680. this.m_lblUpdateDate.Name = "m_lblUpdateDate";
  681. this.m_lblUpdateDate.Size = new System.Drawing.Size(72, 16);
  682. this.m_lblUpdateDate.TabIndex = 64;
  683. this.m_lblUpdateDate.Text = "Update Date";
  684. this.m_lblUpdateDate.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  685. //
  686. // m_lblUpdateUser
  687. //
  688. this.m_lblUpdateUser.Location = new System.Drawing.Point(392, 14);
  689. this.m_lblUpdateUser.Name = "m_lblUpdateUser";
  690. this.m_lblUpdateUser.Size = new System.Drawing.Size(72, 16);
  691. this.m_lblUpdateUser.TabIndex = 63;
  692. this.m_lblUpdateUser.Text = "Update User";
  693. this.m_lblUpdateUser.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  694. //
  695. // m_guiCreateDate
  696. //
  697. this.m_guiCreateDate.BackColor = System.Drawing.SystemColors.Control;
  698. this.m_guiCreateDate.Location = new System.Drawing.Point(264, 46);
  699. this.m_guiCreateDate.Name = "m_guiCreateDate";
  700. this.m_guiCreateDate.ReadOnly = true;
  701. this.m_guiCreateDate.Size = new System.Drawing.Size(104, 20);
  702. this.m_guiCreateDate.TabIndex = 62;
  703. this.m_guiCreateDate.TabStop = false;
  704. this.m_guiCreateDate.Text = "";
  705. //
  706. // m_guiCreateUser
  707. //
  708. this.m_guiCreateUser.BackColor = System.Drawing.SystemColors.Control;
  709. this.m_guiCreateUser.Location = new System.Drawing.Point(264, 14);
  710. this.m_guiCreateUser.Name = "m_guiCreateUser";
  711. this.m_guiCreateUser.ReadOnly = true;
  712. this.m_guiCreateUser.Size = new System.Drawing.Size(104, 20);
  713. this.m_guiCreateUser.TabIndex = 61;
  714. this.m_guiCreateUser.TabStop = false;
  715. this.m_guiCreateUser.Text = "";
  716. //
  717. // m_lblCreateDate
  718. //
  719. this.m_lblCreateDate.Location = new System.Drawing.Point(192, 46);
  720. this.m_lblCreateDate.Name = "m_lblCreateDate";
  721. this.m_lblCreateDate.Size = new System.Drawing.Size(72, 16);
  722. this.m_lblCreateDate.TabIndex = 60;
  723. this.m_lblCreateDate.Text = "Create Date";
  724. this.m_lblCreateDate.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  725. //
  726. // m_lblCreateUser
  727. //
  728. this.m_lblCreateUser.Location = new System.Drawing.Point(192, 14);
  729. this.m_lblCreateUser.Name = "m_lblCreateUser";
  730. this.m_lblCreateUser.Size = new System.Drawing.Size(72, 16);
  731. this.m_lblCreateUser.TabIndex = 59;
  732. this.m_lblCreateUser.Text = "Create User";
  733. this.m_lblCreateUser.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  734. //
  735. // m_guiComments
  736. //
  737. this.m_guiComments.Location = new System.Drawing.Point(240, 136);
  738. this.m_guiComments.Multiline = true;
  739. this.m_guiComments.Name = "m_guiComments";
  740. this.m_guiComments.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
  741. this.m_guiComments.Size = new System.Drawing.Size(552, 40);
  742. this.m_guiComments.TabIndex = 150;
  743. this.m_guiComments.Text = "";
  744. //
  745. // m_panelThresholds
  746. //
  747. this.m_panelThresholds.Controls.Add(this.m_lblThresholdDetails);
  748. this.m_panelThresholds.Controls.Add(this.m_guiThresholdList);
  749. this.m_panelThresholds.Controls.Add(this.m_lblThresholds);
  750. this.m_panelThresholds.Location = new System.Drawing.Point(16, 184);
  751. this.m_panelThresholds.Name = "m_panelThresholds";
  752. this.m_panelThresholds.Size = new System.Drawing.Size(784, 112);
  753. this.m_panelThresholds.TabIndex = 39;
  754. //
  755. // m_lblThresholdDetails
  756. //
  757. this.m_lblThresholdDetails.Controls.Add(this.m_guiThresRate);
  758. this.m_lblThresholdDetails.Controls.Add(this.m_guiThresMin);
  759. this.m_lblThresholdDetails.Controls.Add(this.m_guiThresMax);
  760. this.m_lblThresholdDetails.Controls.Add(this.m_lblThresMin);
  761. this.m_lblThresholdDetails.Controls.Add(this.m_lblThresMax);
  762. this.m_lblThresholdDetails.Controls.Add(this.m_lblThresRate);
  763. this.m_lblThresholdDetails.Controls.Add(this.m_lblRateThresholdType);
  764. this.m_lblThresholdDetails.Controls.Add(this.m_guiRateThresholdType);
  765. this.m_lblThresholdDetails.Controls.Add(this.m_guiNewThreshold);
  766. this.m_lblThresholdDetails.ImeMode = System.Windows.Forms.ImeMode.On;
  767. this.m_lblThresholdDetails.Location = new System.Drawing.Point(320, 8);
  768. this.m_lblThresholdDetails.Name = "m_lblThresholdDetails";
  769. this.m_lblThresholdDetails.Size = new System.Drawing.Size(456, 104);
  770. this.m_lblThresholdDetails.TabIndex = 169;
  771. this.m_lblThresholdDetails.TabStop = false;
  772. this.m_lblThresholdDetails.Text = "Threshold Details";
  773. //
  774. // m_guiThresRate
  775. //
  776. this.m_guiThresRate.Location = new System.Drawing.Point(48, 64);
  777. this.m_guiThresRate.Name = "m_guiThresRate";
  778. this.m_guiThresRate.Size = new System.Drawing.Size(88, 20);
  779. this.m_guiThresRate.TabIndex = 200;
  780. this.m_guiThresRate.Text = "";
  781. //
  782. // m_guiThresMin
  783. //
  784. this.m_guiThresMin.Location = new System.Drawing.Point(48, 32);
  785. this.m_guiThresMin.Name = "m_guiThresMin";
  786. this.m_guiThresMin.Size = new System.Drawing.Size(88, 20);
  787. this.m_guiThresMin.TabIndex = 170;
  788. this.m_guiThresMin.Text = "";
  789. //
  790. // m_guiThresMax
  791. //
  792. this.m_guiThresMax.Location = new System.Drawing.Point(176, 32);
  793. this.m_guiThresMax.Name = "m_guiThresMax";
  794. this.m_guiThresMax.Size = new System.Drawing.Size(88, 20);
  795. this.m_guiThresMax.TabIndex = 180;
  796. this.m_guiThresMax.Text = "";
  797. //
  798. // m_lblThresMin
  799. //
  800. this.m_lblThresMin.Location = new System.Drawing.Point(16, 32);
  801. this.m_lblThresMin.Name = "m_lblThresMin";
  802. this.m_lblThresMin.Size = new System.Drawing.Size(64, 16);
  803. this.m_lblThresMin.TabIndex = 186;
  804. this.m_lblThresMin.Text = "Min";
  805. this.m_lblThresMin.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  806. //
  807. // m_lblThresMax
  808. //
  809. this.m_lblThresMax.Location = new System.Drawing.Point(144, 32);
  810. this.m_lblThresMax.Name = "m_lblThresMax";
  811. this.m_lblThresMax.Size = new System.Drawing.Size(88, 16);
  812. this.m_lblThresMax.TabIndex = 187;
  813. this.m_lblThresMax.Text = "Max";
  814. this.m_lblThresMax.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  815. //
  816. // m_lblThresRate
  817. //
  818. this.m_lblThresRate.Location = new System.Drawing.Point(16, 64);
  819. this.m_lblThresRate.Name = "m_lblThresRate";
  820. this.m_lblThresRate.Size = new System.Drawing.Size(40, 16);
  821. this.m_lblThresRate.TabIndex = 188;
  822. this.m_lblThresRate.Text = "Rate";
  823. this.m_lblThresRate.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  824. //
  825. // m_lblRateThresholdType
  826. //
  827. this.m_lblRateThresholdType.Location = new System.Drawing.Point(328, 16);
  828. this.m_lblRateThresholdType.Name = "m_lblRateThresholdType";
  829. this.m_lblRateThresholdType.Size = new System.Drawing.Size(112, 16);
  830. this.m_lblRateThresholdType.TabIndex = 39;
  831. this.m_lblRateThresholdType.Text = "Rate Threshold Type";
  832. this.m_lblRateThresholdType.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  833. //
  834. // m_guiRateThresholdType
  835. //
  836. this.m_guiRateThresholdType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  837. this.m_guiRateThresholdType.Location = new System.Drawing.Point(328, 32);
  838. this.m_guiRateThresholdType.Name = "m_guiRateThresholdType";
  839. this.m_guiRateThresholdType.Size = new System.Drawing.Size(112, 21);
  840. this.m_guiRateThresholdType.TabIndex = 190;
  841. //
  842. // m_guiNewThreshold
  843. //
  844. this.m_guiNewThreshold.Location = new System.Drawing.Point(328, 64);
  845. this.m_guiNewThreshold.Name = "m_guiNewThreshold";
  846. this.m_guiNewThreshold.Size = new System.Drawing.Size(112, 24);
  847. this.m_guiNewThreshold.TabIndex = 210;
  848. this.m_guiNewThreshold.Text = "New Threshold";
  849. this.m_guiNewThreshold.Click += new System.EventHandler(this.m_guiNewThreshold_Click);
  850. //
  851. // m_guiThresholdList
  852. //
  853. this.m_guiThresholdList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
  854. this.m_colThresMin,
  855. this.m_colThresMax,
  856. this.m_colThresRate});
  857. this.m_guiThresholdList.FullRowSelect = true;
  858. this.m_guiThresholdList.GridLines = true;
  859. this.m_guiThresholdList.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
  860. this.m_guiThresholdList.HideSelection = false;
  861. this.m_guiThresholdList.Location = new System.Drawing.Point(8, 16);
  862. this.m_guiThresholdList.MultiSelect = false;
  863. this.m_guiThresholdList.Name = "m_guiThresholdList";
  864. this.m_guiThresholdList.Size = new System.Drawing.Size(296, 96);
  865. this.m_guiThresholdList.Sorting = System.Windows.Forms.SortOrder.Ascending;
  866. this.m_guiThresholdList.TabIndex = 160;
  867. this.m_guiThresholdList.View = System.Windows.Forms.View.Details;
  868. //
  869. // m_colThresMin
  870. //
  871. this.m_colThresMin.Text = "Minimum";
  872. this.m_colThresMin.Width = 90;
  873. //
  874. // m_colThresMax
  875. //
  876. this.m_colThresMax.Text = "Maximum";
  877. this.m_colThresMax.Width = 90;
  878. //
  879. // m_colThresRate
  880. //
  881. this.m_colThresRate.Text = "Rate";
  882. this.m_colThresRate.Width = 70;
  883. //
  884. // m_lblThresholds
  885. //
  886. this.m_lblThresholds.Location = new System.Drawing.Point(8, 0);
  887. this.m_lblThresholds.Name = "m_lblThresholds";
  888. this.m_lblThresholds.Size = new System.Drawing.Size(88, 16);
  889. this.m_lblThresholds.TabIndex = 37;
  890. this.m_lblThresholds.Text = "Threshold List";
  891. this.m_lblThresholds.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  892. //
  893. // m_guiAmtThresholdType
  894. //
  895. this.m_guiAmtThresholdType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  896. this.m_guiAmtThresholdType.Location = new System.Drawing.Point(632, 40);
  897. this.m_guiAmtThresholdType.Name = "m_guiAmtThresholdType";
  898. this.m_guiAmtThresholdType.Size = new System.Drawing.Size(160, 21);
  899. this.m_guiAmtThresholdType.TabIndex = 120;
  900. //
  901. // m_lblAmountThresholdType
  902. //
  903. this.m_lblAmountThresholdType.Location = new System.Drawing.Point(632, 24);
  904. this.m_lblAmountThresholdType.Name = "m_lblAmountThresholdType";
  905. this.m_lblAmountThresholdType.Size = new System.Drawing.Size(112, 16);
  906. this.m_lblAmountThresholdType.TabIndex = 37;
  907. this.m_lblAmountThresholdType.Text = "Amt Threshold Type";
  908. this.m_lblAmountThresholdType.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  909. //
  910. // m_lblItemDocIndicator
  911. //
  912. this.m_lblItemDocIndicator.Controls.Add(this.m_guiDocumentIndicator);
  913. this.m_lblItemDocIndicator.Controls.Add(this.m_guiItemIndicator);
  914. this.m_lblItemDocIndicator.Location = new System.Drawing.Point(472, 72);
  915. this.m_lblItemDocIndicator.Name = "m_lblItemDocIndicator";
  916. this.m_lblItemDocIndicator.Size = new System.Drawing.Size(216, 48);
  917. this.m_lblItemDocIndicator.TabIndex = 129;
  918. this.m_lblItemDocIndicator.TabStop = false;
  919. this.m_lblItemDocIndicator.Text = "Item Document Indicator";
  920. //
  921. // m_guiDocumentIndicator
  922. //
  923. this.m_guiDocumentIndicator.Location = new System.Drawing.Point(112, 16);
  924. this.m_guiDocumentIndicator.Name = "m_guiDocumentIndicator";
  925. this.m_guiDocumentIndicator.Size = new System.Drawing.Size(80, 24);
  926. this.m_guiDocumentIndicator.TabIndex = 140;
  927. this.m_guiDocumentIndicator.Tag = "D";
  928. this.m_guiDocumentIndicator.Text = "Document";
  929. this.m_guiDocumentIndicator.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  930. //
  931. // m_guiItemIndicator
  932. //
  933. this.m_guiItemIndicator.Location = new System.Drawing.Point(32, 16);
  934. this.m_guiItemIndicator.Name = "m_guiItemIndicator";
  935. this.m_guiItemIndicator.Size = new System.Drawing.Size(48, 24);
  936. this.m_guiItemIndicator.TabIndex = 130;
  937. this.m_guiItemIndicator.Tag = "I";
  938. this.m_guiItemIndicator.Text = "Item";
  939. this.m_guiItemIndicator.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  940. //
  941. // m_lblUseCommonRules
  942. //
  943. this.m_lblUseCommonRules.Location = new System.Drawing.Point(184, 24);
  944. this.m_lblUseCommonRules.Name = "m_lblUseCommonRules";
  945. this.m_lblUseCommonRules.Size = new System.Drawing.Size(112, 24);
  946. this.m_lblUseCommonRules.TabIndex = 31;
  947. this.m_lblUseCommonRules.Text = "Use Common Rules:";
  948. this.m_lblUseCommonRules.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  949. //
  950. // m_guiUseCommonRulesNo
  951. //
  952. this.m_guiUseCommonRulesNo.Location = new System.Drawing.Point(368, 24);
  953. this.m_guiUseCommonRulesNo.Name = "m_guiUseCommonRulesNo";
  954. this.m_guiUseCommonRulesNo.Size = new System.Drawing.Size(40, 24);
  955. this.m_guiUseCommonRulesNo.TabIndex = 80;
  956. this.m_guiUseCommonRulesNo.Tag = "N";
  957. this.m_guiUseCommonRulesNo.Text = "No";
  958. this.m_guiUseCommonRulesNo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  959. //
  960. // m_guiUseCommonRulesYes
  961. //
  962. this.m_guiUseCommonRulesYes.Location = new System.Drawing.Point(304, 24);
  963. this.m_guiUseCommonRulesYes.Name = "m_guiUseCommonRulesYes";
  964. this.m_guiUseCommonRulesYes.Size = new System.Drawing.Size(48, 24);
  965. this.m_guiUseCommonRulesYes.TabIndex = 70;
  966. this.m_guiUseCommonRulesYes.Tag = "Y";
  967. this.m_guiUseCommonRulesYes.Text = "Yes";
  968. this.m_guiUseCommonRulesYes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  969. //
  970. // m_lblComments
  971. //
  972. this.m_lblComments.Location = new System.Drawing.Point(184, 128);
  973. this.m_lblComments.Name = "m_lblComments";
  974. this.m_lblComments.Size = new System.Drawing.Size(56, 32);
  975. this.m_lblComments.TabIndex = 26;
  976. this.m_lblComments.Text = "Comment";
  977. this.m_lblComments.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  978. //
  979. // m_lblRate
  980. //
  981. this.m_lblRate.Location = new System.Drawing.Point(472, 24);
  982. this.m_lblRate.Name = "m_lblRate";
  983. this.m_lblRate.Size = new System.Drawing.Size(144, 16);
  984. this.m_lblRate.TabIndex = 25;
  985. this.m_lblRate.Text = "Rate";
  986. this.m_lblRate.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  987. //
  988. // m_lblCommonRules
  989. //
  990. this.m_lblCommonRules.Controls.Add(this.m_guiApplyDistrict);
  991. this.m_lblCommonRules.Controls.Add(this.m_guiApplyState);
  992. this.m_lblCommonRules.Controls.Add(this.m_guiApplySelf);
  993. this.m_lblCommonRules.Controls.Add(this.m_guiApplyCity);
  994. this.m_lblCommonRules.Controls.Add(this.m_guiApplyCounty);
  995. this.m_lblCommonRules.Location = new System.Drawing.Point(24, 24);
  996. this.m_lblCommonRules.Name = "m_lblCommonRules";
  997. this.m_lblCommonRules.Size = new System.Drawing.Size(144, 152);
  998. this.m_lblCommonRules.TabIndex = 9;
  999. this.m_lblCommonRules.TabStop = false;
  1000. this.m_lblCommonRules.Text = "Common Rules";
  1001. //
  1002. // m_guiApplyDistrict
  1003. //
  1004. this.m_guiApplyDistrict.Location = new System.Drawing.Point(16, 120);
  1005. this.m_guiApplyDistrict.Name = "m_guiApplyDistrict";
  1006. this.m_guiApplyDistrict.Size = new System.Drawing.Size(120, 24);
  1007. this.m_guiApplyDistrict.TabIndex = 60;
  1008. this.m_guiApplyDistrict.Text = "Apply To District";
  1009. //
  1010. // m_guiApplyState
  1011. //
  1012. this.m_guiApplyState.Location = new System.Drawing.Point(16, 48);
  1013. this.m_guiApplyState.Name = "m_guiApplyState";
  1014. this.m_guiApplyState.Size = new System.Drawing.Size(120, 24);
  1015. this.m_guiApplyState.TabIndex = 30;
  1016. this.m_guiApplyState.Text = "Apply To State";
  1017. //
  1018. // m_guiApplySelf
  1019. //
  1020. this.m_guiApplySelf.Location = new System.Drawing.Point(16, 24);
  1021. this.m_guiApplySelf.Name = "m_guiApplySelf";
  1022. this.m_guiApplySelf.Size = new System.Drawing.Size(120, 24);
  1023. this.m_guiApplySelf.TabIndex = 20;
  1024. this.m_guiApplySelf.Text = "Apply To Self";
  1025. //
  1026. // m_guiApplyCity
  1027. //
  1028. this.m_guiApplyCity.Location = new System.Drawing.Point(16, 96);
  1029. this.m_guiApplyCity.Name = "m_guiApplyCity";
  1030. this.m_guiApplyCity.Size = new System.Drawing.Size(120, 24);
  1031. this.m_guiApplyCity.TabIndex = 50;
  1032. this.m_guiApplyCity.Text = "Apply To City";
  1033. //
  1034. // m_guiApplyCounty
  1035. //
  1036. this.m_guiApplyCounty.Location = new System.Drawing.Point(16, 72);
  1037. this.m_guiApplyCounty.Name = "m_guiApplyCounty";
  1038. this.m_guiApplyCounty.Size = new System.Drawing.Size(120, 24);
  1039. this.m_guiApplyCounty.TabIndex = 40;
  1040. this.m_guiApplyCounty.Text = "Apply To County";
  1041. //
  1042. // m_guiRate
  1043. //
  1044. this.m_guiRate.Location = new System.Drawing.Point(472, 40);
  1045. this.m_guiRate.Name = "m_guiRate";
  1046. this.m_guiRate.Size = new System.Drawing.Size(152, 20);
  1047. this.m_guiRate.TabIndex = 110;
  1048. this.m_guiRate.Text = "";
  1049. //
  1050. // m_lblSunset
  1051. //
  1052. this.m_lblSunset.Location = new System.Drawing.Point(184, 96);
  1053. this.m_lblSunset.Name = "m_lblSunset";
  1054. this.m_lblSunset.Size = new System.Drawing.Size(48, 16);
  1055. this.m_lblSunset.TabIndex = 3;
  1056. this.m_lblSunset.Text = "Sunset";
  1057. this.m_lblSunset.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  1058. //
  1059. // m_lblEffective
  1060. //
  1061. this.m_lblEffective.Location = new System.Drawing.Point(184, 64);
  1062. this.m_lblEffective.Name = "m_lblEffective";
  1063. this.m_lblEffective.Size = new System.Drawing.Size(48, 16);
  1064. this.m_lblEffective.TabIndex = 2;
  1065. this.m_lblEffective.Text = "Effective";
  1066. this.m_lblEffective.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  1067. //
  1068. // persistentRepository1
  1069. //
  1070. this.persistentRepository1.Items.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
  1071. this.m_editorComboBox});
  1072. //
  1073. // m_editorComboBox
  1074. //
  1075. this.m_editorComboBox.Name = "m_editorComboBox";
  1076. this.m_editorComboBox.Properties.AllowFocused = false;
  1077. this.m_editorComboBox.Properties.AutoHeight = false;
  1078. this.m_editorComboBox.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
  1079. this.m_editorComboBox.Properties.Buttons.Add(new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo));
  1080. this.m_editorComboBox.Properties.ButtonsBorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.HotFlat;
  1081. this.m_editorComboBox.Properties.DropDownRows = 2;
  1082. this.m_editorComboBox.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
  1083. this.m_editorComboBox.Properties.UseCtrlScroll = true;
  1084. //
  1085. // m_guiVersionList
  1086. //
  1087. this.m_guiVersionList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
  1088. this.m_colVersionId,
  1089. this.m_colEffectiveDate,
  1090. this.m_colSunsetDate,
  1091. this.m_colItemDocInd,
  1092. this.m_colRate,
  1093. this.m_colUseCommonRules,
  1094. this.m_colApplyToSelf,
  1095. this.m_colApplyToState,
  1096. this.m_colApplyToCounty,
  1097. this.m_colApplyToCity,
  1098. this.m_colApplyToDistrict,
  1099. this.m_colRecordStatus,
  1100. this.m_colIsPosted,
  1101. this.m_colTaxRuleId});
  1102. this.m_guiVersionList.FullRowSelect = true;
  1103. this.m_guiVersionList.GridLines = true;
  1104. this.m_guiVersionList.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
  1105. this.m_guiVersionList.HideSelection = false;
  1106. this.m_guiVersionList.Location = new System.Drawing.Point(16, 32);
  1107. this.m_guiVersionList.MultiSelect = false;
  1108. this.m_guiVersionList.Name = "m_guiVersionList";
  1109. this.m_guiVersionList.Size = new System.Drawing.Size(816, 96);
  1110. this.m_guiVersionList.TabIndex = 10;
  1111. this.m_guiVersionList.View = System.Windows.Forms.View.Details;
  1112. //
  1113. // m_colVersionId
  1114. //
  1115. this.m_colVersionId.Text = "Version Id";
  1116. this.m_colVersionId.Width = 65;
  1117. //
  1118. // m_colEffectiveDate
  1119. //
  1120. this.m_colEffectiveDate.Text = "Effective Date";
  1121. this.m_colEffectiveDate.Width = 80;
  1122. //
  1123. // m_colSunsetDate
  1124. //
  1125. this.m_colSunsetDate.Text = "Sunset Date";
  1126. this.m_colSunsetDate.Width = 75;
  1127. //
  1128. // m_colItemDocInd
  1129. //
  1130. this.m_colItemDocInd.Text = "Item/Doc";
  1131. //
  1132. // m_colRate
  1133. //
  1134. this.m_colRate.Text = "Rate";
  1135. //
  1136. // m_colUseCommonRules
  1137. //
  1138. this.m_colUseCommonRules.Text = "Use Common";
  1139. this.m_colUseCommonRules.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
  1140. this.m_colUseCommonRules.Width = 75;
  1141. //
  1142. // m_colApplyToSelf
  1143. //
  1144. this.m_colApplyToSelf.Text = "Self";
  1145. this.m_colApplyToSelf.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
  1146. this.m_colApplyToSelf.Width = 35;
  1147. //
  1148. // m_colApplyToState
  1149. //
  1150. this.m_colApplyToState.Text = "State";
  1151. this.m_colApplyToState.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
  1152. this.m_colApplyToState.Width = 40;
  1153. //
  1154. // m_colApplyToCounty
  1155. //
  1156. this.m_colApplyToCounty.Text = "County";
  1157. this.m_colApplyToCounty.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
  1158. this.m_colApplyToCounty.Width = 50;
  1159. //
  1160. // m_colApplyToCity
  1161. //
  1162. this.m_colApplyToCity.Text = "City";
  1163. this.m_colApplyToCity.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
  1164. this.m_colApplyToCity.Width = 30;
  1165. //
  1166. // m_colApplyToDistrict
  1167. //
  1168. this.m_colApplyToDistrict.Text = "District";
  1169. this.m_colApplyToDistrict.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
  1170. this.m_colApplyToDistrict.Width = 45;
  1171. //
  1172. // m_colRecordStatus
  1173. //
  1174. this.m_colRecordStatus.Text = "Status";
  1175. this.m_colRecordStatus.Width = 65;
  1176. //
  1177. // m_colIsPosted
  1178. //
  1179. this.m_colIsPosted.Text = "Is Posted";
  1180. //
  1181. // m_colTaxRuleId
  1182. //
  1183. this.m_colTaxRuleId.Text = "Tax Rule Id";
  1184. this.m_colTaxRuleId.Width = 70;
  1185. //
  1186. // m_guiResetStatus
  1187. //
  1188. this.m_guiResetStatus.Location = new System.Drawing.Point(744, 560);
  1189. this.m_guiResetStatus.Name = "m_guiResetStatus";
  1190. this.m_guiResetStatus.Size = new System.Drawing.Size(88, 24);
  1191. this.m_guiResetStatus.TabIndex = 250;
  1192. this.m_guiResetStatus.Text = "Reset Status";
  1193. this.m_guiResetStatus.Click += new System.EventHandler(this.m_guiResetStatus_Click);
  1194. //
  1195. // VersionPane
  1196. //
  1197. this.Controls.Add(this.m_guiResetStatus);
  1198. this.Controls.Add(this.m_guiVersionList);
  1199. this.Controls.Add(this.m_guiNewVersion);
  1200. this.Controls.Add(this.m_guiApprove);
  1201. this.Controls.Add(this.m_lblVersionList);
  1202. this.Controls.Add(this.m_guiReject);
  1203. this.Controls.Add(this.m_lblVersionDetails);
  1204. this.Name = "VersionPane";
  1205. this.Size = new System.Drawing.Size(850, 600);
  1206. this.m_lblVersionDetails.ResumeLayout(false);
  1207. ((System.ComponentModel.ISupportInitialize)(this.m_guiSunset)).EndInit();
  1208. ((System.ComponentModel.ISupportInitialize)(this.m_guiEffective)).EndInit();
  1209. this.m_panelAuditInfo.ResumeLayout(false);
  1210. this.m_panelThresholds.ResumeLayout(false);
  1211. this.m_lblThresholdDetails.ResumeLayout(false);
  1212. this.m_lblItemDocIndicator.ResumeLayout(false);
  1213. this.m_lblCommonRules.ResumeLayout(false);
  1214. ((System.ComponentModel.ISupportInitialize)(this.m_editorComboBox)).EndInit();
  1215. this.ResumeLayout(false);
  1216.  
  1217. }
  1218. #endregion
  1219.  
  1220. #region Intialization Routines
  1221. public void Initialize()
  1222. {
  1223. m_useCommonRulesGroup = new RadioButtonGroup();
  1224. m_useCommonRulesGroup.Add(m_guiUseCommonRulesYes);
  1225. m_useCommonRulesGroup.Add(m_guiUseCommonRulesNo);
  1226.  
  1227. m_itemDocumentGroup = new RadioButtonGroup();
  1228. m_itemDocumentGroup.Add(m_guiItemIndicator);
  1229. m_itemDocumentGroup.Add(m_guiDocumentIndicator);
  1230.  
  1231. m_commonRulesGroup = new CheckBoxGroup();
  1232. m_commonRulesGroup.Add(m_guiApplySelf);
  1233. m_commonRulesGroup.Add(m_guiApplyState);
  1234. m_commonRulesGroup.Add(m_guiApplyCounty);
  1235. m_commonRulesGroup.Add(m_guiApplyCity);
  1236. m_commonRulesGroup.Add(m_guiApplyDistrict);
  1237.  
  1238. m_guiVersionList.BindingContext = new BindingContext();
  1239. }
  1240.  
  1241. public void InitRegisterEvents()
  1242. {
  1243. this.Load += new System.EventHandler(VersionPane_Load);
  1244. m_guiUseCommonRulesYes.CheckedChanged += new System.EventHandler(m_guiUseCommonRulesYes_CheckChanged);
  1245. m_guiUseCommonRulesNo.CheckedChanged += new System.EventHandler(m_guiUseCommonRulesNo_CheckChanged);
  1246. m_guiVersionList.SelectedIndexChanged += new System.EventHandler(this.ListView_SelectedIndexChanged);
  1247. m_guiThresholdList.SelectedIndexChanged += new System.EventHandler(this.m_guiThresholdList_SelectedIndexChanged);
  1248. m_guiThresholdList.KeyUp += new System.Windows.Forms.KeyEventHandler(this.ThresholdListView_KeyUp);
  1249. m_guiVersionList.KeyUp += new System.Windows.Forms.KeyEventHandler(this.ListView_KeyUp);
  1250. m_guiApplySelf.LostFocus += new System.EventHandler(this.VersionDetails_LostFocus);
  1251. m_guiApplyState.LostFocus += new System.EventHandler(this.VersionDetails_LostFocus);
  1252. m_guiApplyCounty.LostFocus += new System.EventHandler(this.VersionDetails_LostFocus);
  1253. m_guiApplyCity.LostFocus += new System.EventHandler(this.VersionDetails_LostFocus);
  1254. m_guiApplyDistrict.LostFocus += new System.EventHandler(this.VersionDetails_LostFocus);
  1255. m_guiUseCommonRulesNo.LostFocus += new System.EventHandler(this.VersionDetails_LostFocus);
  1256. m_guiUseCommonRulesYes.LostFocus += new System.EventHandler(this.VersionDetails_LostFocus);
  1257. m_guiRate.LostFocus += new System.EventHandler(this.VersionDetails_LostFocus);
  1258. m_guiItemIndicator.LostFocus += new System.EventHandler(this.VersionDetails_LostFocus);
  1259. m_guiDocumentIndicator.LostFocus += new System.EventHandler(this.VersionDetails_LostFocus);
  1260. m_guiAmtThresholdType.LostFocus += new System.EventHandler(this.VersionDetails_LostFocus);
  1261. m_guiRateThresholdType.LostFocus += new System.EventHandler(this.VersionDetails_LostFocus);
  1262. m_guiEffective.LostFocus += new System.EventHandler(this.VersionDetails_LostFocus);
  1263. m_guiSunset.LostFocus += new System.EventHandler(this.VersionDetails_LostFocus);
  1264. m_guiComments.LostFocus += new System.EventHandler(this.VersionDetails_LostFocus);
  1265. m_guiThresMin.LostFocus += new System.EventHandler(this.ThresholdDetails_ValueChanged);
  1266. m_guiThresMax.LostFocus += new System.EventHandler(this.ThresholdDetails_ValueChanged);
  1267. m_guiThresRate.LostFocus += new System.EventHandler(this.ThresholdDetails_ValueChanged);
  1268.  
  1269. m_guiApplySelf.GotFocus += new System.EventHandler(this.VersionDetails_GotFocus);
  1270. m_guiApplyState.GotFocus += new System.EventHandler(this.VersionDetails_GotFocus);
  1271. m_guiApplyCounty.GotFocus += new System.EventHandler(this.VersionDetails_GotFocus);
  1272. m_guiApplyCity.GotFocus += new System.EventHandler(this.VersionDetails_GotFocus);
  1273. m_guiApplyDistrict.GotFocus += new System.EventHandler(this.VersionDetails_GotFocus);
  1274. m_guiUseCommonRulesNo.GotFocus += new System.EventHandler(this.VersionDetails_GotFocus);
  1275. m_guiUseCommonRulesYes.GotFocus += new System.EventHandler(this.VersionDetails_GotFocus);
  1276. m_guiRate.GotFocus += new System.EventHandler(this.VersionDetails_GotFocus);
  1277. m_guiItemIndicator.GotFocus += new System.EventHandler(this.VersionDetails_GotFocus);
  1278. m_guiDocumentIndicator.GotFocus += new System.EventHandler(this.VersionDetails_GotFocus);
  1279. m_guiAmtThresholdType.GotFocus += new System.EventHandler(this.VersionDetails_GotFocus);
  1280. m_guiRateThresholdType.GotFocus += new System.EventHandler(this.VersionDetails_GotFocus);
  1281. m_guiEffective.GotFocus += new System.EventHandler(this.VersionDetails_GotFocus);
  1282. m_guiSunset.GotFocus += new System.EventHandler(this.VersionDetails_GotFocus);
  1283. m_guiComments.GotFocus += new System.EventHandler(this.VersionDetails_GotFocus);
  1284. m_guiThresMin.GotFocus += new System.EventHandler(this.ThresholdDetails_ValueChanged);
  1285. m_guiThresMax.GotFocus += new System.EventHandler(this.ThresholdDetails_ValueChanged);
  1286. m_guiThresRate.GotFocus += new System.EventHandler(this.ThresholdDetails_ValueChanged);
  1287.  
  1288. m_guiVersionList.LostFocus += new System.EventHandler(this.m_guiVersionList_LostFocus);
  1289.  
  1290. m_guiThresMin.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.NumericTextBox_KeyPress);
  1291. m_guiThresMax.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.NumericTextBox_KeyPress);
  1292. m_guiThresRate.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.NumericTextBox_KeyPress);
  1293. m_guiRate.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.NumericTextBox_KeyPress);
  1294. }
  1295. #endregion Intialization Routines
  1296.  
  1297. #region Interface IDataConsumerControl
  1298. public void LoadControlData()
  1299. {
  1300. ExemptAlgType et = new ExemptAlgType();
  1301. m_dsAmtThreshold = et.List();
  1302. et.AlgorithmCode = VALUE_AMT_THRESHOLD_TYPE_NA;
  1303. et.AlgorithmDesc = DISPLAY_AMT_THRESHOLD_TYPE_NA;
  1304. m_dsAmtThreshold.Insert(0, et);
  1305.  
  1306. TaxRateThreshAlgType tt = new TaxRateThreshAlgType();
  1307. m_dsRateThreshold = tt.List();
  1308. tt.AlgorithmCode = VALUE_RATE_THRESHOLD_TYPE_NA;
  1309. tt.AlgorithmDesc = DISPLAY_RATE_THRESHOLD_TYPE_NA;
  1310. m_dsRateThreshold.Insert(0, tt);
  1311.  
  1312. m_dsRateFlag = new DataTable();
  1313. m_dsRateFlag.Columns.Add("VALUE");
  1314. m_dsRateFlag.Columns.Add("DISPLAY");
  1315. m_dsRateFlag.Rows.Add(new String[] {VALUE_RATE_THRESHOLD_FLAG_YES, DISPLAY_RATE_THRESHOLD_FLAG_YES});
  1316. m_dsRateFlag.Rows.Add(new String[] {VALUE_RATE_THRESHOLD_FLAG_NO , DISPLAY_RATE_THRESHOLD_FLAG_NO});
  1317. }
  1318.  
  1319. public void BindControlData()
  1320. {
  1321. m_useCommonRulesGroup.Value = "Y";
  1322. m_itemDocumentGroup.Value = "I";
  1323.  
  1324. m_editorComboBox.Properties.Items.Add("Y");
  1325. m_editorComboBox.Properties.Items.Add("N");
  1326.  
  1327. m_guiAmtThresholdType.DataSource = m_dsAmtThreshold;
  1328. m_guiAmtThresholdType.DisplayMember = "AlgorithmDesc";
  1329. m_guiAmtThresholdType.ValueMember = "AlgorithmCode";
  1330.  
  1331. m_guiRateThresholdType.DataSource = m_dsRateThreshold;
  1332. m_guiRateThresholdType.DisplayMember = "AlgorithmDesc";
  1333. m_guiRateThresholdType.ValueMember = "AlgorithmCode";
  1334.  
  1335. }
  1336.  
  1337. public void SetDefaultControlValues()
  1338. {
  1339. m_guiAmtThresholdType.SelectedValue = VALUE_AMT_THRESHOLD_TYPE_NA;
  1340. m_guiRateThresholdType.SelectedValue = VALUE_RATE_THRESHOLD_TYPE_NA;
  1341. }
  1342.  
  1343. #endregion Interface IDataConsumerControl
  1344.  
  1345. #region Interface IEditorPane
  1346. public void GetSelectedControlValues()
  1347. {
  1348. Com.Taxware.Platform.TaxRule tr = (Com.Taxware.Platform.TaxRule) m_dataSource;
  1349. foreach (TaxRuleVersion trv in tr.Versions)
  1350. {
  1351. if (trv.IsPosted == 1 && trv.RecordStatus.Equals("POSTED"))
  1352. {
  1353. trv.RecordStatus = "PENDING";
  1354. }
  1355. }
  1356. }
  1357. public void SetSelectedControlValues()
  1358. {
  1359. if (m_editMode == TaxRuleEditMode.EDIT_MODE_EDIT_RULE)
  1360. {
  1361. SetEditRuleState();
  1362. SetEditRuleValues();
  1363. }
  1364. else if (m_editMode == TaxRuleEditMode.EDIT_MODE_COPY_RULE)
  1365. {
  1366. SetEditRuleState();
  1367. SetEditRuleValues();
  1368. }
  1369. else if (m_editMode == TaxRuleEditMode.EDIT_MODE_NEW_RULE)
  1370. {
  1371. SetNewRuleState();
  1372. SetNewRuleValues();
  1373. }
  1374. else if (m_editMode == TaxRuleEditMode.EDIT_MODE_ADD_CHILD_RULE)
  1375. {
  1376. SetAddChildRuleState();
  1377. SetAddChildRuleValues();
  1378. }
  1379. }
  1380. public void ClearControlValues()
  1381. {
  1382. }
  1383.  
  1384. public bool ValidateControlValues()
  1385. {
  1386. bool bCommonRulesChecked = false;
  1387. bool bItemDocIndChecked = false;
  1388. bool bIsCommonRule = false;
  1389. string sCommonRules = String.Empty;
  1390. string sItemDocInd = String.Empty;
  1391. int iBlankSunset = 0;
  1392. DateTime dtPreviousEff = DateTime.MaxValue;
  1393. int i = 0;
  1394. foreach (TaxRuleVersion trv in m_dataSource.Versions)
  1395. {
  1396. if (i == 0)
  1397. {
  1398. sCommonRules = trv.ApplyToCommonRules;
  1399. sItemDocInd = trv.ItemDocIndicator;
  1400. }
  1401. if (trv.ApplyToSelf.ToUpper().Trim().Equals("Y") ||
  1402. trv.ApplyToState.ToUpper().Trim().Equals("Y") ||
  1403. trv.ApplyToCounty.ToUpper().Trim().Equals("Y") ||
  1404. trv.ApplyToCity.ToUpper().Trim().Equals("Y") ||
  1405. trv.ApplyToDistrict.ToUpper().Trim().Equals("Y"))
  1406. {
  1407. bIsCommonRule = true;
  1408. }
  1409. //check that all apply to common rules among version are same
  1410. if (!trv.ApplyToCommonRules.Equals(sCommonRules) && !bCommonRulesChecked)
  1411. {
  1412. if (MessageBox.Show(TaxRuleMessages.MSG_VERSION_USE_COMMON_RULES_DIFFERENT,
  1413. TaxRuleMessages.WIN_VERSION_TITLE_WARNING,
  1414. MessageBoxButtons.YesNo,
  1415. MessageBoxIcon.Warning) == DialogResult.Yes)
  1416. {
  1417. return false;
  1418. }
  1419. else
  1420. {
  1421. bCommonRulesChecked = true;
  1422. }
  1423. }
  1424. //You can not use common rules for secondary rules
  1425. if (trv.ApplyToCommonRules.ToUpper().Trim().Equals("Y") && m_dataSource.IsSecondaryRule)
  1426. {
  1427. if (MessageBox.Show(TaxRuleMessages.MSG_VERSION_USE_COMMON_RULE_SECONDARY,
  1428. TaxRuleMessages.WIN_VERSION_TITLE_WARNING,
  1429. MessageBoxButtons.YesNo,
  1430. MessageBoxIcon.Exclamation) == DialogResult.No)
  1431. {
  1432. return false;
  1433. }
  1434. }
  1435. //check that all item document indicators among version are same
  1436. if (!trv.ItemDocIndicator.Equals(sItemDocInd) && !bItemDocIndChecked)
  1437. {
  1438. if (MessageBox.Show(TaxRuleMessages.MSG_VERSION_ITEM_DOCUMENT_DIFFERENT,
  1439. TaxRuleMessages.WIN_VERSION_TITLE_WARNING,
  1440. MessageBoxButtons.YesNo,
  1441. MessageBoxIcon.Warning) == DialogResult.Yes)
  1442. {
  1443. return false;
  1444. }
  1445. else
  1446. {
  1447. bItemDocIndChecked = true;
  1448. }
  1449. }
  1450. //Effective date should never be blank
  1451. if (PlatformUtil.ToString(trv.EffectiveDate, "yyyy-mm-dd") == String.Empty)
  1452. {
  1453. MessageBox.Show(TaxRuleMessages.MSG_VERSION_EFFECTIVE_MISSING,
  1454. TaxRuleMessages.WIN_VERSION_TITLE_ERROR,
  1455. MessageBoxButtons.OK,
  1456. MessageBoxIcon.Exclamation);
  1457. return false;
  1458. }
  1459. //Count blank sunset dates can only be one per tax rule
  1460. if (PlatformUtil.ToString(trv.SunsetDate, "yyyy-mm-dd") == String.Empty)
  1461. {
  1462. iBlankSunset++;
  1463. if (iBlankSunset > 1)
  1464. {
  1465. MessageBox.Show(TaxRuleMessages.MSG_VERSION_SUNSET_MULTIPLE_BLANK,
  1466. TaxRuleMessages.WIN_VERSION_TITLE_ERROR,
  1467. MessageBoxButtons.OK,
  1468. MessageBoxIcon.Exclamation);
  1469. return false;
  1470. }
  1471. }
  1472. //A sunset date should not be blank in the middle of a series
  1473. if (i > 0 && PlatformUtil.ToString(trv.SunsetDate, "yyyy-mm-dd") == String.Empty)
  1474. {
  1475. if (MessageBox.Show(String.Format(TaxRuleMessages.MSG_VERSION_SUNSET_MISSING, dtPreviousEff.ToString("yyyy-MM-dd")),
  1476. TaxRuleMessages.WIN_VERSION_TITLE_WARNING,
  1477. MessageBoxButtons.YesNo,
  1478. MessageBoxIcon.Warning) == DialogResult.Yes)
  1479. {
  1480. return false;
  1481. }
  1482. }
  1483. //Sunset date is less than effective date
  1484. if ((PlatformUtil.ToString(trv.SunsetDate, "yyyy-mm-dd") != String.Empty) &&
  1485. (trv.SunsetDate < trv.EffectiveDate))
  1486. {
  1487. MessageBox.Show(TaxRuleMessages.MSG_VERSION_SUNSET_LESS,
  1488. TaxRuleMessages.WIN_VERSION_TITLE_ERROR,
  1489. MessageBoxButtons.OK,
  1490. MessageBoxIcon.Exclamation);
  1491. return false;
  1492. }
  1493. //Doesn't seem to be contiguous set of dates
  1494. if (dtPreviousEff != DateTime.MaxValue &&
  1495. dtPreviousEff != trv.SunsetDate)
  1496. {
  1497. if (MessageBox.Show(TaxRuleMessages.MSG_VERSION_DATE_NOT_CONTIGUOUS,
  1498. TaxRuleMessages.WIN_VERSION_TITLE_WARNING,
  1499. MessageBoxButtons.YesNo,
  1500. MessageBoxIcon.Warning) == DialogResult.Yes)
  1501. {
  1502. return false;
  1503. }
  1504. }
  1505. //Check that there is a Algorithm type for particular versions
  1506. if (m_dataSource.TaxRuleTypeId == TaxRuleType.RULE_TYPE_TAXABLE_AMOUNT_THRESHOLD)
  1507. {
  1508. if (trv.AlgTypeCd == String.Empty || trv.AlgTypeCd == "0")
  1509. {
  1510. MessageBox.Show(TaxRuleMessages.MSG_VERSION_AMT_THRESHOLD_MISSING,
  1511. TaxRuleMessages.WIN_VERSION_TITLE_WARNING,
  1512. MessageBoxButtons.OK,
  1513. MessageBoxIcon.Exclamation);
  1514. return false;
  1515. }
  1516. }
  1517. else if (m_dataSource.TaxRuleTypeId == TaxRuleType.RULE_TYPE_TAX_RATE_THRESHOLD)
  1518. {
  1519. if (trv.AlgTypeCd == String.Empty || trv.AlgTypeCd == "0")
  1520. {
  1521. MessageBox.Show(TaxRuleMessages.MSG_VERSION_RATE_THRESHOLD_MISSING,
  1522. TaxRuleMessages.WIN_VERSION_TITLE_WARNING,
  1523. MessageBoxButtons.OK,
  1524. MessageBoxIcon.Exclamation);
  1525. return false;
  1526. }
  1527. }
  1528.  
  1529. //check the threshold values
  1530. if (m_dataSource.TaxRuleTypeId == TaxRuleType.RULE_TYPE_TAX_RATE_THRESHOLD)
  1531. {
  1532. int iBlankMaxCount = 0;
  1533. foreach (TaxRateThreshold trt in trv.TaxRateThresholds)
  1534. {
  1535. //Only one blank Max is allowed per series of thresholds
  1536. if (Double.IsNaN(trt.MaxValue))
  1537. {
  1538. iBlankMaxCount++;
  1539. }
  1540. if (iBlankMaxCount > 1)
  1541. {
  1542. String sSunset = PlatformUtil.ToString(trv.SunsetDate, "yyyy-MM-dd");
  1543. sSunset = (sSunset == String.Empty ? "Indefinite" : sSunset);
  1544. if (MessageBox.Show(String.Format(TaxRuleMessages.MSG_VERSION_MAX_THRESHOLD_BLANK, trv.EffectiveDate.ToString("yyyy-MM-dd"), sSunset),
  1545. TaxRuleMessages.WIN_VERSION_TITLE_WARNING,
  1546. MessageBoxButtons.YesNo,
  1547. MessageBoxIcon.Warning) == DialogResult.Yes)
  1548. {
  1549. return false;
  1550. }
  1551. }
  1552. if ((!Double.IsNaN(trt.MaxValue)) && trt.MinValue >= trt.MaxValue)
  1553. {
  1554. String sSunset = PlatformUtil.ToString(trv.SunsetDate, "yyyy-MM-dd");
  1555. sSunset = (sSunset == String.Empty ? "Indefinite" : sSunset);
  1556. MessageBox.Show(String.Format(TaxRuleMessages.MSG_VERSION_MIN_GREATER_MAX, trv.EffectiveDate.ToString("yyyy-MM-dd"), sSunset),
  1557. TaxRuleMessages.WIN_VERSION_TITLE_WARNING,
  1558. MessageBoxButtons.OK,
  1559. MessageBoxIcon.Exclamation);
  1560. return false;
  1561. }
  1562. }
  1563. }
  1564.  
  1565. dtPreviousEff = trv.EffectiveDate;
  1566. i++;
  1567. }
  1568. if (bIsCommonRule &&
  1569. m_dataSource.Children != null &&
  1570. m_dataSource.Children.Count > 0)
  1571. {
  1572. MessageBox.Show(TaxRuleMessages.MSG_VERSION_COMMON_RULE_CHILD,
  1573. TaxRuleMessages.WIN_VERSION_TITLE_WARNING,
  1574. MessageBoxButtons.OK,
  1575. MessageBoxIcon.Exclamation);
  1576. return false;
  1577. }
  1578. if (bIsCommonRule && m_dataSource.AssociatedTaxRuleId != Int32.MinValue)
  1579. {
  1580. MessageBox.Show(TaxRuleMessages.MSG_VERSION_COMMON_RULE_PARENTS,
  1581. TaxRuleMessages.WIN_VERSION_TITLE_WARNING,
  1582. MessageBoxButtons.OK,
  1583. MessageBoxIcon.Exclamation);
  1584. return false;
  1585. }
  1586. if (bIsCommonRule && m_dataSource.IsPrimaryRule)
  1587. {
  1588. if (MessageBox.Show(TaxRuleMessages.MSG_VERSION_COMMON_RULE_PRIMARY_RULE,
  1589. TaxRuleMessages.WIN_VERSION_TITLE_ERROR,
  1590. MessageBoxButtons.YesNo,
  1591. MessageBoxIcon.Exclamation) == DialogResult.No)
  1592. {
  1593. return false;
  1594. }
  1595. }
  1596. return true;
  1597.  
  1598. }
  1599.  
  1600. public void InitPane()
  1601. {
  1602.  
  1603. }
  1604.  
  1605. public object DataSource
  1606. {
  1607. get {return m_dataSource;}
  1608. set
  1609. {
  1610. m_dataSource = (Com.Taxware.Platform.TaxRule) value;
  1611. if (m_dataSource != null && m_dataSource.Versions != null)
  1612. {
  1613. m_scratchPad = m_dataSource.Versions.Clone(true);
  1614. }
  1615. }
  1616. }
  1617.  
  1618. public object EditMode
  1619. {
  1620. get {return m_editMode;}
  1621. set {m_editMode = (TaxRuleEditMode) value;}
  1622. }
  1623.  
  1624. public override string ToString()
  1625. {
  1626. StringBuilder sb = new StringBuilder();
  1627. sb.Append("\n");
  1628. sb.Append("VERSIONS \n");
  1629. sb.Append("====================\n");
  1630. foreach (TaxRuleVersion trv in m_dataSource.Versions)
  1631. {
  1632. sb.Append("\t");
  1633. sb.Append("Version - " + PlatformUtil.ToString(trv.EffectiveDate, "yyyy-MM-dd") + " to ");
  1634. if (PlatformUtil.ToString(trv.SunsetDate, "yyyy-MM-dd") == String.Empty)
  1635. {
  1636. sb.Append("Indefinite" + "\n");
  1637. }
  1638. else
  1639. {
  1640. sb.Append(PlatformUtil.ToString(trv.SunsetDate, "yyyy-MM-dd") + "\n");
  1641. }
  1642. sb.Append("\t\tUse Common Rules: " + trv.ApplyToCommonRules + " ");
  1643. sb.Append("Apply To Self: " + trv.ApplyToSelf + " ");
  1644. sb.Append("Apply To State: " + trv.ApplyToState + " ");
  1645. sb.Append("Apply To County: " + trv.ApplyToCounty + " ");
  1646. sb.Append("Apply To City: " + trv.ApplyToCity + " ");
  1647. sb.Append("Apply To District: " + trv.ApplyToDistrict + "\n");
  1648. sb.Append("\t\tRate: " + PlatformUtil.ToString(trv.Value) + "\t\t");
  1649. sb.Append("Algorithm Type: " + (trv.AlgTypeCd) + " ");
  1650. sb.Append("Item Document Indicator: " + (trv.ItemDocIndicator) + " ");
  1651. sb.Append("Record Status: " + (trv.RecordStatus) + " ");
  1652. sb.Append("Is Posted: " + PlatformUtil.ToString(trv.IsPosted) + "\n");
  1653. sb.Append("\t\tComments: " + trv.Comments + "\n");
  1654. foreach (TaxRateThreshold trt in trv.TaxRateThresholds)
  1655. {
  1656. sb.Append("\t\tMiniumum: " + PlatformUtil.ToString(trt.MinValue) + "\t");
  1657. sb.Append("Maximum: " + PlatformUtil.ToString(trt.MaxValue) + "\t");
  1658. sb.Append("Rate: " + PlatformUtil.ToString(trt.TaxRateValue) + "\n");
  1659. }
  1660. sb.Append("\n");
  1661. }
  1662. sb.Append("\n");
  1663. return sb.ToString();
  1664.  
  1665. }
  1666.  
  1667. #endregion Interface IEditorPane
  1668.  
  1669. #region Private Methods
  1670. private void ListViewAddGuiVersion(ListView lv, TaxRuleVersion trv)
  1671. {
  1672. ListViewItem li = new ListViewItem();
  1673. li.Text = PlatformUtil.ToString(trv.VersionId);
  1674. li.SubItems.Add(PlatformUtil.ToString(trv.EffectiveDate, "yyyy-MM-dd")); //Effective Date
  1675. li.SubItems.Add(PlatformUtil.ToString(trv.SunsetDate, "yyyy-MM-dd")); //Sunset Date
  1676. li.SubItems.Add(trv.ItemDocIndicator); //Item document indicator
  1677. li.SubItems.Add(PlatformUtil.ToString(trv.Value)); //Rate
  1678. li.SubItems.Add(trv.ApplyToCommonRules); //Use common rules
  1679. li.SubItems.Add(trv.ApplyToSelf); //Apply To Self
  1680. li.SubItems.Add(trv.ApplyToState); //Apply To State
  1681. li.SubItems.Add(trv.ApplyToCounty); //Apply To County
  1682. li.SubItems.Add(trv.ApplyToCity); //Apply To City
  1683. li.SubItems.Add(trv.ApplyToDistrict); //Apply To District
  1684. li.SubItems.Add(trv.RecordStatus); //Status
  1685. li.SubItems.Add(PlatformUtil.ToString(trv.IsPosted)); //Is Posted
  1686. li.SubItems.Add(PlatformUtil.ToString(trv.TaxRuleId)); //Tax Rule Id
  1687. lv.Items.Add(li);
  1688. }
  1689.  
  1690.  
  1691. private void ListViewAddGuiThreshold(ListView lv, TaxRateThreshold trt)
  1692. {
  1693. ListViewItem li = new ListViewItem();
  1694. li.Text = PlatformUtil.ToString(trt.MinValue);
  1695. li.SubItems.Add(PlatformUtil.ToString(trt.MaxValue));
  1696. li.SubItems.Add(PlatformUtil.ToString(trt.TaxRateValue));
  1697. lv.Items.Add(li);
  1698. }
  1699.  
  1700.  
  1701. private void SetEditRuleState()
  1702. {
  1703.  
  1704. }
  1705.  
  1706. private void SetEditRuleValues()
  1707. {
  1708. SetVersionList();
  1709. ListViewUtil.FocusRow(m_guiVersionList, 0);
  1710. }
  1711.  
  1712. private void SetNewRuleState()
  1713. {
  1714.  
  1715. }
  1716.  
  1717. private void SetNewRuleValues()
  1718. {
  1719. SetVersionList();
  1720. ListViewUtil.FocusRow(m_guiVersionList, 0);
  1721. }
  1722.  
  1723. private void SetAddChildRuleState()
  1724. {
  1725.  
  1726. }
  1727.  
  1728. private void SetAddChildRuleValues()
  1729. {
  1730. SetVersionList();
  1731. ListViewUtil.FocusRow(m_guiVersionList, 0);
  1732. }
  1733.  
  1734.  
  1735. private void SetVersionList()
  1736. {
  1737. m_guiVersionList.Items.Clear();
  1738. foreach (TaxRuleVersion trv in m_dataSource.Versions)
  1739. {
  1740. ListViewAddGuiVersion(m_guiVersionList, trv);
  1741. }
  1742. }
  1743.  
  1744. private void UpdateVersionList()
  1745. {
  1746. ListViewItem li = m_guiVersionList.Items[m_versionListIndex];
  1747. TaxRuleVersion trv = (TaxRuleVersion) m_dataSource.Versions[m_versionListIndex];
  1748.  
  1749. li.Text = PlatformUtil.ToString(trv.VersionId);
  1750. li.SubItems[1].Text = PlatformUtil.ToString(trv.EffectiveDate, "yyyy-MM-dd");
  1751. li.SubItems[2].Text = PlatformUtil.ToString(trv.SunsetDate, "yyyy-MM-dd");
  1752. li.SubItems[3].Text = trv.ItemDocIndicator;
  1753. li.SubItems[4].Text = PlatformUtil.ToString(trv.Value);
  1754. li.SubItems[5].Text = trv.ApplyToCommonRules;
  1755. li.SubItems[6].Text = trv.ApplyToSelf;
  1756. li.SubItems[7].Text = trv.ApplyToState;
  1757. li.SubItems[8].Text = trv.ApplyToCounty;
  1758. li.SubItems[9].Text = trv.ApplyToCity;
  1759. li.SubItems[10].Text = trv.ApplyToDistrict;
  1760. li.SubItems[11].Text = trv.RecordStatus;
  1761. li.SubItems[12].Text = PlatformUtil.ToString(trv.IsPosted);
  1762. li.SubItems[13].Text = PlatformUtil.ToString(trv.TaxRuleId);
  1763.  
  1764. }
  1765.  
  1766. private void UpdateThresholdList(int iThresholdIndex)
  1767. {
  1768. ListViewItem li = m_guiThresholdList.Items[iThresholdIndex];
  1769. li.Text = m_guiThresMin.Text;
  1770. li.SubItems[1].Text = m_guiThresMax.Text;
  1771. li.SubItems[2].Text = m_guiThresRate.Text;
  1772. }
  1773.  
  1774.  
  1775. private void AddGuiVersion()
  1776. {
  1777. Com.Taxware.Platform.TaxRule tr = (Com.Taxware.Platform.TaxRule) m_dataSource;
  1778. if (tr.Versions.Count >= 1)
  1779. {
  1780. TaxRuleVersion trvClone;
  1781. TaxRuleVersion trv = (TaxRuleVersion) tr.Versions[0];
  1782. trvClone = trv.Clone(true);
  1783. trvClone.EffectiveDate = trv.SunsetDate;
  1784. trvClone.SunsetDate = DateTime.MinValue;
  1785. trvClone.CreatedBy = AuthManager.User.UserId;
  1786. trvClone.UpdateBy = AuthManager.User.UserId;
  1787. trvClone.TaxRuleId = tr.TaxRuleId;
  1788. trvClone.Comments = String.Empty;
  1789. tr.Versions.Insert(0, trvClone);
  1790. }
  1791. }
  1792.  
  1793. private void DeleteGuiVersion()
  1794. {
  1795. m_guiVersionList.Items.Clear();
  1796. foreach (TaxRuleVersion trv in m_dataSource.Versions)
  1797. {
  1798. ListViewAddGuiVersion(m_guiVersionList, trv);
  1799. }
  1800. }
  1801.  
  1802. private void UpdateVersionData()
  1803. {
  1804. if (m_guiVersionList.SelectedItems.Count != 1) return;
  1805.  
  1806. int i = m_guiVersionList.SelectedItems[0].Index;
  1807. TaxRuleVersion trv = (TaxRuleVersion) m_dataSource.Versions[i];
  1808.  
  1809. trv.ApplyToSelf = m_guiApplySelf.Checked ? "Y" : "N";
  1810. trv.ApplyToState = m_guiApplyState.Checked ? "Y" : "N";
  1811. trv.ApplyToCounty = m_guiApplyCounty.Checked ? "Y" : "N";
  1812. trv.ApplyToCity = m_guiApplyCity.Checked ? "Y" : "N";
  1813. trv.ApplyToDistrict = m_guiApplyDistrict.Checked ? "Y" : "N";
  1814. trv.ApplyToCommonRules = m_useCommonRulesGroup.Value.ToString();
  1815. trv.EffectiveDate = PlatformUtil.FromString(m_guiEffective.Text, m_guiEffective.DateTime);
  1816. trv.SunsetDate = PlatformUtil.FromString(m_guiSunset.Text, m_guiSunset.DateTime);
  1817. trv.Value = (m_guiRate.Text == String.Empty) ? Double.NaN : Convert.ToDouble(m_guiRate.Text);
  1818. trv.ItemDocIndicator = m_itemDocumentGroup.Value.ToString();
  1819. trv.Comments = m_guiComments.Text;
  1820. if (m_dataSource.TaxRuleTypeId == TaxRuleType.RULE_TYPE_TAXABLE_AMOUNT_THRESHOLD)
  1821. {
  1822. trv.AlgTypeCd = m_guiAmtThresholdType.SelectedValue.ToString();
  1823. }
  1824. else if (m_dataSource.TaxRuleTypeId == TaxRuleType.RULE_TYPE_TAX_RATE_THRESHOLD)
  1825. {
  1826. trv.AlgTypeCd = m_guiRateThresholdType.SelectedValue.ToString();
  1827. }
  1828. else
  1829. {
  1830. trv.AlgTypeCd = String.Empty;
  1831. }
  1832. }
  1833.  
  1834. private void SetThresholdList(TaxRuleVersion trv)
  1835. {
  1836. if (trv.TaxRateThresholds.Count <= 0)
  1837. {
  1838. TaxRateThreshold trt = new TaxRateThreshold();
  1839. trt.MinValue = 0;
  1840. trt.TaxRateValue = 0;
  1841. trt.IsStandardRateFlag = "Y";
  1842. trv.TaxRateThresholds.Add(trt);
  1843. }
  1844. m_guiThresholdList.Items.Clear();
  1845. foreach (TaxRateThreshold trt in trv.TaxRateThresholds)
  1846. {
  1847. ListViewAddGuiThreshold(m_guiThresholdList, trt);
  1848. }
  1849. ListViewUtil.FocusRow(m_guiThresholdList, 0);
  1850. }
  1851.  
  1852.  
  1853. private void UpdateThresholdData()
  1854. {
  1855. TaxRuleVersion trv = (TaxRuleVersion) m_dataSource.Versions[m_versionListIndex];
  1856. SetPooledThreshold(trv);
  1857. foreach (ListViewItem lvi in m_guiThresholdList.Items)
  1858. {
  1859. TaxRateThreshold trt = GetPooledThreshold(trv);
  1860. trt.TaxRuleTypeId = TaxRuleType.RULE_TYPE_TAX_RATE_THRESHOLD;
  1861. trt.MinValue = PlatformUtil.FromString(lvi.Text, trt.MinValue);
  1862. trt.MaxValue = PlatformUtil.FromString(lvi.SubItems[1].Text, trt.MaxValue);
  1863. trt.TaxRateValue = PlatformUtil.FromString(lvi.SubItems[2].Text, trt.TaxRateValue);
  1864. trt.IsStandardRateFlag = "Y";
  1865. trv.TaxRateThresholds.Add(trt);
  1866. }
  1867. if (m_dataSource.TaxRuleTypeId == TaxRuleType.RULE_TYPE_TAXABLE_AMOUNT_THRESHOLD)
  1868. {
  1869. trv.AlgTypeCd = m_guiAmtThresholdType.SelectedValue.ToString();
  1870. }
  1871. else if (m_dataSource.TaxRuleTypeId == TaxRuleType.RULE_TYPE_TAX_RATE_THRESHOLD)
  1872. {
  1873. trv.AlgTypeCd = m_guiRateThresholdType.SelectedValue.ToString();
  1874. }
  1875. else
  1876. {
  1877. trv.AlgTypeCd = String.Empty;
  1878. }
  1879. }
  1880.  
  1881.  
  1882. private void SetPooledThreshold(TaxRuleVersion trv)
  1883. {
  1884. //Put TaxRateThresholds from one collection to another depending
  1885. //so that they can be pooled and reused, if they are not even in
  1886. //the database then just remove from collection
  1887. int iThresholdId = Int32.MinValue;
  1888. while(trv.TaxRateThresholds.Count > 0)
  1889. {
  1890. TaxRateThreshold trt = (TaxRateThreshold) trv.TaxRateThresholds[0];
  1891. iThresholdId = trt.TaxRateThresholdId;
  1892. if (iThresholdId != Int32.MinValue &&
  1893. trv.DeletedThresholds.FindThreshold(iThresholdId) == null)
  1894. {
  1895. trv.DeletedThresholds.Add(trt);
  1896. }
  1897. trv.TaxRateThresholds.Remove(trt);
  1898. }
  1899. }
  1900.  
  1901.  
  1902. private TaxRateThreshold GetPooledThreshold(TaxRuleVersion trv)
  1903. {
  1904. //Try to reuse thresholds which already have ids
  1905. TaxRateThreshold trt = null;
  1906. if (trv.DeletedThresholds.Count >= 1)
  1907. {
  1908. trt = (TaxRateThreshold) trv.DeletedThresholds[0];
  1909. trv.DeletedThresholds.Remove(trt);
  1910. return trt;
  1911. }
  1912. else
  1913. {
  1914. return new TaxRateThreshold();
  1915. }
  1916. }
  1917.  
  1918. private void EnableFieldsByRuleType(int iTaxRuleType)
  1919. {
  1920. //Defaults
  1921. m_lblRate.Text = LABEL_RATE_DEFAULT;
  1922. m_lblRate.Visible = true;
  1923. m_guiRate.Visible = true;
  1924. m_commonRulesGroup.Enabled = true;
  1925. m_useCommonRulesGroup.Enabled = true;
  1926. m_lblAmountThresholdType.Visible = false;
  1927. m_guiAmtThresholdType.Visible = false;
  1928. m_panelThresholds.Visible = false;
  1929. m_panelAuditInfo.Location = new System.Drawing.Point(16, 184);
  1930.  
  1931. switch (iTaxRuleType)
  1932. {
  1933. case TaxRuleType.RULE_TYPE_COMPLETE_EXEMPTION:
  1934. break;
  1935. case TaxRuleType.RULE_TYPE_FEE:
  1936. m_lblRate.Text = LABEL_RATE_FEE;
  1937. m_commonRulesGroup.Enabled = false;
  1938. m_useCommonRulesGroup.Value = "N";
  1939. m_useCommonRulesGroup.Enabled = false;
  1940. break;
  1941. case TaxRuleType.RULE_TYPE_RECOVERABLE_PERCENTAGE:
  1942. break;
  1943. case TaxRuleType.RULE_TYPE_STANDARD_TAX_RATE:
  1944. m_commonRulesGroup.Enabled = false;
  1945. break;
  1946. case TaxRuleType.RULE_TYPE_TAX_AMOUNT_LIMITATION:
  1947. m_lblRate.Text = LABEL_RATE_TAX_AMOUNT_LIMITATION;
  1948. break;
  1949. case TaxRuleType.RULE_TYPE_TAX_RATE_LIMITATION:
  1950. m_commonRulesGroup.Enabled = false;
  1951. m_lblRate.Text = LABEL_RATE_TAX_RATE_LIMITATION;
  1952. break;
  1953. case TaxRuleType.RULE_TYPE_TAX_RATE_THRESHOLD:
  1954. m_lblRate.Visible = false;
  1955. m_guiRate.Visible = false;
  1956. m_commonRulesGroup.Enabled = false;
  1957. m_panelThresholds.Visible = true;
  1958. m_panelAuditInfo.Location = new System.Drawing.Point(16, 304);
  1959. break;
  1960. case TaxRuleType.RULE_TYPE_TAXABILITY_GROUP_RULE:
  1961. m_lblRate.Visible = false;
  1962. m_guiRate.Visible = false;
  1963. break;
  1964. case TaxRuleType.RULE_TYPE_TAXABLE_AMOUNT_DECREASE:
  1965. m_lblRate.Text = LABEL_RATE_TAXABLE_AMOUNT_DECREASE;
  1966. break;
  1967. case TaxRuleType.RULE_TYPE_TAXABLE_AMOUNT_INCREASE:
  1968. m_lblRate.Text = LABEL_RATE_TAXABLE_AMOUNT_INCREASE;
  1969. break;
  1970. case TaxRuleType.RULE_TYPE_TAXABLE_AMOUNT_LIMITATION:
  1971. m_lblRate.Text = LABEL_RATE_TAXABLE_AMOUNT_LIMITATION;
  1972. break;
  1973. case TaxRuleType.RULE_TYPE_TAXABLE_AMOUNT_THRESHOLD:
  1974. m_lblRate.Text = LABEL_RATE_TAXABLE_AMOUNT_THRESHOLD;
  1975. m_lblAmountThresholdType.Visible = true;
  1976. m_guiAmtThresholdType.Visible = true;
  1977. break;
  1978. };
  1979. if (m_useCommonRulesGroup.Value.ToString() == "Y")
  1980. {
  1981. m_commonRulesGroup.Enabled = false;
  1982. }
  1983. }
  1984.  
  1985.  
  1986. private void EnableFieldsByIsPosted(string sIsPosted)
  1987. {
  1988. if (sIsPosted.Equals("1"))
  1989. {
  1990. m_guiApplySelf.Enabled = false;
  1991. m_guiApplyState.Enabled = false;
  1992. m_guiApplyCounty.Enabled = false;
  1993. m_guiApplyCity.Enabled = false;
  1994. m_guiApplyDistrict.Enabled = false;
  1995. m_guiUseCommonRulesYes.Enabled = false;
  1996. m_guiUseCommonRulesNo.Enabled = false;
  1997. m_guiItemIndicator.Enabled = false;
  1998. m_guiDocumentIndicator.Enabled = false;
  1999. ControlUtil.Enable(m_guiAmtThresholdType, false);
  2000. m_guiRate.ReadOnly = true;
  2001. m_guiEffective.Enabled = false;
  2002. if (m_guiEffective.DateTime > DateTime.Now)
  2003. {
  2004. m_guiEffective.Enabled = true;
  2005. }
  2006. if (m_guiSunset.Text == String.Empty || m_guiRecordStatus.Text != RecordStatus.STATUS_POSTED)
  2007. {
  2008. m_guiSunset.Enabled = true;
  2009. }
  2010. else
  2011. {
  2012. m_guiSunset.Enabled = false;
  2013. }
  2014. m_guiComments.ReadOnly = true;
  2015. m_guiThresMin.ReadOnly = true;
  2016. m_guiThresMax.ReadOnly = true;
  2017. m_guiThresRate.ReadOnly = true;
  2018. ControlUtil.Enable(m_guiRateThresholdType, false);
  2019. m_guiNewThreshold.Enabled = false;
  2020. this.m_guiThresholdList.KeyUp -= new System.Windows.Forms.KeyEventHandler(this.ThresholdListView_KeyUp);
  2021. }
  2022. else if (sIsPosted.Equals("0"))
  2023. {
  2024. m_guiApplySelf.Enabled = true;
  2025. m_guiApplyState.Enabled = true;
  2026. m_guiApplyCounty.Enabled = true;
  2027. m_guiApplyCity.Enabled = true;
  2028. m_guiApplyDistrict.Enabled = true;
  2029. m_guiUseCommonRulesYes.Enabled = true;
  2030. m_guiUseCommonRulesNo.Enabled = true;
  2031. m_guiItemIndicator.Enabled = true;
  2032. m_guiDocumentIndicator.Enabled = true;
  2033. ControlUtil.Enable(m_guiAmtThresholdType, true);
  2034. m_guiRate.ReadOnly = false;
  2035. m_guiEffective.Enabled = true;
  2036. m_guiSunset.Enabled = true;
  2037. m_guiComments.ReadOnly = false;
  2038. m_guiThresMin.ReadOnly = false;
  2039. m_guiThresMax.ReadOnly = false;
  2040. m_guiThresRate.ReadOnly = false;
  2041. ControlUtil.Enable(m_guiRateThresholdType, true);
  2042. m_guiNewThreshold.Enabled = true;
  2043. this.m_guiThresholdList.KeyUp += new System.Windows.Forms.KeyEventHandler(this.ThresholdListView_KeyUp);
  2044. EnableFieldsByRuleType(m_dataSource.TaxRuleTypeId);
  2045. EnableFieldsByHierarchy();
  2046. }
  2047.  
  2048. }
  2049.  
  2050. private void EnableFieldsByHierarchy()
  2051. {
  2052. if (m_dataSource == null) return;
  2053. if (m_dataSource.Parent == null) return;
  2054.  
  2055. if (m_dataSource.AssociatedTaxRuleId > Int32.MinValue)
  2056. {
  2057. m_guiApplySelf.Enabled = false;
  2058. m_guiApplyState.Enabled = false;
  2059. m_guiApplyCounty.Enabled = false;
  2060. m_guiApplyCity.Enabled = false;
  2061. m_guiApplyDistrict.Enabled = false;
  2062. m_guiUseCommonRulesYes.Enabled = false;
  2063. m_guiUseCommonRulesNo.Enabled = false;
  2064. }
  2065. }
  2066.  
  2067.  
  2068.  
  2069. private void SetVersionDetails(TaxRuleVersion trv)
  2070. {
  2071. m_useCommonRulesGroup.Value = trv.ApplyToCommonRules.ToString();
  2072. m_itemDocumentGroup.Value = trv.ItemDocIndicator.ToString();
  2073. m_guiRate.Text = PlatformUtil.ToString(trv.Value);
  2074. m_guiEffective.Text = PlatformUtil.ToString(trv.EffectiveDate, "MMMM dd, yyyy");
  2075. m_guiSunset.Text = PlatformUtil.ToString(trv.SunsetDate, "MMMM dd, yyyy");
  2076. m_guiComments.Text = trv.Comments;
  2077. m_guiVersionId.Text = PlatformUtil.ToString(trv.VersionId);
  2078. m_guiTaxRuleId.Text = PlatformUtil.ToString(trv.TaxRuleId);
  2079. m_guiCreateUser.Text = trv.CreatedBy;
  2080. m_guiCreateDate.Text = PlatformUtil.ToString(trv.CreatedDate, "yyyy-MM-dd");
  2081. m_guiUpdateUser.Text = trv.UpdateBy;
  2082. m_guiUpdateDate.Text = PlatformUtil.ToString(trv.UpdatedDate, "yyyy-MM-dd");
  2083. m_guiRecordStatus.Text = trv.RecordStatus;
  2084. m_guiIsPosted.Text = PlatformUtil.ToString(trv.IsPosted);
  2085. m_guiApplySelf.Checked = PlatformUtil.ToBool(trv.ApplyToSelf, "Y");
  2086. m_guiApplyState.Checked = PlatformUtil.ToBool(trv.ApplyToState, "Y");
  2087. m_guiApplyCounty.Checked = PlatformUtil.ToBool(trv.ApplyToCounty, "Y");
  2088. m_guiApplyCity.Checked = PlatformUtil.ToBool(trv.ApplyToCity, "Y");
  2089. m_guiApplyDistrict.Checked = PlatformUtil.ToBool(trv.ApplyToDistrict, "Y");
  2090. m_guiAmtThresholdType.SelectedValue = trv.AlgTypeCd.ToString();
  2091. m_guiRateThresholdType.SelectedValue = trv.AlgTypeCd.ToString();
  2092. if (m_dataSource.TaxRuleTypeId == TaxRuleType.RULE_TYPE_TAX_RATE_THRESHOLD)
  2093. {
  2094. SetThresholdList(trv);
  2095. }
  2096. EnableFieldsByRuleType(m_dataSource.TaxRuleTypeId);
  2097. EnableFieldsByIsPosted(trv.IsPosted.ToString());
  2098. EnableFieldsByHierarchy();
  2099.  
  2100. }
  2101.  
  2102.  
  2103. private void SetThresholdDetails(ListViewItem lvi)
  2104. {
  2105. m_guiThresMin.Text = lvi.Text;
  2106. m_guiThresMax.Text = lvi.SubItems[1].Text;
  2107. m_guiThresRate.Text = lvi.SubItems[2].Text;
  2108. }
  2109.  
  2110.  
  2111. #endregion Private Methods
  2112.  
  2113. #region Event Handlers
  2114. private void m_guiUseCommonRulesYes_CheckChanged(object sender, System.EventArgs e)
  2115. {
  2116. RadioButton rb = (RadioButton) sender;
  2117. if (rb.Checked)
  2118. {
  2119. m_commonRulesGroup.Clear();
  2120. m_commonRulesGroup.Enabled = false;
  2121. }
  2122. else if (!(m_dataSource.TaxRuleTypeId == TaxRuleType.RULE_TYPE_STANDARD_TAX_RATE ||
  2123. m_dataSource.TaxRuleTypeId == TaxRuleType.RULE_TYPE_TAX_RATE_THRESHOLD ||
  2124. m_dataSource.TaxRuleTypeId == TaxRuleType.RULE_TYPE_TAX_RATE_LIMITATION ||
  2125. m_dataSource.TaxRuleTypeId == TaxRuleType.RULE_TYPE_FEE))
  2126. {
  2127. m_commonRulesGroup.Enabled = true;
  2128. }
  2129. }
  2130.  
  2131. private void m_guiUseCommonRulesNo_CheckChanged(object sender, System.EventArgs e)
  2132. {
  2133. RadioButton rb = (RadioButton) sender;
  2134. if ((rb.Checked) &&
  2135. !(m_dataSource.TaxRuleTypeId == TaxRuleType.RULE_TYPE_STANDARD_TAX_RATE ||
  2136. m_dataSource.TaxRuleTypeId == TaxRuleType.RULE_TYPE_TAX_RATE_THRESHOLD ||
  2137. m_dataSource.TaxRuleTypeId == TaxRuleType.RULE_TYPE_TAX_RATE_LIMITATION ||
  2138. m_dataSource.TaxRuleTypeId == TaxRuleType.RULE_TYPE_FEE))
  2139. {
  2140. m_commonRulesGroup.Enabled = true;
  2141. }
  2142. }
  2143.  
  2144. private void ListView_KeyUp(object sender, KeyEventArgs e)
  2145. {
  2146. if (e.KeyCode == Keys.Delete)
  2147. {
  2148. Com.Taxware.Platform.TaxRule tr = m_dataSource;
  2149. if (tr.Versions.Count <= 1) return;
  2150. foreach (ListViewItem li in m_guiVersionList.SelectedItems)
  2151. {
  2152. TaxRuleVersion trv = (TaxRuleVersion) tr.Versions[li.Index];
  2153. if (trv.VersionId != Int32.MinValue)
  2154. {
  2155. MessageBox.Show(TaxRuleMessages.MSG_VERSION_CANNOT_DELETE,
  2156. TaxRuleMessages.WIN_VERSION_TITLE_ERROR,
  2157. MessageBoxButtons.OK,
  2158. MessageBoxIcon.Exclamation);
  2159. continue;
  2160. }
  2161. else if (trv.IsPosted != 1)
  2162. {
  2163. tr.Versions.Remove(trv);
  2164. li.Remove();
  2165. ListViewUtil.FocusRow(m_guiVersionList, 0);
  2166. }
  2167. }
  2168. }
  2169. }
  2170.  
  2171. private void ListView_SelectedIndexChanged(object sender, System.EventArgs e)
  2172. {
  2173. ListView lv = (ListView) sender;
  2174. if (lv.SelectedItems.Count == 0 && lv.Items.Count > 0)
  2175. {
  2176. //Somehow this causes multiple to be selected even though
  2177. //multiselect is set to false for the control, also I have
  2178. //noticed that this event fires twice per selection change,
  2179. //first time is that the selection is 0, then to 1
  2180. //ListViewUtil.FocusRow(m_guiVersionList, 0);
  2181. }
  2182. else if (lv.SelectedItems.Count == 1)
  2183. {
  2184. m_versionListIndex = lv.SelectedItems[0].Index;
  2185. TaxRuleVersion trv = (TaxRuleVersion) m_dataSource.Versions[m_versionListIndex];
  2186. SetVersionDetails(trv);
  2187. }
  2188. }
  2189.  
  2190.  
  2191. public void VersionDetails_GotFocus(object sender, System.EventArgs e)
  2192. {
  2193. if (m_guiVersionList.SelectedItems.Count <= 0)
  2194. {
  2195. MessageBox.Show(TaxRuleMessages.MSG_VERSION_NOT_SELECTED,
  2196. TaxRuleMessages.WIN_VERSION_TITLE_WARNING,
  2197. MessageBoxButtons.OK,
  2198. MessageBoxIcon.Exclamation);
  2199. return;
  2200. }
  2201. }
  2202.  
  2203. public void m_guiVersionList_LostFocus(object sender, System.EventArgs e)
  2204. {
  2205. if (m_guiVersionList.SelectedItems.Count == 0 && m_guiVersionList.Items.Count > 0)
  2206. {
  2207. ListViewUtil.FocusRow(m_guiVersionList, 0);
  2208. }
  2209. }
  2210.  
  2211.  
  2212. public void VersionDetails_LostFocus(object sender, System.EventArgs e)
  2213. {
  2214. if (m_guiVersionList.SelectedItems.Count != 1) return;
  2215. int iVersionIndex = m_guiVersionList.SelectedItems[0].Index;
  2216.  
  2217. UpdateVersionData();
  2218. UpdateVersionList();
  2219. ListViewUtil.FocusRow(m_guiVersionList, iVersionIndex);
  2220. }
  2221.  
  2222. public void ThresholdDetails_ValueChanged(object sender, System.EventArgs e)
  2223. {
  2224. if (m_guiThresholdList.SelectedItems.Count != 1) return;
  2225. int iThresholdIndex = m_guiThresholdList.SelectedItems[0].Index;
  2226. UpdateThresholdList(iThresholdIndex);
  2227. UpdateThresholdData();
  2228. }
  2229.  
  2230.  
  2231.  
  2232. public void VersionPane_TaxRuleTypeChanged(object sender, System.EventArgs e)
  2233. {
  2234. EnableFieldsByRuleType(m_dataSource.TaxRuleTypeId);
  2235. EnableFieldsByHierarchy();
  2236.  
  2237. }
  2238.  
  2239. private void m_editorTextEdit_ValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e)
  2240. {
  2241. if(e.NewValue is string && !string.Empty.Equals(e.NewValue))
  2242. {
  2243. try
  2244. {
  2245. Convert.ToDouble(e.NewValue);
  2246. }
  2247. catch
  2248. {
  2249. e.Cancel = true;
  2250. }
  2251. }
  2252. }
  2253.  
  2254. private void VersionPane_Load(object sender, System.EventArgs e)
  2255. {
  2256. if (m_dataSource != null)
  2257. {
  2258. EnableFieldsByRuleType(m_dataSource.TaxRuleTypeId);
  2259. if (m_dataSource.Versions.Count > 0)
  2260. {
  2261. ListViewUtil.FocusRow(m_guiVersionList, 0);
  2262. TaxRuleVersion trv = (TaxRuleVersion) m_dataSource.Versions[0];
  2263. EnableFieldsByIsPosted(trv.IsPosted.ToString());
  2264. EnableFieldsByHierarchy();
  2265. }
  2266. }
  2267. }
  2268.  
  2269.  
  2270. private void m_guiNewVersion_Click(object sender, System.EventArgs e)
  2271. {
  2272. if (m_guiVersionList.SelectedItems.Count <= 0)
  2273. {
  2274. MessageBox.Show(TaxRuleMessages.MSG_VERSION_NOT_SELECTED,
  2275. TaxRuleMessages.WIN_VERSION_TITLE_WARNING,
  2276. MessageBoxButtons.OK,
  2277. MessageBoxIcon.Exclamation);
  2278. return;
  2279. }
  2280.  
  2281. if (m_guiVersionList.Items.Count >= 1)
  2282. {
  2283. TaxRuleVersion trv = (TaxRuleVersion) m_dataSource.Versions[0];
  2284. if (trv.SunsetDate != DateTime.MinValue)
  2285. {
  2286. AddGuiVersion();
  2287. SetVersionList();
  2288. ListViewUtil.FocusRow(m_guiVersionList, 0);
  2289. }
  2290. else
  2291. {
  2292. MessageBox.Show(TaxRuleMessages.MSG_VERSION_SUNSET_PREVIOUS,
  2293. TaxRuleMessages.WIN_VERSION_TITLE_WARNING,
  2294. MessageBoxButtons.OK,
  2295. MessageBoxIcon.Exclamation);
  2296. }
  2297. }
  2298. }
  2299.  
  2300. private void m_guiApprove_Click(object sender, System.EventArgs e)
  2301. {
  2302. if (m_guiVersionList.SelectedItems.Count <= 0)
  2303. {
  2304. MessageBox.Show(TaxRuleMessages.MSG_VERSION_NOT_SELECTED,
  2305. TaxRuleMessages.WIN_VERSION_TITLE_WARNING,
  2306. MessageBoxButtons.OK,
  2307. MessageBoxIcon.Exclamation);
  2308. return;
  2309. }
  2310.  
  2311. if (m_dataSource.Versions.Count <= 0 &&
  2312. m_versionListIndex > m_dataSource.Versions.Count - 1)
  2313. {
  2314. return;
  2315. }
  2316. TaxRuleVersion trv = (TaxRuleVersion) m_dataSource.Versions[m_versionListIndex];
  2317. if (trv.VersionId == Int32.MinValue)
  2318. {
  2319. MessageBox.Show(TaxRuleMessages.MSG_VERSION_NEW_VERSION_APPROVE,
  2320. TaxRuleMessages.WIN_VERSION_TITLE_WARNING,
  2321. MessageBoxButtons.OK,
  2322. MessageBoxIcon.Exclamation);
  2323. return;
  2324. }
  2325. trv.RecordStatus = ApproveRejectStatus.getNextApproveStatus(trv.RecordStatus);
  2326. SetVersionDetails(trv);
  2327. VersionDetails_LostFocus(null, null);
  2328. }
  2329.  
  2330. private void m_guiReject_Click(object sender, System.EventArgs e)
  2331. {
  2332. if (m_guiVersionList.SelectedItems.Count <= 0)
  2333. {
  2334. MessageBox.Show(TaxRuleMessages.MSG_VERSION_NOT_SELECTED,
  2335. TaxRuleMessages.WIN_VERSION_TITLE_WARNING,
  2336. MessageBoxButtons.OK,
  2337. MessageBoxIcon.Exclamation);
  2338. return;
  2339. }
  2340.  
  2341. if (m_dataSource.Versions.Count <= 0 &&
  2342. m_versionListIndex > m_dataSource.Versions.Count - 1)
  2343. {
  2344. return;
  2345. }
  2346. TaxRuleVersion trv = (TaxRuleVersion) m_dataSource.Versions[m_versionListIndex];
  2347. if (trv.VersionId == Int32.MinValue)
  2348. {
  2349. MessageBox.Show(TaxRuleMessages.MSG_VERSION_NEW_VERSION_REJECT,
  2350. TaxRuleMessages.WIN_VERSION_TITLE_WARNING,
  2351. MessageBoxButtons.OK,
  2352. MessageBoxIcon.Exclamation);
  2353. return;
  2354. }
  2355. if (trv.IsPosted == 1)
  2356. {
  2357. MessageBox.Show(TaxRuleMessages.MSG_REJECT_POSTED,
  2358. TaxRuleMessages.WIN_VERSION_TITLE_WARNING,
  2359. MessageBoxButtons.OK,
  2360. MessageBoxIcon.Exclamation);
  2361. return;
  2362. }
  2363. trv.RecordStatus = ApproveRejectStatus.getNextRejectStatus(trv.RecordStatus, Convert.ToBoolean(trv.IsPosted));
  2364. SetVersionDetails(trv);
  2365. VersionDetails_LostFocus(null, null);
  2366. if ((trv.VersionId == Int32.MinValue) &&
  2367. (trv.RecordStatus.ToUpper() == "REJECTED" || trv.RecordStatus.ToUpper() == "DELETED"))
  2368. {
  2369. MessageBox.Show(TaxRuleMessages.MSG_VERSION_SHOULD_DELETE,
  2370. TaxRuleMessages.WIN_VERSION_TITLE_WARNING,
  2371. MessageBoxButtons.OK,
  2372. MessageBoxIcon.Information);
  2373. }
  2374. }
  2375.  
  2376. private void m_guiResetStatus_Click(object sender, System.EventArgs e)
  2377. {
  2378. if (m_guiVersionList.SelectedItems.Count <= 0)
  2379. {
  2380. MessageBox.Show(TaxRuleMessages.MSG_VERSION_NOT_SELECTED,
  2381. TaxRuleMessages.WIN_VERSION_TITLE_WARNING,
  2382. MessageBoxButtons.OK,
  2383. MessageBoxIcon.Exclamation);
  2384. return;
  2385. }
  2386.  
  2387. if (m_dataSource.Versions.Count <= 0 &&
  2388. m_versionListIndex > m_dataSource.Versions.Count - 1)
  2389. {
  2390. return;
  2391. }
  2392. TaxRuleVersion trv = (TaxRuleVersion) m_dataSource.Versions[m_versionListIndex];
  2393. trv.RecordStatus = "PENDING";
  2394. SetVersionDetails(trv);
  2395. VersionDetails_LostFocus(null, null);
  2396. }
  2397.  
  2398.  
  2399. private void m_guiNewThreshold_Click(object sender, System.EventArgs e)
  2400. {
  2401. ListViewItem liClone = new ListViewItem();
  2402. if (m_guiThresholdList.SelectedItems.Count > 0)
  2403. {
  2404. ListViewItem li = m_guiThresholdList.SelectedItems[0];
  2405. liClone.Text = li.SubItems[1].Text;
  2406. liClone.SubItems.Add(String.Empty);
  2407. liClone.SubItems.Add(li.SubItems[2].Text);
  2408. m_guiThresholdList.Items.Add(liClone);
  2409. }
  2410. else
  2411. {
  2412. liClone.Text = "0";
  2413. liClone.SubItems.Add(String.Empty);
  2414. liClone.SubItems.Add("0");
  2415. liClone.SubItems.Add("Y");
  2416. m_guiThresholdList.Items.Add(liClone);
  2417. }
  2418. ListViewUtil.FocusRow(m_guiThresholdList, liClone.Index);
  2419. }
  2420.  
  2421. private void m_guiThresholdList_SelectedIndexChanged(object sender, System.EventArgs e)
  2422. {
  2423. ListView lv = (ListView) sender;
  2424. if (lv.SelectedItems.Count == 0 && lv.Items.Count > 0)
  2425. {
  2426. //Somehow this causes multiple to be selected even though
  2427. //multiselect is set to false for the control, also I have
  2428. //noticed that this event fires twice per selection change,
  2429. //first time is that the selection is 0, then to 1
  2430. //ListViewUtil.FocusRow(m_guiVersionList, 0);
  2431. }
  2432. else if (lv.SelectedItems.Count == 1)
  2433. {
  2434. ListViewItem lvi = lv.SelectedItems[0];
  2435. SetThresholdDetails(lvi);
  2436. }
  2437. }
  2438.  
  2439. private void ThresholdListView_KeyUp(object sender, KeyEventArgs e)
  2440. {
  2441. if (e.KeyCode == Keys.Delete)
  2442. {
  2443. ListView li = (ListView) sender;
  2444. foreach (ListViewItem lvi in li.SelectedItems)
  2445. {
  2446. lvi.Remove();
  2447.  
  2448. }
  2449. //Seems to call KeyUp again??? ListViewUtil.FocusRow(li, 0);
  2450. }
  2451. }
  2452.  
  2453. private void NumericTextBox_KeyPress(object sender, KeyPressEventArgs e)
  2454. {
  2455. if (!Char.IsDigit(e.KeyChar) && e.KeyChar != '.' && e.KeyChar != Convert.ToChar(8))
  2456. {
  2457. e.Handled = true;
  2458. }
  2459. else
  2460. {
  2461. e.Handled = false;
  2462. }
  2463.  
  2464. }
  2465.  
  2466. #endregion Event Handlers
  2467.  
  2468. }
  2469. }
  2470. ,updated_at=2015-01-21 14:02:32.0,text_value=null,measure_data=[B@1985631,text_value=null,measure_data=[B@241d6c,text_value=null,measure_data=[B@8e6804,text_value=null,measure_data=null,text_value=null,measure_data=null,text_value=null,measure_data=null,text_value=null,measure_data=null,text_value=null,measure_data=null,text_value=null,measure_data=null,text_value=null,measure_data=null,text_value=null,measure_data=null,text_value=null,measure_data=null,text_value=null,measure_data=[B@e3ffc0]
  2471. at org.sonar.db.version.SelectImpl.newExceptionWithRowDetails(SelectImpl.java:89) ~[sonar-db-5.6.5.jar:na]
  2472. at org.sonar.db.version.SelectImpl.scroll(SelectImpl.java:81) ~[sonar-db-5.6.5.jar:na]
  2473. at org.sonar.db.version.MassUpdate.execute(MassUpdate.java:91) ~[sonar-db-5.6.5.jar:na]
  2474. at org.sonar.db.version.v50.FeedFileSources.execute(FeedFileSources.java:289) ~[sonar-db-5.6.5.jar:na]
  2475. at org.sonar.db.version.BaseDataChange.execute(BaseDataChange.java:45) ~[sonar-db-5.6.5.jar:na]
  2476. at org.sonar.server.db.migrations.DatabaseMigrator.executeMigration(DatabaseMigrator.java:95) ~[sonar-server-5.6.5.jar:na]
  2477. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111]
  2478. at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_111]
  2479. at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_111]
  2480. at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_111]
  2481. at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:455) [jruby-complete-1.7.9.jar:na]
  2482. at org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:316) [jruby-complete-1.7.9.jar:na]
  2483. at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:61) [jruby-complete-1.7.9.jar:na]
  2484. at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168) [jruby-complete-1.7.9.jar:na]
  2485. at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57) [jruby-complete-1.7.9.jar:na]
  2486. at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na]
  2487. at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na]
  2488. at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182) [jruby-complete-1.7.9.jar:na]
  2489. at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:198) [jruby-complete-1.7.9.jar:na]
  2490. at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326) [jruby-complete-1.7.9.jar:na]
  2491. at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170) [jruby-complete-1.7.9.jar:na]
  2492. at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36) [jruby-complete-1.7.9.jar:na]
  2493. at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na]
  2494. at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na]
  2495. at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161) [jruby-complete-1.7.9.jar:na]
  2496. at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190) [jruby-complete-1.7.9.jar:na]
  2497. at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:81) [jruby-complete-1.7.9.jar:na]
  2498. at org.jruby.RubyClass.finvoke(RubyClass.java:527) [jruby-complete-1.7.9.jar:na]
  2499. at org.jruby.RubyBasicObject.send(RubyBasicObject.java:2590) [jruby-complete-1.7.9.jar:na]
  2500. at org.jruby.RubyKernel.send(RubyKernel.java:2223) [jruby-complete-1.7.9.jar:na]
  2501. at org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen) [jruby-complete-1.7.9.jar:na]
  2502. at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350) [jruby-complete-1.7.9.jar:na]
  2503. at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326) [jruby-complete-1.7.9.jar:na]
  2504. at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170) [jruby-complete-1.7.9.jar:na]
  2505. at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36) [jruby-complete-1.7.9.jar:na]
  2506. at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123) [jruby-complete-1.7.9.jar:na]
  2507. at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na]
  2508. at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112) [jruby-complete-1.7.9.jar:na]
  2509. at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384) [jruby-complete-1.7.9.jar:na]
  2510. at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303) [jruby-complete-1.7.9.jar:na]
  2511. at org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:229) [jruby-complete-1.7.9.jar:na]
  2512. at org.jruby.runtime.Block.yieldSpecific(Block.java:111) [jruby-complete-1.7.9.jar:na]
  2513. at org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25) [jruby-complete-1.7.9.jar:na]
  2514. at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na]
  2515. at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) [jruby-complete-1.7.9.jar:na]
  2516. at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na]
  2517. at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161) [jruby-complete-1.7.9.jar:na]
  2518. at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190) [jruby-complete-1.7.9.jar:na]
  2519. at org.jruby.internal.runtime.methods.WrapperMethod.call(WrapperMethod.java:74) [jruby-complete-1.7.9.jar:na]
  2520. at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143) [jruby-complete-1.7.9.jar:na]
  2521. at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154) [jruby-complete-1.7.9.jar:na]
  2522. at org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64) [jruby-complete-1.7.9.jar:na]
  2523. at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123) [jruby-complete-1.7.9.jar:na]
  2524. at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na]
  2525. at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) [jruby-complete-1.7.9.jar:na]
  2526. at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na]
  2527. at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:204) [jruby-complete-1.7.9.jar:na]
  2528. at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:206) [jruby-complete-1.7.9.jar:na]
  2529. at org.jruby.RubyClass.finvoke(RubyClass.java:567) [jruby-complete-1.7.9.jar:na]
  2530. at org.jruby.RubyBasicObject.send(RubyBasicObject.java:2595) [jruby-complete-1.7.9.jar:na]
  2531. at org.jruby.RubyKernel.send(RubyKernel.java:2227) [jruby-complete-1.7.9.jar:na]
  2532. at org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen) [jruby-complete-1.7.9.jar:na]
  2533. at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:356) [jruby-complete-1.7.9.jar:na]
  2534. at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:213) [jruby-complete-1.7.9.jar:na]
  2535. at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:217) [jruby-complete-1.7.9.jar:na]
  2536. at org.jruby.ast.CallSpecialArgBlockPassNode.interpret(CallSpecialArgBlockPassNode.java:66) [jruby-complete-1.7.9.jar:na]
  2537. at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na]
  2538. at org.jruby.ast.RescueNode.executeBody(RescueNode.java:221) [jruby-complete-1.7.9.jar:na]
  2539. at org.jruby.ast.RescueNode.interpret(RescueNode.java:116) [jruby-complete-1.7.9.jar:na]
  2540. at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na]
  2541. at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182) [jruby-complete-1.7.9.jar:na]
  2542. at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:198) [jruby-complete-1.7.9.jar:na]
  2543. at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168) [jruby-complete-1.7.9.jar:na]
  2544. at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57) [jruby-complete-1.7.9.jar:na]
  2545. at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na]
  2546. at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) [jruby-complete-1.7.9.jar:na]
  2547. at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112) [jruby-complete-1.7.9.jar:na]
  2548. at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384) [jruby-complete-1.7.9.jar:na]
  2549. at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:336) [jruby-complete-1.7.9.jar:na]
  2550. at org.jruby.runtime.BlockBody.call(BlockBody.java:73) [jruby-complete-1.7.9.jar:na]
  2551. at org.jruby.runtime.Block.call(Block.java:101) [jruby-complete-1.7.9.jar:na]
  2552. at org.jruby.RubyProc.call(RubyProc.java:290) [jruby-complete-1.7.9.jar:na]
  2553. at org.jruby.RubyProc.call(RubyProc.java:224) [jruby-complete-1.7.9.jar:na]
  2554. at org.jruby.RubyProc$INVOKER$i$0$0$call.call(RubyProc$INVOKER$i$0$0$call.gen) [jruby-complete-1.7.9.jar:na]
  2555. at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:202) [jruby-complete-1.7.9.jar:na]
  2556. at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:198) [jruby-complete-1.7.9.jar:na]
  2557. at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134) [jruby-complete-1.7.9.jar:na]
  2558. at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60) [jruby-complete-1.7.9.jar:na]
  2559. at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na]
  2560. at org.jruby.ast.IfNode.interpret(IfNode.java:118) [jruby-complete-1.7.9.jar:na]
  2561. at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na]
  2562. at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na]
  2563. at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161) [jruby-complete-1.7.9.jar:na]
  2564. at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190) [jruby-complete-1.7.9.jar:na]
  2565. at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143) [jruby-complete-1.7.9.jar:na]
  2566. at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154) [jruby-complete-1.7.9.jar:na]
  2567. at org.jruby.ast.FCallNoArgBlockNode.interpret(FCallNoArgBlockNode.java:32) [jruby-complete-1.7.9.jar:na]
  2568. at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na]
  2569. at org.jruby.ast.RescueNode.executeBody(RescueNode.java:221) [jruby-complete-1.7.9.jar:na]
  2570. at org.jruby.ast.RescueNode.interpret(RescueNode.java:116) [jruby-complete-1.7.9.jar:na]
  2571. at org.jruby.ast.BeginNode.interpret(BeginNode.java:83) [jruby-complete-1.7.9.jar:na]
  2572. at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na]
  2573. at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) [jruby-complete-1.7.9.jar:na]
  2574. at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112) [jruby-complete-1.7.9.jar:na]
  2575. at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384) [jruby-complete-1.7.9.jar:na]
  2576. at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:357) [jruby-complete-1.7.9.jar:na]
  2577. at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:312) [jruby-complete-1.7.9.jar:na]
  2578. at org.jruby.runtime.Block.yield(Block.java:142) [jruby-complete-1.7.9.jar:na]
  2579. at org.jruby.RubyArray.eachCommon(RubyArray.java:1606) [jruby-complete-1.7.9.jar:na]
  2580. at org.jruby.RubyArray.each(RubyArray.java:1613) [jruby-complete-1.7.9.jar:na]
  2581. at org.jruby.RubyArray$INVOKER$i$0$0$each.call(RubyArray$INVOKER$i$0$0$each.gen) [jruby-complete-1.7.9.jar:na]
  2582. at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:316) [jruby-complete-1.7.9.jar:na]
  2583. at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:145) [jruby-complete-1.7.9.jar:na]
  2584. at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154) [jruby-complete-1.7.9.jar:na]
  2585. at org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64) [jruby-complete-1.7.9.jar:na]
  2586. at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na]
  2587. at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) [jruby-complete-1.7.9.jar:na]
  2588. at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na]
  2589. at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139) [jruby-complete-1.7.9.jar:na]
  2590. at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182) [jruby-complete-1.7.9.jar:na]
  2591. at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:306) [jruby-complete-1.7.9.jar:na]
  2592. at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:136) [jruby-complete-1.7.9.jar:na]
  2593. at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60) [jruby-complete-1.7.9.jar:na]
  2594. at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na]
  2595. at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na]
  2596. at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:225) [jruby-complete-1.7.9.jar:na]
  2597. at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:214) [jruby-complete-1.7.9.jar:na]
  2598. at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:346) [jruby-complete-1.7.9.jar:na]
  2599. at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:204) [jruby-complete-1.7.9.jar:na]
  2600. at org.jruby.ast.FCallTwoArgNode.interpret(FCallTwoArgNode.java:38) [jruby-complete-1.7.9.jar:na]
  2601. at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na]
  2602. at org.jruby.ast.WhenOneArgNode.whenNoTest(WhenOneArgNode.java:27) [jruby-complete-1.7.9.jar:na]
  2603. at org.jruby.ast.WhenOneArgNode.when(WhenOneArgNode.java:45) [jruby-complete-1.7.9.jar:na]
  2604. at org.jruby.ast.CaseNode.interpret(CaseNode.java:132) [jruby-complete-1.7.9.jar:na]
  2605. at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na]
  2606. at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na]
  2607. at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182) [jruby-complete-1.7.9.jar:na]
  2608. at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:198) [jruby-complete-1.7.9.jar:na]
  2609. at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326) [jruby-complete-1.7.9.jar:na]
  2610. at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170) [jruby-complete-1.7.9.jar:na]
  2611. at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57) [jruby-complete-1.7.9.jar:na]
  2612. at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na]
  2613. at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na]
  2614. at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139) [jruby-complete-1.7.9.jar:na]
  2615. at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182) [jruby-complete-1.7.9.jar:na]
  2616. at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:306) [jruby-complete-1.7.9.jar:na]
  2617. at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:136) [jruby-complete-1.7.9.jar:na]
  2618. at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60) [jruby-complete-1.7.9.jar:na]
  2619. at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na]
  2620. at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na]
  2621. at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:112) [jruby-complete-1.7.9.jar:na]
  2622. at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:164) [jruby-complete-1.7.9.jar:na]
  2623. at RbCallUpgrade_272903560.callUpgrade(RbCallUpgrade_272903560.gen:13) [jruby-complete-1.7.9.jar:na]
  2624. at org.sonar.server.ruby.PlatformRubyBridge$1.trigger(PlatformRubyBridge.java:52) [sonar-server-5.6.5.jar:na]
  2625. at org.sonar.server.db.migrations.PlatformDatabaseMigration.doUpgradeDb(PlatformDatabaseMigration.java:131) [sonar-server-5.6.5.jar:na]
  2626. at org.sonar.server.db.migrations.PlatformDatabaseMigration.doDatabaseMigration(PlatformDatabaseMigration.java:113) [sonar-server-5.6.5.jar:na]
  2627. at org.sonar.server.db.migrations.PlatformDatabaseMigration.access$000(PlatformDatabaseMigration.java:37) [sonar-server-5.6.5.jar:na]
  2628. at org.sonar.server.db.migrations.PlatformDatabaseMigration$1.run(PlatformDatabaseMigration.java:101) [sonar-server-5.6.5.jar:na]
  2629. at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_111]
  2630. at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_111]
  2631. at java.lang.Thread.run(Unknown Source) [na:1.8.0_111]
  2632. Caused by: java.sql.BatchUpdateException: Packet for query is too large (6371233 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable.
  2633. at com.mysql.jdbc.PreparedStatement.executeBatchedInserts(PreparedStatement.java:1607) ~[mysql-connector-java-5.1.35.jar:5.1.35]
  2634. at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1272) ~[mysql-connector-java-5.1.35.jar:5.1.35]
  2635. at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) ~[commons-dbcp-1.4.jar:1.4]
  2636. at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) ~[commons-dbcp-1.4.jar:1.4]
  2637. at org.sonar.db.version.UpsertImpl.addBatch(UpsertImpl.java:41) ~[sonar-db-5.6.5.jar:na]
  2638. at org.sonar.db.version.MassUpdate.callSingleHandler(MassUpdate.java:118) ~[sonar-db-5.6.5.jar:na]
  2639. at org.sonar.db.version.MassUpdate.lambda$execute$0(MassUpdate.java:91) ~[sonar-db-5.6.5.jar:na]
  2640. at org.sonar.db.version.SelectImpl.scroll(SelectImpl.java:78) ~[sonar-db-5.6.5.jar:na]
  2641. ... 159 common frames omitted
  2642. Caused by: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (6371233 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable.
  2643. at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3540) ~[mysql-connector-java-5.1.35.jar:5.1.35]
  2644. at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2417) ~[mysql-connector-java-5.1.35.jar:5.1.35]
  2645. at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582) ~[mysql-connector-java-5.1.35.jar:5.1.35]
  2646. at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2535) ~[mysql-connector-java-5.1.35.jar:5.1.35]
  2647. at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1911) ~[mysql-connector-java-5.1.35.jar:5.1.35]
  2648. at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2145) ~[mysql-connector-java-5.1.35.jar:5.1.35]
  2649. at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2081) ~[mysql-connector-java-5.1.35.jar:5.1.35]
  2650. at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2066) ~[mysql-connector-java-5.1.35.jar:5.1.35]
  2651. at com.mysql.jdbc.PreparedStatement.executeBatchedInserts(PreparedStatement.java:1553) ~[mysql-connector-java-5.1.35.jar:5.1.35]
  2652. ... 166 common frames omitted
  2653. 2017.02.16 13:18:43 INFO web[o.s.s.d.m.PlatformDatabaseMigration] DB migration failed | time=7907530ms
  2654. 2017.02.16 13:18:43 ERROR web[o.s.s.d.m.PlatformDatabaseMigration] DB Migration or container restart failed. Process ended with an exception
  2655. org.jruby.exceptions.RaiseException: (StandardError) An error has occurred, all later migrations canceled:
  2656.  
  2657. Fail to execute database migration: org.sonar.db.version.v50.FeedFileSources
Add Comment
Please, Sign In to add comment