diff --git a/.gitignore b/.gitignore index d053125..55c168b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,12 @@ /.idea/ -/nbproject/private/ +/nbproject/ /dist/ /build/ +/DynamicReport/ +build.xml +jssc-2.8.0.jar +mysql-connector-java-5.1.23-bin.jar +nbbuild.xml +ojdbc6.jar +lib +out diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b8..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/jpa-buddy.xml b/.idea/jpa-buddy.xml deleted file mode 100644 index 966d5f5..0000000 --- a/.idea/jpa-buddy.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/libraries/Cassa.xml b/.idea/libraries/Cassa.xml deleted file mode 100644 index 1836706..0000000 --- a/.idea/libraries/Cassa.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/DynamicReport.xml b/.idea/libraries/DynamicReport.xml deleted file mode 100644 index 8bf1811..0000000 --- a/.idea/libraries/DynamicReport.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/lib.xml b/.idea/libraries/lib.xml deleted file mode 100644 index a1e60e6..0000000 --- a/.idea/libraries/lib.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index e5ceda3..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index aa9b6b3..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/DynamicReport/avalon-LICENSE.txt b/DynamicReport/avalon-LICENSE.txt deleted file mode 100644 index 67db858..0000000 --- a/DynamicReport/avalon-LICENSE.txt +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/DynamicReport/avalon-NOTICE.txt b/DynamicReport/avalon-NOTICE.txt deleted file mode 100644 index 281b318..0000000 --- a/DynamicReport/avalon-NOTICE.txt +++ /dev/null @@ -1,11 +0,0 @@ - ========================================================================= - == NOTICE file corresponding to the section 4 d of == - == the Apache License, Version 2.0, == - ========================================================================= - - This product is developed by the Apache Avalon Project. - http://avalon.apache.org - - The names "Avalon" and "Merlin" must not be used to endorse or promote - products derived from this software without prior written permission. - For written permission, please contact pmc@avalon.apache.org. diff --git a/DynamicReport/avalon-framework-impl-4.2.0.jar b/DynamicReport/avalon-framework-impl-4.2.0.jar deleted file mode 100644 index ca61697..0000000 Binary files a/DynamicReport/avalon-framework-impl-4.2.0.jar and /dev/null differ diff --git a/DynamicReport/barbecue-1.5-beta1.jar b/DynamicReport/barbecue-1.5-beta1.jar deleted file mode 100644 index a8fe1e3..0000000 Binary files a/DynamicReport/barbecue-1.5-beta1.jar and /dev/null differ diff --git a/DynamicReport/barbecue-LICENSE.txt b/DynamicReport/barbecue-LICENSE.txt deleted file mode 100644 index 0a420a9..0000000 --- a/DynamicReport/barbecue-LICENSE.txt +++ /dev/null @@ -1,26 +0,0 @@ -/*********************************************************************************************************************** -Copyright (c) 2003, International Barcode Consortium -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of - conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list of - conditions and the following disclaimer in the documentation and/or other materials - provided with the distribution. - * Neither the name of the International Barcode Consortium nor the names of any contributors may be used to endorse - or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. -***********************************************************************************************************************/ - diff --git a/DynamicReport/barcode4j-2.0.jar b/DynamicReport/barcode4j-2.0.jar deleted file mode 100644 index 0b91a46..0000000 Binary files a/DynamicReport/barcode4j-2.0.jar and /dev/null differ diff --git a/DynamicReport/barcode4j-LICENSE.txt b/DynamicReport/barcode4j-LICENSE.txt deleted file mode 100644 index d645695..0000000 --- a/DynamicReport/barcode4j-LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/DynamicReport/barcode4j-NOTICE.txt b/DynamicReport/barcode4j-NOTICE.txt deleted file mode 100644 index 4706f89..0000000 --- a/DynamicReport/barcode4j-NOTICE.txt +++ /dev/null @@ -1,21 +0,0 @@ -========================================================================= -== NOTICE file corresponding to section 4(d) of the Apache License, == -== Version 2.0, in this case for the Barcode4J distribution. == -========================================================================= - -Barcode4J -Copyright 2002-2008 Jeremias Märki -Copyright 2005-2006 Dietmar Bürkle - -Portions of this software were contributed under section 5 of the -Apache License. Contributors are listed under: -http://barcode4j.sourceforge.net/contributors.html - -This product includes software developed for project -Krysalis (http://www.krysalis.org/). - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - -This product includes software developed by the -JDOM Project (http://www.jdom.org/). \ No newline at end of file diff --git a/DynamicReport/batik-LICENSE.txt b/DynamicReport/batik-LICENSE.txt deleted file mode 100644 index 1653b64..0000000 --- a/DynamicReport/batik-LICENSE.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/DynamicReport/batik-anim-1.7.jar b/DynamicReport/batik-anim-1.7.jar deleted file mode 100644 index 2a150b2..0000000 Binary files a/DynamicReport/batik-anim-1.7.jar and /dev/null differ diff --git a/DynamicReport/batik-awt-util-1.7.jar b/DynamicReport/batik-awt-util-1.7.jar deleted file mode 100644 index f83b5bd..0000000 Binary files a/DynamicReport/batik-awt-util-1.7.jar and /dev/null differ diff --git a/DynamicReport/batik-bridge-1.7.jar b/DynamicReport/batik-bridge-1.7.jar deleted file mode 100644 index 872cf27..0000000 Binary files a/DynamicReport/batik-bridge-1.7.jar and /dev/null differ diff --git a/DynamicReport/batik-css-1.7.jar b/DynamicReport/batik-css-1.7.jar deleted file mode 100644 index ef3013d..0000000 Binary files a/DynamicReport/batik-css-1.7.jar and /dev/null differ diff --git a/DynamicReport/batik-dom-1.7.jar b/DynamicReport/batik-dom-1.7.jar deleted file mode 100644 index 0206475..0000000 Binary files a/DynamicReport/batik-dom-1.7.jar and /dev/null differ diff --git a/DynamicReport/batik-ext-1.7.jar b/DynamicReport/batik-ext-1.7.jar deleted file mode 100644 index 57fb273..0000000 Binary files a/DynamicReport/batik-ext-1.7.jar and /dev/null differ diff --git a/DynamicReport/batik-gvt-1.7.jar b/DynamicReport/batik-gvt-1.7.jar deleted file mode 100644 index 9aa9686..0000000 Binary files a/DynamicReport/batik-gvt-1.7.jar and /dev/null differ diff --git a/DynamicReport/batik-parser-1.7.jar b/DynamicReport/batik-parser-1.7.jar deleted file mode 100644 index b84ad36..0000000 Binary files a/DynamicReport/batik-parser-1.7.jar and /dev/null differ diff --git a/DynamicReport/batik-script-1.7.jar b/DynamicReport/batik-script-1.7.jar deleted file mode 100644 index a684f1c..0000000 Binary files a/DynamicReport/batik-script-1.7.jar and /dev/null differ diff --git a/DynamicReport/batik-svg-dom-1.7.jar b/DynamicReport/batik-svg-dom-1.7.jar deleted file mode 100644 index 463d0e0..0000000 Binary files a/DynamicReport/batik-svg-dom-1.7.jar and /dev/null differ diff --git a/DynamicReport/batik-util-1.7.jar b/DynamicReport/batik-util-1.7.jar deleted file mode 100644 index c50d1ff..0000000 Binary files a/DynamicReport/batik-util-1.7.jar and /dev/null differ diff --git a/DynamicReport/batik-xml-1.7.jar b/DynamicReport/batik-xml-1.7.jar deleted file mode 100644 index 45ba157..0000000 Binary files a/DynamicReport/batik-xml-1.7.jar and /dev/null differ diff --git a/DynamicReport/bcprov-LICENSE.txt b/DynamicReport/bcprov-LICENSE.txt deleted file mode 100644 index 3676bd6..0000000 --- a/DynamicReport/bcprov-LICENSE.txt +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (c) 2000 - 2011 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/DynamicReport/bcprov-jdk14-138.jar b/DynamicReport/bcprov-jdk14-138.jar deleted file mode 100644 index d1befb7..0000000 Binary files a/DynamicReport/bcprov-jdk14-138.jar and /dev/null differ diff --git a/DynamicReport/commons-LICENSE.txt b/DynamicReport/commons-LICENSE.txt deleted file mode 100644 index d645695..0000000 --- a/DynamicReport/commons-LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/DynamicReport/commons-NOTICE.txt b/DynamicReport/commons-NOTICE.txt deleted file mode 100644 index 439eb83..0000000 --- a/DynamicReport/commons-NOTICE.txt +++ /dev/null @@ -1,3 +0,0 @@ -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/DynamicReport/commons-beanutils-1.8.0.jar b/DynamicReport/commons-beanutils-1.8.0.jar deleted file mode 100644 index caf7ae3..0000000 Binary files a/DynamicReport/commons-beanutils-1.8.0.jar and /dev/null differ diff --git a/DynamicReport/commons-collections-3.2.1.jar b/DynamicReport/commons-collections-3.2.1.jar deleted file mode 100644 index c35fa1f..0000000 Binary files a/DynamicReport/commons-collections-3.2.1.jar and /dev/null differ diff --git a/DynamicReport/commons-digester-2.1.jar b/DynamicReport/commons-digester-2.1.jar deleted file mode 100644 index a07cfa8..0000000 Binary files a/DynamicReport/commons-digester-2.1.jar and /dev/null differ diff --git a/DynamicReport/commons-lang-2.5.jar b/DynamicReport/commons-lang-2.5.jar deleted file mode 100644 index ae491da..0000000 Binary files a/DynamicReport/commons-lang-2.5.jar and /dev/null differ diff --git a/DynamicReport/commons-lang3-3.1.jar b/DynamicReport/commons-lang3-3.1.jar deleted file mode 100644 index a85e539..0000000 Binary files a/DynamicReport/commons-lang3-3.1.jar and /dev/null differ diff --git a/DynamicReport/commons-logging-1.1.1.jar b/DynamicReport/commons-logging-1.1.1.jar deleted file mode 100644 index 1deef14..0000000 Binary files a/DynamicReport/commons-logging-1.1.1.jar and /dev/null differ diff --git a/DynamicReport/dynamicreports-adhoc-3.2.0-sources.jar b/DynamicReport/dynamicreports-adhoc-3.2.0-sources.jar deleted file mode 100644 index c3e5324..0000000 Binary files a/DynamicReport/dynamicreports-adhoc-3.2.0-sources.jar and /dev/null differ diff --git a/DynamicReport/dynamicreports-adhoc-3.2.0.jar b/DynamicReport/dynamicreports-adhoc-3.2.0.jar deleted file mode 100644 index 54af925..0000000 Binary files a/DynamicReport/dynamicreports-adhoc-3.2.0.jar and /dev/null differ diff --git a/DynamicReport/dynamicreports-core-3.2.0-javadoc.jar b/DynamicReport/dynamicreports-core-3.2.0-javadoc.jar deleted file mode 100644 index 2ae8ab3..0000000 Binary files a/DynamicReport/dynamicreports-core-3.2.0-javadoc.jar and /dev/null differ diff --git a/DynamicReport/dynamicreports-core-3.2.0-sources.jar b/DynamicReport/dynamicreports-core-3.2.0-sources.jar deleted file mode 100644 index f8d78e8..0000000 Binary files a/DynamicReport/dynamicreports-core-3.2.0-sources.jar and /dev/null differ diff --git a/DynamicReport/dynamicreports-core-3.2.0.jar b/DynamicReport/dynamicreports-core-3.2.0.jar deleted file mode 100644 index d44b039..0000000 Binary files a/DynamicReport/dynamicreports-core-3.2.0.jar and /dev/null differ diff --git a/DynamicReport/dynamicreports-examples-3.2.0-sources.jar b/DynamicReport/dynamicreports-examples-3.2.0-sources.jar deleted file mode 100644 index 4d03fe3..0000000 Binary files a/DynamicReport/dynamicreports-examples-3.2.0-sources.jar and /dev/null differ diff --git a/DynamicReport/dynamicreports-examples-3.2.0.jar b/DynamicReport/dynamicreports-examples-3.2.0.jar deleted file mode 100644 index 693689d..0000000 Binary files a/DynamicReport/dynamicreports-examples-3.2.0.jar and /dev/null differ diff --git a/DynamicReport/dynamicreports-googlecharts-3.2.0-sources.jar b/DynamicReport/dynamicreports-googlecharts-3.2.0-sources.jar deleted file mode 100644 index f0fa281..0000000 Binary files a/DynamicReport/dynamicreports-googlecharts-3.2.0-sources.jar and /dev/null differ diff --git a/DynamicReport/dynamicreports-googlecharts-3.2.0.jar b/DynamicReport/dynamicreports-googlecharts-3.2.0.jar deleted file mode 100644 index 8814b39..0000000 Binary files a/DynamicReport/dynamicreports-googlecharts-3.2.0.jar and /dev/null differ diff --git a/DynamicReport/hsqldb-1.8.0.10.jar b/DynamicReport/hsqldb-1.8.0.10.jar deleted file mode 100644 index e010269..0000000 Binary files a/DynamicReport/hsqldb-1.8.0.10.jar and /dev/null differ diff --git a/DynamicReport/hsqldb-LICENSE.txt b/DynamicReport/hsqldb-LICENSE.txt deleted file mode 100644 index a53f073..0000000 --- a/DynamicReport/hsqldb-LICENSE.txt +++ /dev/null @@ -1,67 +0,0 @@ -COPYRIGHTS AND LICENSES (based on BSD License) - -For work developed by the HSQL Development Group: - -Copyright (c) 2001-2010, The HSQL Development Group -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -Neither the name of the HSQL Development Group nor the names of its -contributors may be used to endorse or promote products derived from this -software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -For work originally developed by the Hypersonic SQL Group: - -Copyright (c) 1995-2000 by the Hypersonic SQL Group. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -Neither the name of the Hypersonic SQL Group nor the names of its -contributors may be used to endorse or promote products derived from this -software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This software consists of voluntary contributions made by many individuals on behalf of the -Hypersonic SQL Group. \ No newline at end of file diff --git a/DynamicReport/iText-LICENSE.txt b/DynamicReport/iText-LICENSE.txt deleted file mode 100644 index 6a61e91..0000000 --- a/DynamicReport/iText-LICENSE.txt +++ /dev/null @@ -1,437 +0,0 @@ - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal -permission to copy, distribute and/or modify the library. - - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. -. - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. -. - GNU LIBRARY GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. -. - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. -. - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. -. - 6. As an exception to the Sections above, you may also compile or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - c) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - d) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. -. - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. -. - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. -. - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS diff --git a/DynamicReport/itext-2.1.7.js2.jar b/DynamicReport/itext-2.1.7.js2.jar deleted file mode 100644 index 5d319fc..0000000 Binary files a/DynamicReport/itext-2.1.7.js2.jar and /dev/null differ diff --git a/DynamicReport/jackson-annotations-2.0.5-LICENSE.txt b/DynamicReport/jackson-annotations-2.0.5-LICENSE.txt deleted file mode 100644 index d645695..0000000 --- a/DynamicReport/jackson-annotations-2.0.5-LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/DynamicReport/jackson-annotations-2.1.4.jar b/DynamicReport/jackson-annotations-2.1.4.jar deleted file mode 100644 index 143edf4..0000000 Binary files a/DynamicReport/jackson-annotations-2.1.4.jar and /dev/null differ diff --git a/DynamicReport/jackson-core-2.0.5-LICENSE.txt b/DynamicReport/jackson-core-2.0.5-LICENSE.txt deleted file mode 100644 index d645695..0000000 --- a/DynamicReport/jackson-core-2.0.5-LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/DynamicReport/jackson-core-2.1.4.jar b/DynamicReport/jackson-core-2.1.4.jar deleted file mode 100644 index 0f14468..0000000 Binary files a/DynamicReport/jackson-core-2.1.4.jar and /dev/null differ diff --git a/DynamicReport/jackson-databind-2.0.5-LICENSE.txt b/DynamicReport/jackson-databind-2.0.5-LICENSE.txt deleted file mode 100644 index d645695..0000000 --- a/DynamicReport/jackson-databind-2.0.5-LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/DynamicReport/jackson-databind-2.1.4.jar b/DynamicReport/jackson-databind-2.1.4.jar deleted file mode 100644 index ce125d1..0000000 Binary files a/DynamicReport/jackson-databind-2.1.4.jar and /dev/null differ diff --git a/DynamicReport/jasperreports-5.5.1.jar b/DynamicReport/jasperreports-5.5.1.jar deleted file mode 100644 index b22c6b4..0000000 Binary files a/DynamicReport/jasperreports-5.5.1.jar and /dev/null differ diff --git a/DynamicReport/jasperreports-LICENSE.txt b/DynamicReport/jasperreports-LICENSE.txt deleted file mode 100644 index cca7fc2..0000000 --- a/DynamicReport/jasperreports-LICENSE.txt +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/DynamicReport/jcommon-1.0.15.jar b/DynamicReport/jcommon-1.0.15.jar deleted file mode 100644 index d0dc26d..0000000 Binary files a/DynamicReport/jcommon-1.0.15.jar and /dev/null differ diff --git a/DynamicReport/jcommon-LICENSE.txt b/DynamicReport/jcommon-LICENSE.txt deleted file mode 100644 index b1e3f5a..0000000 --- a/DynamicReport/jcommon-LICENSE.txt +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/DynamicReport/jdtcore-3.1.0.jar b/DynamicReport/jdtcore-3.1.0.jar deleted file mode 100644 index d920738..0000000 Binary files a/DynamicReport/jdtcore-3.1.0.jar and /dev/null differ diff --git a/DynamicReport/jdtcore-LICENSE.txt b/DynamicReport/jdtcore-LICENSE.txt deleted file mode 100644 index aa7cc81..0000000 --- a/DynamicReport/jdtcore-LICENSE.txt +++ /dev/null @@ -1,87 +0,0 @@ -Eclipse Public License - v 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and - -b) in the case of each subsequent Contributor: - -i) changes to the Program, and - -ii) additions to the Program; - -where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. - -b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. - -c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. - -d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and - -b) its license agreement: - -i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; - -ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; - -iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and - -iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. - -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and - -b) a copy of this Agreement must be included with each copy of the Program. - -Contributors may not remove or alter any copyright notices contained within the Program. - -Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. \ No newline at end of file diff --git a/DynamicReport/jfreechart-1.0.12.jar b/DynamicReport/jfreechart-1.0.12.jar deleted file mode 100644 index 73be90f..0000000 Binary files a/DynamicReport/jfreechart-1.0.12.jar and /dev/null differ diff --git a/DynamicReport/jfreechart-LICENSE.txt b/DynamicReport/jfreechart-LICENSE.txt deleted file mode 100644 index b1e3f5a..0000000 --- a/DynamicReport/jfreechart-LICENSE.txt +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/DynamicReport/json-20080701.jar b/DynamicReport/json-20080701.jar deleted file mode 100644 index c9a093e..0000000 Binary files a/DynamicReport/json-20080701.jar and /dev/null differ diff --git a/DynamicReport/jxl-2.6.10.jar b/DynamicReport/jxl-2.6.10.jar deleted file mode 100644 index a2eced5..0000000 Binary files a/DynamicReport/jxl-2.6.10.jar and /dev/null differ diff --git a/DynamicReport/jxl-LICENSE.txt b/DynamicReport/jxl-LICENSE.txt deleted file mode 100644 index b1e3f5a..0000000 --- a/DynamicReport/jxl-LICENSE.txt +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/DynamicReport/log4j-1.2.14.jar b/DynamicReport/log4j-1.2.14.jar deleted file mode 100644 index 6251307..0000000 Binary files a/DynamicReport/log4j-1.2.14.jar and /dev/null differ diff --git a/DynamicReport/log4j-LICENSE.txt b/DynamicReport/log4j-LICENSE.txt deleted file mode 100644 index 6279e52..0000000 --- a/DynamicReport/log4j-LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 1999-2005 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/DynamicReport/poi-3.7.jar b/DynamicReport/poi-3.7.jar deleted file mode 100644 index a08d953..0000000 Binary files a/DynamicReport/poi-3.7.jar and /dev/null differ diff --git a/DynamicReport/poi-LICENSE.txt b/DynamicReport/poi-LICENSE.txt deleted file mode 100644 index 3f40d40..0000000 --- a/DynamicReport/poi-LICENSE.txt +++ /dev/null @@ -1,507 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -APACHE POI SUBCOMPONENTS: - -Apache POI includes subcomponents with separate copyright notices and -license terms. Your use of these subcomponents is subject to the terms -and conditions of the following licenses: - - -Office Open XML schemas (ooxml-schemas-1.0.jar) - - The Office Open XML schema definitions used by Apache POI are - a part of the Office Open XML ECMA Specification (ECMA-376, [1]). - As defined in section 9.4 of the ECMA bylaws [2], this specification - is available to all interested parties without restriction: - - 9.4 All documents when approved shall be made available to - all interested parties without restriction. - - Furthermore, both Microsoft and Adobe have granted patent licenses - to this work [3,4,5]. - - [1] http://www.ecma-international.org/publications/standards/Ecma-376.htm - [2] http://www.ecma-international.org/memento/Ecmabylaws.htm - [3] http://www.microsoft.com/interop/osp/ - [4] http://www.ecma-international.org/publications/files/ECMA-ST/Ecma%20PATENT/ECMA-376%20Edition%201%20Microsoft%20Patent%20Declaration.pdf - [5] http://www.ecma-international.org/publications/files/ECMA-ST/Ecma%20PATENT/ga-2006-191.pdf - - -DOM4J library (dom4j-1.6.1.jar) - - Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved. - - Redistribution and use of this software and associated documentation - ("Software"), with or without modification, are permitted provided - that the following conditions are met: - - 1. Redistributions of source code must retain copyright - statements and notices. Redistributions must also contain a - copy of this document. - - 2. Redistributions in binary form must reproduce the - above copyright notice, this list of conditions and the - following disclaimer in the documentation and/or other - materials provided with the distribution. - - 3. The name "DOM4J" must not be used to endorse or promote - products derived from this Software without prior written - permission of MetaStuff, Ltd. For written permission, - please contact dom4j-info@metastuff.com. - - 4. Products derived from this Software may not be called "DOM4J" - nor may "DOM4J" appear in their names without prior written - permission of MetaStuff, Ltd. DOM4J is a registered - trademark of MetaStuff, Ltd. - - 5. Due credit should be given to the DOM4J Project - - http://www.dom4j.org - - THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS - ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT - NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - OF THE POSSIBILITY OF SUCH DAMAGE. - - -JUnit test library (junit-3.8.1.jar) - - Common Public License - v 1.0 - - THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON - PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION - OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - - 1. DEFINITIONS - - "Contribution" means: - - a) in the case of the initial Contributor, the initial code and - documentation distributed under this Agreement, and - - b) in the case of each subsequent Contributor: - - i) changes to the Program, and - - ii) additions to the Program; - - where such changes and/or additions to the Program originate from - and are distributed by that particular Contributor. A Contribution - 'originates' from a Contributor if it was added to the Program by - such Contributor itself or anyone acting on such Contributor's behalf. - Contributions do not include additions to the Program which: (i) are - separate modules of software distributed in conjunction with the - Program under their own license agreement, and (ii) are not derivative - works of the Program. - - "Contributor" means any person or entity that distributes the Program. - - "Licensed Patents " mean patent claims licensable by a Contributor which - are necessarily infringed by the use or sale of its Contribution alone - or when combined with the Program. - - "Program" means the Contributions distributed in accordance with this - Agreement. - - "Recipient" means anyone who receives the Program under this Agreement, - including all Contributors. - - 2. GRANT OF RIGHTS - - a) Subject to the terms of this Agreement, each Contributor hereby grants - Recipient a non-exclusive, worldwide, royalty-free copyright license - to reproduce, prepare derivative works of, publicly display, publicly - perform, distribute and sublicense the Contribution of such - Contributor, if any, and such derivative works, in source code and - object code form. - - b) Subject to the terms of this Agreement, each Contributor hereby grants - Recipient a non-exclusive, worldwide, royalty-free patent license under - Licensed Patents to make, use, sell, offer to sell, import and - otherwise transfer the Contribution of such Contributor, if any, in - source code and object code form. This patent license shall apply to - the combination of the Contribution and the Program if, at the time - the Contribution is added by the Contributor, such addition of the - Contribution causes such combination to be covered by the Licensed - Patents. The patent license shall not apply to any other combinations - which include the Contribution. No hardware per se is licensed - hereunder. - - c) Recipient understands that although each Contributor grants the - licenses to its Contributions set forth herein, no assurances are - provided by any Contributor that the Program does not infringe the - patent or other intellectual property rights of any other entity. - Each Contributor disclaims any liability to Recipient for claims - brought by any other entity based on infringement of intellectual - property rights or otherwise. As a condition to exercising the rights - and licenses granted hereunder, each Recipient hereby assumes sole - responsibility to secure any other intellectual property rights - needed, if any. For example, if a third party patent license is - required to allow Recipient to distribute the Program, it is - Recipient's responsibility to acquire that license before - distributing the Program. - - d) Each Contributor represents that to its knowledge it has sufficient - copyright rights in its Contribution, if any, to grant the copyright - license set forth in this Agreement. - - 3. REQUIREMENTS - - A Contributor may choose to distribute the Program in object code form - under its own license agreement, provided that: - - a) it complies with the terms and conditions of this Agreement; and - - b) its license agreement: - - i) effectively disclaims on behalf of all Contributors all warranties - and conditions, express and implied, including warranties or - conditions of title and non-infringement, and implied warranties - or conditions of merchantability and fitness for a particular - purpose; - - ii) effectively excludes on behalf of all Contributors all liability - for damages, including direct, indirect, special, incidental and - consequential damages, such as lost profits; - - iii) states that any provisions which differ from this Agreement are - offered by that Contributor alone and not by any other party; and - - iv) states that source code for the Program is available from such - Contributor, and informs licensees how to obtain it in a - reasonable manner on or through a medium customarily used for - software exchange. - - When the Program is made available in source code form: - - a) it must be made available under this Agreement; and - - b) a copy of this Agreement must be included with each copy of - the Program. - - Contributors may not remove or alter any copyright notices contained - within the Program. - - Each Contributor must identify itself as the originator of its - Contribution, if any, in a manner that reasonably allows subsequent - Recipients to identify the originator of the Contribution. - - 4. COMMERCIAL DISTRIBUTION - - Commercial distributors of software may accept certain responsibilities - with respect to end users, business partners and the like. While this - license is intended to facilitate the commercial use of the Program, - the Contributor who includes the Program in a commercial product offering - should do so in a manner which does not create potential liability for - other Contributors. Therefore, if a Contributor includes the Program - in a commercial product offering, such Contributor ("Commercial - Contributor") hereby agrees to defend and indemnify every other - Contributor ("Indemnified Contributor") against any losses, damages - and costs (collectively "Losses") arising from claims, lawsuits and - other legal actions brought by a third party against the Indemnified - Contributor to the extent caused by the acts or omissions of such - Commercial Contributor in connection with its distribution of the - Program in a commercial product offering. The obligations in this - section do not apply to any claims or Losses relating to any actual - or alleged intellectual property infringement. In order to qualify, - an Indemnified Contributor must: a) promptly notify the Commercial - Contributor in writing of such claim, and b) allow the Commercial - Contributor to control, and cooperate with the Commercial Contributor - in, the defense and any related settlement negotiations. The Indemnified - Contributor may participate in any such claim at its own expense. - - For example, a Contributor might include the Program in a commercial - product offering, Product X. That Contributor is then a Commercial - Contributor. If that Commercial Contributor then makes performance - claims, or offers warranties related to Product X, those performance - claims and warranties are such Commercial Contributor's responsibility - alone. Under this section, the Commercial Contributor would have to - defend claims against the other Contributors related to those - performance claims and warranties, and if a court requires any other - Contributor to pay any damages as a result, the Commercial Contributor - must pay those damages. - - 5. NO WARRANTY - - EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED - ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER - EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR - CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR - A PARTICULAR PURPOSE. Each Recipient is solely responsible for - determining the appropriateness of using and distributing the Program - and assumes all risks associated with its exercise of rights under this - Agreement, including but not limited to the risks and costs of program - errors, compliance with applicable laws, damage to or loss of data, - programs or equipment, and unavailability or interruption of operations. - - 6. DISCLAIMER OF LIABILITY - - EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR - ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING - WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR - DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED - HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - 7. GENERAL - - If any provision of this Agreement is invalid or unenforceable under - applicable law, it shall not affect the validity or enforceability of - the remainder of the terms of this Agreement, and without further - action by the parties hereto, such provision shall be reformed to the - minimum extent necessary to make such provision valid and enforceable. - - If Recipient institutes patent litigation against a Contributor with - respect to a patent applicable to software (including a cross-claim or - counterclaim in a lawsuit), then any patent licenses granted by that - Contributor to such Recipient under this Agreement shall terminate as of - the date such litigation is filed. In addition, if Recipient institutes - patent litigation against any entity (including a cross-claim or - counterclaim in a lawsuit) alleging that the Program itself (excluding - combinations of the Program with other software or hardware) infringes - such Recipient's patent(s), then such Recipient's rights granted under - Section 2(b) shall terminate as of the date such litigation is filed. - - All Recipient's rights under this Agreement shall terminate if it fails - to comply with any of the material terms or conditions of this Agreement - and does not cure such failure in a reasonable period of time after - becoming aware of such noncompliance. If all Recipient's rights under - this Agreement terminate, Recipient agrees to cease use and distribution - of the Program as soon as reasonably practicable. However, Recipient's - obligations under this Agreement and any licenses granted by Recipient - relating to the Program shall continue and survive. - - Everyone is permitted to copy and distribute copies of this Agreement, - but in order to avoid inconsistency the Agreement is copyrighted and may - only be modified in the following manner. The Agreement Steward reserves - the right to publish new versions (including revisions) of this Agreement - from time to time. No one other than the Agreement Steward has the right - to modify this Agreement. IBM is the initial Agreement Steward. IBM may - assign the responsibility to serve as the Agreement Steward to a suitable - separate entity. Each new version of the Agreement will be given a - distinguishing version number. The Program (including Contributions) may - always be distributed subject to the version of the Agreement under which - it was received. In addition, after a new version of the Agreement is - published, Contributor may elect to distribute the Program (including - its Contributions) under the new version. Except as expressly stated in - Sections 2(a) and 2(b) above, Recipient receives no rights or licenses - to the intellectual property of any Contributor under this Agreement, - whether expressly, by implication, estoppel or otherwise. All rights in - the Program not expressly granted under this Agreement are reserved. - - This Agreement is governed by the laws of the State of New York and the - intellectual property laws of the United States of America. No party to - this Agreement will bring a legal action under this Agreement more than - one year after the cause of action arose. Each party waives its rights - to a jury trial in any resulting litigation. diff --git a/DynamicReport/poi-NOTICE.txt b/DynamicReport/poi-NOTICE.txt deleted file mode 100644 index 6d9855f..0000000 --- a/DynamicReport/poi-NOTICE.txt +++ /dev/null @@ -1,21 +0,0 @@ -Apache POI -Copyright 2009 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - -This product contains the DOM4J library (http://www.dom4j.org). -Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved. - -This product contains parts that were originally based on software from BEA. -Copyright (c) 2000-2003, BEA Systems, . - -This product contains W3C XML Schema documents. Copyright 2001-2003 (c) -World Wide Web Consortium (Massachusetts Institute of Technology, European -Research Consortium for Informatics and Mathematics, Keio University) - -This product contains the Piccolo XML Parser for Java -(http://piccolo.sourceforge.net/). Copyright 2002 Yuval Oren. - -This product contains the chunks_parse_cmds.tbl file from the vsdump program. -Copyright (C) 2006-2007 Valek Filippov (frob@df.ru) diff --git a/DynamicReport/serializer-2.7.1.jar b/DynamicReport/serializer-2.7.1.jar deleted file mode 100644 index 99f98db..0000000 Binary files a/DynamicReport/serializer-2.7.1.jar and /dev/null differ diff --git a/DynamicReport/serializer-LICENSE.txt b/DynamicReport/serializer-LICENSE.txt deleted file mode 100644 index d9a10c0..0000000 --- a/DynamicReport/serializer-LICENSE.txt +++ /dev/null @@ -1,176 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/DynamicReport/servlet-api-2.4.jar b/DynamicReport/servlet-api-2.4.jar deleted file mode 100644 index dd326d3..0000000 Binary files a/DynamicReport/servlet-api-2.4.jar and /dev/null differ diff --git a/DynamicReport/spring-LICENSE.txt b/DynamicReport/spring-LICENSE.txt deleted file mode 100644 index 261eeb9..0000000 --- a/DynamicReport/spring-LICENSE.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/DynamicReport/spring-beans-2.5.jar b/DynamicReport/spring-beans-2.5.jar deleted file mode 100644 index 4d6a4bf..0000000 Binary files a/DynamicReport/spring-beans-2.5.jar and /dev/null differ diff --git a/DynamicReport/spring-core-2.5.jar b/DynamicReport/spring-core-2.5.jar deleted file mode 100644 index 7347707..0000000 Binary files a/DynamicReport/spring-core-2.5.jar and /dev/null differ diff --git a/DynamicReport/velocity-1.7.jar b/DynamicReport/velocity-1.7.jar deleted file mode 100644 index ae936d3..0000000 Binary files a/DynamicReport/velocity-1.7.jar and /dev/null differ diff --git a/DynamicReport/velocity-LICENSE.txt b/DynamicReport/velocity-LICENSE.txt deleted file mode 100644 index d645695..0000000 --- a/DynamicReport/velocity-LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/DynamicReport/xalan-2.7.1.jar b/DynamicReport/xalan-2.7.1.jar deleted file mode 100644 index 458fa73..0000000 Binary files a/DynamicReport/xalan-2.7.1.jar and /dev/null differ diff --git a/DynamicReport/xalan-LICENSE.txt b/DynamicReport/xalan-LICENSE.txt deleted file mode 100644 index d9a10c0..0000000 --- a/DynamicReport/xalan-LICENSE.txt +++ /dev/null @@ -1,176 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/DynamicReport/xml-apis-1.3.04.jar b/DynamicReport/xml-apis-1.3.04.jar deleted file mode 100644 index d42c0ea..0000000 Binary files a/DynamicReport/xml-apis-1.3.04.jar and /dev/null differ diff --git a/DynamicReport/xml-apis-LICENSE.txt b/DynamicReport/xml-apis-LICENSE.txt deleted file mode 100644 index d645695..0000000 --- a/DynamicReport/xml-apis-LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/DynamicReport/xml-apis-NOTICE.txt b/DynamicReport/xml-apis-NOTICE.txt deleted file mode 100644 index 4544ce7..0000000 --- a/DynamicReport/xml-apis-NOTICE.txt +++ /dev/null @@ -1,13 +0,0 @@ - ========================================================================= - == NOTICE file corresponding to section 4(d) of the Apache License, == - == Version 2.0, in this case for the Apache xml-commons xml-apis == - == distribution. == - ========================================================================= - - This product includes software developed by - The Apache Software Foundation (http://www.apache.org/). - - Portions of this software were originally based on the following: - - software copyright (c) 1999, IBM Corporation., http://www.ibm.com. - - software copyright (c) 1999, Sun Microsystems., http://www.sun.com. - - software copyright (c) 2000 World Wide Web Consortium, http://www.w3.org diff --git a/DynamicReport/xml-apis-ext-1.3.04.jar b/DynamicReport/xml-apis-ext-1.3.04.jar deleted file mode 100644 index a7869d6..0000000 Binary files a/DynamicReport/xml-apis-ext-1.3.04.jar and /dev/null differ diff --git a/build.xml b/build.xml deleted file mode 100644 index a032931..0000000 --- a/build.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - Builds, tests, and runs the project Cassa. - - - diff --git a/jssc-2.8.0.jar b/jssc-2.8.0.jar deleted file mode 100644 index d2b5c07..0000000 Binary files a/jssc-2.8.0.jar and /dev/null differ diff --git a/lib/AbsoluteLayout.jar b/lib/AbsoluteLayout.jar deleted file mode 100644 index 667ffd2..0000000 Binary files a/lib/AbsoluteLayout.jar and /dev/null differ diff --git a/lib/avalon-framework-impl-4.2.0.jar b/lib/avalon-framework-impl-4.2.0.jar deleted file mode 100644 index ca61697..0000000 Binary files a/lib/avalon-framework-impl-4.2.0.jar and /dev/null differ diff --git a/lib/barbecue-1.5-beta1.jar b/lib/barbecue-1.5-beta1.jar deleted file mode 100644 index a8fe1e3..0000000 Binary files a/lib/barbecue-1.5-beta1.jar and /dev/null differ diff --git a/lib/barcode4j-2.0.jar b/lib/barcode4j-2.0.jar deleted file mode 100644 index 0b91a46..0000000 Binary files a/lib/barcode4j-2.0.jar and /dev/null differ diff --git a/lib/batik-anim-1.7.jar b/lib/batik-anim-1.7.jar deleted file mode 100644 index 2a150b2..0000000 Binary files a/lib/batik-anim-1.7.jar and /dev/null differ diff --git a/lib/batik-awt-util-1.7.jar b/lib/batik-awt-util-1.7.jar deleted file mode 100644 index f83b5bd..0000000 Binary files a/lib/batik-awt-util-1.7.jar and /dev/null differ diff --git a/lib/batik-bridge-1.7.jar b/lib/batik-bridge-1.7.jar deleted file mode 100644 index 872cf27..0000000 Binary files a/lib/batik-bridge-1.7.jar and /dev/null differ diff --git a/lib/batik-css-1.7.jar b/lib/batik-css-1.7.jar deleted file mode 100644 index ef3013d..0000000 Binary files a/lib/batik-css-1.7.jar and /dev/null differ diff --git a/lib/batik-dom-1.7.jar b/lib/batik-dom-1.7.jar deleted file mode 100644 index 0206475..0000000 Binary files a/lib/batik-dom-1.7.jar and /dev/null differ diff --git a/lib/batik-ext-1.7.jar b/lib/batik-ext-1.7.jar deleted file mode 100644 index 57fb273..0000000 Binary files a/lib/batik-ext-1.7.jar and /dev/null differ diff --git a/lib/batik-gvt-1.7.jar b/lib/batik-gvt-1.7.jar deleted file mode 100644 index 9aa9686..0000000 Binary files a/lib/batik-gvt-1.7.jar and /dev/null differ diff --git a/lib/batik-parser-1.7.jar b/lib/batik-parser-1.7.jar deleted file mode 100644 index b84ad36..0000000 Binary files a/lib/batik-parser-1.7.jar and /dev/null differ diff --git a/lib/batik-script-1.7.jar b/lib/batik-script-1.7.jar deleted file mode 100644 index a684f1c..0000000 Binary files a/lib/batik-script-1.7.jar and /dev/null differ diff --git a/lib/batik-svg-dom-1.7.jar b/lib/batik-svg-dom-1.7.jar deleted file mode 100644 index 463d0e0..0000000 Binary files a/lib/batik-svg-dom-1.7.jar and /dev/null differ diff --git a/lib/batik-util-1.7.jar b/lib/batik-util-1.7.jar deleted file mode 100644 index c50d1ff..0000000 Binary files a/lib/batik-util-1.7.jar and /dev/null differ diff --git a/lib/batik-xml-1.7.jar b/lib/batik-xml-1.7.jar deleted file mode 100644 index 45ba157..0000000 Binary files a/lib/batik-xml-1.7.jar and /dev/null differ diff --git a/lib/bcprov-jdk14-138.jar b/lib/bcprov-jdk14-138.jar deleted file mode 100644 index d1befb7..0000000 Binary files a/lib/bcprov-jdk14-138.jar and /dev/null differ diff --git a/lib/beansbinding-1.2.1.jar b/lib/beansbinding-1.2.1.jar deleted file mode 100644 index 7f26dc3..0000000 Binary files a/lib/beansbinding-1.2.1.jar and /dev/null differ diff --git a/lib/commons-beanutils-1.8.0.jar b/lib/commons-beanutils-1.8.0.jar deleted file mode 100644 index caf7ae3..0000000 Binary files a/lib/commons-beanutils-1.8.0.jar and /dev/null differ diff --git a/lib/commons-collections-3.2.1.jar b/lib/commons-collections-3.2.1.jar deleted file mode 100644 index c35fa1f..0000000 Binary files a/lib/commons-collections-3.2.1.jar and /dev/null differ diff --git a/lib/commons-digester-2.1.jar b/lib/commons-digester-2.1.jar deleted file mode 100644 index a07cfa8..0000000 Binary files a/lib/commons-digester-2.1.jar and /dev/null differ diff --git a/lib/commons-lang-2.5.jar b/lib/commons-lang-2.5.jar deleted file mode 100644 index ae491da..0000000 Binary files a/lib/commons-lang-2.5.jar and /dev/null differ diff --git a/lib/commons-lang3-3.1.jar b/lib/commons-lang3-3.1.jar deleted file mode 100644 index a85e539..0000000 Binary files a/lib/commons-lang3-3.1.jar and /dev/null differ diff --git a/lib/commons-logging-1.1.1.jar b/lib/commons-logging-1.1.1.jar deleted file mode 100644 index 1deef14..0000000 Binary files a/lib/commons-logging-1.1.1.jar and /dev/null differ diff --git a/lib/dynamicreports-adhoc-3.2.0-sources.jar b/lib/dynamicreports-adhoc-3.2.0-sources.jar deleted file mode 100644 index c3e5324..0000000 Binary files a/lib/dynamicreports-adhoc-3.2.0-sources.jar and /dev/null differ diff --git a/lib/dynamicreports-adhoc-3.2.0.jar b/lib/dynamicreports-adhoc-3.2.0.jar deleted file mode 100644 index 54af925..0000000 Binary files a/lib/dynamicreports-adhoc-3.2.0.jar and /dev/null differ diff --git a/lib/dynamicreports-core-3.2.0-javadoc.jar b/lib/dynamicreports-core-3.2.0-javadoc.jar deleted file mode 100644 index 2ae8ab3..0000000 Binary files a/lib/dynamicreports-core-3.2.0-javadoc.jar and /dev/null differ diff --git a/lib/dynamicreports-core-3.2.0-sources.jar b/lib/dynamicreports-core-3.2.0-sources.jar deleted file mode 100644 index f8d78e8..0000000 Binary files a/lib/dynamicreports-core-3.2.0-sources.jar and /dev/null differ diff --git a/lib/dynamicreports-core-3.2.0.jar b/lib/dynamicreports-core-3.2.0.jar deleted file mode 100644 index d44b039..0000000 Binary files a/lib/dynamicreports-core-3.2.0.jar and /dev/null differ diff --git a/lib/dynamicreports-examples-3.2.0-sources.jar b/lib/dynamicreports-examples-3.2.0-sources.jar deleted file mode 100644 index 4d03fe3..0000000 Binary files a/lib/dynamicreports-examples-3.2.0-sources.jar and /dev/null differ diff --git a/lib/dynamicreports-examples-3.2.0.jar b/lib/dynamicreports-examples-3.2.0.jar deleted file mode 100644 index 693689d..0000000 Binary files a/lib/dynamicreports-examples-3.2.0.jar and /dev/null differ diff --git a/lib/dynamicreports-googlecharts-3.2.0-sources.jar b/lib/dynamicreports-googlecharts-3.2.0-sources.jar deleted file mode 100644 index f0fa281..0000000 Binary files a/lib/dynamicreports-googlecharts-3.2.0-sources.jar and /dev/null differ diff --git a/lib/dynamicreports-googlecharts-3.2.0.jar b/lib/dynamicreports-googlecharts-3.2.0.jar deleted file mode 100644 index 8814b39..0000000 Binary files a/lib/dynamicreports-googlecharts-3.2.0.jar and /dev/null differ diff --git a/lib/hsqldb-1.8.0.10.jar b/lib/hsqldb-1.8.0.10.jar deleted file mode 100644 index e010269..0000000 Binary files a/lib/hsqldb-1.8.0.10.jar and /dev/null differ diff --git a/lib/itext-2.1.7.js2.jar b/lib/itext-2.1.7.js2.jar deleted file mode 100644 index 5d319fc..0000000 Binary files a/lib/itext-2.1.7.js2.jar and /dev/null differ diff --git a/lib/jackson-annotations-2.1.4.jar b/lib/jackson-annotations-2.1.4.jar deleted file mode 100644 index 143edf4..0000000 Binary files a/lib/jackson-annotations-2.1.4.jar and /dev/null differ diff --git a/lib/jackson-core-2.1.4.jar b/lib/jackson-core-2.1.4.jar deleted file mode 100644 index 0f14468..0000000 Binary files a/lib/jackson-core-2.1.4.jar and /dev/null differ diff --git a/lib/jackson-databind-2.1.4.jar b/lib/jackson-databind-2.1.4.jar deleted file mode 100644 index ce125d1..0000000 Binary files a/lib/jackson-databind-2.1.4.jar and /dev/null differ diff --git a/lib/jasperreports-5.5.1.jar b/lib/jasperreports-5.5.1.jar deleted file mode 100644 index b22c6b4..0000000 Binary files a/lib/jasperreports-5.5.1.jar and /dev/null differ diff --git a/lib/jcommon-1.0.15.jar b/lib/jcommon-1.0.15.jar deleted file mode 100644 index d0dc26d..0000000 Binary files a/lib/jcommon-1.0.15.jar and /dev/null differ diff --git a/lib/jdtcore-3.1.0.jar b/lib/jdtcore-3.1.0.jar deleted file mode 100644 index d920738..0000000 Binary files a/lib/jdtcore-3.1.0.jar and /dev/null differ diff --git a/lib/jfreechart-1.0.12.jar b/lib/jfreechart-1.0.12.jar deleted file mode 100644 index 73be90f..0000000 Binary files a/lib/jfreechart-1.0.12.jar and /dev/null differ diff --git a/lib/json-20080701.jar b/lib/json-20080701.jar deleted file mode 100644 index c9a093e..0000000 Binary files a/lib/json-20080701.jar and /dev/null differ diff --git a/lib/jxl-2.6.10.jar b/lib/jxl-2.6.10.jar deleted file mode 100644 index a2eced5..0000000 Binary files a/lib/jxl-2.6.10.jar and /dev/null differ diff --git a/lib/poi-3.7.jar b/lib/poi-3.7.jar deleted file mode 100644 index a08d953..0000000 Binary files a/lib/poi-3.7.jar and /dev/null differ diff --git a/lib/serializer-2.7.1.jar b/lib/serializer-2.7.1.jar deleted file mode 100644 index 99f98db..0000000 Binary files a/lib/serializer-2.7.1.jar and /dev/null differ diff --git a/lib/servlet-api-2.4.jar b/lib/servlet-api-2.4.jar deleted file mode 100644 index dd326d3..0000000 Binary files a/lib/servlet-api-2.4.jar and /dev/null differ diff --git a/lib/spring-beans-2.5.jar b/lib/spring-beans-2.5.jar deleted file mode 100644 index 4d6a4bf..0000000 Binary files a/lib/spring-beans-2.5.jar and /dev/null differ diff --git a/lib/spring-core-2.5.jar b/lib/spring-core-2.5.jar deleted file mode 100644 index 7347707..0000000 Binary files a/lib/spring-core-2.5.jar and /dev/null differ diff --git a/lib/velocity-1.7.jar b/lib/velocity-1.7.jar deleted file mode 100644 index ae936d3..0000000 Binary files a/lib/velocity-1.7.jar and /dev/null differ diff --git a/lib/xalan-2.7.1.jar b/lib/xalan-2.7.1.jar deleted file mode 100644 index 458fa73..0000000 Binary files a/lib/xalan-2.7.1.jar and /dev/null differ diff --git a/lib/xml-apis-1.3.04.jar b/lib/xml-apis-1.3.04.jar deleted file mode 100644 index d42c0ea..0000000 Binary files a/lib/xml-apis-1.3.04.jar and /dev/null differ diff --git a/mysql-connector-java-5.1.23-bin.jar b/mysql-connector-java-5.1.23-bin.jar deleted file mode 100644 index 9bd1fde..0000000 Binary files a/mysql-connector-java-5.1.23-bin.jar and /dev/null differ diff --git a/nbbuild.xml b/nbbuild.xml deleted file mode 100644 index a032931..0000000 --- a/nbbuild.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - Builds, tests, and runs the project Cassa. - - - diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml deleted file mode 100644 index 14f274c..0000000 --- a/nbproject/build-impl.xml +++ /dev/null @@ -1,1785 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set platform.home - Must set platform.bootcp - Must set platform.java - Must set platform.javac - - The J2SE Platform is not correctly set up. - Your active platform is: ${platform.active}, but the corresponding property "platforms.${platform.active}.home" is not found in the project's properties files. - Either open the project in the IDE and setup the Platform with the same name or add it manually. - For example like this: - ant -Duser.properties.file=<path_to_property_file> jar (where you put the property "platforms.${platform.active}.home" in a .properties file) - or ant -Dplatforms.${platform.active}.home=<path_to_JDK_home> jar (where no properties file is used) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set src.dir - Must set build.dir - Must set dist.dir - Must set build.classes.dir - Must set dist.javadoc.dir - Must set build.test.classes.dir - Must set build.test.results.dir - Must set build.classes.excludes - Must set dist.jar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - No tests executed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set JVM to use for profiling in profiler.info.jvm - Must set profiler agent JVM arguments in profiler.info.jvmargs.agent - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To run this application from the command line without Ant, try: - - ${platform.java} -jar "${dist.jar.resolved}" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set run.class - - - - Must select one file in the IDE or set run.class - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set debug.class - - - - - Must select one file in the IDE or set debug.class - - - - - Must set fix.includes - - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - Must select one file in the IDE or set profile.class - This target only works when run from inside the NetBeans IDE. - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set run.class - - - - - - Must select some files in the IDE or set test.includes - - - - - Must select one file in the IDE or set run.class - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - - - Some tests failed; see details above. - - - - - - - - - Must select some files in the IDE or set test.includes - - - - Some tests failed; see details above. - - - - Must select some files in the IDE or set test.class - Must select some method in the IDE or set test.method - - - - Some tests failed; see details above. - - - - - Must select one file in the IDE or set test.class - - - - Must select one file in the IDE or set test.class - Must select some method in the IDE or set test.method - - - - - - - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties deleted file mode 100644 index 12ff18c..0000000 --- a/nbproject/genfiles.properties +++ /dev/null @@ -1,8 +0,0 @@ -nbbuild.xml.data.CRC32=14b85913 -nbbuild.xml.script.CRC32=0bf5d772 -nbbuild.xml.stylesheet.CRC32=f85dc8f2@1.110.0.48 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=14b85913 -nbproject/build-impl.xml.script.CRC32=0fbd792c -nbproject/build-impl.xml.stylesheet.CRC32=12e0a6c2@1.110.0.48 diff --git a/nbproject/private/config.properties b/nbproject/private/config.properties deleted file mode 100644 index e69de29..0000000 diff --git a/nbproject/private/private.properties b/nbproject/private/private.properties deleted file mode 100644 index f73f94e..0000000 --- a/nbproject/private/private.properties +++ /dev/null @@ -1,8 +0,0 @@ -compile.on.save=true -do.depend=false -do.jar=true -do.jlink=false -javac.debug=true -javadoc.preview=true -jlink.strip=false -user.properties.file=C:\\Users\\Francesco DS\\AppData\\Roaming\\NetBeans\\21\\build.properties diff --git a/nbproject/project.properties b/nbproject/project.properties deleted file mode 100644 index e5bb852..0000000 --- a/nbproject/project.properties +++ /dev/null @@ -1,207 +0,0 @@ -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=false -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -application.title=Cassa -application.vendor=Francesco DS -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -buildfile=nbbuild.xml -# Uncomment to specify the preferred debugger connection transport: -#debug.transport=dt_socket -debug.classpath=\ - ${run.classpath} -debug.modulepath=\ - ${run.modulepath} -debug.test.classpath=\ - ${run.test.classpath} -debug.test.modulepath=\ - ${run.test.modulepath} -# Files in build.classes.dir which should be excluded from distribution jar -dist.archive.excludes= -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/Cassa.jar -dist.javadoc.dir=${dist.dir}/javadoc -dist.jlink.dir=${dist.dir}/jlink -dist.jlink.output=${dist.jlink.dir}/Cassa -endorsed.classpath= -excludes= -file.reference.avalon-framework-impl-4.2.0.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\avalon-framework-impl-4.2.0.jar -file.reference.barbecue-1.5-beta1.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\barbecue-1.5-beta1.jar -file.reference.barcode4j-2.0.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\barcode4j-2.0.jar -file.reference.batik-anim-1.7.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\batik-anim-1.7.jar -file.reference.batik-awt-util-1.7.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\batik-awt-util-1.7.jar -file.reference.batik-bridge-1.7.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\batik-bridge-1.7.jar -file.reference.batik-css-1.7.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\batik-css-1.7.jar -file.reference.batik-dom-1.7.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\batik-dom-1.7.jar -file.reference.batik-ext-1.7.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\batik-ext-1.7.jar -file.reference.batik-gvt-1.7.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\batik-gvt-1.7.jar -file.reference.batik-parser-1.7.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\batik-parser-1.7.jar -file.reference.batik-script-1.7.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\batik-script-1.7.jar -file.reference.batik-svg-dom-1.7.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\batik-svg-dom-1.7.jar -file.reference.batik-util-1.7.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\batik-util-1.7.jar -file.reference.batik-xml-1.7.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\batik-xml-1.7.jar -file.reference.bcprov-jdk14-138.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\bcprov-jdk14-138.jar -file.reference.Cassa-src=src -file.reference.commons-beanutils-1.8.0.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\commons-beanutils-1.8.0.jar -file.reference.commons-collections-3.2.1.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\commons-collections-3.2.1.jar -file.reference.commons-digester-2.1.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\commons-digester-2.1.jar -file.reference.commons-lang-2.5.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\commons-lang-2.5.jar -file.reference.commons-lang3-3.1.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\commons-lang3-3.1.jar -file.reference.commons-logging-1.1.1.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\commons-logging-1.1.1.jar -file.reference.dynamicreports-adhoc-3.2.0-sources.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\dynamicreports-adhoc-3.2.0-sources.jar -file.reference.dynamicreports-adhoc-3.2.0.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\dynamicreports-adhoc-3.2.0.jar -file.reference.dynamicreports-core-3.2.0-javadoc.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\dynamicreports-core-3.2.0-javadoc.jar -file.reference.dynamicreports-core-3.2.0-sources.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\dynamicreports-core-3.2.0-sources.jar -file.reference.dynamicreports-core-3.2.0.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\dynamicreports-core-3.2.0.jar -file.reference.dynamicreports-examples-3.2.0-sources.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\dynamicreports-examples-3.2.0-sources.jar -file.reference.dynamicreports-examples-3.2.0.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\dynamicreports-examples-3.2.0.jar -file.reference.dynamicreports-googlecharts-3.2.0-sources.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\dynamicreports-googlecharts-3.2.0-sources.jar -file.reference.dynamicreports-googlecharts-3.2.0.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\dynamicreports-googlecharts-3.2.0.jar -file.reference.hsqldb-1.8.0.10.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\hsqldb-1.8.0.10.jar -file.reference.itext-2.1.7.js2.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\itext-2.1.7.js2.jar -file.reference.jackson-annotations-2.1.4.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\jackson-annotations-2.1.4.jar -file.reference.jackson-core-2.1.4.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\jackson-core-2.1.4.jar -file.reference.jackson-databind-2.1.4.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\jackson-databind-2.1.4.jar -file.reference.jasperreports-5.5.1.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\jasperreports-5.5.1.jar -file.reference.jcommon-1.0.15.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\jcommon-1.0.15.jar -file.reference.jdtcore-3.1.0.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\jdtcore-3.1.0.jar -file.reference.jfreechart-1.0.12.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\jfreechart-1.0.12.jar -file.reference.json-20080701.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\json-20080701.jar -file.reference.jssc-2.8.0.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\jssc-2.8.0.jar -file.reference.jxl-2.6.10.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\jxl-2.6.10.jar -file.reference.log4j-1.2.14.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\log4j-1.2.14.jar -file.reference.ojdbc6.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\ojdbc6.jar -file.reference.poi-3.7.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\poi-3.7.jar -file.reference.serializer-2.7.1.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\serializer-2.7.1.jar -file.reference.servlet-api-2.4.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\servlet-api-2.4.jar -file.reference.spring-beans-2.5.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\spring-beans-2.5.jar -file.reference.spring-core-2.5.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\spring-core-2.5.jar -file.reference.velocity-1.7.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\velocity-1.7.jar -file.reference.xalan-2.7.1.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\xalan-2.7.1.jar -file.reference.xml-apis-1.3.04.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\xml-apis-1.3.04.jar -file.reference.xml-apis-ext-1.3.04.jar=D:\\personal\\WORK\\works_and_projects\\Maiora SRL\\Cassa\\DynamicReport\\xml-apis-ext-1.3.04.jar -includes=** -jar.compress=false -javac.classpath=\ - ${libs.absolutelayout.classpath}:\ - ${file.reference.avalon-framework-impl-4.2.0.jar}:\ - ${file.reference.barbecue-1.5-beta1.jar}:\ - ${file.reference.barcode4j-2.0.jar}:\ - ${file.reference.batik-anim-1.7.jar}:\ - ${file.reference.batik-awt-util-1.7.jar}:\ - ${file.reference.batik-bridge-1.7.jar}:\ - ${file.reference.batik-css-1.7.jar}:\ - ${file.reference.batik-dom-1.7.jar}:\ - ${file.reference.batik-ext-1.7.jar}:\ - ${file.reference.batik-gvt-1.7.jar}:\ - ${file.reference.batik-parser-1.7.jar}:\ - ${file.reference.batik-script-1.7.jar}:\ - ${file.reference.batik-svg-dom-1.7.jar}:\ - ${file.reference.batik-util-1.7.jar}:\ - ${file.reference.batik-xml-1.7.jar}:\ - ${file.reference.bcprov-jdk14-138.jar}:\ - ${file.reference.commons-beanutils-1.8.0.jar}:\ - ${file.reference.commons-collections-3.2.1.jar}:\ - ${file.reference.commons-digester-2.1.jar}:\ - ${file.reference.commons-lang-2.5.jar}:\ - ${file.reference.commons-lang3-3.1.jar}:\ - ${file.reference.commons-logging-1.1.1.jar}:\ - ${file.reference.dynamicreports-adhoc-3.2.0-sources.jar}:\ - ${file.reference.dynamicreports-adhoc-3.2.0.jar}:\ - ${file.reference.dynamicreports-core-3.2.0-javadoc.jar}:\ - ${file.reference.dynamicreports-core-3.2.0-sources.jar}:\ - ${file.reference.dynamicreports-core-3.2.0.jar}:\ - ${file.reference.dynamicreports-examples-3.2.0-sources.jar}:\ - ${file.reference.dynamicreports-examples-3.2.0.jar}:\ - ${file.reference.dynamicreports-googlecharts-3.2.0-sources.jar}:\ - ${file.reference.dynamicreports-googlecharts-3.2.0.jar}:\ - ${file.reference.hsqldb-1.8.0.10.jar}:\ - ${file.reference.itext-2.1.7.js2.jar}:\ - ${file.reference.jackson-annotations-2.1.4.jar}:\ - ${file.reference.jackson-core-2.1.4.jar}:\ - ${file.reference.jackson-databind-2.1.4.jar}:\ - ${file.reference.jasperreports-5.5.1.jar}:\ - ${file.reference.jcommon-1.0.15.jar}:\ - ${file.reference.jdtcore-3.1.0.jar}:\ - ${file.reference.jfreechart-1.0.12.jar}:\ - ${file.reference.json-20080701.jar}:\ - ${file.reference.jxl-2.6.10.jar}:\ - ${file.reference.log4j-1.2.14.jar}:\ - ${file.reference.poi-3.7.jar}:\ - ${file.reference.serializer-2.7.1.jar}:\ - ${file.reference.servlet-api-2.4.jar}:\ - ${file.reference.spring-beans-2.5.jar}:\ - ${file.reference.spring-core-2.5.jar}:\ - ${file.reference.velocity-1.7.jar}:\ - ${file.reference.xalan-2.7.1.jar}:\ - ${file.reference.xml-apis-1.3.04.jar}:\ - ${file.reference.xml-apis-ext-1.3.04.jar}:\ - ${file.reference.jssc-2.8.0.jar}:\ - ${file.reference.ojdbc6.jar} -# Space-separated list of extra javac options -javac.compilerargs= -javac.deprecation=false -javac.external.vm=true -javac.modulepath= -javac.processormodulepath= -javac.processorpath=\ - ${javac.classpath} -javac.source=22 -javac.target=22 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -javac.test.modulepath=\ - ${javac.modulepath} -javac.test.processorpath=\ - ${javac.test.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.html5=false -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -# The jlink additional root modules to resolve -jlink.additionalmodules= -# The jlink additional command line parameters -jlink.additionalparam= -jlink.launcher=true -jlink.launcher.name=Cassa -main.class=puntocassa.PuntoCassa -manifest.file=manifest.mf -meta.inf.dir=${src.dir}/META-INF -mkdist.disabled=false -platform.active=JDK_22 -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -# Space-separated list of JVM arguments used when running the project. -# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. -# To set system properties for unit tests define test-sys-prop.name=value: -run.jvmargs= -run.modulepath=\ - ${javac.modulepath} -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -run.test.modulepath=\ - ${javac.test.modulepath} -source.encoding=UTF-8 -src.dir=${file.reference.Cassa-src} diff --git a/nbproject/project.xml b/nbproject/project.xml deleted file mode 100644 index 70bb28f..0000000 --- a/nbproject/project.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - org.netbeans.modules.java.j2seproject - - - Cassa - - - - - - - - diff --git a/ojdbc6.jar b/ojdbc6.jar deleted file mode 100644 index 8240f40..0000000 Binary files a/ojdbc6.jar and /dev/null differ diff --git a/out/production/Cassa/Cassa.jar b/out/production/Cassa/Cassa.jar deleted file mode 100644 index 69078d1..0000000 Binary files a/out/production/Cassa/Cassa.jar and /dev/null differ diff --git a/out/production/Cassa/SmartCard/APDUCommandBoxing.class b/out/production/Cassa/SmartCard/APDUCommandBoxing.class deleted file mode 100644 index 95d0e5f..0000000 Binary files a/out/production/Cassa/SmartCard/APDUCommandBoxing.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/CardList.class b/out/production/Cassa/SmartCard/CardList.class deleted file mode 100644 index 764a1e9..0000000 Binary files a/out/production/Cassa/SmartCard/CardList.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$1.class b/out/production/Cassa/SmartCard/FrmMain$1.class deleted file mode 100644 index b7051d5..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$1.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$10.class b/out/production/Cassa/SmartCard/FrmMain$10.class deleted file mode 100644 index 28fb6b1..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$10.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$11.class b/out/production/Cassa/SmartCard/FrmMain$11.class deleted file mode 100644 index 82d37f8..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$11.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$12.class b/out/production/Cassa/SmartCard/FrmMain$12.class deleted file mode 100644 index 64a640f..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$12.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$13.class b/out/production/Cassa/SmartCard/FrmMain$13.class deleted file mode 100644 index 92d04bb..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$13.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$14.class b/out/production/Cassa/SmartCard/FrmMain$14.class deleted file mode 100644 index 5c0977a..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$14.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$15.class b/out/production/Cassa/SmartCard/FrmMain$15.class deleted file mode 100644 index e4acc99..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$15.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$16.class b/out/production/Cassa/SmartCard/FrmMain$16.class deleted file mode 100644 index 053bec2..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$16.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$17.class b/out/production/Cassa/SmartCard/FrmMain$17.class deleted file mode 100644 index c333186..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$17.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$18.class b/out/production/Cassa/SmartCard/FrmMain$18.class deleted file mode 100644 index ecd75bc..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$18.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$19.class b/out/production/Cassa/SmartCard/FrmMain$19.class deleted file mode 100644 index a367dbc..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$19.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$2.class b/out/production/Cassa/SmartCard/FrmMain$2.class deleted file mode 100644 index 190f6e4..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$2.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$20.class b/out/production/Cassa/SmartCard/FrmMain$20.class deleted file mode 100644 index d88f16d..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$20.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$21.class b/out/production/Cassa/SmartCard/FrmMain$21.class deleted file mode 100644 index f535b9f..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$21.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$22.class b/out/production/Cassa/SmartCard/FrmMain$22.class deleted file mode 100644 index 7a45307..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$22.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$23.class b/out/production/Cassa/SmartCard/FrmMain$23.class deleted file mode 100644 index 54d8675..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$23.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$24.class b/out/production/Cassa/SmartCard/FrmMain$24.class deleted file mode 100644 index 0a04551..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$24.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$3.class b/out/production/Cassa/SmartCard/FrmMain$3.class deleted file mode 100644 index b5aa047..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$3.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$4.class b/out/production/Cassa/SmartCard/FrmMain$4.class deleted file mode 100644 index fceed19..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$4.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$5.class b/out/production/Cassa/SmartCard/FrmMain$5.class deleted file mode 100644 index 354266f..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$5.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$6.class b/out/production/Cassa/SmartCard/FrmMain$6.class deleted file mode 100644 index da4870f..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$6.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$7.class b/out/production/Cassa/SmartCard/FrmMain$7.class deleted file mode 100644 index 7e64195..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$7.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$8.class b/out/production/Cassa/SmartCard/FrmMain$8.class deleted file mode 100644 index 76e05c8..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$8.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$9.class b/out/production/Cassa/SmartCard/FrmMain$9.class deleted file mode 100644 index 8112c61..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$9.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain$APDUSet.class b/out/production/Cassa/SmartCard/FrmMain$APDUSet.class deleted file mode 100644 index 8672944..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain$APDUSet.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/FrmMain.class b/out/production/Cassa/SmartCard/FrmMain.class deleted file mode 100644 index 325382b..0000000 Binary files a/out/production/Cassa/SmartCard/FrmMain.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/ISO7816FileSystem$DF.class b/out/production/Cassa/SmartCard/ISO7816FileSystem$DF.class deleted file mode 100644 index 43ff669..0000000 Binary files a/out/production/Cassa/SmartCard/ISO7816FileSystem$DF.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/ISO7816FileSystem$EF.class b/out/production/Cassa/SmartCard/ISO7816FileSystem$EF.class deleted file mode 100644 index 78cdc74..0000000 Binary files a/out/production/Cassa/SmartCard/ISO7816FileSystem$EF.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/ISO7816FileSystem.class b/out/production/Cassa/SmartCard/ISO7816FileSystem.class deleted file mode 100644 index 9bbc51d..0000000 Binary files a/out/production/Cassa/SmartCard/ISO7816FileSystem.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/ISO7816Response.class b/out/production/Cassa/SmartCard/ISO7816Response.class deleted file mode 100644 index 7912595..0000000 Binary files a/out/production/Cassa/SmartCard/ISO7816Response.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/Main$1.class b/out/production/Cassa/SmartCard/Main$1.class deleted file mode 100644 index a8fedf9..0000000 Binary files a/out/production/Cassa/SmartCard/Main$1.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/Main.class b/out/production/Cassa/SmartCard/Main.class deleted file mode 100644 index bb575e0..0000000 Binary files a/out/production/Cassa/SmartCard/Main.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/SmartCard.class b/out/production/Cassa/SmartCard/SmartCard.class deleted file mode 100644 index ce9e38d..0000000 Binary files a/out/production/Cassa/SmartCard/SmartCard.class and /dev/null differ diff --git a/out/production/Cassa/SmartCard/StringUtil.class b/out/production/Cassa/SmartCard/StringUtil.class deleted file mode 100644 index e5f4137..0000000 Binary files a/out/production/Cassa/SmartCard/StringUtil.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/ComboItem.class b/out/production/Cassa/puntocassa/ComboItem.class deleted file mode 100644 index 321561b..0000000 Binary files a/out/production/Cassa/puntocassa/ComboItem.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/DecimalFormatRenderer.class b/out/production/Cassa/puntocassa/DecimalFormatRenderer.class deleted file mode 100644 index d2b6e59..0000000 Binary files a/out/production/Cassa/puntocassa/DecimalFormatRenderer.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/Encoding.class b/out/production/Cassa/puntocassa/Encoding.class deleted file mode 100644 index 8cdb9f6..0000000 Binary files a/out/production/Cassa/puntocassa/Encoding.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/JEnhancedOptionPane.class b/out/production/Cassa/puntocassa/JEnhancedOptionPane.class deleted file mode 100644 index 9fdbf3d..0000000 Binary files a/out/production/Cassa/puntocassa/JEnhancedOptionPane.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/JInternalReport.class b/out/production/Cassa/puntocassa/JInternalReport.class deleted file mode 100644 index 0d0480a..0000000 Binary files a/out/production/Cassa/puntocassa/JInternalReport.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/JPnlPagamenti$1.class b/out/production/Cassa/puntocassa/JPnlPagamenti$1.class deleted file mode 100644 index ee42167..0000000 Binary files a/out/production/Cassa/puntocassa/JPnlPagamenti$1.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/JPnlPagamenti.class b/out/production/Cassa/puntocassa/JPnlPagamenti.class deleted file mode 100644 index 8722366..0000000 Binary files a/out/production/Cassa/puntocassa/JPnlPagamenti.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/MyApplication.class b/out/production/Cassa/puntocassa/MyApplication.class deleted file mode 100644 index 5c353a3..0000000 Binary files a/out/production/Cassa/puntocassa/MyApplication.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/MyDialog$1.class b/out/production/Cassa/puntocassa/MyDialog$1.class deleted file mode 100644 index cb385f7..0000000 Binary files a/out/production/Cassa/puntocassa/MyDialog$1.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/MyDialog$2.class b/out/production/Cassa/puntocassa/MyDialog$2.class deleted file mode 100644 index 98c64fa..0000000 Binary files a/out/production/Cassa/puntocassa/MyDialog$2.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/MyDialog.class b/out/production/Cassa/puntocassa/MyDialog.class deleted file mode 100644 index 51daf64..0000000 Binary files a/out/production/Cassa/puntocassa/MyDialog.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/MyKeyBoard$1.class b/out/production/Cassa/puntocassa/MyKeyBoard$1.class deleted file mode 100644 index 60e751c..0000000 Binary files a/out/production/Cassa/puntocassa/MyKeyBoard$1.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/MyKeyBoard$2.class b/out/production/Cassa/puntocassa/MyKeyBoard$2.class deleted file mode 100644 index 11a093e..0000000 Binary files a/out/production/Cassa/puntocassa/MyKeyBoard$2.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/MyKeyBoard$3.class b/out/production/Cassa/puntocassa/MyKeyBoard$3.class deleted file mode 100644 index 7dd942e..0000000 Binary files a/out/production/Cassa/puntocassa/MyKeyBoard$3.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/MyKeyBoard$4.class b/out/production/Cassa/puntocassa/MyKeyBoard$4.class deleted file mode 100644 index fb1f85f..0000000 Binary files a/out/production/Cassa/puntocassa/MyKeyBoard$4.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/MyKeyBoard$5.class b/out/production/Cassa/puntocassa/MyKeyBoard$5.class deleted file mode 100644 index 76e2c18..0000000 Binary files a/out/production/Cassa/puntocassa/MyKeyBoard$5.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/MyKeyBoard$ListenerPulsanti.class b/out/production/Cassa/puntocassa/MyKeyBoard$ListenerPulsanti.class deleted file mode 100644 index 19afdbd..0000000 Binary files a/out/production/Cassa/puntocassa/MyKeyBoard$ListenerPulsanti.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/MyKeyBoard.class b/out/production/Cassa/puntocassa/MyKeyBoard.class deleted file mode 100644 index 223a899..0000000 Binary files a/out/production/Cassa/puntocassa/MyKeyBoard.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/MyTableModel.class b/out/production/Cassa/puntocassa/MyTableModel.class deleted file mode 100644 index 131d3bb..0000000 Binary files a/out/production/Cassa/puntocassa/MyTableModel.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$1$1.class b/out/production/Cassa/puntocassa/PuntoCassa$1$1.class deleted file mode 100644 index 2b4ae09..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$1$1.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$1$2.class b/out/production/Cassa/puntocassa/PuntoCassa$1$2.class deleted file mode 100644 index b4d1209..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$1$2.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$1.class b/out/production/Cassa/puntocassa/PuntoCassa$1.class deleted file mode 100644 index 7530c4f..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$1.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$10.class b/out/production/Cassa/puntocassa/PuntoCassa$10.class deleted file mode 100644 index 987e523..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$10.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$11.class b/out/production/Cassa/puntocassa/PuntoCassa$11.class deleted file mode 100644 index 1926b31..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$11.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$12.class b/out/production/Cassa/puntocassa/PuntoCassa$12.class deleted file mode 100644 index 6dd7994..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$12.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$13.class b/out/production/Cassa/puntocassa/PuntoCassa$13.class deleted file mode 100644 index b68af1b..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$13.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$14.class b/out/production/Cassa/puntocassa/PuntoCassa$14.class deleted file mode 100644 index a96d9f7..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$14.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$15.class b/out/production/Cassa/puntocassa/PuntoCassa$15.class deleted file mode 100644 index 12754fa..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$15.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$16.class b/out/production/Cassa/puntocassa/PuntoCassa$16.class deleted file mode 100644 index 088ec33..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$16.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$17.class b/out/production/Cassa/puntocassa/PuntoCassa$17.class deleted file mode 100644 index c49f52d..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$17.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$18.class b/out/production/Cassa/puntocassa/PuntoCassa$18.class deleted file mode 100644 index af2214e..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$18.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$19.class b/out/production/Cassa/puntocassa/PuntoCassa$19.class deleted file mode 100644 index 55f29f8..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$19.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$2.class b/out/production/Cassa/puntocassa/PuntoCassa$2.class deleted file mode 100644 index e19f60f..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$2.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$20.class b/out/production/Cassa/puntocassa/PuntoCassa$20.class deleted file mode 100644 index ea83223..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$20.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$21.class b/out/production/Cassa/puntocassa/PuntoCassa$21.class deleted file mode 100644 index 1a135b0..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$21.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$22.class b/out/production/Cassa/puntocassa/PuntoCassa$22.class deleted file mode 100644 index 90431ad..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$22.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$23.class b/out/production/Cassa/puntocassa/PuntoCassa$23.class deleted file mode 100644 index dbe2b06..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$23.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$24.class b/out/production/Cassa/puntocassa/PuntoCassa$24.class deleted file mode 100644 index ee8d799..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$24.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$25.class b/out/production/Cassa/puntocassa/PuntoCassa$25.class deleted file mode 100644 index c2d3ce3..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$25.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$26.class b/out/production/Cassa/puntocassa/PuntoCassa$26.class deleted file mode 100644 index a7ab6d1..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$26.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$27.class b/out/production/Cassa/puntocassa/PuntoCassa$27.class deleted file mode 100644 index e9af33d..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$27.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$28.class b/out/production/Cassa/puntocassa/PuntoCassa$28.class deleted file mode 100644 index 7c3969a..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$28.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$29.class b/out/production/Cassa/puntocassa/PuntoCassa$29.class deleted file mode 100644 index 84e4aee..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$29.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$3.class b/out/production/Cassa/puntocassa/PuntoCassa$3.class deleted file mode 100644 index 5b08b31..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$3.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$30.class b/out/production/Cassa/puntocassa/PuntoCassa$30.class deleted file mode 100644 index d230202..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$30.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$31.class b/out/production/Cassa/puntocassa/PuntoCassa$31.class deleted file mode 100644 index 50f862f..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$31.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$32.class b/out/production/Cassa/puntocassa/PuntoCassa$32.class deleted file mode 100644 index 4439f49..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$32.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$33.class b/out/production/Cassa/puntocassa/PuntoCassa$33.class deleted file mode 100644 index cf546f8..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$33.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$34.class b/out/production/Cassa/puntocassa/PuntoCassa$34.class deleted file mode 100644 index f92cea0..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$34.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$35.class b/out/production/Cassa/puntocassa/PuntoCassa$35.class deleted file mode 100644 index e5b5f32..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$35.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$36.class b/out/production/Cassa/puntocassa/PuntoCassa$36.class deleted file mode 100644 index 12b4d4d..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$36.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$37.class b/out/production/Cassa/puntocassa/PuntoCassa$37.class deleted file mode 100644 index e387a71..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$37.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$38.class b/out/production/Cassa/puntocassa/PuntoCassa$38.class deleted file mode 100644 index faa2f36..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$38.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$4.class b/out/production/Cassa/puntocassa/PuntoCassa$4.class deleted file mode 100644 index a041835..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$4.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$5.class b/out/production/Cassa/puntocassa/PuntoCassa$5.class deleted file mode 100644 index c425900..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$5.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$6.class b/out/production/Cassa/puntocassa/PuntoCassa$6.class deleted file mode 100644 index 895c4df..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$6.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$7.class b/out/production/Cassa/puntocassa/PuntoCassa$7.class deleted file mode 100644 index 5addf45..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$7.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$8.class b/out/production/Cassa/puntocassa/PuntoCassa$8.class deleted file mode 100644 index 506ccd5..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$8.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$9.class b/out/production/Cassa/puntocassa/PuntoCassa$9.class deleted file mode 100644 index 183e0b4..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$9.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$ButtonCategoria.class b/out/production/Cassa/puntocassa/PuntoCassa$ButtonCategoria.class deleted file mode 100644 index 454abcd..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$ButtonCategoria.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$ButtonProdotto.class b/out/production/Cassa/puntocassa/PuntoCassa$ButtonProdotto.class deleted file mode 100644 index d0f3baf..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$ButtonProdotto.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$CardTask.class b/out/production/Cassa/puntocassa/PuntoCassa$CardTask.class deleted file mode 100644 index e422081..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$CardTask.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$MyCanvas.class b/out/production/Cassa/puntocassa/PuntoCassa$MyCanvas.class deleted file mode 100644 index a7b9bf8..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$MyCanvas.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$TimerDBConn.class b/out/production/Cassa/puntocassa/PuntoCassa$TimerDBConn.class deleted file mode 100644 index b49466c..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$TimerDBConn.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$statiCarta.class b/out/production/Cassa/puntocassa/PuntoCassa$statiCarta.class deleted file mode 100644 index 6bc9d7a..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa$statiCarta.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa.class b/out/production/Cassa/puntocassa/PuntoCassa.class deleted file mode 100644 index 673d6e4..0000000 Binary files a/out/production/Cassa/puntocassa/PuntoCassa.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/esci2.jpg b/out/production/Cassa/puntocassa/esci2.jpg deleted file mode 100644 index 10a0aeb..0000000 Binary files a/out/production/Cassa/puntocassa/esci2.jpg and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmCerca$1.class b/out/production/Cassa/puntocassa/frmCerca$1.class deleted file mode 100644 index 8f570e1..0000000 Binary files a/out/production/Cassa/puntocassa/frmCerca$1.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmCerca$10.class b/out/production/Cassa/puntocassa/frmCerca$10.class deleted file mode 100644 index 9e19ba8..0000000 Binary files a/out/production/Cassa/puntocassa/frmCerca$10.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmCerca$11.class b/out/production/Cassa/puntocassa/frmCerca$11.class deleted file mode 100644 index eaf06f3..0000000 Binary files a/out/production/Cassa/puntocassa/frmCerca$11.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmCerca$12.class b/out/production/Cassa/puntocassa/frmCerca$12.class deleted file mode 100644 index 0f829ab..0000000 Binary files a/out/production/Cassa/puntocassa/frmCerca$12.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmCerca$13.class b/out/production/Cassa/puntocassa/frmCerca$13.class deleted file mode 100644 index 194b45d..0000000 Binary files a/out/production/Cassa/puntocassa/frmCerca$13.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmCerca$14.class b/out/production/Cassa/puntocassa/frmCerca$14.class deleted file mode 100644 index f49b17c..0000000 Binary files a/out/production/Cassa/puntocassa/frmCerca$14.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmCerca$2.class b/out/production/Cassa/puntocassa/frmCerca$2.class deleted file mode 100644 index 61cb9b4..0000000 Binary files a/out/production/Cassa/puntocassa/frmCerca$2.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmCerca$3.class b/out/production/Cassa/puntocassa/frmCerca$3.class deleted file mode 100644 index 61adc7a..0000000 Binary files a/out/production/Cassa/puntocassa/frmCerca$3.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmCerca$4.class b/out/production/Cassa/puntocassa/frmCerca$4.class deleted file mode 100644 index fe6e660..0000000 Binary files a/out/production/Cassa/puntocassa/frmCerca$4.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmCerca$5.class b/out/production/Cassa/puntocassa/frmCerca$5.class deleted file mode 100644 index 5e16544..0000000 Binary files a/out/production/Cassa/puntocassa/frmCerca$5.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmCerca$6.class b/out/production/Cassa/puntocassa/frmCerca$6.class deleted file mode 100644 index 503cc9b..0000000 Binary files a/out/production/Cassa/puntocassa/frmCerca$6.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmCerca$7.class b/out/production/Cassa/puntocassa/frmCerca$7.class deleted file mode 100644 index b72b47a..0000000 Binary files a/out/production/Cassa/puntocassa/frmCerca$7.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmCerca$8.class b/out/production/Cassa/puntocassa/frmCerca$8.class deleted file mode 100644 index ce42f07..0000000 Binary files a/out/production/Cassa/puntocassa/frmCerca$8.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmCerca$9.class b/out/production/Cassa/puntocassa/frmCerca$9.class deleted file mode 100644 index e4dc653..0000000 Binary files a/out/production/Cassa/puntocassa/frmCerca$9.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmCerca.class b/out/production/Cassa/puntocassa/frmCerca.class deleted file mode 100644 index 4cb5041..0000000 Binary files a/out/production/Cassa/puntocassa/frmCerca.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmMeteo$1.class b/out/production/Cassa/puntocassa/frmMeteo$1.class deleted file mode 100644 index 5bc76aa..0000000 Binary files a/out/production/Cassa/puntocassa/frmMeteo$1.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmMeteo$2.class b/out/production/Cassa/puntocassa/frmMeteo$2.class deleted file mode 100644 index e73e771..0000000 Binary files a/out/production/Cassa/puntocassa/frmMeteo$2.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmMeteo$3.class b/out/production/Cassa/puntocassa/frmMeteo$3.class deleted file mode 100644 index 7facee8..0000000 Binary files a/out/production/Cassa/puntocassa/frmMeteo$3.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmMeteo.class b/out/production/Cassa/puntocassa/frmMeteo.class deleted file mode 100644 index 31a0190..0000000 Binary files a/out/production/Cassa/puntocassa/frmMeteo.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmMovimenti$1.class b/out/production/Cassa/puntocassa/frmMovimenti$1.class deleted file mode 100644 index e260458..0000000 Binary files a/out/production/Cassa/puntocassa/frmMovimenti$1.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmMovimenti$2.class b/out/production/Cassa/puntocassa/frmMovimenti$2.class deleted file mode 100644 index 6933ada..0000000 Binary files a/out/production/Cassa/puntocassa/frmMovimenti$2.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmMovimenti$3.class b/out/production/Cassa/puntocassa/frmMovimenti$3.class deleted file mode 100644 index 9487493..0000000 Binary files a/out/production/Cassa/puntocassa/frmMovimenti$3.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmMovimenti$4.class b/out/production/Cassa/puntocassa/frmMovimenti$4.class deleted file mode 100644 index 971cb3c..0000000 Binary files a/out/production/Cassa/puntocassa/frmMovimenti$4.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmMovimenti$5.class b/out/production/Cassa/puntocassa/frmMovimenti$5.class deleted file mode 100644 index 2a4e94a..0000000 Binary files a/out/production/Cassa/puntocassa/frmMovimenti$5.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmMovimenti.class b/out/production/Cassa/puntocassa/frmMovimenti.class deleted file mode 100644 index f3a40e1..0000000 Binary files a/out/production/Cassa/puntocassa/frmMovimenti.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$1.class b/out/production/Cassa/puntocassa/frmProdotti$1.class deleted file mode 100644 index 1b6cbec..0000000 Binary files a/out/production/Cassa/puntocassa/frmProdotti$1.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$10.class b/out/production/Cassa/puntocassa/frmProdotti$10.class deleted file mode 100644 index 43f6c03..0000000 Binary files a/out/production/Cassa/puntocassa/frmProdotti$10.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$11.class b/out/production/Cassa/puntocassa/frmProdotti$11.class deleted file mode 100644 index a6dce06..0000000 Binary files a/out/production/Cassa/puntocassa/frmProdotti$11.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$12.class b/out/production/Cassa/puntocassa/frmProdotti$12.class deleted file mode 100644 index 1915a48..0000000 Binary files a/out/production/Cassa/puntocassa/frmProdotti$12.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$13.class b/out/production/Cassa/puntocassa/frmProdotti$13.class deleted file mode 100644 index 8440c9f..0000000 Binary files a/out/production/Cassa/puntocassa/frmProdotti$13.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$2.class b/out/production/Cassa/puntocassa/frmProdotti$2.class deleted file mode 100644 index 0123824..0000000 Binary files a/out/production/Cassa/puntocassa/frmProdotti$2.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$3.class b/out/production/Cassa/puntocassa/frmProdotti$3.class deleted file mode 100644 index e502a82..0000000 Binary files a/out/production/Cassa/puntocassa/frmProdotti$3.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$4.class b/out/production/Cassa/puntocassa/frmProdotti$4.class deleted file mode 100644 index 11a87be..0000000 Binary files a/out/production/Cassa/puntocassa/frmProdotti$4.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$5.class b/out/production/Cassa/puntocassa/frmProdotti$5.class deleted file mode 100644 index 8eeea68..0000000 Binary files a/out/production/Cassa/puntocassa/frmProdotti$5.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$6.class b/out/production/Cassa/puntocassa/frmProdotti$6.class deleted file mode 100644 index e16577d..0000000 Binary files a/out/production/Cassa/puntocassa/frmProdotti$6.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$7.class b/out/production/Cassa/puntocassa/frmProdotti$7.class deleted file mode 100644 index 2cf7a7a..0000000 Binary files a/out/production/Cassa/puntocassa/frmProdotti$7.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$8.class b/out/production/Cassa/puntocassa/frmProdotti$8.class deleted file mode 100644 index 46baca9..0000000 Binary files a/out/production/Cassa/puntocassa/frmProdotti$8.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$9.class b/out/production/Cassa/puntocassa/frmProdotti$9.class deleted file mode 100644 index d8a3bf3..0000000 Binary files a/out/production/Cassa/puntocassa/frmProdotti$9.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmProdotti.class b/out/production/Cassa/puntocassa/frmProdotti.class deleted file mode 100644 index f390053..0000000 Binary files a/out/production/Cassa/puntocassa/frmProdotti.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmProgress$1.class b/out/production/Cassa/puntocassa/frmProgress$1.class deleted file mode 100644 index 49787fa..0000000 Binary files a/out/production/Cassa/puntocassa/frmProgress$1.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmProgress$2.class b/out/production/Cassa/puntocassa/frmProgress$2.class deleted file mode 100644 index 1ba2559..0000000 Binary files a/out/production/Cassa/puntocassa/frmProgress$2.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmProgress.class b/out/production/Cassa/puntocassa/frmProgress.class deleted file mode 100644 index 600c3ab..0000000 Binary files a/out/production/Cassa/puntocassa/frmProgress.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmStorno$1.class b/out/production/Cassa/puntocassa/frmStorno$1.class deleted file mode 100644 index f758363..0000000 Binary files a/out/production/Cassa/puntocassa/frmStorno$1.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmStorno$2.class b/out/production/Cassa/puntocassa/frmStorno$2.class deleted file mode 100644 index 0c3bb6e..0000000 Binary files a/out/production/Cassa/puntocassa/frmStorno$2.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmStorno$3.class b/out/production/Cassa/puntocassa/frmStorno$3.class deleted file mode 100644 index ebf3639..0000000 Binary files a/out/production/Cassa/puntocassa/frmStorno$3.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmStorno$4.class b/out/production/Cassa/puntocassa/frmStorno$4.class deleted file mode 100644 index 051b9d0..0000000 Binary files a/out/production/Cassa/puntocassa/frmStorno$4.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmStorno$5.class b/out/production/Cassa/puntocassa/frmStorno$5.class deleted file mode 100644 index a05b661..0000000 Binary files a/out/production/Cassa/puntocassa/frmStorno$5.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmStorno$6.class b/out/production/Cassa/puntocassa/frmStorno$6.class deleted file mode 100644 index 813da92..0000000 Binary files a/out/production/Cassa/puntocassa/frmStorno$6.class and /dev/null differ diff --git a/out/production/Cassa/puntocassa/frmStorno.class b/out/production/Cassa/puntocassa/frmStorno.class deleted file mode 100644 index dea1a3c..0000000 Binary files a/out/production/Cassa/puntocassa/frmStorno.class and /dev/null differ diff --git a/out/production/Cassa/risorse/Acqua minerale.jpg b/out/production/Cassa/risorse/Acqua minerale.jpg deleted file mode 100644 index 416cc55..0000000 Binary files a/out/production/Cassa/risorse/Acqua minerale.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/Brioche.jpg b/out/production/Cassa/risorse/Brioche.jpg deleted file mode 100644 index df3217e..0000000 Binary files a/out/production/Cassa/risorse/Brioche.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/Caffe.jpg b/out/production/Cassa/risorse/Caffe.jpg deleted file mode 100644 index 8615520..0000000 Binary files a/out/production/Cassa/risorse/Caffe.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/Cappuccino.jpg b/out/production/Cassa/risorse/Cappuccino.jpg deleted file mode 100644 index 89f67f8..0000000 Binary files a/out/production/Cassa/risorse/Cappuccino.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/Coca Cola lattina.jpg b/out/production/Cassa/risorse/Coca Cola lattina.jpg deleted file mode 100644 index 2f1da8e..0000000 Binary files a/out/production/Cassa/risorse/Coca Cola lattina.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/Frutta fresca.jpg b/out/production/Cassa/risorse/Frutta fresca.jpg deleted file mode 100644 index a303980..0000000 Binary files a/out/production/Cassa/risorse/Frutta fresca.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/Hamburger.jpg b/out/production/Cassa/risorse/Hamburger.jpg deleted file mode 100644 index 71e7a92..0000000 Binary files a/out/production/Cassa/risorse/Hamburger.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/Insalata nizzarda.jpg b/out/production/Cassa/risorse/Insalata nizzarda.jpg deleted file mode 100644 index 42891cb..0000000 Binary files a/out/production/Cassa/risorse/Insalata nizzarda.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/Insalata verde.jpg b/out/production/Cassa/risorse/Insalata verde.jpg deleted file mode 100644 index 78fa2b3..0000000 Binary files a/out/production/Cassa/risorse/Insalata verde.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/Logo.ico b/out/production/Cassa/risorse/Logo.ico deleted file mode 100644 index 2828b6c..0000000 Binary files a/out/production/Cassa/risorse/Logo.ico and /dev/null differ diff --git a/out/production/Cassa/risorse/Menu colazione.jpg b/out/production/Cassa/risorse/Menu colazione.jpg deleted file mode 100644 index 0d643b5..0000000 Binary files a/out/production/Cassa/risorse/Menu colazione.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/Menu completo.jpg b/out/production/Cassa/risorse/Menu completo.jpg deleted file mode 100644 index 92417af..0000000 Binary files a/out/production/Cassa/risorse/Menu completo.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/Menu ridotto.jpg b/out/production/Cassa/risorse/Menu ridotto.jpg deleted file mode 100644 index a696599..0000000 Binary files a/out/production/Cassa/risorse/Menu ridotto.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/Movimenti.jpg b/out/production/Cassa/risorse/Movimenti.jpg deleted file mode 100644 index 069bfeb..0000000 Binary files a/out/production/Cassa/risorse/Movimenti.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/Movimenti.png b/out/production/Cassa/risorse/Movimenti.png deleted file mode 100644 index 6d3773f..0000000 Binary files a/out/production/Cassa/risorse/Movimenti.png and /dev/null differ diff --git a/out/production/Cassa/risorse/Omelette.jpg b/out/production/Cassa/risorse/Omelette.jpg deleted file mode 100644 index afe6bb4..0000000 Binary files a/out/production/Cassa/risorse/Omelette.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/Pasta al ragu.jpg b/out/production/Cassa/risorse/Pasta al ragu.jpg deleted file mode 100644 index 13e469b..0000000 Binary files a/out/production/Cassa/risorse/Pasta al ragu.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/Pasta fredda.jpg b/out/production/Cassa/risorse/Pasta fredda.jpg deleted file mode 100644 index 8216fae..0000000 Binary files a/out/production/Cassa/risorse/Pasta fredda.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/Prosciutto crudo.jpg b/out/production/Cassa/risorse/Prosciutto crudo.jpg deleted file mode 100644 index 228779e..0000000 Binary files a/out/production/Cassa/risorse/Prosciutto crudo.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/Risotto.jpg b/out/production/Cassa/risorse/Risotto.jpg deleted file mode 100644 index 0308f6e..0000000 Binary files a/out/production/Cassa/risorse/Risotto.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/Spremuta arancia.jpg b/out/production/Cassa/risorse/Spremuta arancia.jpg deleted file mode 100644 index 87593ea..0000000 Binary files a/out/production/Cassa/risorse/Spremuta arancia.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/Thumbs.db b/out/production/Cassa/risorse/Thumbs.db deleted file mode 100644 index 4ad42a6..0000000 Binary files a/out/production/Cassa/risorse/Thumbs.db and /dev/null differ diff --git a/out/production/Cassa/risorse/Tiramisu.jpg b/out/production/Cassa/risorse/Tiramisu.jpg deleted file mode 100644 index db5f013..0000000 Binary files a/out/production/Cassa/risorse/Tiramisu.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/Vetrino.jpg b/out/production/Cassa/risorse/Vetrino.jpg deleted file mode 100644 index eab164e..0000000 Binary files a/out/production/Cassa/risorse/Vetrino.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/a scalare.png b/out/production/Cassa/risorse/a scalare.png deleted file mode 100644 index f5400ee..0000000 Binary files a/out/production/Cassa/risorse/a scalare.png and /dev/null differ diff --git a/out/production/Cassa/risorse/coltello e forchetta.jpg b/out/production/Cassa/risorse/coltello e forchetta.jpg deleted file mode 100644 index 235b635..0000000 Binary files a/out/production/Cassa/risorse/coltello e forchetta.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/contanti.png b/out/production/Cassa/risorse/contanti.png deleted file mode 100644 index ad3f601..0000000 Binary files a/out/production/Cassa/risorse/contanti.png and /dev/null differ diff --git a/out/production/Cassa/risorse/da asporto.jpg b/out/production/Cassa/risorse/da asporto.jpg deleted file mode 100644 index 033b098..0000000 Binary files a/out/production/Cassa/risorse/da asporto.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/db.png b/out/production/Cassa/risorse/db.png deleted file mode 100644 index 08708f3..0000000 Binary files a/out/production/Cassa/risorse/db.png and /dev/null differ diff --git a/out/production/Cassa/risorse/differito.jpg b/out/production/Cassa/risorse/differito.jpg deleted file mode 100644 index 59b3f23..0000000 Binary files a/out/production/Cassa/risorse/differito.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/differito.png b/out/production/Cassa/risorse/differito.png deleted file mode 100644 index 902bca9..0000000 Binary files a/out/production/Cassa/risorse/differito.png and /dev/null differ diff --git a/out/production/Cassa/risorse/esci.jpg b/out/production/Cassa/risorse/esci.jpg deleted file mode 100644 index 69febe7..0000000 Binary files a/out/production/Cassa/risorse/esci.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/esci2.jpg b/out/production/Cassa/risorse/esci2.jpg deleted file mode 100644 index 10a0aeb..0000000 Binary files a/out/production/Cassa/risorse/esci2.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/freccia_down.jpg b/out/production/Cassa/risorse/freccia_down.jpg deleted file mode 100644 index b5a8964..0000000 Binary files a/out/production/Cassa/risorse/freccia_down.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/freccia_dx.jpg b/out/production/Cassa/risorse/freccia_dx.jpg deleted file mode 100644 index a3bfff1..0000000 Binary files a/out/production/Cassa/risorse/freccia_dx.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/freccia_sx.jpg b/out/production/Cassa/risorse/freccia_sx.jpg deleted file mode 100644 index 8845cfb..0000000 Binary files a/out/production/Cassa/risorse/freccia_sx.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/freccia_up.jpg b/out/production/Cassa/risorse/freccia_up.jpg deleted file mode 100644 index bfbd19a..0000000 Binary files a/out/production/Cassa/risorse/freccia_up.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/fulmine.jpg b/out/production/Cassa/risorse/fulmine.jpg deleted file mode 100644 index 76a0929..0000000 Binary files a/out/production/Cassa/risorse/fulmine.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/fulmine.png b/out/production/Cassa/risorse/fulmine.png deleted file mode 100644 index d9f3bd6..0000000 Binary files a/out/production/Cassa/risorse/fulmine.png and /dev/null differ diff --git a/out/production/Cassa/risorse/giù.png b/out/production/Cassa/risorse/giù.png deleted file mode 100644 index 3e35679..0000000 Binary files a/out/production/Cassa/risorse/giù.png and /dev/null differ diff --git a/out/production/Cassa/risorse/logo (1).png b/out/production/Cassa/risorse/logo (1).png deleted file mode 100644 index 1eea74d..0000000 Binary files a/out/production/Cassa/risorse/logo (1).png and /dev/null differ diff --git a/out/production/Cassa/risorse/logo.png b/out/production/Cassa/risorse/logo.png deleted file mode 100644 index 500ce11..0000000 Binary files a/out/production/Cassa/risorse/logo.png and /dev/null differ diff --git a/out/production/Cassa/risorse/logoStampa.jpg b/out/production/Cassa/risorse/logoStampa.jpg deleted file mode 100644 index 005ba66..0000000 Binary files a/out/production/Cassa/risorse/logoStampa.jpg and /dev/null differ diff --git a/out/production/Cassa/risorse/meteo.png b/out/production/Cassa/risorse/meteo.png deleted file mode 100644 index 17ed983..0000000 Binary files a/out/production/Cassa/risorse/meteo.png and /dev/null differ diff --git a/out/production/Cassa/risorse/print.png b/out/production/Cassa/risorse/print.png deleted file mode 100644 index 42999cc..0000000 Binary files a/out/production/Cassa/risorse/print.png and /dev/null differ diff --git a/out/production/Cassa/risorse/prodotti.png b/out/production/Cassa/risorse/prodotti.png deleted file mode 100644 index 3ba74d2..0000000 Binary files a/out/production/Cassa/risorse/prodotti.png and /dev/null differ diff --git a/out/production/Cassa/risorse/puntocassa (2).xml b/out/production/Cassa/risorse/puntocassa (2).xml deleted file mode 100644 index dc32e9a..0000000 --- a/out/production/Cassa/risorse/puntocassa (2).xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - NO - MySQL - com.mysql.jdbc.Driver - localhost - 3306 - sir - sir - sir - - - SI - Oracle - oracle.jdbc.driver.OracleDriver - localhost - 1521 - xe - SIR_CASSA - sir_cassa - - - ..\risorse\ - E:\Lavoro\Goffredo\Cassa\dist\Cassa.jar - - - SIR - Sistema Informativo della Ristorazione: Punto Cassa - - - - 1024 - 700 - 20 - 150 - 150 - SI - - - NO - - DSU TOSCANA - SIR - diff --git a/out/production/Cassa/risorse/puntocassa - Copia.xml b/out/production/Cassa/risorse/puntocassa - Copia.xml deleted file mode 100644 index 308d9a4..0000000 --- a/out/production/Cassa/risorse/puntocassa - Copia.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - NO - MySQL - com.mysql.jdbc.Driver - localhost - 3306 - sir - sir - sir - - - SI - Oracle - oracle.jdbc.driver.OracleDriver - marco-nbacer - 1521 - XE - SIR_CASSA - sir_cassa - - - L:\Lavoro\Goffredo\risorse\ - - - SIR - Sistema Informativo della Ristorazione: Punto Cassa 123 - - - 1024 - 700 - - 123 - diff --git a/out/production/Cassa/risorse/puntocassa.xml b/out/production/Cassa/risorse/puntocassa.xml deleted file mode 100644 index dc32e9a..0000000 --- a/out/production/Cassa/risorse/puntocassa.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - NO - MySQL - com.mysql.jdbc.Driver - localhost - 3306 - sir - sir - sir - - - SI - Oracle - oracle.jdbc.driver.OracleDriver - localhost - 1521 - xe - SIR_CASSA - sir_cassa - - - ..\risorse\ - E:\Lavoro\Goffredo\Cassa\dist\Cassa.jar - - - SIR - Sistema Informativo della Ristorazione: Punto Cassa - - - - 1024 - 700 - 20 - 150 - 150 - SI - - - NO - - DSU TOSCANA - SIR - diff --git a/out/production/Cassa/risorse/puntocassaGF.xml b/out/production/Cassa/risorse/puntocassaGF.xml deleted file mode 100644 index e5bac86..0000000 --- a/out/production/Cassa/risorse/puntocassaGF.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - NO - MySQL - com.mysql.jdbc.Driver - localhost - 3306 - sir - sir - sir - - - SI - Oracle - oracle.jdbc.driver.OracleDriver - XP_TEST - 1521 - XE - SIR_CASSA - sir_cassa - - - L:\Lavoro\Goffredo\risorse\ - - - SIR - Sistema Informativo della Ristorazione: Punto Cassa 123 - - - 1024 - 700 - 20 - 150 - 150 - - 1 - diff --git a/out/production/Cassa/risorse/storno.png b/out/production/Cassa/risorse/storno.png deleted file mode 100644 index a7071da..0000000 Binary files a/out/production/Cassa/risorse/storno.png and /dev/null differ diff --git a/out/production/Cassa/risorse/ticket.png b/out/production/Cassa/risorse/ticket.png deleted file mode 100644 index 00b3125..0000000 Binary files a/out/production/Cassa/risorse/ticket.png and /dev/null differ diff --git a/out/production/Cassa/risorse/ticket2.png b/out/production/Cassa/risorse/ticket2.png deleted file mode 100644 index f2759b1..0000000 Binary files a/out/production/Cassa/risorse/ticket2.png and /dev/null differ diff --git a/out/production/Cassa/risorse/tsn.png b/out/production/Cassa/risorse/tsn.png deleted file mode 100644 index cc35a2e..0000000 Binary files a/out/production/Cassa/risorse/tsn.png and /dev/null differ diff --git a/risorse/puntocassa.xml b/risorse/puntocassa.xml index 7743ba8..ae9b165 100644 --- a/risorse/puntocassa.xml +++ b/risorse/puntocassa.xml @@ -21,7 +21,7 @@ cGhYYXVGVU0yUVRhckZHZHlsMmM= - SI + NO Oracle oracle.jdbc.driver.OracleDriver 192.168.20.101 @@ -30,6 +30,16 @@ SIR_CASSA cGhYYXVGVU0yUVRhckZHZHlsMmM= + + SI + Oracle + oracle.jdbc.driver.OracleDriver + 192.168.20.137 + 1521 + XE + SIR_CASSA + cGhYYXVGVU0yUVRhckZHZHlsMmM= + NO Oracle @@ -61,8 +71,9 @@ 1024 700 - 20 + 15 150 + 40 150 SI diff --git a/src/puntocassa/FrmCerca.form b/src/puntocassa/FrmCerca.form new file mode 100644 index 0000000..86492e5 --- /dev/null +++ b/src/puntocassa/FrmCerca.form @@ -0,0 +1,269 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/puntocassa/FrmCerca.java b/src/puntocassa/FrmCerca.java new file mode 100644 index 0000000..587fb20 --- /dev/null +++ b/src/puntocassa/FrmCerca.java @@ -0,0 +1,775 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package puntocassa; + +import java.awt.Color; +import java.awt.Font; +import java.awt.Image; +import java.awt.Rectangle; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.io.File; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import javax.swing.ImageIcon; +import javax.swing.JOptionPane; +import javax.swing.JTable; +import javax.swing.JTextField; +import javax.swing.ListSelectionModel; +import javax.swing.table.TableColumn; +import puntocassa.utils.Utils; + +/** + * + * @author Marco + */ +public class FrmCerca extends javax.swing.JFrame { + +private PuntoCassa frmPuntoCassa; +private JTextField jtxtTessera; + + public int HFont=15; + private int AltControlli=100; + private int LargControlli=100; + private int AltRigaGriglia=0; + private String BP=""; + private Boolean FlagMostraDataNascita=true; + private Boolean DisabilitaPerBuono=false; + + /** + * Creates new form frm + */ + public FrmCerca(PuntoCassa frm,JTextField jtxtT,String imgPath,String BuoniPasto,Boolean flagMostraDataNascita) { + BP=BuoniPasto; + frmPuntoCassa=frm; + frmPuntoCassa.setEnabled(false); + frmPuntoCassa.addRemoveKeyDispatcher(false); + //KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(frmPuntoCassa.keyDispatcher); +// FlagMostraDataNascita=flagMostraDataNascita; + jtxtTessera=jtxtT; + initComponents(); + String startDir = System.getProperty("user.dir"); + File IconaApp = new File(startDir + "/risorse/logo.png"); + if (IconaApp.exists()) { + + ImageIcon icon = new ImageIcon(startDir + "/risorse/logo.png"); + this.setIconImage(icon.getImage()); + } + + ImageIcon icon = new ImageIcon(imgPath +"freccia_down.jpg"); + Image img = icon.getImage() ; + Image newimg = img.getScaledInstance(50,50,java.awt.Image.SCALE_SMOOTH ) ; + icon = new ImageIcon(newimg); + jbtnGiu.setIcon(icon); + + ImageIcon icon2 = new ImageIcon(imgPath +"freccia_up.jpg"); + Image img2 = icon2.getImage() ; + Image newimg2 = img2.getScaledInstance(50,50,java.awt.Image.SCALE_SMOOTH ) ; + icon2 = new ImageIcon(newimg2); + jbtnSu.setIcon(icon2); + + // -------------------------------------------------------------------- + // ** creo evento click jTblStudenti + // -------------------------------------------------------------------- + jTblStudenti.addMouseListener(new MouseAdapter() { + public void mouseClicked(MouseEvent e) { + + if (e.getClickCount() == 1) { + //JTable target = (JTable) e.getSource(); + //int row = target.getSelectedRow(); + //int column = target.getSelectedColumn(); + jBtnOKActionPerformed(null); + } + } + }); + + if (BuoniPasto.length()<=0){ + CercaValoriDefault(); + }else{ + //jtxtCognome.requestFocus(); + //jtxtCognome.setBackground(Color.yellow); + DisabilitaPerBuono=true; + + jtxtCognome.setText(BuoniPasto); + Cerca(); + Disabilita(); + } + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + pnl1 = new javax.swing.JPanel(); + lblCF = new javax.swing.JLabel(); + lblNome = new javax.swing.JLabel(); + lblCognome = new javax.swing.JLabel(); + jBtnCerca = new javax.swing.JButton(); + jScrollPane3 = new javax.swing.JScrollPane(); + jTblStudenti = new javax.swing.JTable(); + jtxtCognome = new javax.swing.JTextField(); + jtxtNome = new javax.swing.JTextField(); + jbtnAnnulla = new javax.swing.JButton(); + jLblTitolo = new javax.swing.JLabel(); + jtxtNumTessera = new javax.swing.JTextField(); + jBtnOK = new javax.swing.JButton(); + jbtnSu = new javax.swing.JButton(); + jbtnGiu = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setTitle("Cerca Tessera Attiva"); + addWindowListener(new java.awt.event.WindowAdapter() { + public void windowClosed(java.awt.event.WindowEvent evt) { + formWindowClosed(evt); + } + }); + + lblCF.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + lblCF.setText("Num. Tessera:"); + + lblNome.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + lblNome.setText("Nome:"); + + lblCognome.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + lblCognome.setText("Cognome:"); + + jBtnCerca.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jBtnCerca.setText("Cerca"); + jBtnCerca.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtnCercaActionPerformed(evt); + } + }); + + jTblStudenti.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + jTblStudenti.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + {}, + {}, + {}, + {} + }, + new String [] { + + } + )); + jScrollPane3.setViewportView(jTblStudenti); + + jtxtCognome.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jtxtCognome.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jtxtCognomeFocusGained(evt); + } + }); + jtxtCognome.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jtxtCognomeMouseClicked(evt); + } + }); + + jtxtNome.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jtxtNome.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jtxtNomeFocusGained(evt); + } + }); + jtxtNome.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jtxtNomeMouseClicked(evt); + } + }); + + jbtnAnnulla.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jbtnAnnulla.setText("Annulla"); + jbtnAnnulla.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnAnnullaActionPerformed(evt); + } + }); + + jLblTitolo.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLblTitolo.setForeground(new java.awt.Color(255, 0, 0)); + jLblTitolo.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + jLblTitolo.setText("Cerca Tessera Attiva"); + + jtxtNumTessera.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jtxtNumTessera.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jtxtNumTesseraFocusGained(evt); + } + }); + jtxtNumTessera.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jtxtNumTesseraMouseClicked(evt); + } + }); + + jBtnOK.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jBtnOK.setText("OK"); + jBtnOK.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtnOKActionPerformed(evt); + } + }); + + jbtnSu.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnSuActionPerformed(evt); + } + }); + + jbtnGiu.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnGiuActionPerformed(evt); + } + }); + + javax.swing.GroupLayout pnl1Layout = new javax.swing.GroupLayout(pnl1); + pnl1.setLayout(pnl1Layout); + pnl1Layout.setHorizontalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addComponent(jLblTitolo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(256, 256, 256)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jtxtCognome, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(lblCognome)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lblNome) + .addComponent(jtxtNome, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(lblCF) + .addContainerGap()) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jtxtNumTessera, javax.swing.GroupLayout.PREFERRED_SIZE, 176, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jBtnCerca, javax.swing.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jbtnAnnulla, javax.swing.GroupLayout.DEFAULT_SIZE, 135, Short.MAX_VALUE)))) + .addComponent(jBtnOK, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jScrollPane3) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jbtnSu, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jbtnGiu, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))) + ); + pnl1Layout.setVerticalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addComponent(jLblTitolo, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lblCognome) + .addComponent(lblNome) + .addComponent(lblCF)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jtxtNumTessera, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jBtnCerca, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jbtnAnnulla, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(jtxtNome, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jtxtCognome, javax.swing.GroupLayout.Alignment.TRAILING)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jbtnSu, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jbtnGiu, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 50, Short.MAX_VALUE))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jBtnOK, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 845, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGap(6, 6, 6) + .addComponent(pnl1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap())) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 322, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(pnl1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap())) + ); + + pack(); + }// //GEN-END:initComponents + + private void jtxtNumTesseraFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jtxtNumTesseraFocusGained + if (DisabilitaPerBuono==false){ + Tastiera(evt); + jtxtNumTessera.setBackground(Color.yellow); + jtxtNome.setBackground(Color.white); + jtxtCognome.setBackground(Color.white); + } +// MyApplication MyA = new MyApplication(); +// if (MyA.TastieraVideo) { +// if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { +// MyA.UltimoTxt = " "; +// } else { +// MyA.UltimoTxt = evt.getComponent().toString(); +// Tastiera((JTextField) evt.getComponent(), 0, 0); +// } +// } + }//GEN-LAST:event_jtxtNumTesseraFocusGained + + private void jbtnAnnullaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnAnnullaActionPerformed +// ClearTable((MyTableModel)jTblStudenti.getModel()); + + //frmPuntoCassa.setEnabled(true); + //frmPuntoCassa=null; + this.dispose(); + + }//GEN-LAST:event_jbtnAnnullaActionPerformed + private void ClearTable(MyTableModel model) { + try { + for (Integer i = model.getRowCount() - 1; i >= 0; i--) { + model.deleteRow(i); + } + } catch (Exception e) { + } + } + private void Tastiera(JTextField jTxt,Integer MyX,Integer MyY){ + if (DisabilitaPerBuono==false){ + MyKeyBoard myk=new MyKeyBoard(this,true); + myk.txt=jTxt; + myk.parent=this; + Rectangle s=this.getBounds(); + Rectangle s2=jTxt.getBounds(); + Integer l=s.x+s2.x+MyX; + if(l+800>s.x+s.width){l=s.x+s.width-800;} + myk.setBounds(l,s.y+s2.y+60+MyY, 800, 300); + myk.setVisible(true); + } + + } + private void jtxtNomeFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jtxtNomeFocusGained + Tastiera(evt); + jtxtNome.setBackground(Color.yellow); + jtxtNumTessera.setBackground(Color.white); + jtxtCognome.setBackground(Color.white); +// MyApplication MyA = new MyApplication(); +// if (MyA.TastieraVideo) { +// if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { +// MyA.UltimoTxt = " "; +// } else { +// MyA.UltimoTxt = evt.getComponent().toString(); +// Tastiera((JTextField) evt.getComponent(), 0, 0); +// } +// } + }//GEN-LAST:event_jtxtNomeFocusGained + + private void jtxtCognomeFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jtxtCognomeFocusGained + if(BP.length()<=0){ + Tastiera(evt); + } + jtxtCognome.setBackground(Color.yellow); + + jtxtNumTessera.setBackground(Color.white); + jtxtNome.setBackground(Color.white); +// MyApplication MyA = new MyApplication(); +// if (MyA.TastieraVideo) { +// System.out.print("jtxtCognomeFocusGained:" + evt.getComponent().toString()); +// if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { +// MyA.UltimoTxt = " "; +// } else { +// MyA.UltimoTxt = evt.getComponent().toString(); +// Tastiera((JTextField) evt.getComponent(), 0, 0); +// } +// } + }//GEN-LAST:event_jtxtCognomeFocusGained + + private void jBtnCercaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnCercaActionPerformed + Cerca(); + }//GEN-LAST:event_jBtnCercaActionPerformed + public void Cerca() { + if (jtxtCognome.getText().trim().length() <= 0 && jtxtNome.getText().trim().length() <= 0 && jtxtNumTessera.getText().trim().length() <= 0) { + JOptionPane.showMessageDialog(this, "Inserire Cognome o Nome o Numero Tessera!", "Attenzione", JOptionPane.INFORMATION_MESSAGE); + return; + } + + Aggiorna(); + + } + private void Disabilita(){ + jtxtCognome.setEnabled(false); + jtxtNome.setEnabled(false); + jtxtNumTessera.setEnabled(false); + jBtnCerca.setEnabled(false); + jBtnOK.requestFocus(); + } + private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed + try{ + frmPuntoCassa.setEnabled(true); + frmPuntoCassa.addRemoveKeyDispatcher(true); + //KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(frmPuntoCassa.keyDispatcher); + frmPuntoCassa.toFront(); + frmPuntoCassa.repaint(); + frmPuntoCassa=null; + this.dispose(); + }catch(Exception ex){} + }//GEN-LAST:event_formWindowClosed + + private void jBtnOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnOKActionPerformed + if (jTblStudenti.getSelectedRow() >= 0 ) { + MyTableModel model = new MyTableModel(); + model = (MyTableModel) jTblStudenti.getModel(); + String nTessera = model.getValueAt(jTblStudenti.getSelectedRow(), 4).toString(); + + jtxtTessera.setText(nTessera); + this.dispose(); + frmPuntoCassa.cercaTessera(); + + } + + }//GEN-LAST:event_jBtnOKActionPerformed + + private void jbtnSuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnSuActionPerformed + // TODO add your handling code here: + if(jTblStudenti.getSelectedRow()>0){ + jTblStudenti.setRowSelectionInterval(jTblStudenti.getSelectedRow()-1, jTblStudenti.getSelectedRow()-1); + jTblStudenti.scrollRectToVisible(new Rectangle(jTblStudenti.getCellRect(jTblStudenti.getSelectedRow(), 0, true))); + } + }//GEN-LAST:event_jbtnSuActionPerformed + + private void jbtnGiuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnGiuActionPerformed + // TODO add your handling code here: + if(jTblStudenti.getSelectedRow()0){Where=Where + " and UPPER(Utenti.Cognome) like '" + jtxtCognome.getText().trim().toUpperCase().replace("'", "''") + "%' ";} + if (jtxtNome.getText().trim().length()>0) {Where=Where + " and UPPER(Utenti.Nome) like '" + jtxtNome.getText().trim().toUpperCase().replace("'", "''") + "%'"; } + if (jtxtNumTessera.getText().trim().length()>0) {Where=Where + " and UPPER(Tessere.Numero) like '" + jtxtNumTessera.getText().trim().toUpperCase().replace("'", "''") + "%'"; } + String[] Col = {"id","Cognome","Nome","Data di Nascita","Tessera","Data Scadenza", "Fascia"}; + String[] ColType = {"long", "text","text","data","text","data","text"}; + String QueryCount="Select count(*) as righe " + From + Where; + QueryDati("select UTENTI.id, UTENTI.Cognome, Utenti.Nome, Utenti.Data_Di_Nascita, Tessere.Numero as Tessera, Tessere.Data_Scadenza, Fasce.Nome as Fascia " + From + Where + " order by Cognome,Nome", QueryCount, Col, ColType, jTblStudenti, false); + + //jTblStudenti.getColumn("Drawing").setPreferredWidth(200); + + + + Font f=new Font("Tahoma",0,20); + jTblStudenti.setFont(f); + if(AltRigaGriglia==0){AltRigaGriglia=jTblStudenti.getRowHeight();} +// txtUsername.setSize(CalcolaLarghezzaAltezza(txtUsername.getWidth(),LargControlli), CalcolaLarghezzaAltezza(txtUsername.getHeight(),AltControlli)); + + jTblStudenti.setRowHeight(25); + + //ClearTable((MyTableModel)jTblTessere.getModel()); + + if (jTblStudenti.getRowCount() > 0) { + jTblStudenti.setRowSelectionInterval(0, 0); + + } + ///AggiornaTessera(0); + + + } catch (Exception e) { + } + } + private Integer CalcolaLarghezzaAltezza(Integer LarControllo,Integer Percentuale){ + Integer D = Percentuale - 100; + if (D == 0) { + return LarControllo; + } else { + Integer N = LarControllo + ((LarControllo * D) / 100); + return N; + } + + } + public Object[][] RowData(String Query, String[] Cols, String[] ColType, int rowCount) { + Object[][] rows = null; + try { + Connection dbConnection = DriverManager.getConnection(frmPuntoCassa.dbStringa, frmPuntoCassa.dbUsername, frmPuntoCassa.dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + rows = new Object[rowCount][]; + int r = 0; + while (rs.next()) { + Object[] row = new Object[Cols.length]; + for (int i = 0; i < Cols.length; i++) { + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + switch (ColType[i]) { + case "text": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + break; + case "integer": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0; + } else { + row[i] = rs.getInt(Cols[i].replace(" ", "_")); + } + break; + case "long": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0; + } else { + row[i] = rs.getLong(Cols[i].replace(" ", "_")); + } + break; + case "boolean": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = false; + } else { + row[i] = rs.getBoolean(Cols[i].replace(" ", "_")); + } + break; + case "float": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0.00; + } else { + String v = rs.getString(Cols[i].replace(" ", "_")); + + row[i] = Float.parseFloat(v.replace(",", ".")); + } + + break; + + case "data": + row[i] = ""; + if (rs.getString(Cols[i].replace(" ", "_")) != null) { +// Date d = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss",Locale.ITALY).parse(rs.getString(Cols[i])); + //SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + String[] d= rs.getString(Cols[i].replace(" ", "_")).split("-"); + if (d.length>=3){ + row[i] = d[2].trim().substring(0, 2) + "/" + d[1] + "/" + d[0]; + } + } + + break; + } + + } + rows[r] = row; + r++; + /*int id = rs.getInt("id"); + String name = rs.getString("name"); + int age = rs.getInt("age"); + String address = rs.getString("address"); + float salary = rs.getFloat("salary");*/ + + } + rs.close(); + st.close(); + dbConnection.close(); + + } catch (SQLException | NumberFormatException e) { + System.err.println(e.getClass().getName() + ": " + e.getMessage()); + } finally { + + return rows; + } + + } + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + // + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(FrmCerca.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(FrmCerca.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(FrmCerca.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(FrmCerca.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + // + // + // + // + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new FrmCerca(null,null,null,null,true).setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBtnCerca; + private javax.swing.JButton jBtnOK; + private javax.swing.JLabel jLblTitolo; + private javax.swing.JScrollPane jScrollPane3; + private javax.swing.JTable jTblStudenti; + private javax.swing.JButton jbtnAnnulla; + private javax.swing.JButton jbtnGiu; + private javax.swing.JButton jbtnSu; + private javax.swing.JTextField jtxtCognome; + private javax.swing.JTextField jtxtNome; + private javax.swing.JTextField jtxtNumTessera; + private javax.swing.JLabel lblCF; + private javax.swing.JLabel lblCognome; + private javax.swing.JLabel lblNome; + private javax.swing.JPanel pnl1; + // End of variables declaration//GEN-END:variables + + private void CercaValoriDefault() { + try { + MyApplication MyA = new MyApplication(); + String txtbox = Utils.mySelect("Select Valore from PARAMETRI where chiave='ImpostaTesseraCampo'", "Valore", frmPuntoCassa); + String txtboxValore = Utils.mySelect("Select Valore from PARAMETRI where chiave='ImpostaTesseraStringa'", "Valore", frmPuntoCassa); + + if (txtbox.equalsIgnoreCase("COGNOME")) { + jtxtCognome.requestFocus(); + jtxtCognome.setBackground(Color.yellow); + jtxtCognome.setText(txtboxValore); + } + if (txtbox.equalsIgnoreCase("NOME")) { + jtxtNome.requestFocus(); + jtxtNome.setBackground(Color.yellow); + jtxtNome.setText(txtboxValore); + } + if (txtbox.equalsIgnoreCase("TESSERA")) { + jtxtNumTessera.requestFocus(); + jtxtNumTessera.setBackground(Color.yellow); + jtxtNumTessera.setText(txtboxValore); + } + } catch (Exception ex) { + JOptionPane.showMessageDialog(this, ex.getMessage()); + } + } +} diff --git a/src/puntocassa/FrmMeteo.form b/src/puntocassa/FrmMeteo.form new file mode 100644 index 0000000..fadae41 --- /dev/null +++ b/src/puntocassa/FrmMeteo.form @@ -0,0 +1,99 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/puntocassa/FrmMeteo.java b/src/puntocassa/FrmMeteo.java new file mode 100644 index 0000000..281f2d3 --- /dev/null +++ b/src/puntocassa/FrmMeteo.java @@ -0,0 +1,405 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package puntocassa; + +import java.awt.Font; +import java.awt.Rectangle; +import java.io.File; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.text.SimpleDateFormat; +import java.util.Date; +import javax.swing.ImageIcon; +import javax.swing.JComboBox; +import javax.swing.JOptionPane; +import javax.swing.JTable; +import javax.swing.JTextField; +import javax.swing.ListSelectionModel; +import javax.swing.table.TableColumn; +import puntocassa.utils.Utils; + +/** + * + * @author Marco + */ +public class FrmMeteo extends javax.swing.JFrame { + + private PuntoCassa frmPuntoCassa; + private Long idPuntoCassa=0L; + private Boolean Inserimento=false; + public int HFont=15; + private int AltControlli=100; + private int LargControlli=100; + private int AltRigaGriglia=0; + + /** + * Creates new form frm + */ + public FrmMeteo(PuntoCassa frm, Long id_Punto_Cassa,Boolean Nuovo) { + + frmPuntoCassa=frm; + frmPuntoCassa.setEnabled(false); + //KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(frmPuntoCassa.keyDispatcher); + frmPuntoCassa.addRemoveKeyDispatcher(false); + idPuntoCassa=id_Punto_Cassa; + Inserimento=Nuovo; + initComponents(); + String startDir = System.getProperty("user.dir"); + File IconaApp = new File(startDir + "/risorse/logo.png"); + if (IconaApp.exists()) { + + ImageIcon icon = new ImageIcon(startDir + "/risorse/logo.png"); + this.setIconImage(icon.getImage()); + } + CaricaCombo("Select nome,id from condizioni_meteo order by nome", "nome", "id", jCmbCat); + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + pnl1 = new javax.swing.JPanel(); + jBtnAggiorna = new javax.swing.JButton(); + jCmbCat = new javax.swing.JComboBox(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setTitle("Aggiorna condizioni Meteo"); + addWindowListener(new java.awt.event.WindowAdapter() { + public void windowClosed(java.awt.event.WindowEvent evt) { + formWindowClosed(evt); + } + }); + + jBtnAggiorna.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + jBtnAggiorna.setText("Aggiorna"); + jBtnAggiorna.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtnAggiornaActionPerformed(evt); + } + }); + + jCmbCat.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + jCmbCat.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); + + javax.swing.GroupLayout pnl1Layout = new javax.swing.GroupLayout(pnl1); + pnl1.setLayout(pnl1Layout); + pnl1Layout.setHorizontalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jCmbCat, 0, 238, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jBtnAggiorna, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(6, 6, 6)) + ); + pnl1Layout.setVerticalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jCmbCat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jBtnAggiorna)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(pnl1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(pnl1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + + pack(); + }// //GEN-END:initComponents + private void ClearTable(MyTableModel model) { + try { + for (Integer i = model.getRowCount() - 1; i >= 0; i--) { + model.deleteRow(i); + } + } catch (Exception e) { + } + } + private void Tastiera(JTextField jTxt,Integer MyX,Integer MyY){ + + MyKeyBoard myk=new MyKeyBoard(this,false); + myk.txt=jTxt; + myk.parent=this; + Rectangle s=this.getBounds(); + Rectangle s2=jTxt.getBounds(); + Integer l=s.x+s2.x+MyX; + if(l+800>s.x+s.width){l=s.x+s.width-800;} + myk.setBounds(l,s.y+s2.y+60+MyY, 800, 300); + myk.setVisible(true); + + } + private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed + try { + frmPuntoCassa.setEnabled(true); + //KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(frmPuntoCassa.keyDispatcher); + frmPuntoCassa.addRemoveKeyDispatcher(true); + frmPuntoCassa.toFront(); + frmPuntoCassa.repaint(); + + frmPuntoCassa = null; + this.dispose(); + } catch (Exception ex) { + + } + }//GEN-LAST:event_formWindowClosed + + private void jBtnAggiornaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnAggiornaActionPerformed + ComboItem c = new ComboItem(null, null); + c = (ComboItem) jCmbCat.getSelectedItem(); + if (Inserimento) { + MyInsert("insert into meteo (id_Punto_Cassa,id_Condizioni) values (" + idPuntoCassa + "," + c.getKey() + ")"); + } else { + Date Adesso=new Date(); + MyInsert("Update meteo set id_Condizioni=" + c.getKey() + " where id_Punto_Cassa=" + + idPuntoCassa + " and to_date(ts_segnalazione,'dd/mm/yy')=" + AggiustaData(Adesso)); + } + this.dispose(); + }//GEN-LAST:event_jBtnAggiornaActionPerformed + + private String AggiustaData(Date Data) { + SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + String data = "to_date('" + formatter.format(Data) + "','dd/mm/yyyy')"; + return data; + } + + private Boolean MyInsert(String Query) { + Boolean res=false; + try { + Connection dbConnection = DriverManager.getConnection(frmPuntoCassa.dbStringa, frmPuntoCassa.dbUsername, frmPuntoCassa.dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + rs.close(); + st.close(); + dbConnection.close(); + res=true; + } catch (SQLException e) { + JOptionPane.showMessageDialog(this, "Errore MySelect ['" + e.getMessage() + " " + Query + "']"); + + } + return res; + } + private void QueryDati(String Query,String QueryCount,String[] Colonne,String[] ColType, JTable jTbl,Boolean Editable){ + try{ + MyApplication MyA=new MyApplication(); + MyTableModel model = new MyTableModel( ); + model.setColumname(Colonne); + +// model.setEditable(Editable); +// int [] colBool=new int[1]; +// colBool[0]=7; +// model.setColBoolean(colBool); +// int[] cols=new int[1]; +// cols[0]=7; +// model.setColModificabile(cols); + int rowCount=Integer.parseInt(Utils.mySelect(QueryCount, "righe", frmPuntoCassa)); + Object[][] data = RowData(Query, Colonne,ColType,rowCount); + model.setData(data); + + try{jTbl.setModel(model);}catch(Exception e){} + jTbl.setAutoCreateColumnsFromModel(true); + + jTbl.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + jTbl.getTableHeader().setFont(new Font("Tahoma", Font.BOLD, 16)); + jTbl.setFont(new Font("Tahoma", 0, 16)); + + + TableColumn column = jTbl.getColumn("id"); + column.setMinWidth(0); + column.setMaxWidth(0); + column.setWidth(0); + column.setPreferredWidth(0); + + model.fireTableDataChanged(); + + doLayout(); + }catch(NumberFormatException e){ + + System.out.println("Query: " + e.getMessage()); + } + + } + private Integer CalcolaLarghezzaAltezza(Integer LarControllo,Integer Percentuale){ + Integer D = Percentuale - 100; + if (D == 0) { + return LarControllo; + } else { + Integer N = LarControllo + ((LarControllo * D) / 100); + return N; + } + + } + public Object[][] RowData(String Query, String[] Cols, String[] ColType, int rowCount) { + Object[][] rows = null; + try { + Connection dbConnection = DriverManager.getConnection(frmPuntoCassa.dbStringa, frmPuntoCassa.dbUsername, frmPuntoCassa.dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + rows = new Object[rowCount][]; + int r = 0; + while (rs.next()) { + Object[] row = new Object[Cols.length]; + for (int i = 0; i < Cols.length; i++) { + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + switch (ColType[i]) { + case "text": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + break; + case "integer": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0; + } else { + row[i] = rs.getInt(Cols[i].replace(" ", "_")); + } + break; + case "boolean": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = false; + } else { + row[i] = rs.getBoolean(Cols[i].replace(" ", "_")); + } + break; + case "float": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0.00; + } else { + String v = rs.getString(Cols[i].replace(" ", "_")); + + row[i] = Float.parseFloat(v.replace(",", ".")); + } + + break; + + case "data": + row[i] = ""; + if (rs.getString(Cols[i].replace(" ", "_")) != null) { +// Date d = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss",Locale.ITALY).parse(rs.getString(Cols[i])); + //SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + String[] d= rs.getString(Cols[i].replace(" ", "_")).split("-"); + if (d.length>=3){ + row[i] = d[2].trim().substring(0, 2) + "/" + d[1] + "/" + d[0]; + } + } + + break; + } + + } + rows[r] = row; + r++; + /*int id = rs.getInt("id"); + String name = rs.getString("name"); + int age = rs.getInt("age"); + String address = rs.getString("address"); + float salary = rs.getFloat("salary");*/ + + } + rs.close(); + st.close(); + + + } catch (SQLException | NumberFormatException e) { + System.err.println(e.getClass().getName() + ": " + e.getMessage()); + } finally { + + return rows; + } + + } + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + // + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(FrmMeteo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(FrmMeteo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(FrmMeteo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(FrmMeteo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + // + // + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new FrmMeteo(null,0L,true).setVisible(true); + } + }); + } + private void CaricaCombo (String Query, String itemValue, String itemId, JComboBox cmb) { + try { + Connection dbConnection = DriverManager.getConnection(frmPuntoCassa.dbStringa, frmPuntoCassa.dbUsername, frmPuntoCassa.dbPassword); + Connection c = dbConnection; + Statement stmt = null; + cmb.removeAllItems(); + stmt = c.createStatement(); + ResultSet rs = stmt.executeQuery(Query); + int r = 0; + while (rs.next()) { + + ComboItem row=new ComboItem(rs.getLong(itemId), rs.getString(itemValue)) ; + cmb.addItem(row); + + r++; + + } + rs.close(); + stmt.close(); + dbConnection.close(); + + } catch (SQLException e) { + System.err.println(e.getClass().getName() + ": " + e.getMessage()); + } + + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBtnAggiorna; + private javax.swing.JComboBox jCmbCat; + private javax.swing.JPanel pnl1; + // End of variables declaration//GEN-END:variables +} diff --git a/src/puntocassa/FrmMovimenti.form b/src/puntocassa/FrmMovimenti.form new file mode 100644 index 0000000..0e5c724 --- /dev/null +++ b/src/puntocassa/FrmMovimenti.form @@ -0,0 +1,152 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/puntocassa/FrmMovimenti.java b/src/puntocassa/FrmMovimenti.java new file mode 100644 index 0000000..502830d --- /dev/null +++ b/src/puntocassa/FrmMovimenti.java @@ -0,0 +1,516 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package puntocassa; + +import java.awt.Font; +import java.awt.Image; +import java.awt.Rectangle; +import java.io.File; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import javax.swing.ImageIcon; +import javax.swing.JOptionPane; +import javax.swing.JTable; +import javax.swing.JTextField; +import javax.swing.ListSelectionModel; +import javax.swing.table.TableColumn; +import puntocassa.utils.Utils; + +/** + * + * @author Marco + */ +public class FrmMovimenti extends javax.swing.JFrame { + + private PuntoCassa frmPuntoCassa; + private Long idTessera=0L,idPuntoCassa=0L; + public int HFont = 15; + private int AltControlli = 100; + private int LargControlli = 100; + private int AltRigaGriglia = 0; + + + /** + * Creates new form frm + */ + public FrmMovimenti(PuntoCassa frm,Long IDTessera,Long IDPuntoCassa,String imgPath) { + + frmPuntoCassa=frm; + frmPuntoCassa.setEnabled(false); + //KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(frmPuntoCassa.keyDispatcher); + frmPuntoCassa.addRemoveKeyDispatcher(false); + + idPuntoCassa=IDPuntoCassa; + idTessera=IDTessera; + + initComponents(); + + String startDir = System.getProperty("user.dir"); + File IconaApp = new File(startDir + "/risorse/logo.png"); + if (IconaApp.exists()) { + + ImageIcon icon = new ImageIcon(startDir + "/risorse/logo.png"); + this.setIconImage(icon.getImage()); + } + + + ImageIcon icon = new ImageIcon(imgPath +"freccia_down.jpg"); + Image img = icon.getImage() ; + Image newimg = img.getScaledInstance(50,50,java.awt.Image.SCALE_SMOOTH ) ; + icon = new ImageIcon(newimg); + jbtnGiu.setIcon(icon); + + ImageIcon icon2 = new ImageIcon(imgPath +"freccia_up.jpg"); + Image img2 = icon2.getImage() ; + Image newimg2 = img2.getScaledInstance(50,50,java.awt.Image.SCALE_SMOOTH ) ; + icon2 = new ImageIcon(newimg2); + jbtnSu.setIcon(icon2); + Aggiorna(); + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + pnl1 = new javax.swing.JPanel(); + jScrollPane3 = new javax.swing.JScrollPane(); + jTblStudenti = new javax.swing.JTable(); + jbtnAnnulla = new javax.swing.JButton(); + jLblTitolo = new javax.swing.JLabel(); + jbtnSu = new javax.swing.JButton(); + jbtnGiu = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setTitle("Ultimi Movimenti"); + addWindowListener(new java.awt.event.WindowAdapter() { + public void windowClosed(java.awt.event.WindowEvent evt) { + formWindowClosed(evt); + } + }); + + jTblStudenti.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + jTblStudenti.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + {}, + {}, + {}, + {} + }, + new String [] { + + } + )); + jScrollPane3.setViewportView(jTblStudenti); + + jbtnAnnulla.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jbtnAnnulla.setText("Annulla"); + jbtnAnnulla.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnAnnullaActionPerformed(evt); + } + }); + + jLblTitolo.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLblTitolo.setForeground(new java.awt.Color(255, 0, 0)); + jLblTitolo.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + jLblTitolo.setText("Ultimi Movimenti"); + + jbtnSu.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnSuActionPerformed(evt); + } + }); + + jbtnGiu.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnGiuActionPerformed(evt); + } + }); + + javax.swing.GroupLayout pnl1Layout = new javax.swing.GroupLayout(pnl1); + pnl1.setLayout(pnl1Layout); + pnl1Layout.setHorizontalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addComponent(jLblTitolo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(8, 8, 8)) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 768, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jbtnSu, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jbtnGiu, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(pnl1Layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(jbtnAnnulla, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE)) + ); + pnl1Layout.setVerticalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addComponent(jLblTitolo, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 225, Short.MAX_VALUE) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jbtnSu, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jbtnGiu, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jbtnAnnulla, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 850, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGap(6, 6, 6) + .addComponent(pnl1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap())) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 307, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(pnl1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap())) + ); + + pack(); + }// //GEN-END:initComponents + + private void jbtnAnnullaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnAnnullaActionPerformed +// ClearTable((MyTableModel)jTblStudenti.getModel()); + +// frmPuntoCassa.setEnabled(true); +// frmPuntoCassa=null; + this.dispose(); + + }//GEN-LAST:event_jbtnAnnullaActionPerformed + private void ClearTable(MyTableModel model) { + try { + for (Integer i = model.getRowCount() - 1; i >= 0; i--) { + model.deleteRow(i); + } + } catch (Exception e) { + } + } + private void Tastiera(JTextField jTxt,Integer MyX,Integer MyY){ + + MyKeyBoard myk=new MyKeyBoard(this,false); + myk.txt=jTxt; + myk.parent=this; + Rectangle s=this.getBounds(); + Rectangle s2=jTxt.getBounds(); + Integer l=s.x+s2.x+MyX; + if(l+800>s.x+s.width){l=s.x+s.width-800;} + myk.setBounds(l,s.y+s2.y+60+MyY, 800, 300); + myk.setVisible(true); + + } + private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed + try{ + frmPuntoCassa.setEnabled(true); + //KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(frmPuntoCassa.keyDispatcher); + frmPuntoCassa.addRemoveKeyDispatcher(true); + frmPuntoCassa.toFront(); + frmPuntoCassa.repaint(); + frmPuntoCassa=null; + this.dispose(); + }catch(Exception ex){} + }//GEN-LAST:event_formWindowClosed + + private void jbtnSuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnSuActionPerformed + // TODO add your handling code here: + if(jTblStudenti.getSelectedRow()>0){ + jTblStudenti.setRowSelectionInterval(jTblStudenti.getSelectedRow()-1, jTblStudenti.getSelectedRow()-1); + jTblStudenti.scrollRectToVisible(new Rectangle(jTblStudenti.getCellRect(jTblStudenti.getSelectedRow(), 0, true))); + } + }//GEN-LAST:event_jbtnSuActionPerformed + + private void jbtnGiuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnGiuActionPerformed + // TODO add your handling code here: + if(jTblStudenti.getSelectedRow() 0) { + jTblStudenti.setRowSelectionInterval(0, 0); + + } + ///AggiornaTessera(0); + + + } catch (Exception e) { + } + } + private Integer CalcolaLarghezzaAltezza(Integer LarControllo,Integer Percentuale){ + Integer D = Percentuale - 100; + if (D == 0) { + return LarControllo; + } else { + Integer N = LarControllo + ((LarControllo * D) / 100); + return N; + } + + } + public Object[][] RowData(String Query, String[] Cols, String[] ColType, int rowCount) { + Object[][] rows = null; + try { + Connection dbConnection = DriverManager.getConnection(frmPuntoCassa.dbStringa, frmPuntoCassa.dbUsername, frmPuntoCassa.dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + rows = new Object[rowCount][]; + int r = 0; + while (rs.next()) { + Object[] row = new Object[Cols.length]; + for (int i = 0; i < Cols.length; i++) { + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + switch (ColType[i]) { + case "text": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + break; + case "integer": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0; + } else { + row[i] = rs.getInt(Cols[i].replace(" ", "_")); + } + break; + case "long": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0; + } else { + row[i] = rs.getLong(Cols[i].replace(" ", "_")); + } + break; + case "boolean": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = false; + } else { + row[i] = rs.getBoolean(Cols[i].replace(" ", "_")); + } + break; + case "float": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0.00; + } else { + String v = rs.getString(Cols[i].replace(" ", "_")); + + row[i] = Float.parseFloat(v.replace(",", ".")); + } + + break; + + case "data": + row[i] = ""; + if (rs.getString(Cols[i].replace(" ", "_")) != null) { +// Date d = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss",Locale.ITALY).parse(rs.getString(Cols[i])); + //SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + String[] d= rs.getString(Cols[i].replace(" ", "_")).split("-"); + if (d.length>=3){ + String Ora=""; + + if(d[2].length()>8){ + String[] dx=d[2].trim().split(" "); + if(dx.length>1){ + Ora=dx[1].substring(0,8); + } + } + row[i] = d[2].trim().substring(0, 2) + "/" + d[1] + "/" + d[0] + " " + Ora; + } + } + + break; + } + + } + rows[r] = row; + r++; + /*int id = rs.getInt("id"); + String name = rs.getString("name"); + int age = rs.getInt("age"); + String address = rs.getString("address"); + float salary = rs.getFloat("salary");*/ + + } + rs.close(); + st.close(); + dbConnection.close(); + + } catch (SQLException | NumberFormatException e) { + System.err.println(e.getClass().getName() + ": " + e.getMessage()); + } finally { + + return rows; + } + + } + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + // + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(FrmMovimenti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(FrmMovimenti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(FrmMovimenti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(FrmMovimenti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + // + // + // + // + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new FrmMovimenti(null,0L,0L,null).setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JLabel jLblTitolo; + private javax.swing.JScrollPane jScrollPane3; + private javax.swing.JTable jTblStudenti; + private javax.swing.JButton jbtnAnnulla; + private javax.swing.JButton jbtnGiu; + private javax.swing.JButton jbtnSu; + private javax.swing.JPanel pnl1; + // End of variables declaration//GEN-END:variables +} diff --git a/src/puntocassa/FrmProdotti.form b/src/puntocassa/FrmProdotti.form new file mode 100644 index 0000000..3117897 --- /dev/null +++ b/src/puntocassa/FrmProdotti.form @@ -0,0 +1,290 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/puntocassa/FrmProdotti.java b/src/puntocassa/FrmProdotti.java new file mode 100644 index 0000000..e46da25 --- /dev/null +++ b/src/puntocassa/FrmProdotti.java @@ -0,0 +1,744 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package puntocassa; + +import java.awt.Font; +import java.awt.Image; +import java.awt.Rectangle; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.io.File; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import javax.swing.ImageIcon; +import javax.swing.JComboBox; +import javax.swing.JOptionPane; +import javax.swing.JTable; +import javax.swing.JTextField; +import javax.swing.ListSelectionModel; +import javax.swing.table.TableColumn; +import puntocassa.utils.Utils; + +/** + * + * @author Marco + */ +public class FrmProdotti extends javax.swing.JFrame { + +private PuntoCassa frmPuntoCassa; + + + public int HFont=15; + private int AltControlli=100; + private int LargControlli=100; + private int AltRigaGriglia=0; + + /** + * Creates new form frm + */ + public FrmProdotti(PuntoCassa frm,String imgPath) { + + frmPuntoCassa=frm; + frmPuntoCassa.setEnabled(false); + //KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(frmPuntoCassa.keyDispatcher); + frmPuntoCassa.addRemoveKeyDispatcher(false); + initComponents(); + + String startDir = System.getProperty("user.dir"); + File IconaApp = new File(startDir + "/risorse/logo.png"); + if (IconaApp.exists()) { + + ImageIcon icon = new ImageIcon(startDir + "/risorse/logo.png"); + this.setIconImage(icon.getImage()); + } + + ImageIcon icon = new ImageIcon(imgPath +"freccia_down.jpg"); + Image img = icon.getImage() ; + Image newimg = img.getScaledInstance(50,50,java.awt.Image.SCALE_SMOOTH ) ; + icon = new ImageIcon(newimg); + jbtnGiu.setIcon(icon); + + ImageIcon icon2 = new ImageIcon(imgPath +"freccia_up.jpg"); + Image img2 = icon2.getImage() ; + Image newimg2 = img2.getScaledInstance(50,50,java.awt.Image.SCALE_SMOOTH ) ; + icon2 = new ImageIcon(newimg2); + jbtnSu.setIcon(icon2); + + // -------------------------------------------------------------------- + // ** creo evento click jTblStudenti + // -------------------------------------------------------------------- + jTblProdotti.addMouseListener(new MouseAdapter() { + public void mouseClicked(MouseEvent e) { + + if (e.getClickCount() == 1) { + //JTable target = (JTable) e.getSource(); + //int row = target.getSelectedRow(); + //int column = target.getSelectedColumn(); +// jBtnOKActionPerformed(null); + } + } + }); + CaricaCombo("Select nome,id from categorie_prodotti union select ' ' as nome,0 as id from categorie_prodotti order by nome", "nome", "id", jCmbCat); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + pnl1 = new javax.swing.JPanel(); + jScrollPane3 = new javax.swing.JScrollPane(); + jTblProdotti = new javax.swing.JTable(); + jLblTitolo = new javax.swing.JLabel(); + jbtnAggiungi = new javax.swing.JButton(); + lblCognome = new javax.swing.JLabel(); + jtxtCodice = new javax.swing.JTextField(); + jBtnCerca = new javax.swing.JButton(); + jbtnAnnulla2 = new javax.swing.JButton(); + jCmbCat = new javax.swing.JComboBox(); + lblCognome1 = new javax.swing.JLabel(); + jtxtProdotto = new javax.swing.JTextField(); + lblCognome2 = new javax.swing.JLabel(); + jbtnSu = new javax.swing.JButton(); + jbtnGiu = new javax.swing.JButton(); + jbtnElimina = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setTitle("Cerca Prodotto"); + addWindowListener(new java.awt.event.WindowAdapter() { + public void windowClosed(java.awt.event.WindowEvent evt) { + formWindowClosed(evt); + } + }); + + jTblProdotti.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jTblProdotti.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + {}, + {}, + {}, + {} + }, + new String [] { + + } + )); + jScrollPane3.setViewportView(jTblProdotti); + + jLblTitolo.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLblTitolo.setForeground(new java.awt.Color(255, 0, 0)); + jLblTitolo.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + jLblTitolo.setText("Cerca Prodotti"); + + jbtnAggiungi.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jbtnAggiungi.setText("Aggiungi Prodotto"); + jbtnAggiungi.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnAggiungiActionPerformed(evt); + } + }); + + lblCognome.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + lblCognome.setText("Categoria:"); + + jtxtCodice.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jtxtCodice.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jtxtCodiceFocusGained(evt); + } + }); + jtxtCodice.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jtxtCodiceMouseClicked(evt); + } + }); + + jBtnCerca.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jBtnCerca.setText("Cerca"); + jBtnCerca.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtnCercaActionPerformed(evt); + } + }); + + jbtnAnnulla2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jbtnAnnulla2.setText("Annulla"); + jbtnAnnulla2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnAnnulla2ActionPerformed(evt); + } + }); + + jCmbCat.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jCmbCat.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); + + lblCognome1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + lblCognome1.setText("Codice:"); + + jtxtProdotto.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jtxtProdotto.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jtxtProdottoFocusGained(evt); + } + }); + jtxtProdotto.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jtxtProdottoMouseClicked(evt); + } + }); + + lblCognome2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + lblCognome2.setText("Prodotto:"); + + jbtnSu.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnSuActionPerformed(evt); + } + }); + + jbtnGiu.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnGiuActionPerformed(evt); + } + }); + + jbtnElimina.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jbtnElimina.setText("Elimina Prodotto"); + jbtnElimina.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnEliminaActionPerformed(evt); + } + }); + + javax.swing.GroupLayout pnl1Layout = new javax.swing.GroupLayout(pnl1); + pnl1.setLayout(pnl1Layout); + pnl1Layout.setHorizontalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pnl1Layout.createSequentialGroup() + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(lblCognome) + .addGap(0, 180, Short.MAX_VALUE)) + .addComponent(jCmbCat, 0, 274, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lblCognome1) + .addComponent(jtxtCodice, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lblCognome2) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jtxtProdotto, javax.swing.GroupLayout.DEFAULT_SIZE, 121, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jBtnCerca, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jbtnAnnulla2, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addComponent(jLblTitolo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(8, 8, 8)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jbtnAggiungi, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jbtnElimina, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(jScrollPane3)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jbtnSu, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jbtnGiu, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap()) + ); + pnl1Layout.setVerticalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addComponent(jLblTitolo, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lblCognome1) + .addComponent(lblCognome)) + .addComponent(lblCognome2) + .addGroup(pnl1Layout.createSequentialGroup() + .addGap(21, 21, 21) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jCmbCat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jbtnAnnulla2)) + .addComponent(jBtnCerca, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jtxtCodice) + .addComponent(jtxtProdotto)))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jbtnSu, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jbtnGiu, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jbtnAggiungi, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jbtnElimina, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap()) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addContainerGap() + .addComponent(pnl1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(pnl1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + + pack(); + }// //GEN-END:initComponents + private void ClearTable(MyTableModel model) { + try { + for (Integer i = model.getRowCount() - 1; i >= 0; i--) { + model.deleteRow(i); + } + } catch (Exception e) { + } + } + private void Tastiera(JTextField jTxt,Integer MyX,Integer MyY){ + + MyKeyBoard myk=new MyKeyBoard(this,false); + myk.txt=jTxt; + myk.parent=this; + Rectangle s=this.getBounds(); + Rectangle s2=jTxt.getBounds(); + Integer l=s.x+s2.x+MyX; + if(l+800>s.x+s.width){l=s.x+s.width-800;} + myk.setBounds(l,s.y+s2.y+60+MyY, 800, 300); + myk.setVisible(true); + + } + private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed + try{ + frmPuntoCassa.setEnabled(true); + //KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(frmPuntoCassa.keyDispatcher); + frmPuntoCassa.addRemoveKeyDispatcher(true); + frmPuntoCassa.toFront(); + frmPuntoCassa.repaint(); + frmPuntoCassa=null; + this.dispose(); + }catch(Exception ex){} + }//GEN-LAST:event_formWindowClosed + + private void jbtnAggiungiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnAggiungiActionPerformed + MyTableModel model = new MyTableModel(); + model = (MyTableModel) jTblProdotti.getModel(); + Long cod = 0L; + if (jTblProdotti.getSelectedRow() >= 0) { + cod = Long.parseLong(model.getValueAt(jTblProdotti.getSelectedRow(), 0).toString()); + Boolean presente = Boolean.parseBoolean(model.getValueAt(jTblProdotti.getSelectedRow(), 4).toString()); + if (presente == false) { + MyInsert("Insert into Catalogo_punti_cassa (id,id_prodotto,id_punto_cassa,flag_locale) values(-1," + cod + "," + frmPuntoCassa.idPuntoCassa + ",1)"); + frmPuntoCassa.caricaDati("PRODOTTI", "-1"); + this.dispose(); + } + + } + + }//GEN-LAST:event_jbtnAggiungiActionPerformed + private Boolean MyInsert(String Query) { + Boolean res=false; + try { + Connection dbConnection = DriverManager.getConnection(frmPuntoCassa.dbStringa, frmPuntoCassa.dbUsername, frmPuntoCassa.dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + rs.close(); + st.close(); + dbConnection.close(); + res=true; + } catch (SQLException e) { + JOptionPane.showMessageDialog(this, "Errore MySelect ['" + e.getMessage() + " " + Query + "']"); + + } + return res; + } + private void jtxtCodiceFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jtxtCodiceFocusGained + Tastiera(evt); +// MyApplication MyA = new MyApplication(); +// if (MyA.TastieraVideo) { +// if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { +// MyA.UltimoTxt = " "; +// } else { +// MyA.UltimoTxt = evt.getComponent().toString(); +// Tastiera((JTextField) evt.getComponent(), 0, 0); +// } +// } + }//GEN-LAST:event_jtxtCodiceFocusGained + + private void jBtnCercaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnCercaActionPerformed +// if (jtxtProdotto.getText().trim().length()<=0){ +// JOptionPane.showMessageDialog(this, "Inserire la descrizione del prodotto!","Attenzione",JOptionPane.INFORMATION_MESSAGE); +// return; +// } + + Aggiorna(); + }//GEN-LAST:event_jBtnCercaActionPerformed + + private void jbtnAnnulla2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnAnnulla2ActionPerformed + // ClearTable((MyTableModel)jTblStudenti.getModel()); + +// frmPuntoCassa.setEnabled(true); +// frmPuntoCassa=null; + this.dispose(); + + }//GEN-LAST:event_jbtnAnnulla2ActionPerformed + + private void jtxtProdottoFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jtxtProdottoFocusGained + Tastiera(evt); + }//GEN-LAST:event_jtxtProdottoFocusGained + + private void jbtnSuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnSuActionPerformed + // TODO add your handling code here: + if(jTblProdotti.getSelectedRow()>0){ + jTblProdotti.setRowSelectionInterval(jTblProdotti.getSelectedRow()-1, jTblProdotti.getSelectedRow()-1); + jTblProdotti.scrollRectToVisible(new Rectangle(jTblProdotti.getCellRect(jTblProdotti.getSelectedRow(), 0, true))); + } + }//GEN-LAST:event_jbtnSuActionPerformed + + private void jbtnGiuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnGiuActionPerformed + // TODO add your handling code here: + if(jTblProdotti.getSelectedRow()= 0) { + cod = Long.parseLong(model.getValueAt(jTblProdotti.getSelectedRow(), 0).toString()); + Boolean presente = Boolean.parseBoolean(model.getValueAt(jTblProdotti.getSelectedRow(), 4).toString()); + if (presente) { + MyInsert("Delete Catalogo_punti_cassa where id_prodotto=" + cod + " and id_punto_cassa=" + frmPuntoCassa.idPuntoCassa); + frmPuntoCassa.caricaDati("PRODOTTI", "-1"); + this.dispose(); + } + + } + }//GEN-LAST:event_jbtnEliminaActionPerformed + private void Tastiera(java.awt.event.MouseEvent evt) { + MyApplication MyA = new MyApplication(); + if (MyA.tastieraVideo) { + if (MyA.ultimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { + MyA.ultimoTxt = " "; + } else { + MyA.ultimoTxt = evt.getComponent().toString(); + Tastiera((JTextField) evt.getComponent(), 0, 0); + } + } + } + //java.awt.event.FocusEvent + private void Tastiera(java.awt.event.FocusEvent evt) { + MyApplication MyA = new MyApplication(); + if (MyA.tastieraVideo) { + if (MyA.ultimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { + MyA.ultimoTxt = " "; + } else { + MyA.ultimoTxt = evt.getComponent().toString(); + Tastiera((JTextField) evt.getComponent(), 0, 0); + } + } + } + private void QueryDati(String Query,String QueryCount,String[] Colonne,String[] ColType, JTable jTbl,Boolean Editable){ + try{ + MyApplication MyA=new MyApplication(); + MyTableModel model = new MyTableModel( ); + model.setColumname(Colonne); + +// model.setEditable(Editable); +// int [] colBool=new int[1]; +// colBool[0]=7; +// model.setColBoolean(colBool); +// int[] cols=new int[1]; +// cols[0]=7; +// model.setColModificabile(cols); + int rowCount=Integer.parseInt(Utils.mySelect(QueryCount, "righe", frmPuntoCassa)); + Object[][] data = RowData(Query, Colonne,ColType,rowCount); + model.setData(data); + + try{jTbl.setModel(model);}catch(Exception e){} + jTbl.setAutoCreateColumnsFromModel(true); + + jTbl.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + jTbl.getTableHeader().setFont(new Font("Tahoma", Font.BOLD, 16)); + jTbl.setFont(new Font("Tahoma", 0, 16)); + + + TableColumn column = jTbl.getColumn("id"); + column.setMinWidth(0); + column.setMaxWidth(0); + column.setWidth(0); + column.setPreferredWidth(0); + + TableColumn column1 = jTbl.getColumn("Prodotto"); + column1.setPreferredWidth(380); + column1.setWidth(380); +// TableColumn column2 = jTbl.getColumn("Codice"); +// column2.setPreferredWidth(20); + + model.fireTableDataChanged(); + + doLayout(); + }catch(NumberFormatException e){ + + System.out.println("Query: " + e.getMessage()); + } + + } + private void Aggiorna() { + try { + String From=" from prodotti p, categorie_prodotti c "; + String Where = " WHERE p.id_categoria = c.id "; + if (jtxtCodice.getText().trim().length() > 0) { + Where = Where + " and upper(p.codice) like '" + jtxtCodice.getText().trim().replace("'", "''").toUpperCase() + "%' "; + } + if (jtxtProdotto.getText().trim().length() > 0) { + Where = Where + " and upper(p.nome) like '%" + jtxtProdotto.getText().trim().replace("'", "''").toUpperCase() + "%' "; + } + + ComboItem c = new ComboItem(null, null); + c = (ComboItem) jCmbCat.getSelectedItem(); + + if (c.getKey() > 0) { + Where = Where + " and p.id_categoria = " + c.getKey(); + } + String[] Col = {"id","Categoria","Codice","Prodotto","Presente"}; + String[] ColType = {"long", "text","text","text","boolean"}; + String QueryCount="Select count(*) as righe " + From + Where; + QueryDati("select p.id,c.nome as categoria,p.codice, p.nome as prodotto, prodotto_in_catalogo (p.id, " + frmPuntoCassa.idPuntoCassa + ") as presente " + From + Where + " order by c.nome,p.nome", QueryCount, Col, ColType, jTblProdotti, false); + + //jTblStudenti.getColumn("Drawing").setPreferredWidth(200); + + + + //Font f=new Font("Tahoma",0,HFont); + Font f=new Font("Tahoma",0,20); + jTblProdotti.setFont(f); + jTblProdotti.setFont(f); + if(AltRigaGriglia==0){AltRigaGriglia=jTblProdotti.getRowHeight();} +// txtUsername.setSize(CalcolaLarghezzaAltezza(txtUsername.getWidth(),LargControlli), CalcolaLarghezzaAltezza(txtUsername.getHeight(),AltControlli)); + + //jTblProdotti.setRowHeight(CalcolaLarghezzaAltezza(AltRigaGriglia,AltControlli)); + jTblProdotti.setRowHeight(25); + //ClearTable((MyTableModel)jTblTessere.getModel()); + + if (jTblProdotti.getRowCount() > 0) { + jTblProdotti.setRowSelectionInterval(0, 0); + + } + ///AggiornaTessera(0); + + + } catch (Exception e) { + } + } + private Integer CalcolaLarghezzaAltezza(Integer LarControllo,Integer Percentuale){ + Integer D = Percentuale - 100; + if (D == 0) { + return LarControllo; + } else { + Integer N = LarControllo + ((LarControllo * D) / 100); + return N; + } + + } + public Object[][] RowData(String Query, String[] Cols, String[] ColType, int rowCount) { + Object[][] rows = null; + try { + Connection dbConnection = DriverManager.getConnection(frmPuntoCassa.dbStringa, frmPuntoCassa.dbUsername, frmPuntoCassa.dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + rows = new Object[rowCount][]; + int r = 0; + while (rs.next()) { + Object[] row = new Object[Cols.length]; + for (int i = 0; i < Cols.length; i++) { + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + switch (ColType[i]) { + case "text": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + break; + case "integer": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0; + } else { + row[i] = rs.getInt(Cols[i].replace(" ", "_")); + } + break; + case "boolean": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = false; + } else { + row[i] = rs.getBoolean(Cols[i].replace(" ", "_")); + } + break; + case "float": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0.00; + } else { + String v = rs.getString(Cols[i].replace(" ", "_")); + + row[i] = Float.parseFloat(v.replace(",", ".")); + } + + break; + + case "data": + row[i] = ""; + if (rs.getString(Cols[i].replace(" ", "_")) != null) { +// Date d = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss",Locale.ITALY).parse(rs.getString(Cols[i])); + //SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + String[] d= rs.getString(Cols[i].replace(" ", "_")).split("-"); + if (d.length>=3){ + row[i] = d[2].trim().substring(0, 2) + "/" + d[1] + "/" + d[0]; + } + } + + break; + } + + } + rows[r] = row; + r++; + /*int id = rs.getInt("id"); + String name = rs.getString("name"); + int age = rs.getInt("age"); + String address = rs.getString("address"); + float salary = rs.getFloat("salary");*/ + + } + rs.close(); + st.close(); + dbConnection.close(); + + } catch (SQLException | NumberFormatException e) { + System.err.println(e.getClass().getName() + ": " + e.getMessage()); + } finally { + + return rows; + } + + } + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + // + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(FrmProdotti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(FrmProdotti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(FrmProdotti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(FrmProdotti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + // + // + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new FrmProdotti(null,null).setVisible(true); + } + }); + } + private void CaricaCombo (String Query, String itemValue, String itemId, JComboBox cmb) { + try { + Connection dbConnection = DriverManager.getConnection(frmPuntoCassa.dbStringa, frmPuntoCassa.dbUsername, frmPuntoCassa.dbPassword); + Connection c = dbConnection; + Statement stmt = null; + cmb.removeAllItems(); + stmt = c.createStatement(); + ResultSet rs = stmt.executeQuery(Query); + int r = 0; + while (rs.next()) { + + ComboItem row=new ComboItem(rs.getLong(itemId), rs.getString(itemValue)) ; + cmb.addItem(row); + + r++; + + } + rs.close(); + stmt.close(); + dbConnection.close(); + + } catch (SQLException e) { + System.err.println(e.getClass().getName() + ": " + e.getMessage()); + } + + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBtnCerca; + private javax.swing.JComboBox jCmbCat; + private javax.swing.JLabel jLblTitolo; + private javax.swing.JScrollPane jScrollPane3; + private javax.swing.JTable jTblProdotti; + private javax.swing.JButton jbtnAggiungi; + private javax.swing.JButton jbtnAnnulla2; + private javax.swing.JButton jbtnElimina; + private javax.swing.JButton jbtnGiu; + private javax.swing.JButton jbtnSu; + private javax.swing.JTextField jtxtCodice; + private javax.swing.JTextField jtxtProdotto; + private javax.swing.JLabel lblCognome; + private javax.swing.JLabel lblCognome1; + private javax.swing.JLabel lblCognome2; + private javax.swing.JPanel pnl1; + // End of variables declaration//GEN-END:variables +} diff --git a/src/puntocassa/FrmProgress.form b/src/puntocassa/FrmProgress.form new file mode 100644 index 0000000..47b28f4 --- /dev/null +++ b/src/puntocassa/FrmProgress.form @@ -0,0 +1,78 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/puntocassa/FrmProgress.java b/src/puntocassa/FrmProgress.java new file mode 100644 index 0000000..954d476 --- /dev/null +++ b/src/puntocassa/FrmProgress.java @@ -0,0 +1,143 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package puntocassa; + +import java.io.File; +import javax.swing.ImageIcon; + +/** + * + * @author Marco + */ +public class FrmProgress extends javax.swing.JFrame { + + private PuntoCassa frmPuntoCassa; + + /** + * Creates new form frm + */ + public FrmProgress(PuntoCassa frm) { + frmPuntoCassa=frm; + initComponents(); + String startDir = System.getProperty("user.dir"); + File IconaApp = new File(startDir + "/risorse/logo.png"); + if (IconaApp.exists()) { + + ImageIcon icon = new ImageIcon(startDir + "/risorse/logo.png"); + this.setIconImage(icon.getImage()); + } + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + pnl1 = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setTitle("Aggiorna database..."); + setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); + setResizable(false); + setType(java.awt.Window.Type.POPUP); + addWindowListener(new java.awt.event.WindowAdapter() { + public void windowClosed(java.awt.event.WindowEvent evt) { + formWindowClosed(evt); + } + }); + + jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel1.setText("Aggiornamento in corso..."); + jLabel1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + + javax.swing.GroupLayout pnl1Layout = new javax.swing.GroupLayout(pnl1); + pnl1.setLayout(pnl1Layout); + pnl1Layout.setHorizontalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 377, Short.MAX_VALUE) + ); + pnl1Layout.setVerticalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(pnl1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(pnl1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE)) + ); + + pack(); + }// //GEN-END:initComponents + private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed + try{ + frmPuntoCassa.setEnabled(true); + + frmPuntoCassa.toFront(); + frmPuntoCassa.repaint(); + + frmPuntoCassa=null; + this.dispose(); + }catch(Exception ex){} + }//GEN-LAST:event_formWindowClosed + + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + // + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(FrmProgress.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(FrmProgress.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(FrmProgress.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(FrmProgress.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + // + // + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new FrmProgress(null).setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JLabel jLabel1; + private javax.swing.JPanel pnl1; + // End of variables declaration//GEN-END:variables +} diff --git a/src/puntocassa/FrmStorno.form b/src/puntocassa/FrmStorno.form new file mode 100644 index 0000000..388bff0 --- /dev/null +++ b/src/puntocassa/FrmStorno.form @@ -0,0 +1,167 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/puntocassa/FrmStorno.java b/src/puntocassa/FrmStorno.java new file mode 100644 index 0000000..28640eb --- /dev/null +++ b/src/puntocassa/FrmStorno.java @@ -0,0 +1,586 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package puntocassa; + +import java.awt.Font; +import java.awt.Image; +import java.awt.Rectangle; +import java.io.File; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import javax.swing.ImageIcon; +import javax.swing.JOptionPane; +import javax.swing.JTable; +import javax.swing.JTextField; +import javax.swing.ListSelectionModel; +import javax.swing.table.TableColumn; +import puntocassa.utils.Utils; + +/** + * + * @author Marco + */ +public class FrmStorno extends javax.swing.JFrame { + + private PuntoCassa frmPuntoCassa; + private Long idTessera=0L,idPuntoCassa=0L; + public int HFont = 15; + private int AltControlli = 100; + private int LargControlli = 100; + private int AltRigaGriglia = 0; + private Boolean Azzera=false; + private Boolean StornoEffettuato=false; + + /** + * Creates new form frm + */ + public FrmStorno(PuntoCassa frm,Long IDTessera,Long IDPuntoCassa,String imgPath,Boolean azzera) { + + frmPuntoCassa=frm; + frmPuntoCassa.setEnabled(false); + //KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(frmPuntoCassa.keyDispatcher); + frmPuntoCassa.addRemoveKeyDispatcher(false); + + idPuntoCassa=IDPuntoCassa; + idTessera=IDTessera; + Azzera=azzera; + initComponents(); + + String startDir = System.getProperty("user.dir"); + File IconaApp = new File(startDir + "/risorse/logo.png"); + if (IconaApp.exists()) { + + ImageIcon icon = new ImageIcon(startDir + "/risorse/logo.png"); + this.setIconImage(icon.getImage()); + } + + + ImageIcon icon = new ImageIcon(imgPath +"freccia_down.jpg"); + Image img = icon.getImage() ; + Image newimg = img.getScaledInstance(50,50,java.awt.Image.SCALE_SMOOTH ) ; + icon = new ImageIcon(newimg); + jbtnGiu.setIcon(icon); + + ImageIcon icon2 = new ImageIcon(imgPath +"freccia_up.jpg"); + Image img2 = icon2.getImage() ; + Image newimg2 = img2.getScaledInstance(50,50,java.awt.Image.SCALE_SMOOTH ) ; + icon2 = new ImageIcon(newimg2); + jbtnSu.setIcon(icon2); + Aggiorna(); + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + pnl1 = new javax.swing.JPanel(); + jScrollPane3 = new javax.swing.JScrollPane(); + jTblStudenti = new javax.swing.JTable(); + jbtnAnnulla = new javax.swing.JButton(); + jLblTitolo = new javax.swing.JLabel(); + jBtnOK = new javax.swing.JButton(); + jbtnSu = new javax.swing.JButton(); + jbtnGiu = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setTitle("Storno"); + addWindowListener(new java.awt.event.WindowAdapter() { + public void windowClosed(java.awt.event.WindowEvent evt) { + formWindowClosed(evt); + } + }); + + jTblStudenti.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + jTblStudenti.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + {}, + {}, + {}, + {} + }, + new String [] { + + } + )); + jScrollPane3.setViewportView(jTblStudenti); + + jbtnAnnulla.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jbtnAnnulla.setText("Annulla"); + jbtnAnnulla.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnAnnullaActionPerformed(evt); + } + }); + + jLblTitolo.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLblTitolo.setForeground(new java.awt.Color(255, 0, 0)); + jLblTitolo.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + jLblTitolo.setText("Storno"); + + jBtnOK.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jBtnOK.setText("Storna"); + jBtnOK.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtnOKActionPerformed(evt); + } + }); + + jbtnSu.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnSuActionPerformed(evt); + } + }); + + jbtnGiu.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnGiuActionPerformed(evt); + } + }); + + javax.swing.GroupLayout pnl1Layout = new javax.swing.GroupLayout(pnl1); + pnl1.setLayout(pnl1Layout); + pnl1Layout.setHorizontalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addComponent(jLblTitolo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(8, 8, 8)) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 768, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jbtnSu, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jbtnGiu, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jBtnOK, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jbtnAnnulla, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE)) + ); + pnl1Layout.setVerticalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addComponent(jLblTitolo, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 223, Short.MAX_VALUE) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jbtnSu, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jbtnGiu, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jBtnOK, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jbtnAnnulla, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 850, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGap(6, 6, 6) + .addComponent(pnl1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap())) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 307, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(pnl1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap())) + ); + + pack(); + }// //GEN-END:initComponents + + private void jbtnAnnullaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnAnnullaActionPerformed +// ClearTable((MyTableModel)jTblStudenti.getModel()); + +// frmPuntoCassa.setEnabled(true); +// frmPuntoCassa=null; +// if (Azzera){ +// frmPuntoCassa.AzzeraDopoStorno(); +// } + this.dispose(); + + }//GEN-LAST:event_jbtnAnnullaActionPerformed + private void ClearTable(MyTableModel model) { + try { + for (Integer i = model.getRowCount() - 1; i >= 0; i--) { + model.deleteRow(i); + } + } catch (Exception e) { + } + } + private void Tastiera(JTextField jTxt,Integer MyX,Integer MyY){ + + MyKeyBoard myk=new MyKeyBoard(this,false); + myk.txt=jTxt; + myk.parent=this; + Rectangle s=this.getBounds(); + Rectangle s2=jTxt.getBounds(); + Integer l=s.x+s2.x+MyX; + if(l+800>s.x+s.width){l=s.x+s.width-800;} + myk.setBounds(l,s.y+s2.y+60+MyY, 800, 300); + myk.setVisible(true); + + } + private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed + try{ + + frmPuntoCassa.setEnabled(true); + //KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(frmPuntoCassa.keyDispatcher); + frmPuntoCassa.addRemoveKeyDispatcher(true); + frmPuntoCassa.toFront(); + frmPuntoCassa.repaint(); + if (Azzera && StornoEffettuato==false){ + frmPuntoCassa.azzeraDopoStorno(); + } + frmPuntoCassa=null; + + this.dispose(); + }catch(Exception ex){} + }//GEN-LAST:event_formWindowClosed + + private void jBtnOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnOKActionPerformed + if (jTblStudenti.getSelectedRow() >= 0 ) { + MyTableModel model = new MyTableModel(); + model = (MyTableModel) jTblStudenti.getModel(); + Object[]row = model.getRow(jTblStudenti.getSelectedRow()); + // QueryDati("select a.id 0,a.data 1,a.num_progressivo as Progressivo 2,p.nome as Prodotto,a.importo 4,a.punti 5,a.saldo_pre,a.saldo_post,a.punti_pre,a.punti_post,p.id as idProdotto " + From + Where + " order by a.data,a.num_progressivo", QueryCount, Col, ColType, jTblStudenti, false); + + //Boolean Ok=MyInsert("insert into ristorni (ID_TESSERA,ID_PRODOTTO,ID_PUNTO_CASSA,DATA,NUM_PROGRESSIVO,IMPORTO,PUNTI,ID_TIPO_PAGAMENTO,ID_TURNO) " + + // "values (" + idTessera + "," + row[1] + "," + idPuntoCassa + ",to_date('" + row[2] + "','dd/mm/yyyy HH24:MI:SS')," + row[3] + ","+ row[5] + "," + row[6] + "," + row[7] + "," + row[8] + ")"); + Boolean Ok=MyInsert("insert into ristorni (ID_TESSERA,ID_PRODOTTO,ID_PUNTO_CASSA,DATA,NUM_PROGRESSIVO,IMPORTO,PUNTI,ID_TIPO_PAGAMENTO,ID_TURNO,FLAG_IN_VASSOIO,SALDO_PRE,SALDO_POST,PUNTI_PRE,PUNTI_POST,FLAG_GRATUITA,FLAG_ASPORTO,FLAG_BONUS) " + + "SELECT ID_TESSERA,ID_PRODOTTO,ID_PUNTO_CASSA,DATA,NUM_PROGRESSIVO,IMPORTO,PUNTI,ID_TIPO_PAGAMENTO,ID_TURNO,FLAG_IN_VASSOIO,SALDO_PRE,SALDO_POST,PUNTI_PRE,PUNTI_POST,FLAG_GRATUITA,FLAG_ASPORTO,FLAG_BONUS " + + "FROM st_acquisti WHERE num_progressivo = " + row[3]); + if(Ok){ + //MyInsert("Delete from St_Acquisti where id="+ row[0]); + MyInsert("Delete from St_Acquisti where num_progressivo="+ row[3]); + StornoEffettuato=true; + } + + + + if (Azzera){ +// frmPuntoCassa.AzzeraDopoStorno(); + }else + { + frmPuntoCassa.aggiornaProgressivi(); + } + //frmPuntoCassa.CercaTessera(); + this.dispose(); + } + + }//GEN-LAST:event_jBtnOKActionPerformed + + private void jbtnSuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnSuActionPerformed + // TODO add your handling code here: + if(jTblStudenti.getSelectedRow()>0){ + jTblStudenti.setRowSelectionInterval(jTblStudenti.getSelectedRow()-1, jTblStudenti.getSelectedRow()-1); + jTblStudenti.scrollRectToVisible(new Rectangle(jTblStudenti.getCellRect(jTblStudenti.getSelectedRow(), 0, true))); + } + }//GEN-LAST:event_jbtnSuActionPerformed + + private void jbtnGiuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnGiuActionPerformed + // TODO add your handling code here: + if(jTblStudenti.getSelectedRow()0) {Where=Where + " and UPPER(Nome) like '" + jtxtNome.getText().trim().toUpperCase().replace("'", "''") + "%'"; } +// if (jtxtCodFis.getText().trim().length()>0) {Where=Where + " and UPPER(Matricola) like '" + jtxtCodFis.getText().trim().toUpperCase().replace("'", "''") + "%'"; } + String[] Col = {"id", "idProdotto", "Data","Progressivo","Prodotto","Importo","id_Tipo_Pagamento","id_Turno","Pagamento"}; + String[] ColType = {"long", "long", "data","integer", "text", "float", "long", "long", "text"}; + String QueryCount="Select count(*) as righe " + From + Where; + QueryDati("select a.id,p.id as idProdotto,a.data,a.num_progressivo as Progressivo,p.nome as Prodotto,a.importo,a.id_tipo_pagamento,a.id_turno,tp.Nome as Pagamento " + From + Where + " order by a.data desc,a.num_progressivo desc", QueryCount, Col, ColType, jTblStudenti, false); + + //jTblStudenti.getColumn("Drawing").setPreferredWidth(200); + + + + Font f=new Font("Tahoma",0,18); + jTblStudenti.setFont(f); + if(AltRigaGriglia==0){AltRigaGriglia=jTblStudenti.getRowHeight();} +// txtUsername.setSize(CalcolaLarghezzaAltezza(txtUsername.getWidth(),LargControlli), CalcolaLarghezzaAltezza(txtUsername.getHeight(),AltControlli)); + + jTblStudenti.setRowHeight(25); + + + //ClearTable((MyTableModel)jTblTessere.getModel()); + + if (jTblStudenti.getRowCount() > 0) { + jTblStudenti.setRowSelectionInterval(0, 0); + + } + ///AggiornaTessera(0); + + + } catch (Exception e) { + } + } + private Integer CalcolaLarghezzaAltezza(Integer LarControllo,Integer Percentuale){ + Integer D = Percentuale - 100; + if (D == 0) { + return LarControllo; + } else { + Integer N = LarControllo + ((LarControllo * D) / 100); + return N; + } + + } + public Object[][] RowData(String Query, String[] Cols, String[] ColType, int rowCount) { + Object[][] rows = null; + try { + Connection dbConnection = DriverManager.getConnection(frmPuntoCassa.dbStringa, frmPuntoCassa.dbUsername, frmPuntoCassa.dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + rows = new Object[rowCount][]; + int r = 0; + while (rs.next()) { + Object[] row = new Object[Cols.length]; + for (int i = 0; i < Cols.length; i++) { + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + switch (ColType[i]) { + case "text": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + break; + case "integer": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0; + } else { + row[i] = rs.getInt(Cols[i].replace(" ", "_")); + } + break; + case "long": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0; + } else { + row[i] = rs.getLong(Cols[i].replace(" ", "_")); + } + break; + case "boolean": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = false; + } else { + row[i] = rs.getBoolean(Cols[i].replace(" ", "_")); + } + break; + case "float": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0.00; + } else { + String v = rs.getString(Cols[i].replace(" ", "_")); + + row[i] = Float.parseFloat(v.replace(",", ".")); + } + + break; + + case "data": + row[i] = ""; + if (rs.getString(Cols[i].replace(" ", "_")) != null) { +// Date d = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss",Locale.ITALY).parse(rs.getString(Cols[i])); + //SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + String[] d= rs.getString(Cols[i].replace(" ", "_")).split("-"); + if (d.length>=3){ + String Ora=""; + + if(d[2].length()>8){ + String O[]=d[2].trim().split(" "); + if(O.length>1){ + if(O[1].length()>=8){ + Ora=O[1].substring(0, 8); + } + } + } + row[i] = d[2].trim().substring(0, 2) + "/" + d[1] + "/" + d[0] + " " + Ora; + } + } + + break; + } + + } + rows[r] = row; + r++; + /*int id = rs.getInt("id"); + String name = rs.getString("name"); + int age = rs.getInt("age"); + String address = rs.getString("address"); + float salary = rs.getFloat("salary");*/ + + } + rs.close(); + st.close(); + dbConnection.close(); + + } catch (SQLException | NumberFormatException e) { + System.err.println(e.getClass().getName() + ": " + e.getMessage()); + } finally { + + return rows; + } + + } + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + // + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(FrmStorno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(FrmStorno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(FrmStorno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(FrmStorno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + // + // + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new FrmStorno(null,0L,0L,null,false).setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBtnOK; + private javax.swing.JLabel jLblTitolo; + private javax.swing.JScrollPane jScrollPane3; + private javax.swing.JTable jTblStudenti; + private javax.swing.JButton jbtnAnnulla; + private javax.swing.JButton jbtnGiu; + private javax.swing.JButton jbtnSu; + private javax.swing.JPanel pnl1; + // End of variables declaration//GEN-END:variables +} diff --git a/src/puntocassa/JInternalReport.form b/src/puntocassa/JInternalReport.form deleted file mode 100644 index a7acc73..0000000 --- a/src/puntocassa/JInternalReport.form +++ /dev/null @@ -1,34 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/puntocassa/JInternalReport.java b/src/puntocassa/JInternalReport.java deleted file mode 100644 index e994b15..0000000 --- a/src/puntocassa/JInternalReport.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package puntocassa; -import static net.sf.dynamicreports.report.builder.DynamicReports.*; -import java.awt.Color; -import java.awt.Cursor; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import net.sf.dynamicreports.examples.complex.dynamicreport.DynamicColumn; -import net.sf.dynamicreports.jasper.builder.JasperReportBuilder; -import net.sf.dynamicreports.jasper.constant.JasperProperty; -import net.sf.dynamicreports.report.builder.column.ColumnBuilder; -import net.sf.dynamicreports.report.builder.column.PercentageColumnBuilder; -import net.sf.dynamicreports.report.builder.column.TextColumnBuilder; -import net.sf.dynamicreports.report.builder.group.GroupBuilders; -import net.sf.dynamicreports.report.builder.style.ReportStyleBuilder; -import net.sf.dynamicreports.report.builder.style.StyleBuilder; -import net.sf.dynamicreports.report.builder.subtotal.AggregationSubtotalBuilder; -import net.sf.dynamicreports.report.constant.HorizontalAlignment; -import net.sf.dynamicreports.report.constant.PageOrientation; -import net.sf.dynamicreports.report.constant.PageType; -import net.sf.dynamicreports.report.datasource.DRDataSource; -import net.sf.dynamicreports.report.exception.DRException; -import net.sf.jasperreports.engine.DefaultJasperReportsContext; -import net.sf.jasperreports.engine.JRDataSource; -import net.sf.jasperreports.engine.JasperPrint; -import net.sf.jasperreports.view.JasperViewer; -/** - * - * @author Marco - */ -public class JInternalReport extends javax.swing.JInternalFrame { - MyApplication MyA=new MyApplication(); - public String TitoloReport = "Regione Toscana - Punto Cassa "; - String Ditta="Regione Toscana"; - private StyleBuilder boldStyle; - private TextColumnBuilder ColonnaPrezzi; - - public void CreaReport(String[] Col, String[] ColType, Object[][] data) { - - - StyleBuilder boldStyle = stl.style().bold(); - //scegliere il size del font - StyleBuilder FontStyle = stl.style().setFontSize(7); - StyleBuilder boldCenteredStyle = stl.style(boldStyle).setHorizontalAlignment(HorizontalAlignment.CENTER); - StyleBuilder boldLeftStyle = stl.style(boldStyle).setHorizontalAlignment(HorizontalAlignment.LEFT); - StyleBuilder columnTitleStyle = stl.style(boldCenteredStyle).setBorder(stl.pen1Point()).setBackgroundColor(Color.LIGHT_GRAY); - - ArrayList columns = new ArrayList(); - - TextColumnBuilder itemColumn= null; - TextColumnBuilder itemPosizione= null; - MyApplication MyA=new MyApplication(); - for (int i = 0; i < Col.length; i++) { - if (Col[i].toString().equalsIgnoreCase("Codice")) { - } else { - - switch (ColType[i]) { - case "text": - TextColumnBuilder textColumn = col.column(Col[i].replace("_", " "), Col[i], type.stringType()); - textColumn.setHorizontalAlignment(HorizontalAlignment.CENTER); - columns.add(textColumn); - - break; - case "integer": - TextColumnBuilder integerColumn = col.column(Col[i].replace("_", " "), Col[i], type.integerType()); - - columns.add(integerColumn); - if (Col[i].equalsIgnoreCase(MyA.ReportColonnaGroupBy)){ - itemPosizione=integerColumn; - } - break; - case "boolean": - //TextColumnBuilder booleanColumn = col.column(Col[i], Col[i].replace(" ", "_"), type.booleanType()); - TextColumnBuilder booleanColumn = col.column(Col[i].replace("_", " "), Col[i], type.stringType()); - booleanColumn.setHorizontalAlignment(HorizontalAlignment.CENTER); - columns.add(booleanColumn); - break; - case "float": - TextColumnBuilder floatColumn = col.column(Col[i].replace("_", " "), Col[i], type.floatType()); - floatColumn.setPattern("#,##0.00"); - columns.add(floatColumn); - - if (Col[i].equalsIgnoreCase(MyA.ReportColonnaSomma)){ - itemColumn=floatColumn; - } - ColonnaPrezzi=floatColumn; - break; - } - } - } - - //TextColumnBuilder unitPriceColumn = col.column("Unit price", "unitprice", type.bigDecimalType()); - //price = unitPrice * quantity - //TextColumnBuilder priceColumn = unitPriceColumn.multiply(quantityColumn).setTitle("Price"); - //PercentageColumnBuilder pricePercColumn = col.percentageColumn("Price %", priceColumn); - /*TextColumnBuilder rowNumberColumn = col.reportRowNumberColumn("No.") - //sets the fixed width of a column, width = 2 * character width - .setFixedColumns(2) - .setHorizontalAlignment(HorizontalAlignment.CENTER);*/ - try { - - JasperReportBuilder myReport; - - myReport = report() - .setColumnTitleStyle(columnTitleStyle) - .highlightDetailEvenRows() - .subtotalsAtSummary(createSubtotal("Totale")) - // .columns() - //.columns(columns) - - // rowNumberColumn, textColumn, integerColumn, floatColumn) - .title(cmp.text(Ditta).setStyle(boldLeftStyle),cmp.text(TitoloReport).setStyle(boldCenteredStyle),cmp.image("..\\risorse\\logoStampa.jpg").setDimension(50,50))//shows report title - //.title(cmp.image("pictures\\logoStampa.jpg").setFixedHeight(50),cmp.text(Ditta).setStyle(boldLeftStyle),cmp.text(TitoloReport).setStyle(boldCenteredStyle))//shows report title - - .pageFooter(cmp.pageXofY().setStyle(boldCenteredStyle))//shows number of page at page footer - //.setDataSource(createDataSource(Col,data))//set datasource - .setPageFormat(PageType.A5, PageOrientation.LANDSCAPE) - //.setPageMargin(margin(20)) - //.groupBy(itemColumn) - - - //assegna la grandezza del font al corpo del report - .setColumnStyle(FontStyle) - - - .setDataSource(createDataSource(Col,ColType, data)); - - for (int i = 0; i < columns.size(); i++) { - columns.get(i).setStretchWithOverflow(true); - columns.get(i).addProperty(JasperProperty.PRINT_KEEP_FULL_TEXT, "true"); - Integer Pos=MyA.ElencoColonneReport.indexOf(";" + i + "|"); - if (Pos>=0){ - Integer PosF=MyA.ElencoColonneReport.indexOf(";",Pos+1); - String T=MyA.ElencoColonneReport.substring(Pos, PosF); - String E[]=T.split("\\|"); - columns.get(i).setFixedWidth(Integer.parseInt(E[1])); - } - myReport.columns(columns.get(i)); - - } - - -// if (MyA.ReportColonnaGroupBy.length()>0){ -// myReport.groupBy(itemPosizione); -// myReport.subtotalsAtSummary(sbt.sum(itemColumn)); -// //myReport.subtotalsAtFirstGroupFooter(sbt.sum(itemPosizione),sbt.sum(itemColumn)); -// } - MyA.ReportColonnaGroupBy="";MyA.ElencoColonneReport=""; - JasperPrint reportPrint = myReport.toJasperPrint(); - JasperViewer reportViewer = new JasperViewer( - DefaultJasperReportsContext.getInstance(), - reportPrint, - false, - null, - null - ); - - reportViewer.setTitle(TitoloReport); - - reportViewer.setVisible(true); - - setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - - } catch (DRException e) { - setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - e.printStackTrace(); - - } - - } - - private AggregationSubtotalBuilder createSubtotal(String label) { - boldStyle = stl.style().bold().setHorizontalAlignment(HorizontalAlignment.RIGHT); - - return sbt.sum(ColonnaPrezzi).setLabel(label).setLabelStyle(boldStyle); - - } - - - private JRDataSource createDataSource(String[] Col,String[] ColType, Object[][] data) { - - //DRDataSource dataSource = new DRDataSource("item", "quantity", "unitprice"); - - //dataSource.add("Notebook", 1, new BigDecimal(500)); - if (Col[0].toString().equalsIgnoreCase("Codice")) { - String[] Col2=new String[Col.length-1]; - for(int i=1;i//GEN-BEGIN:initComponents - private void initComponents() { - - setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 400, Short.MAX_VALUE) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 300, Short.MAX_VALUE) - ); - - pack(); - }// //GEN-END:initComponents - - - - // Variables declaration - do not modify//GEN-BEGIN:variables - // End of variables declaration//GEN-END:variables -} diff --git a/src/puntocassa/MyApplication.java b/src/puntocassa/MyApplication.java index 04014a3..6502248 100644 --- a/src/puntocassa/MyApplication.java +++ b/src/puntocassa/MyApplication.java @@ -1,291 +1,203 @@ package puntocassa; - import SmartCard.ISO7816Response; import SmartCard.SmartCard; import SmartCard.StringUtil; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.text.DecimalFormat; -import java.util.ArrayList; -import java.util.Properties; import javax.smartcardio.CardException; import javax.smartcardio.CommandAPDU; import javax.smartcardio.ResponseAPDU; -import javax.swing.JComboBox; import javax.swing.JOptionPane; +import puntocassa.utils.Utils; /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ - /** * * @author Marco */ public class MyApplication { - public static String path ="";// System.getProperty("user.dir") + "/db/MyFactoryDB.sqlite"; - public static String ElencoRigheDivisori=""; - public static String ElencoColonneFloat=""; - public static String ElencoColonneReport=""; - public static String ReportColonnaGroupBy=""; - public static String ReportColonnaSomma=""; - public static SmartCard SC = new SmartCard(); - public static String idTesseraA=""; - public static String UltimoTxt=" "; - public static Boolean TastieraVideo=true; - public static Boolean UnaVolta=false; - public boolean isNumeric(String s) { - return s.matches("[-+]?\\d*\\.?\\d+"); -} - public String NumericMonth(String Month) { - String num=""; - switch (Month) { - case "Jan": - num="01"; - break; - case "Feb": - num="02"; - break; - case "Mar": - num="03"; - break; - case "Apr": - num="04"; - break; - case "May": - num="05"; - break; - case "Jun": - num="06"; - break; - case "Jul": - num="07"; - break; - case "Aug": - num="08"; - break; - case "Sep": - num="09"; - break; - case "Oct": - num="10"; - break; - case "Nov": - num="11"; - break; - case "Dec": - num="12"; - break; - } - return num; - } + public static String path = "";// System.getProperty("user.dir") + "/db/MyFactoryDB.sqlite"; + //public static String elencoRigheDivisori = ""; + //public static String elencoColonneFloat = ""; + public static String elencoColonneReport = ""; + public static String reportColonnaGroupBy = ""; + public static String reportColonnaSomma = ""; + public static SmartCard smartCard = new SmartCard(); + public static String idTesseraA = ""; + public static String ultimoTxt = " "; + public static Boolean tastieraVideo = true; + public static Boolean unaVolta = false; + + + - public String MySelect(PuntoCassa frmA, String Query,String Campo) { + + /*public String mySelect(PuntoCassa frmA, String query, String campo) { String res = ""; try { - Connection dbConnection = DriverManager.getConnection(frmA.dbStringa, frmA.dbUsername, frmA.dbPassword); + Connection dbConnection = DriverManager.getConnection(frmA.dbStringa, frmA.dbUsername, frmA.dbPassword); Statement st = dbConnection.createStatement(); - ResultSet rs = st.executeQuery(Query); + ResultSet rs = st.executeQuery(query); while (rs.next()) { - res = rs.getString(Campo); + res = rs.getString(campo); } rs.close(); st.close(); dbConnection.close(); } catch (SQLException e) { - JOptionPane.showMessageDialog(frmA, "Errore MySelect ['" + e.getMessage() + " " + Query + "']"); + JOptionPane.showMessageDialog(frmA, "Errore MySelect ['" + e.getMessage() + " " + query + "']"); } - if(res==null){res="";} + if (res == null) { + res = ""; + } return res; - } - public String ExportCSV(Object[][] data, String[] Cols,String[] ColType,int ColInizio) { + }*/ + + /*public String exportCSV(Object[][] data, String[] cols, String[] colType, int colInizio) { StringBuilder s = new StringBuilder(""); DecimalFormat df = new DecimalFormat("#0.00"); - for (int i = ColInizio; i < Cols.length; i++) { - s.append(Cols[i] + ";"); + for (int i = colInizio; i < cols.length; i++) { + s.append(cols[i]).append(";"); } s.append("\r"); - for (int i = 0; i < data.length; i++) { - for (int c = ColInizio; c < Cols.length; c++) { - if (data[i][c] == null) { + for (Object[] data1 : data) { + for (int c = colInizio; c < cols.length; c++) { + if (data1[c] == null) { s.append(";"); } else { - - String field=data[i][c].toString().replace("\r", " "); + String field = data1[c].toString().replace("\r", " "); + if (colType[c].equalsIgnoreCase("integer")) { + Integer in = Integer.valueOf(field); + if (in == 0) { + field = ""; + } else { + field = "" + in; + } + + } else if (colType[c].equalsIgnoreCase("float")) { + Float in = Float.valueOf(field); + if (in == 0) { + field = ""; + } else { + field = "" + df.format(in); + } + + } else if (colType[c].equalsIgnoreCase("boolean")) { + Boolean in = Boolean.valueOf(field); + if (in == true) { + field = "Si"; + } else { + field = "No"; + } - if (ColType[c].toString().equalsIgnoreCase("integer")){ - Integer in=Integer.parseInt(field); - if (in==0){field="";}else{field="" + in;} - - }else if (ColType[c].toString().equalsIgnoreCase("float")){ - Float in=Float.parseFloat(field); - if (in==0){field="";}else{field="" + df.format(in);} - - } else if (ColType[c].toString().equalsIgnoreCase("boolean")){ - Boolean in=Boolean.parseBoolean(field); - if (in==true){field="Si";}else{field="No";} - } - field=field.replace("\n", " "); - field=field.replace(";", ","); - s.append(field + ";"); + field = field.replace("\n", " "); + field = field.replace(";", ","); + s.append(field).append(";"); } } s.append("\r"); } return s.toString(); - } - public static String sendAPDU(PuntoCassa frmATT, String Sdata,String Scla,String Sins,String Sp1,String Sp2,String Sp3,String Sle) throws CardException{ - CommandAPDU apdu=null; - - if(!SC.isConnected()){ - JOptionPane.showMessageDialog(frmATT, new Exception("Please connect first"),"Exception",JOptionPane.ERROR_MESSAGE); - return ""; - } - - Integer cla = StringUtil.parseHex(Scla); - Integer ins = StringUtil.parseHex(Sins); - Integer p1 = StringUtil.parseHex(Sp1); - Integer p2 = StringUtil.parseHex(Sp2); - Integer p3 = StringUtil.parseHex(Sp3); - Integer le = StringUtil.parseHex(Sle); + }*/ - if(cla == null){ - JOptionPane.showMessageDialog(frmATT, new Exception("Invalid value for CLASS"),"Exception",JOptionPane.ERROR_MESSAGE); + public static String sendAPDU(PuntoCassa frmATT, String sData, String sCla, String sIns, + String sP1, String sP2, String sP3, String sLe) throws CardException { + CommandAPDU apdu; + + if (!smartCard.isConnected()) { + JOptionPane.showMessageDialog(frmATT, new Exception("Please connect first"), "Exception", JOptionPane.ERROR_MESSAGE); return ""; } - if(ins == null){ - JOptionPane.showMessageDialog(frmATT, new Exception("Invalid value for INS"),"Exception",JOptionPane.ERROR_MESSAGE); - return ""; - } - if(p1 == null || p2 == null){ - JOptionPane.showMessageDialog(frmATT, new Exception("Invalid value for P1/2"),"Exception",JOptionPane.ERROR_MESSAGE); - return ""; + Integer cla = StringUtil.parseHex(sCla); + Integer ins = StringUtil.parseHex(sIns); + Integer p1 = StringUtil.parseHex(sP1); + Integer p2 = StringUtil.parseHex(sP2); + Integer p3 = StringUtil.parseHex(sP3); + Integer le = StringUtil.parseHex(sLe); + + if (cla == null) { + JOptionPane.showMessageDialog(frmATT, new Exception("Invalid value for CLASS"), "Exception", JOptionPane.ERROR_MESSAGE); + return ""; } - - byte[] data = StringUtil.stringToByteArr(Sdata); - - if(Sdata.length()==0 && le==null) - apdu = new CommandAPDU(cla, ins,p1, p2); - else if(p3 == null && le == null) - apdu = new CommandAPDU(cla, ins ,p1, p2, data); - else if(le == null) - apdu = new CommandAPDU(cla, ins ,p1, p2,data,0,p3); - else{ - if(p3==null) p3 = data.length; - apdu = new CommandAPDU(cla, ins ,p1, p2, data,0,p3,le); + if (ins == null) { + JOptionPane.showMessageDialog(frmATT, new Exception("Invalid value for INS"), "Exception", JOptionPane.ERROR_MESSAGE); + return ""; } - - ResponseAPDU res = SC.getChannel().transmit(apdu); - - String sw = StringUtil.byteToHex(res.getSW1()) + " " + StringUtil.byteToHex(res.getSW2()) ; + if (p1 == null || p2 == null) { + JOptionPane.showMessageDialog(frmATT, new Exception("Invalid value for P1/2"), "Exception", JOptionPane.ERROR_MESSAGE); + + return ""; + } + + byte[] data = StringUtil.stringToByteArr(sData); + + if (sData.length() == 0 && le == null) { + apdu = new CommandAPDU(cla, ins, p1, p2); + } else if (p3 == null && le == null) { + apdu = new CommandAPDU(cla, ins, p1, p2, data); + } else if (le == null) { + apdu = new CommandAPDU(cla, ins, p1, p2, data, 0, p3); + } else { + if (p3 == null) { + p3 = data.length; + } + apdu = new CommandAPDU(cla, ins, p1, p2, data, 0, p3, le); + } + + ResponseAPDU res = smartCard.getChannel().transmit(apdu); + + String sw = StringUtil.byteToHex(res.getSW1()) + " " + StringUtil.byteToHex(res.getSW2()); ISO7816Response isoResp = new ISO7816Response(res.getSW1(), res.getSW2()); String status = isoResp.toString(); - - /*if(isoResp.isGood()) - lbLastStatus.setForeground(Color.GREEN); - else - lbLastStatus.setForeground(Color.RED); - lbLastStatus.setText(status);*/ - - /*String dataoutHex = StringUtil.byteArrToString(res.getData()," "); - String dataoutStr = StringUtil.byteArrToPrintableString(res.getData()); - String fullResHex = StringUtil.byteArrToString(res.getBytes()," ");*/ - String CF="",DS=""; - //jtxtDati.setText(StringUtil.hexDump(res.getBytes(), 16)); - if (Sle.length()>0 && Integer.parseInt(Sle)==140 ) { - String Dati = StringUtil.byteArrToPrintableString(res.getBytes()); - if (Dati.length() >= 47) { -// jtxtDati.append(Dati+ "\n"); -// StringBuilder S = new StringBuilder(); -// S.append(Dati.substring(12, 26) + "\n"); - idTesseraA = Dati.substring(12, 26).replace(".", ""); - CF = Dati.substring(31, 47); - DS = TrovaScadenza(Dati);//Dati.substring(188, 196);//data scadenza + + + String CF = "", DS; + if (sLe.length() > 0 && Integer.parseInt(sLe) == 140) { + String dati = StringUtil.byteArrToPrintableString(res.getBytes()); + if (dati.length() >= 47) { + idTesseraA = dati.substring(12, 26).replace(".", ""); + CF = dati.substring(31, 47); + DS = Utils.trovaScadenza(dati);//data scadenza CF = CF + "|" + DS; -// S.append(Dati.substring(31, 47) + "\n");//CF -// jtxtCF.setText(Dati.substring(31, 47)); -// S.append(Dati.substring(47, 74) + "\n"); -// S.append(Dati.substring(75, 83) + "\n"); -// S.append(Dati.substring(99, 133) + "\n"); -// jtxtDati.append(S.toString()); } return CF; } - if (Sle.length()>0 && Integer.parseInt(Sle)==14) { - String Dati = StringUtil.byteArrToPrintableString(res.getBytes()); -// jtxtDati.append(Dati+ "\n"); - StringBuilder S = new StringBuilder(); - if (Dati.length() >= 16) { - S.append(Dati.substring(4, 16) + "\n"); - idTesseraA = idTesseraA + Dati.substring(4, 13) + Luhn(idTesseraA + Dati.substring(4, 13)); + if (sLe.length() > 0 && Integer.parseInt(sLe) == 14) { + String dati = StringUtil.byteArrToPrintableString(res.getBytes()); + StringBuilder s = new StringBuilder(); + if (dati.length() >= 16) { + s.append(dati.substring(4, 16)).append("\n"); + idTesseraA = idTesseraA + dati.substring(4, 13) + Utils.luhn(idTesseraA + dati.substring(4, 13)); } -// jtxtIDT.setText(IdTesseraA); -// jtxtDati.append(S.toString()); - - } - return idTesseraA; - } - private static String TrovaScadenza(String Testo) { - String Scadenza = ""; - String Tag = "#"; - Integer PI = Testo.lastIndexOf(Tag); - if (PI > 0) { - Scadenza=Testo.substring(PI-9, PI-1); - } - - return Scadenza; - } - public String AggiustaDateTessera(String data){ - String Data=""; - if(data.length()>=8){ - String m="",d="",a=""; - m=data.substring(4, 6); - d=data.substring(6, 8); - a=data.substring(0, 4); - Data= d + "/" + m + "/" + a; - - } - - return Data; - - } - static String Luhn(String Dati){ - - - Integer s=0; - for (Integer i=0;i=10){doppio=1+(doppio%10);} - s=s+doppio; - }else{ - s=s+d; - } - } - Integer resto=s%10; - if (resto == 0) { - return "0"; - } else { - Integer ris=10 - resto; - return "" + ris; - } - } + + /*public String aggiustaDateTessera(String data) { + String newData = ""; + if (data.length() >= 8) { + String m, d, a; + m = data.substring(4, 6); + d = data.substring(6, 8); + a = data.substring(0, 4); + newData = d + "/" + m + "/" + a; + + } + + return newData; + + }*/ + + } diff --git a/src/puntocassa/MyKeyBoard.java b/src/puntocassa/MyKeyBoard.java index e8b0c21..28d952b 100644 --- a/src/puntocassa/MyKeyBoard.java +++ b/src/puntocassa/MyKeyBoard.java @@ -3,10 +3,8 @@ * To change this template file, choose Tools | Templates * and open the template in the editor. */ - package puntocassa; -import java.awt.Desktop; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; @@ -21,22 +19,23 @@ import javax.swing.JTextField; * @author Marco */ public class MyKeyBoard extends javax.swing.JFrame { + public JTextField txt; - public JFrame Parent; - Process proc; - Boolean FormCerca=false; + public JFrame parent; + Boolean formCerca = false; + /** * Creates new form MyKeyBoard */ - public MyKeyBoard(JFrame parent,Boolean Ricerca) { + public MyKeyBoard(JFrame parent, Boolean ricerca) { initComponents(); - CreaPulsanti(); - Parent=parent; - FormCerca=Ricerca; - Parent.setEnabled(false); + creaPulsanti(); + this.parent = parent; + formCerca = ricerca; + this.parent.setEnabled(false); String startDir = System.getProperty("user.dir"); - File IconaApp = new File(startDir + "/risorse/logo.png"); - if (IconaApp.exists()) { + File iconaApp = new File(startDir + "/risorse/logo.png"); + if (iconaApp.exists()) { ImageIcon icon = new ImageIcon(startDir + "/risorse/logo.png"); this.setIconImage(icon.getImage()); @@ -44,27 +43,29 @@ public class MyKeyBoard extends javax.swing.JFrame { } - private void CreaPulsanti(){ - String [] Tasti={"1","2","3","4","5","6","7","8","9","0","/","ì"}; - Crea(Tasti,jPanel1); - String [] Tasti2={"q","w","e","r","t","y","u","i","o","p","è","é"}; - Crea(Tasti2,jPanel2); - String [] Tasti3={"a","s","d","f","g","h","j","k","l","ò","à","ù"}; - Crea(Tasti3,jPanel3); - String [] Tasti4={"z","x","c","v","b","n","m",",",".",":","-","'"}; - Crea(Tasti4,jPanel4); + private void creaPulsanti() { + String[] tasti = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "/", "ì"}; + crea(tasti, jPanel1); + String[] tasti2 = {"q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "è", "é"}; + crea(tasti2, jPanel2); + String[] tasti3 = {"a", "s", "d", "f", "g", "h", "j", "k", "l", "ò", "à", "ù"}; + crea(tasti3, jPanel3); + String[] tasti4 = {"z", "x", "c", "v", "b", "n", "m", ",", ".", ":", "-", "'"}; + crea(tasti4, jPanel4); } - private void Crea(String [] Tasti,JPanel pnl){ + + private void crea(String[] tasti, JPanel pnl) { ActionListener listenerBottoni = new ListenerPulsanti(); - for (int i=0;i0){ - txt.setText(txt.getText().substring(0, d-1)); + if (d > 0) { + txt.setText(txt.getText().substring(0, d - 1)); } - - }catch(Exception e){} + } catch (Exception e) { + } }//GEN-LAST:event_jBtnCancActionPerformed private void jBtnInvioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnInvioActionPerformed - - if (FormCerca) { - frmCerca frm; - frm = (frmCerca) Parent; - frm.Cerca(); - } - - Parent.setEnabled(true); + + if (formCerca) { + FrmCerca frm; + frm = (FrmCerca) parent; + frm.Cerca(); + } + + parent.setEnabled(true); this.dispose(); }//GEN-LAST:event_jBtnInvioActionPerformed private void jBtnSpazioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnSpazioActionPerformed // TODO add your handling code here: - txt.setText(txt.getText()+ " "); + txt.setText(txt.getText() + " "); }//GEN-LAST:event_jBtnSpazioActionPerformed private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing // TODO add your handling code here: - Parent.setEnabled(true); + parent.setEnabled(true); - this.dispose(); + this.dispose(); }//GEN-LAST:event_formWindowClosing - private class ListenerPulsanti implements ActionListener - { - public void actionPerformed(ActionEvent ev) - { - JButton pressed = (JButton) ev.getSource(); - String c = pressed.getText(); - if(jBtnShift.isSelected()){c=c.toUpperCase();} - txt.setText(txt.getText()+c); - /*if (c!="Canc" && c!="Maiuscolo" && c!="Spazio") - { - mainFrame.inserisciCarattere(c); - } - else if (c=="Canc") - { - mainFrame.inserisciCanc(c); - } - else if(c=="Maiuscolo") - { - mainFrame.inserisciMaiuscolo(c); - } - else if(c=="Spazio") - { - mainFrame.inserisciCarattere(" "); - }*/ - } - } + private class ListenerPulsanti implements ActionListener { + + public void actionPerformed(ActionEvent ev) { + JButton pressed = (JButton) ev.getSource(); + String c = pressed.getText(); + if (jBtnShift.isSelected()) { + c = c.toUpperCase(); + } + txt.setText(txt.getText() + c); + + } + } + /** * @param args the command line arguments */ @@ -272,7 +252,7 @@ public class MyKeyBoard extends javax.swing.JFrame { /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { - new MyKeyBoard(null,false).setVisible(true); + new MyKeyBoard(null, false).setVisible(true); } }); } diff --git a/src/puntocassa/MyTableModel.java b/src/puntocassa/MyTableModel.java index 569cd7d..7328fda 100644 --- a/src/puntocassa/MyTableModel.java +++ b/src/puntocassa/MyTableModel.java @@ -1,8 +1,5 @@ package puntocassa; - -import java.util.ArrayList; -import java.util.Vector; import javax.swing.table.AbstractTableModel; /* @@ -10,99 +7,106 @@ import javax.swing.table.AbstractTableModel; * To change this template file, choose Tools | Templates * and open the template in the editor. */ - /** * * @author Marco */ - public class MyTableModel extends AbstractTableModel{ - private String[] columnNames ; - private Object[][] data; - private Boolean editable=false; - private Boolean modificato=false; +public class MyTableModel extends AbstractTableModel { + + private String[] columnNames; + private Object[][] data; + private Boolean editable = false; + private Boolean modificato = false; private int[] colModificabile; private int[] colBoolean; - private Object[]row; + private Object[] row; - public Double Somma(int col) { - Double tot = 0.0; - if (data != null) { - for (int i = 0; i < data.length; i++) { - if (data[i][col] != null) { - tot = tot + Double.parseDouble(data[i][col].toString()); - } - } - } - return tot; - } + public Double somma(int col) { + Double tot = 0.0; + if (data != null) { + for (int i = 0; i < data.length; i++) { + if (data[i][col] != null) { + tot = tot + Double.valueOf(data[i][col].toString()); + } + } + } + return tot; + } - public int SommaInt(int col) { - int tot = 0; - if (data != null) { - for (int i = 0; i < data.length; i++) { - if (data[i][col] != null) { - tot = tot + (int) data[i][col]; - } - } - } - return tot; - } + public int sommaInt(int col) { + int tot = 0; + if (data != null) { + for (int i = 0; i < data.length; i++) { + if (data[i][col] != null) { + tot = tot + (int) data[i][col]; + } + } + } + return tot; + } public Object[] getRow(int Row) { - row=data[Row]; + row = data[Row]; return row; } - public void addRow(Object[] rowData) { - Object[][] data2=null; - if (data != null) { - data2 = new Object[data.length+1][]; - int r = 0; - for (int i = 0; i < data.length; i++) { - data2[r] = data[i]; - r++; - } - data2[r] = rowData; - }else{ - data2=new Object[1][]; - data2[0] = rowData; - } - - this.data = data2; -// fireTableRowsInserted(data2.length, data2.length); - fireTableDataChanged(); + public void addRow(Object[] rowData) { + Object[][] data2; + if (data != null) { + data2 = new Object[data.length + 1][]; + int r = 0; + for (int i = 0; i < data.length; i++) { + data2[r] = data[i]; + r++; + } + data2[r] = rowData; + } else { + data2 = new Object[1][]; + data2[0] = rowData; + } - } + this.data = data2; + fireTableDataChanged(); + + } public void setRow(Object[] row) { - Object[][] data2; - try { - data2 = new Object[data.length + 1][]; - for (int i = 0; i < data.length; i++) { - data2[i] = data[i]; - } - data2[data.length] = row; - this.data = data2; - } catch (Exception ex) { - } + Object[][] data2; + try { + data2 = new Object[data.length + 1][]; + for (int i = 0; i < data.length; i++) { + data2[i] = data[i]; + } + data2[data.length] = row; + this.data = data2; + } catch (Exception ex) { + } + + } - } public void deleteRow(int row) { - if (data.length > 0) { - Object[][] data2; - data2 = new Object[data.length - 1][]; - int r=0; - for (int i = 0; i < data.length; i++) { - if (i != row) { - data2[r] = data[i]; - r++; - } - } + if (data.length > 0) { + Object[][] data2; + data2 = new Object[data.length - 1][]; + int r = 0; + for (int i = 0; i < data.length; i++) { + if (i != row) { + data2[r] = data[i]; + r++; + } + } + + this.data = data2; + this.fireTableDataChanged(); + } + } + + public void clearTable() { + for (Integer i = this.getRowCount() - 1; i >= 0; i--) { + this.deleteRow(i); + } + } - this.data = data2; - this.fireTableDataChanged(); - } - } public int[] isColBoolean() { return colBoolean; } @@ -134,13 +138,13 @@ import javax.swing.table.AbstractTableModel; public void setEditable(Boolean editable) { this.editable = editable; } - - public void setColumname(String[] colnames){ - columnNames=colnames; + + public void setColumname(String[] colnames) { + columnNames = colnames; } - - public void setData(Object[][] rowdata){ - data=rowdata; + + public void setData(Object[][] rowdata) { + data = rowdata; } public int getColumnCount() { @@ -148,8 +152,11 @@ import javax.swing.table.AbstractTableModel; } public int getRowCount() { - int rows=0; - try{rows=data.length;}catch(Exception ex){} + int rows = 0; + try { + rows = data.length; + } catch (Exception ex) { + } return rows; } @@ -158,10 +165,10 @@ import javax.swing.table.AbstractTableModel; } public Object getValueAt(int row, int col) { - try{ + try { return data[row][col]; - - }catch(Exception ex){ + + } catch (Exception ex) { return ""; } @@ -170,58 +177,56 @@ import javax.swing.table.AbstractTableModel; public Class getColumnClass(int c) { return getValueAt(0, c).getClass(); } - + @Override - public void setValueAt(Object value, int row, int col) { - if (colBoolean != null) { - for (int i = 0; i < colBoolean.length; i++) { - if (colBoolean[i] == col) { - //data[row][col] = value; - //fireTableCellUpdated(row, col); - return; - } - } - } - if (colModificabile != null) { - for (int i = 0; i < colModificabile.length; i++) { - if (colModificabile[i] == col) { - data[row][col] = value; - fireTableCellUpdated(row, col); - return; - } - } - } else { - data[row][col] = value; - fireTableCellUpdated(row, col); - return; + public void setValueAt(Object value, int row, int col) { + if (colBoolean != null) { + for (int i = 0; i < colBoolean.length; i++) { + if (colBoolean[i] == col) { + //data[row][col] = value; + //fireTableCellUpdated(row, col); + return; + } + } + } + if (colModificabile != null) { + for (int i = 0; i < colModificabile.length; i++) { + if (colModificabile[i] == col) { + data[row][col] = value; + fireTableCellUpdated(row, col); + return; + } + } + } else { + data[row][col] = value; + fireTableCellUpdated(row, col); + return; - } + } - } + } - @Override - public boolean isCellEditable(int row, int col) { - if (editable) { - boolean M = false; - for (int i = 0; i < colModificabile.length; i++) { - if (col == colModificabile[i]) { - if (data[row][col].toString().equalsIgnoreCase("true") || data[row][col].toString().equalsIgnoreCase("false")) { - data[row][col] = !(Boolean) data[row][col]; + public boolean isCellEditable(int row, int col) { + if (editable) { + boolean M = false; + for (int i = 0; i < colModificabile.length; i++) { + if (col == colModificabile[i]) { + if (data[row][col].toString().equalsIgnoreCase("true") || data[row][col].toString().equalsIgnoreCase("false")) { + data[row][col] = !(Boolean) data[row][col]; - } else { - - } - M = true; - } - } - modificato = M; - return M; - } else { - return false; - } + } else { - } + } + M = true; + } + } + modificato = M; + return M; + } else { + return false; + } + } } diff --git a/src/puntocassa/PuntoCassa.form b/src/puntocassa/PuntoCassa.form index 9612a29..04502fa 100644 --- a/src/puntocassa/PuntoCassa.form +++ b/src/puntocassa/PuntoCassa.form @@ -121,21 +121,21 @@ - + - + - - + + - + @@ -173,7 +173,7 @@ - + @@ -225,7 +225,7 @@ - + @@ -357,7 +357,7 @@ - + @@ -367,7 +367,7 @@ - + @@ -736,11 +736,6 @@ - - - - - diff --git a/src/puntocassa/PuntoCassa.java b/src/puntocassa/PuntoCassa.java index de50fe8..e12fca7 100644 --- a/src/puntocassa/PuntoCassa.java +++ b/src/puntocassa/PuntoCassa.java @@ -4,13 +4,10 @@ */ package puntocassa; -//import javax.swing.JDialog; -//import java.beans.*; import java.awt.*; import java.awt.event.*; import java.io.File; -import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; @@ -21,6 +18,9 @@ import java.sql.*; import java.text.DecimalFormat; import java.text.ParseException; import java.text.SimpleDateFormat; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.Locale; @@ -29,7 +29,6 @@ import java.util.TimerTask; import javax.swing.DefaultComboBoxModel; import javax.swing.ImageIcon; import javax.swing.JButton; -import javax.swing.JComponent; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JPanel; @@ -43,10 +42,12 @@ import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import jssc.SerialPort; import jssc.SerialPortException; +import org.apache.log4j.LogManager; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; +import puntocassa.utils.Utils; //****************************************************************************** @@ -59,279 +60,92 @@ public class PuntoCassa extends JFrame implements ActionListener { // ========================================================================== // *** Variabili globali relative alle connessioni // ========================================================================== - public static String Versione="2.4"; + public static String versione = "2.4"; public static String dbStringa = ""; private String dbTipo = ""; private String dbDriver = ""; public static String dbUsername = ""; public static String dbPassword = ""; - //public static Connection dbConnection; - //private Integer statoConnessione = 0; private String utenteLoggato = ""; private String imgPath = "";// "L:\\Lavoro\\Goffredo\\risorse\\"; -// private String Path_Aggiornamento=""; - private int displayWidth = 1024; + private int displayWidth = 1024; private int displayHeight = 768; - private Long Progressivo = 0L; - private Long ProgressivoTurno = 0L; - private Long ProgressivoGiorno = 0L; - private Double ProgressivoScalare = 0.0; - private Double ProgressivoContanti = 0.0; - private Double ProgressivoTicket = 0.0; - private Double ProgressivoDifferito = 0.0; - private Double SaldoMinimoStop = 0.0; + private int altezzaBarraApplicazioni = 0; + private Long progressivo = 0L; + private Long progressivoTurno = 0L; + private Long progressivoGiorno = 0L; + private Double progressivoScalare = 0.0; + private Double progressivoContanti = 0.0; + private Double progressivoTicket = 0.0; + private Double progressivoDifferito = 0.0; + private Double saldoMinimoStop = 0.0; private Long idTurno = 0L; - private String NomeTurno = ""; + private String nomeTurno = ""; private Long idTurnoAttuale = 0L; - private String NomeTurnoAttuale = ""; + private String nomeTurnoAttuale = ""; - private int ColImporto = 1; - private int ColPunti = 2; - private int ColIDProdotto = 3; - private int ColImporto2 = 4; - private int ColCategoria = 5; + private int colImporto = 1; + private int colPunti = 2; + private int colIDProdotto = 3; + private int colImporto2 = 4; + private int colCategoria = 5; public Long idPuntoCassa = 0L; - private Boolean ConsentiCredito = false; + private Boolean consentiCredito = false; private Long idProfiloTariffario = 0L; private Long idProfiloTariffarioDefault = 0L; public static Long idModoPagamento = 0L; - public static String ModoPagamentoDefault = "A scalare"; - public static Integer FLAG_BONUS = 0; + public static String modoPagamentoDefault = "A scalare"; + public static Integer flagBonus = 0; private Long idTessera = 0L; private Long idPrenotazione = 0L; - private Boolean CassaAperta = false; + private Boolean isCassaAperta = false; private Long idAccount = 0L; Timer timerCard; - private int NumeroCategorie = 0; - - private Boolean StatoCardLettore = false; - StringBuilder TestoSwipCard = new StringBuilder(); - StringBuilder TestoRFIDCard = new StringBuilder(); - StringBuilder LogTestoTessera = new StringBuilder(); - String LogNumeroTessera = "", LogIDTessera = "", LogTesseraErrore = ""; -// StringBuilder TestoCarteCF=new StringBuilder(); -// private String TesseraCartaCF=""; - - private Boolean UnSoloTipoPagamento = false; - private Boolean menuGiornoPresente = false, MessaggioSaldoUnaVolta = false; - private Boolean FlagMostraDataDiNascita = true; - private Boolean StoCalcolando = false; - private Boolean FlagEsegueStorni = true; - //private Boolean MessaggioFlagExtraUnaVolta = false; - -// private Boolean TesseraCFLetta=false; - //private String idComposizione="",cmdComposizione=""; - private void VerificaAggiornamentoDB() { - //FlagProponiAggiornamentoDB - String FlagProponiAggiornamentoDB = MySelect("Select Valore from Parametri where chiave='FlagProponiAggiornamentoDB' ", "Valore"); - if (FlagProponiAggiornamentoDB.equals("NO")) { - return; - } - - Long Agg = MySelectInteger("Select DB_locale_aggiornato as Agg from dual", "Agg"); - if (FlagProponiAggiornamentoDB.equals("SI")) { - - if (Agg == 0) { - //jBtnDBActionPerformed(null); - AggiornaDB(true); - } - } else { - if (Agg == 0) { - //jBtnDBActionPerformed(null); - AggiornaDB(false); - } - - } + private int numeroCategorie = 0; + private Boolean statoCardLettore = false; + StringBuilder testoSwipCard = new StringBuilder(); + StringBuilder testoRFIDCard = new StringBuilder(); + StringBuilder logTestoTessera = new StringBuilder(); + String logNumeroTessera = "", logIDTessera = "", logTesseraErrore = ""; + private Boolean flagImpostaTipoPagamento = false; + private Boolean menuGiornoPresente = false, messaggioSaldoUnaVolta = false; + private Boolean flagMostraDataDiNascita = true; + private Boolean stoCalcolando = false; + private Boolean flagEsegueStorni = true; + enum StatiCarta { + ASSENTE, INSERITA, RIMOSSA } - private void VerificaModoPagamento() { - String FlagImpostaTipoPagamento = MySelect("Select Valore from Parametri where chiave='FlagImpostaTipoPagamento' ", "Valore"); - if (FlagImpostaTipoPagamento.equals("NO")) { -// jBtnTicket.setEnabled(false); - UnSoloTipoPagamento = true; - } else { -// jBtnTicket.setEnabled(true); - UnSoloTipoPagamento = false; - } - - } - - private void LogTessera() { - try { - if (LogIDTessera == "" && LogNumeroTessera == "" && LogTestoTessera.toString().length() <= 0) { - } else { - MyInsert("Insert into LETTURE_TESSERE (STRINGA_LETTA,NUMERO_TESSERA,ID_TESSERA,ERRORE) values ('" + LogTestoTessera.toString().replace("'", "''") + "','" + LogNumeroTessera + "','" + LogIDTessera + "','" + LogTesseraErrore.replace("'", "''") + "')"); - LogIDTessera = ""; - LogNumeroTessera = ""; - LogTestoTessera = new StringBuilder(); - } - } catch (Exception ex) { - } - } - - enum statiCarta { - Assente, Inserita, Tolta - } - public statiCarta StatoCarta; - public Boolean CartaLetta = false; + public StatiCarta statoCarta; + public Boolean cartaLetta = false; public static KeyEventDispatcher keyDispatcher; - - public int HFont = 15; - private int AltControlli = 100; - private int LargControlli = 100; - private int AltRigaGriglia = 0; - -// private Object[][] Completi; -// private Object[] CompletiDett; - - public frmProgress MyProgress; - public frmMeteo MyMeteo; - private int Gratuita_Residue = 0; - //private int Gratuita_ResidueProg=0; - private int Bonus_Residui = 0; - //private int Bonus_ResiduiProg=0; - private StringBuilder ModiPagamento = new StringBuilder(""); - private static Boolean KeyDespatcherAttivo = false; - public Boolean PassaggioTessera = false; - private Boolean PassaggiEsauritiNoComposizione = false; - private static Boolean Visualizza_Messaggi_Display = true; - private static String Message_Display = ""; - public static Boolean FlagExtra = false; - public static Boolean FlagRicevuta = false; + public int hFont = 15; + private int altControlli = 100; + private int largControlli = 100; + public FrmProgress myProgressForm; + public FrmMeteo myMeteoForm; + private int gratuitaResidue = 0; + private int bonusResidui = 0; + private StringBuilder modiPagamento = new StringBuilder(""); + private static Boolean keyDespatcherAttivo = false; + public Boolean passaggioTessera = false; + private Boolean passaggiEsauritiNoComposizione = false; + private static Boolean visualizzaMessaggiDisplay = true; + private static String messageDisplay = ""; + public static Boolean flagExtra = false; + public static Boolean flagRicevuta = false; Timer timerDisplay = new Timer(); - private static Integer DelaySwipCard = 100; - private static Boolean BottoneImposta = true; - private static Boolean Asporto = false; - private static Boolean FlagPrecaricaLista = false; - - // ========================================================================== - // *** Metodo per identificare la classe esterna dall'interno dei membri classe - // ========================================================================== - public PuntoCassa getOuter() { - return PuntoCassa.this; - } - - // ========================================================================== - // *** Sottoclasse per la gestione degli eventi a timer - // ========================================================================== - public class TimerDBConn extends java.util.TimerTask { - - // ======================================================================= - // ** Implementazione del riferimento alla classe contenitore - // ======================================================================= - private PuntoCassa pc; - Connection dbConnection; - - TimerDBConn(PuntoCassa pc) { - this.pc = pc; - } - - PuntoCassa getPuntoCassa() { - return pc; - } - - // ======================================================================= - // ** Contiene il processo da eseguire in background - // ======================================================================= - public void run() { - - String sql; - Statement st = null; - ResultSet rs; - - // ==================================================================== - // * Se non c'è connessione al DB prova a connettersi - // ==================================================================== - //if (this.pc.statoConnessione == 0) { - try { - Class.forName(dbDriver); - - dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); - //this.pc.statoConnessione = 1; - } catch (Exception ex) { - //this.pc.statoConnessione = 0; - this.pc.utenteLoggato = ""; - this.pc.lblStatoConnessione.setText("Errore di connessione al db"); - } - //} - - // ==================================================================== - // * Se c'è connessione - // ==================================================================== - //if (this.pc.statoConnessione == 1) { - // ----------------------------------------------------------------- - // *** Verifica lo stato di attività della connessione - // ----------------------------------------------------------------- - if (dbTipo.equals("Oracle")) { -// sql = "SELECT to_char(sysdate, 'hh24:mi') AS now FROM dual"; - sql = "Select Valore as now from Parametri where chiave='UltimoAggTabelle'"; - } else { - sql = "SELECT now() AS now FROM dual"; - } - try { - - st = dbConnection.createStatement(); - rs = st.executeQuery(sql); - while (rs.next()) { - String strRiga = rs.getString("now"); - this.pc.lblStatoConnessione.setText(strRiga + " Vers. " + Versione); - - } - - // -------------------------------------------------------------- - // ** Verifica se c'è un utente loggato - // -------------------------------------------------------------- - this.pc.pnlErrore.setVisible(false); - - // -------------------------------------------------------------- - // ** Verifica se c'è un utente loggato - // -------------------------------------------------------------- - if (this.pc.utenteLoggato == "") { - this.pc.pnlLogin.setVisible(true); - } else { - this.pc.pnlLogin.setVisible(false); - } - - rs.close(); - st.close(); - dbConnection.close(); - - } catch (SQLException e) { - this.pc.pnlErrore.setVisible(true); - this.pc.lblMessaggioErrore.setText("Errore di connessione al database!");//Errore query " + sql); - } - - // ================================================================= - // * Altrimenti ... - // ================================================================= - /*} else { - this.pc.lblStatoConnessione.setText("Errore di connessione al database"); - }*/ - } - } - - private void ClearTable(MyTableModel model) { - try { - for (Integer i = model.getRowCount() - 1; i >= 0; i--) { - model.deleteRow(i); - } - } catch (Exception e) { - } - } - // ========================================================================== - // *** Sottoclasse per i button categoria - // ========================================================================== - - public class ButtonCategoria extends javax.swing.JButton { - } - - // ========================================================================== - // *** Sottoclasse per i button prodotto - // ========================================================================== - public class ButtonProdotto extends javax.swing.JButton { - } - + private static Integer delaySwipCard = 100; + private static Boolean bottoneImposta = true; + private static Boolean asporto = false; + private static Boolean flagPrecaricaLista = false; + + //delta per la grafica (in px) + private int deltaWidth = 14; + private int deltaHeight = 7; + + // ========================================================================== // *** Constructor della classe PuntoCassa // ========================================================================== @@ -348,12 +162,11 @@ public class PuntoCassa extends JFrame implements ActionListener { try { DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = documentFactory.newDocumentBuilder(); - //Document document = builder.parse(new File("../risorse/puntocassa.xml")); String startDir = System.getProperty("user.dir"); Document document = builder.parse(new File(startDir + "/risorse/puntocassa.xml")); - File IconaApp = new File(startDir + "/risorse/logo.png"); - if (IconaApp.exists()) { + File iconaApp = new File(startDir + "/risorse/logo.png"); + if (iconaApp.exists()) { ImageIcon icon = new ImageIcon(startDir + "/risorse/logo.png"); this.setIconImage(icon.getImage()); @@ -377,9 +190,9 @@ public class PuntoCassa extends JFrame implements ActionListener { String password = db.getElementsByTagName("password").item(0).getFirstChild().getNodeValue(); if (attivo.equals("SI")) { - Encoding en = new Encoding(); + //Encoding en = new Encoding(); dbUsername = username; - dbPassword = en.decodeString(password); + dbPassword = Encoding.decodeString(password); dbTipo = tipo; dbDriver = driver; if (tipo.equals("MySQL")) { @@ -403,8 +216,6 @@ public class PuntoCassa extends JFrame implements ActionListener { if (imgPath.equalsIgnoreCase("..\\risorse\\")) { imgPath = startDir + "/risorse/"; } -// Path_Aggiornamento= p.getElementsByTagName("Aggiornamento").item(0).getFirstChild().getNodeValue(); -// Path_Aggiornamento=Path_Aggiornamento.replaceAll(Pattern.quote("\\"), Matcher.quoteReplacement("/")); } } @@ -412,38 +223,50 @@ public class PuntoCassa extends JFrame implements ActionListener { // ** Etichette // -------------------------------------------------------------------- NodeList etichette = document.getElementsByTagName("etichette"); - String Titolo = ""; - MyApplication MyA = new MyApplication(); + //String titolo = ""; + MyApplication myApp = new MyApplication(); for (int i = 0; i < paths.getLength(); i++) { Node etichetta = etichette.item(i); if (etichetta.getNodeType() == Node.ELEMENT_NODE) { Element p = (Element) etichetta; - Titolo = p.getElementsByTagName("titolo").item(0).getFirstChild().getNodeValue(); - idPuntoCassa = Long.parseLong(MyA.MySelect(this, "SELECT valore FROM parametri WHERE chiave = 'IdPuntoCassa'", "valore")); + String titolo = p.getElementsByTagName("titolo").item(0).getFirstChild().getNodeValue(); + //idPuntoCassa = Long.valueOf(myApp.mySelect(this, "SELECT valore FROM parametri WHERE chiave = 'IdPuntoCassa'", "valore")); + idPuntoCassa = Long.valueOf(Utils.mySelect("SELECT valore FROM parametri WHERE chiave = 'IdPuntoCassa'", + "valore", + this)); - String Credito = MyA.MySelect(this, "SELECT valore FROM parametri WHERE chiave = 'FlagIgnoraSaldoStop'", "valore"); - if (Credito.equalsIgnoreCase("SI")) { - ConsentiCredito = true; + //String credito = myApp.mySelect(this, "SELECT valore FROM parametri WHERE chiave = 'FlagIgnoraSaldoStop'", "valore"); + String credito = Utils.mySelect("SELECT valore FROM parametri WHERE chiave = 'FlagIgnoraSaldoStop'", + "valore", + this); + if (credito.equalsIgnoreCase("SI")) { + consentiCredito = true; } - Titolo = Titolo + " " + idPuntoCassa; - this.setTitle(Titolo); - //Aggiornamento 14-01-2019 - //String P=MyA.MySelect(this,"select tp.id || '|' || tp.nome as valore from tipi_pagamenti tp, punti_distribuzione pd, punti_cassa pc where pc.id_punto_distribuzione = pd.id and pd.id_tipo_paga_default = tp.id and pc.id =" + idPuntoCassa, "valore"); - String P = MyA.MySelect(this, "select tp.id || '|' || tp.nome || '|' || pd.flag_bonus || '|' || pd.flag_extra as valore from punti_cassa pc inner join punti_distribuzione pd on pc.id_punto_distribuzione = pd.id inner join tipi_pagamenti tp on pd.id_tipo_paga_default = tp.id where pc.id=" + idPuntoCassa, "valore"); + titolo = titolo + " " + idPuntoCassa; + this.setTitle(titolo); + //Aggiornamento 14-01-2019 + //String stringDatiPagamento = myApp.mySelect(this, "select tp.id || '|' || tp.nome || '|' || pd.flag_bonus || '|' || " + String stringDatiPagamento = Utils.mySelect("select tp.id || '|' || tp.nome || '|' || pd.flag_bonus || '|' || " + + "pd.flag_extra as valore from punti_cassa pc " + + "inner join punti_distribuzione pd on pc.id_punto_distribuzione = pd.id " + + "inner join tipi_pagamenti tp on pd.id_tipo_paga_default = tp.id " + + "where pc.id=" + idPuntoCassa, + "valore", + this); - String[] El = P.split("\\|",-1); - if (El.length >= 2) { - idModoPagamento = Long.parseLong(El[0]); - ModoPagamentoDefault = El[1]; - lblTipoPagamento.setText(El[1]); + String[] arrayDatiPagamento = stringDatiPagamento.split("\\|", -1); + if (arrayDatiPagamento.length >= 2) { + idModoPagamento = Long.valueOf(arrayDatiPagamento[0]); + modoPagamentoDefault = arrayDatiPagamento[1]; + lblTipoPagamento.setText(arrayDatiPagamento[1]); //Aggiornamento 14-01-2019 - FLAG_BONUS = Integer.parseInt(El[2]); - FlagExtra=false; - if (El[3].equalsIgnoreCase("1")){ - FlagExtra=true; + flagBonus = Integer.valueOf(arrayDatiPagamento[2]); + flagExtra = false; + if (arrayDatiPagamento[3].equalsIgnoreCase("1")) { + flagExtra = true; } - PulsantiModoPagamento(); + pulsantiModoPagamento(); } } } @@ -458,32 +281,24 @@ public class PuntoCassa extends JFrame implements ActionListener { Element p = (Element) display; displayWidth = Integer.parseInt(p.getElementsByTagName("larghezza").item(0).getFirstChild().getNodeValue()); displayHeight = Integer.parseInt(p.getElementsByTagName("altezza").item(0).getFirstChild().getNodeValue()); - HFont = Integer.parseInt(p.getElementsByTagName("fontSize").item(0).getFirstChild().getNodeValue()); - AltControlli = Integer.parseInt(p.getElementsByTagName("altezzaControlli").item(0).getFirstChild().getNodeValue()); - LargControlli = Integer.parseInt(p.getElementsByTagName("larghezzaControlli").item(0).getFirstChild().getNodeValue()); + altezzaBarraApplicazioni = Integer.parseInt(p.getElementsByTagName("altBarraApplicazioni").item(0).getFirstChild().getNodeValue()); + hFont = Integer.parseInt(p.getElementsByTagName("fontSize").item(0).getFirstChild().getNodeValue()); + altControlli = Integer.parseInt(p.getElementsByTagName("altezzaControlli").item(0).getFirstChild().getNodeValue()); + largControlli = Integer.parseInt(p.getElementsByTagName("larghezzaControlli").item(0).getFirstChild().getNodeValue()); String tastiera = p.getElementsByTagName("TastieraVideo").item(0).getFirstChild().getNodeValue(); -// MyApplication MyA=new MyApplication(); - if (tastiera.equals("NO")) { - - MyA.TastieraVideo = false; - } else { - MyA.TastieraVideo = true; - - } + myApp.tastieraVideo = !tastiera.equals("NO"); } } - //jPB.setVisible(false); //adatto panel login - Font f = new Font("Tahoma", 0, HFont); - UIManager.put( - "OptionPane.messageFont", - new FontUIResource(new Font("Tahoma", Font.BOLD, HFont)) + Font f = new Font("Tahoma", 0, hFont); + UIManager.put("OptionPane.messageFont", + new FontUIResource(new Font("Tahoma", Font.BOLD, hFont)) ); UIManager.put("OptionPane.buttonFont", new FontUIResource(new Font("Tahoma", Font.BOLD, 25))); btnLogin.setFont(f); - pnlLogin.setSize(CalcolaLarghezzaAltezza(pnlLogin.getWidth(), LargControlli), CalcolaLarghezzaAltezza(pnlLogin.getHeight(), AltControlli)); + pnlLogin.setSize(calcolaLarghezzaAltezza(pnlLogin.getWidth(), largControlli), calcolaLarghezzaAltezza(pnlLogin.getHeight(), altControlli)); lblPassword.setFont(f); lblUsername.setFont(f); txtUsername.setFont(f); @@ -491,443 +306,75 @@ public class PuntoCassa extends JFrame implements ActionListener { jTxtTessera.setFont(f); jChLogin.setFont(f); jBtnReadCard.setVisible(false); + + Font newFontBtnAnnulla = new Font(jbtnAnnulla.getFont().getName(), jbtnAnnulla.getFont().getStyle(), hFont); + jbtnAnnulla.setFont(newFontBtnAnnulla); + Font newFontBtnDuplica = new Font(jbtnDuplica.getFont().getName(), jbtnDuplica.getFont().getStyle(), hFont); + jbtnDuplica.setFont(newFontBtnDuplica); + Font newFontBtnElimina = new Font(jbtnElimina.getFont().getName(), jbtnElimina.getFont().getStyle(), hFont); + jbtnElimina.setFont(newFontBtnElimina); + Font newFontBtnChiudi = new Font(jbtnChiudi.getFont().getName(), jbtnChiudi.getFont().getStyle(), hFont); + jbtnChiudi.setFont(newFontBtnChiudi); + Font newFontTxtTotaleCassa = new Font(txtTotaleCassa.getFont().getName(), txtTotaleCassa.getFont().getStyle(), (hFont + (hFont / 10 * 3))); + txtTotaleCassa.setFont(newFontTxtTotaleCassa); + Font newFontTxtTotalePunti = new Font(txtTotalePunti.getFont().getName(), txtTotalePunti.getFont().getStyle(), (hFont + (hFont / 10 * 3))); + txtTotalePunti.setFont(newFontTxtTotalePunti); // -------------------------------------------------------------------- // ** ID_PUNTO_CASSA // -------------------------------------------------------------------- -// if(idPuntoCassa<=0L){ -// idPuntoCassa = Long.parseLong(document.getElementsByTagName("ID_Punto_Cassa").item(0).getFirstChild().getNodeValue()); -// } jcmbSC.setVisible(false); String VMD = document.getElementsByTagName("Visualizza_Messaggi_Display").item(0).getFirstChild().getNodeValue(); - if (VMD.equalsIgnoreCase("SI")) { - Visualizza_Messaggi_Display = true; - } else { - Visualizza_Messaggi_Display = false; - } - Message_Display = document.getElementsByTagName("Messaggio_Display").item(0).getFirstChild().getNodeValue(); + visualizzaMessaggiDisplay = VMD.equalsIgnoreCase("SI"); + messageDisplay = document.getElementsByTagName("Messaggio_Display").item(0).getFirstChild().getNodeValue(); updateReaderCombo(); - String UltimiMovimenti = MyA.MySelect(this, "SELECT valore FROM parametri WHERE chiave = 'FlagVisualizzaUltimiPassaggi'", "valore"); - if (UltimiMovimenti.equalsIgnoreCase("NO")) { + //String ultimiMovimenti = myApp.mySelect(this, "SELECT valore FROM parametri WHERE chiave = 'FlagVisualizzaUltimiPassaggi'", "valore"); + String ultimiMovimenti = Utils.mySelect("SELECT valore FROM parametri WHERE chiave = 'FlagVisualizzaUltimiPassaggi'", + "valore", + this); + if (ultimiMovimenti.equalsIgnoreCase("NO")) { jBtnMovimenti.setEnabled(false); } timerCard = new java.util.Timer(); timerCard.schedule(new CardTask(this), 0, 1 * 1000); - StatoAttivoNonLoggato(); + statoAttivoNonLoggato(); -// String flagExtra = MySelect("Select Valore from Parametri where Chiave='FlagExtra'", "Valore"); -// if (flagExtra.equalsIgnoreCase("NO")) { -// FlagExtra = false; -// } else { -// FlagExtra = true; -// } - String flagRicevuta = MySelect("Select Valore from Parametri where Chiave='FlagRicevuta'", "Valore"); - if (flagRicevuta.equalsIgnoreCase("NO")) { - FlagRicevuta = false; - //jbtnStampa.setEnabled(false); - } else { - FlagRicevuta = true; + String flagRicevutaValue = Utils.mySelect("Select Valore from Parametri where Chiave='FlagRicevuta'", "Valore",this); + PuntoCassa.flagRicevuta = !flagRicevutaValue.equalsIgnoreCase("NO"); + + String flagDataNascita = Utils.mySelect("Select Valore from Parametri where Chiave='FlagMostraDataDiNascita'", "Valore", this); + flagMostraDataDiNascita = !flagDataNascita.equalsIgnoreCase("NO"); + + String flagEsegueStorniValue = Utils.mySelect("Select Valore from Parametri where Chiave='FlagEsegueStorni'", "Valore", this); + this.flagEsegueStorni = !flagEsegueStorniValue.equalsIgnoreCase("NO"); + + String timeoutSwipCard = Utils.mySelect("Select Valore from Parametri where Chiave='TimeoutSwipCard'", "Valore",this); + //if (myApp.isNumeric(timeoutSwipCard)) { + if (Utils.isNumeric(timeoutSwipCard)) { + delaySwipCard = Integer.valueOf(timeoutSwipCard); } - String flagDataNascita = MySelect("Select Valore from Parametri where Chiave='FlagMostraDataDiNascita'", "Valore"); - if (flagDataNascita.equalsIgnoreCase("NO")) { - FlagMostraDataDiNascita = false; - } else { - FlagMostraDataDiNascita = true; + Utils.myInsert("UPDATE PARAMETRI set valore='NO' where chiave='FlagDownloadInCorso'", this); + + String flagDefaultAsporto = Utils.mySelect("Select Valore from Parametri where Chiave='FlagDefaultAsporto'", "Valore", this); + if (flagDefaultAsporto.equalsIgnoreCase("SI")) { + asporto = true; } - String flagEsegueStorni = MySelect("Select Valore from Parametri where Chiave='FlagEsegueStorni'", "Valore"); - if (flagEsegueStorni.equalsIgnoreCase("NO")){ - FlagEsegueStorni = false; - } else { - FlagEsegueStorni = true; - } + String flagPrecarica = Utils.mySelect("Select Valore from Parametri where Chiave='FlagPrecaricaLista'", "Valore", this); + flagPrecaricaLista = !flagPrecarica.equalsIgnoreCase("NO"); - String TimeoutSwipCard = MySelect("Select Valore from Parametri where Chiave='TimeoutSwipCard'", "Valore"); - if (MyA.isNumeric(TimeoutSwipCard)) { - DelaySwipCard = Integer.parseInt(TimeoutSwipCard); - } + keyDispatcher = creaKeyEventDispatcher(); - MyInsert("UPDATE PARAMETRI set valore='NO' where chiave='FlagDownloadInCorso'"); - - String asporto = MySelect("Select Valore from Parametri where Chiave='FlagDefaultAsporto'", "Valore"); - if (asporto.equalsIgnoreCase("SI")) { - Asporto = true; - } - - String flagPrecarica = MySelect("Select Valore from Parametri where Chiave='FlagPrecaricaLista'", "Valore"); - if (flagPrecarica.equalsIgnoreCase("NO")) { - FlagPrecaricaLista = false; - } else { - FlagPrecaricaLista = true; - } - -// KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager(); -// manager.addKeyEventDispatcher(new KeyEventDispatcher() { -// -// -// @Override -// public boolean dispatchKeyEvent(KeyEvent e) { -// -// int id = e.getID(); -// int keyCode = e.getKeyCode(); -// if (id == KeyEvent.KEY_RELEASED) { -// if (keyCode != 144 && keyCode!=16) { -// char tasto=e.getKeyChar(); -// PuntoCassa.this.TestoSwipCard.append(tasto); -// System.out.println(TestoSwipCard.toString()); -// } -// } -// return true; -// } -// -// } -// ); - keyDispatcher = new KeyEventDispatcher() { - Boolean Swip = false; - Boolean SpiaAltreCarte = false; - Boolean TimerUnaVolta = false; - MyApplication MyP = new MyApplication(); - - public boolean dispatchKeyEvent(KeyEvent e) { - int id = e.getID(); - - if (jbtnChiudi.isEnabled() && pnlLogin.isVisible() == false && jTxtTessera.getText().length() > 0) { - e.consume(); - if (MyP.UnaVolta == false) { - MyP.UnaVolta = true; -// JOptionPane.showOptionDialog(PuntoCassa.this, "Chiudere la transazione!", "Attenzione", -// JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); - } - return false; - } - MyP.UnaVolta = false; - int keyCode = e.getKeyCode(); - if (id == KeyEvent.KEY_RELEASED) { - String tasto = "" + e.getKeyChar(); - System.out.println(keyCode + " - " + tasto); - - LogTestoTessera.append(e.getKeyChar()); - -// if (keyCode != 16){ -// TestoCarteCF.append(tasto); -// } - if (tasto.equalsIgnoreCase("ò")) { //144 - Swip = true; - } - //05-12-2017 - if (keyCode == 16 || keyCode == 45 || tasto.equalsIgnoreCase("ò")) { - SpiaAltreCarte = true; - } - - if (tasto.equalsIgnoreCase("ò") == false && keyCode != 16 && keyCode != 45 && Swip) { //keyCode != 144 && keyCode != 17 - - TestoSwipCard.append(tasto); - System.out.println(TestoSwipCard.toString()); - - } - if (keyCode == 45 && Swip) { //keyCode != 144 - Swip = false; - System.out.println(TestoSwipCard.toString()); - - warn(); - } - - //30-11-2017 modifica per rfid - if (keyCode != 16) { - TestoRFIDCard.append(tasto); - } - if (keyCode == 10 && Swip == false && SpiaAltreCarte == false) { //keyCode != 144 - - System.out.println(TestoRFIDCard.toString()); - TestoSwipCard = TestoRFIDCard; - TestoRFIDCard = new StringBuilder(); - warn(); - } - - //29-10-18------------------------------------------------------ - if (TimerUnaVolta == false) { - TimerUnaVolta = true; - final Timer timer = new Timer(); - final TimerTask task = new TimerTask() { - @Override - public void run() { - - if (TestoRFIDCard.toString().length() > 2) { - System.out.println("Timer: " + TestoRFIDCard.toString()); - TestoSwipCard = TestoRFIDCard; - TestoRFIDCard = new StringBuilder(); - warn(); - } - - timer.cancel(); - timer.purge(); - TimerUnaVolta = false; - } - }; - - timer.schedule(task, 5000); - } - //fine 29-10-18------------------------------------------------------ - -// char tasto = e.getKeyChar(); -// if (keyCode == 144){Swip=true;} -// if (keyCode != 144 && keyCode != 16 && keyCode != 17) { -// -// TestoSwipCard.append(tasto); -// System.out.println(TestoSwipCard.toString()); -// warn(); -// } -// if (Swip == false) { -// AddRemoveKeyDispatcher(false); -// if (keyCode != 16 && keyCode != 17 && keyCode != 8 && keyCode != 127) { -// txtUsername.setText(txtUsername.getText() + tasto); -// } -// } - } - - return true; - } - -// private Boolean VerificaCF(String Testo) { -// Boolean ok = false; -// String El[] = Testo.split("_"); -// if (El[0].substring(0, 1).equalsIgnoreCase("%")) { -// if (El[0].length() == 17) { -// TesseraCartaCF=El[0]; -//// final Timer timer = new Timer(); -//// final TimerTask task = new TimerTask() { -//// @Override -//// public void run() { -// String CF = TesseraCartaCF.substring(1, 17); -// String Q = "select * from(SELECT c.nome || '|' || u.cognome || '|' || u.nome || '|' || TO_CHAR (u.data_di_nascita, 'dd/mm/yyyy') || '|' || u.matricola || '|' || a.nome || '|' || c.nome || '|' || f.nome || '|' || t.ID || '|' || TO_CHAR (t.data_scadenza, 'dd/mm/yyyy') || '|' || t.id_stato || '|' || u.ID || '|' || f.ID || '|' || t.gratuita_residue AS ris " -// + "FROM tessere t " -// + "INNER JOIN utenti u on t.id_utente = u.id " -// + "INNER JOIN categorie_utenti c on u.id_categoria = c.id " -// + "INNER JOIN aziende a on c.id_azienda = a.id " -// + "INNER JOIN categorie_utenti_fasce cf on cf.id_categoria_utenti = c.id " -// + "INNER JOIN fasce f on cf.id_fascia = f.id " -// + "WHERE u.codice_fiscale = '" + CF + "' " -// + "AND t.id_stato = 1 " -// + "ORDER BY t.data_scadenza desc, t.data_emissione desc) where ROWNUM=1"; -// String Q2 = "select * from(SELECT t.Numero AS ris " -// + "FROM tessere t " -// + "INNER JOIN utenti u on t.id_utente = u.id " -// + "INNER JOIN categorie_utenti c on u.id_categoria = c.id " -// + "INNER JOIN aziende a on c.id_azienda = a.id " -// + "INNER JOIN categorie_utenti_fasce cf on cf.id_categoria_utenti = c.id " -// + "INNER JOIN fasce f on cf.id_fascia = f.id " -// + "WHERE u.codice_fiscale = '" + CF + "' " -// + "AND t.id_stato = 1 " -// + "ORDER BY t.data_scadenza desc, t.data_emissione desc) where ROWNUM=1"; -// String Tessera = MySelect(Q2, "ris"); -// jTxtTessera.setText(Tessera); -// PassaggioTessera = true; -// ok=true; -// CercaTessera(Q); -// -//// timer.cancel(); -//// timer.purge(); -// StatoCardLettore = false; -// -//// } -//// }; -//// -//// timer.schedule(task, DelaySwipCard); -// -// } -// } -// -// return ok; -// } - public void warn() { - if (StatoCardLettore) { - return; - } -// System.out.println("TestoCarteCF: " + TestoCarteCF.toString()); -// if(TesseraCFLetta){ -// System.out.println("TestoCarteCF letta "); -// -// return; -// } - //29-10-2018 - TestoRFIDCard = new StringBuilder(); - //fine 29-10-2018 - -// Boolean èCF = false; -// TesseraCartaCF=""; -// if (TestoCarteCF.toString().length() > 0) { -// -// èCF=VerificaCF(TestoCarteCF.toString().replaceAll("\n", "")); -// TesseraCFLetta=èCF; -// TestoCarteCF=new StringBuilder(); -// -// } - if (TestoSwipCard.toString().length() > 0) {// && èCF==false) { - StatoCardLettore = true; - - final Timer timer = new Timer(); - - final TimerTask task = new TimerTask() { - @Override - public void run() { - String Tessera = ""; - //per tessere tipo 8 e 9 - if (TestoSwipCard.toString().indexOf("ì") >= 0) { - String[] txt = TestoSwipCard.toString().split("ì"); - - // per tessera MASTERCARD CARDHOLDER - if (TestoSwipCard.toString().length() > 30) { - - Tessera = txt[0].trim().replace("_", ""); - } else { - Tessera = txt[1].trim().replace("_", ""); - } - } else if (TestoSwipCard.toString().indexOf("&") >= 0) { - // per tessera MASTERCARD CARDHOLDER - String[] txt = TestoSwipCard.toString().split("&"); - - Tessera = txt[0].trim().replace("%B", ""); - - } else { - Tessera = TestoSwipCard.toString().trim().replace("_", ""); - } - - //per tessera tipo 3 - if (Tessera.length() >= 17 && Tessera.length() <= 19) { - Tessera = Tessera.substring(0, 7); - } - - //per tessere tipo 6 e 7 - if (Tessera.length() == 21) { - Tessera = Tessera.substring(0, 10); - int PosI = 0; - for (int i = 0; i <= Tessera.length(); i++) { - if (Tessera.substring(i, i + 1).equalsIgnoreCase("0") == false) { - PosI = i; - break; - } - } - - Tessera = Tessera.substring(PosI); - } - - SpiaAltreCarte = false; - Swip = false; - if (pnlLogin.isVisible()) { - ControllaLogInCarta(Tessera); -// Swip = false; - } else { - //05/11/2018 le nuove tessere con CF a volte leggono solo la matricola -// if (TestoCarteCF.toString().equalsIgnoreCase("%E_ò" + Tessera + "_") || (TestoCarteCF.toString().length()>1 && TestoCarteCF.toString().length()<=8 )) { -// System.out.println("intrappolato:" + TestoCarteCF.toString()); -// TesseraCFLetta=false; -// TestoCarteCF=new StringBuilder(); -// Azzera(); -// } else { - jTxtTessera.setText(Tessera); - PassaggioTessera = true; - LogNumeroTessera = Tessera; - CercaTessera(); -// } - } - - TestoSwipCard = new StringBuilder(); - -// String[] txt = TestoSwipCard.toString().split("ò"); -// if (txt.length > 1) { -// String Tessera = txt[1].trim().replace("_", ""); -// if (pnlLogin.isVisible()) { -// ControllaLogInCarta(Tessera); -// Swip=false; -// } else { -// jTxtTessera.setText(Tessera); -// CercaTessera(); -// -// } -// TestoSwipCard = new StringBuilder(); -// StatoCardLettore = false; -// System.out.println(Tessera); -// } - timer.cancel(); - timer.purge(); - StatoCardLettore = false; - - } - }; - - timer.schedule(task, DelaySwipCard); - - } - } - - }; - -// MyApplication MyA = new MyApplication(); -// if (MyA.TastieraVideo) { KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(keyDispatcher); - KeyDespatcherAttivo = true; -// } + keyDespatcherAttivo = true; + + verificaDB(); - VerificaDB(); - - - //KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(keyDispatcher); -// KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher( -// new KeyEventDispatcher() { -// -// public boolean dispatchKeyEvent(KeyEvent e) { -// int id = e.getID(); -// int keyCode = e.getKeyCode(); -// if (id == KeyEvent.KEY_RELEASED) { -// if (keyCode != 144 && keyCode != 16 && keyCode != 17) { -// char tasto = e.getKeyChar(); -// TestoSwipCard.append(tasto); -// System.out.println(TestoSwipCard.toString()); -// warn(); -// } -// } -// -// return true; -// } -// -// public void warn() { -// if(StatoCardLettore){return;} -// if (TestoSwipCard.toString().length()>0 ){ -// StatoCardLettore=true; -// -// final Timer timer = new Timer(); -// -// final TimerTask task = new TimerTask() { -// @Override -// public void run() { -// String[] txt=TestoSwipCard.toString().split("ò"); -// if (txt.length>0){ -// String Tessera=txt[1].trim().replace("_", ""); -// jTxtTessera.setText(Tessera); -// CercaTessera(); -// TestoSwipCard=new StringBuilder(); -// StatoCardLettore=false; -// System.out.println(Tessera); -// } -// -// -// timer.cancel(); -// timer.purge(); -// StatoCardLettore=false; -// -// } -// }; -// timer.schedule(task, 1000); -// -// -// } -// } -// }); } catch (Exception e) { e.printStackTrace(); @@ -936,113 +383,285 @@ public class PuntoCassa extends JFrame implements ActionListener { // ----------------------------------------------------------------------- // *** Aggiunge un timer con relativa schedulazione a 5 secondi // ----------------------------------------------------------------------- - TimerDBConn mt = new TimerDBConn(this); + timerDBConn mt = new timerDBConn(this); java.util.Timer timer = new java.util.Timer(); timer.schedule(mt, 0, 5000); - VerificaAggiornamentiJAR(); - //Display(Message_Display," "," "); + verificaAggiornamentiJAR(); } + + public KeyEventDispatcher creaKeyEventDispatcher(){ + return new KeyEventDispatcher() { + Boolean swip = false; + Boolean spiaAltreCarte = false; + Boolean timerUnaVolta = false; + MyApplication myApp = new MyApplication(); - private void VerificaAggiornamentiJAR() { + public boolean dispatchKeyEvent(KeyEvent e) { + int id = e.getID(); + + if (jbtnChiudi.isEnabled() && pnlLogin.isVisible() == false && jTxtTessera.getText().length() > 0) { + e.consume(); + if (myApp.unaVolta == false) { + myApp.unaVolta = true; + } + return false; + } + myApp.unaVolta = false; + int keyCode = e.getKeyCode(); + if (id == KeyEvent.KEY_RELEASED) { + String tasto = "" + e.getKeyChar(); + System.out.println(keyCode + " - " + tasto); + + logTestoTessera.append(e.getKeyChar()); + + if (tasto.equalsIgnoreCase("ò")) { //144 + swip = true; + } + //05-12-2017 + if (keyCode == 16 || keyCode == 45 || tasto.equalsIgnoreCase("ò")) { + spiaAltreCarte = true; + } + + if (tasto.equalsIgnoreCase("ò") == false && keyCode != 16 && keyCode != 45 && swip) { //keyCode != 144 && keyCode != 17 + + testoSwipCard.append(tasto); + System.out.println(testoSwipCard.toString()); + + } + if (keyCode == 45 && swip) { //keyCode != 144 + swip = false; + System.out.println(testoSwipCard.toString()); + + warn(); + } + + //30-11-2017 modifica per rfid + if (keyCode != 16) { + testoRFIDCard.append(tasto); + } + if (keyCode == 10 && swip == false && spiaAltreCarte == false) { //keyCode != 144 + + System.out.println(testoRFIDCard.toString()); + testoSwipCard = testoRFIDCard; + testoRFIDCard = new StringBuilder(); + warn(); + } + + //29-10-18------------------------------------------------------ + if (timerUnaVolta == false) { + timerUnaVolta = true; + final Timer timer = new Timer(); + final TimerTask task = new TimerTask() { + @Override + public void run() { + + if (testoRFIDCard.toString().length() > 2) { + System.out.println("Timer: " + testoRFIDCard.toString()); + testoSwipCard = testoRFIDCard; + testoRFIDCard = new StringBuilder(); + warn(); + } + + timer.cancel(); + timer.purge(); + timerUnaVolta = false; + } + }; + + timer.schedule(task, 5000); + } + //fine 29-10-18------------------------------------------------------ + + } + + return true; + } + + public void warn() { + if (statoCardLettore) { + return; + } + + //29-10-2018 + testoRFIDCard = new StringBuilder(); + //fine 29-10-2018 + + if (testoSwipCard.toString().length() > 0) { + statoCardLettore = true; + + final Timer timer = new Timer(); + + final TimerTask task = new TimerTask() { + @Override + public void run() { + String tessera = ""; + //per tessere tipo 8 e 9 + if (testoSwipCard.toString().contains("ì")) { + String[] txt = testoSwipCard.toString().split("ì"); + + // per tessera MASTERCARD CARDHOLDER + if (testoSwipCard.toString().length() > 30) { + + tessera = txt[0].trim().replace("_", ""); + } else { + tessera = txt[1].trim().replace("_", ""); + } + } else if (testoSwipCard.toString().contains("&")) { + // per tessera MASTERCARD CARDHOLDER + String[] txt = testoSwipCard.toString().split("&"); + + tessera = txt[0].trim().replace("%B", ""); + + } else { + tessera = testoSwipCard.toString().trim().replace("_", ""); + } + + //per tessera tipo 3 + if (tessera.length() >= 17 && tessera.length() <= 19) { + tessera = tessera.substring(0, 7); + } + + //per tessere tipo 6 e 7 + if (tessera.length() == 21) { + tessera = tessera.substring(0, 10); + int posI = 0; + for (int i = 0; i <= tessera.length(); i++) { + if (tessera.substring(i, i + 1).equalsIgnoreCase("0") == false) { + posI = i; + break; + } + } + + tessera = tessera.substring(posI); + } + + spiaAltreCarte = false; + swip = false; + if (pnlLogin.isVisible()) { + controllaLogInCarta(tessera); + } else { + //05/11/2018 le nuove tessere con CF a volte leggono solo la matricola + jTxtTessera.setText(tessera); + passaggioTessera = true; + logNumeroTessera = tessera; + cercaTessera(); + } + + testoSwipCard = new StringBuilder(); + + timer.cancel(); + timer.purge(); + statoCardLettore = false; + + } + }; + + timer.schedule(task, delaySwipCard); + + } + } + + }; + } + + + + /*** + * FlagProponiAggiornamentoDB ha 3 possibili valori: + * AUTO vuol dire che, se il db locale è da aggiornare (DB_locale_aggiornato = 0), lo deve fare e basta senza chiedere conferma + * SI vuol dire che, se il db locale è da aggiornare (DB_locale_aggiornato = 0), lo deve fare chiedendo conferma + * NO vuol dire che non lo deve fare nemmeno se è da aggiornare + */ + private void verificaAggiornamentoDB() { + Long dbAggiornato = Utils.mySelectInteger("Select DB_locale_aggiornato as Agg from dual", "Agg", + this); + String flagProponiAggiornamentoDB = Utils.mySelect("Select Valore from Parametri where chiave='FlagProponiAggiornamentoDB' ", "Valore", + this); + if(dbAggiornato == 0){ + if (flagProponiAggiornamentoDB.equals("SI")) { + aggiornaDB(true); + } + else if(flagProponiAggiornamentoDB.equals("AUTO")){ + aggiornaDB(false); + } + } + } + + private void verificaModoPagamento() { + flagImpostaTipoPagamento = Utils.mySelect("Select Valore from Parametri where chiave='FlagImpostaTipoPagamento' ", "Valore", + this).equals("NO"); + } + + private void logTessera() { try { - String PathURL_Aggiornamento = MySelect("Select Valore from Parametri where chiave='UrlJAR' ", "Valore"); + if (!logIDTessera.isEmpty() + || !logNumeroTessera.isEmpty() + || logTestoTessera.length() > 0) { + Utils.myInsert("Insert into LETTURE_TESSERE (STRINGA_LETTA,NUMERO_TESSERA,ID_TESSERA,ERRORE) values " + + "('" + logTestoTessera.toString().replace("'", "''") + + "','" + logNumeroTessera + + "','" + logIDTessera + + "','" + logTesseraErrore.replace("'", "''") + + "')", this); + logIDTessera = ""; + logNumeroTessera = ""; + logTestoTessera = new StringBuilder(); + } + } catch (Exception ex) { + LogManager.getLogger(PuntoCassa.class).error(ex); + } + } - if (PathURL_Aggiornamento.length() > 0) { + private void verificaAggiornamentiJAR() { + try { + String pathURLAggiornamento = Utils.mySelect("Select Valore from Parametri where chiave='UrlJAR' ", "Valore", + this); + + if (pathURLAggiornamento.length() > 0) { String startDir = System.getProperty("user.dir"); - URL url = new URL(PathURL_Aggiornamento); + URL url = new URL(pathURLAggiornamento); HttpURLConnection httpCon = (HttpURLConnection) url.openConnection(); -// File fileAgg = new File(Path_Aggiornamento); Date d = new Date(httpCon.getLastModified()); System.out.println(' ' + d.toString()); File fileAttuale = new File(startDir + "/Cassa.jar"); -// File fileAgg = new File(startDir + "/Cassa.jar"); - Date dA = new Date(fileAttuale.lastModified()); - if (d.after(dA)) { + Date dataUltimaModificaJarCorrente = new Date(fileAttuale.lastModified()); + if (d.after(dataUltimaModificaJarCorrente)) { if (JOptionPane.showConfirmDialog(null, "Aggiornamento disponibile. Aggiornare?", "Aggiornamento", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { System.out.print("Aggiorna............."); - Process proc = Runtime.getRuntime().exec("java -jar " + startDir + "/Aggiornamento.jar " + startDir + " " + PathURL_Aggiornamento); + Runtime.getRuntime().exec("java -jar " + startDir + "/Aggiornamento.jar " + startDir + " " + pathURLAggiornamento); System.exit(0); - } - } - } } catch (IOException ex) { - //Logger.getLogger(PuntoCassa.class.getName()).log(Level.SEVERE, null, ex); + LogManager.getLogger(PuntoCassa.class.getName()).error(ex); } } private void updateReaderCombo() { try { - MyApplication MyA = new MyApplication(); - jcmbSC.setModel(new DefaultComboBoxModel(MyA.SC.listReaders())); + MyApplication myApp = new MyApplication(); + jcmbSC.setModel(new DefaultComboBoxModel(myApp.smartCard.listReaders())); } catch (Exception ex) { - //JOptionPane.showMessageDialog(this, "Card Reader non collegato!", "Update Reader Combo", JOptionPane.ERROR_MESSAGE); + LogManager.getLogger(PuntoCassa.class.getName()).error(ex); } } + - private void ScaricaImmagini() { - this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); - try { - Statement st; - ResultSet rs; - String sql = "SELECT distinct prodotti.id FROM prodotti inner join catalogo_punti_cassa on prodotti.id=CATALOGO_PUNTI_CASSA.ID_Prodotto WHERE prodotti.nome IS NOT NULL and CATALOGO_PUNTI_CASSA.id_Punto_Cassa=" + idPuntoCassa; - //Integer nr=MySelectInteger("SELECT distinct count(*) as tot FROM prodotti inner join catalogo_punti_cassa on prodotti.id=CATALOGO_PUNTI_CASSA.ID_PUNTO_CASSA WHERE prodotti.nome IS NOT NULL and CATALOGO_PUNTI_CASSA.idPunto_Cassa=" + idPuntoCassa, "tot"); - Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); - st = dbConnection.createStatement(); - rs = st.executeQuery(sql); - //InputStream gifdata = null; - //Integer row=1; - while (rs.next()) { - getImage(rs.getString("id")); - - /*String FullName = imgPath + rs.getString("id") + ".jpg"; - - gifdata = rs.getBinaryStream(1); - - File giffile = new File(FullName); - - FileOutputStream file = new FileOutputStream(giffile); - int chunk = 0; - - while ((chunk = gifdata.read()) != -1) { - - file.write(chunk); - - } - file.flush(); - file.close(); - - /*Integer val=(100/nr)*row; - jPB.setValue(val);*/ - // row++; - } - - st.close(); - rs.close(); - dbConnection.close(); - } catch (Exception e) { - JOptionPane.showMessageDialog(this, "Errore Scarico Immagini " + e.getMessage(), "ScaricaImmagini", JOptionPane.ERROR_MESSAGE); - } - - this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - } - - private Integer CalcolaLarghezzaAltezza(Integer LarControllo, Integer Percentuale) { - Integer D = Percentuale - 100; - if (D == 0) { - return LarControllo; + private Integer calcolaLarghezzaAltezza(Integer larControllo, Integer percentuale) { + Integer d = percentuale - 100; + if (d == 0) { + return larControllo; } else { - Integer N = LarControllo + ((LarControllo * D) / 100); - return N; + Integer n = larControllo + ((larControllo * d) / 100); + return n; } } @@ -1059,7 +678,7 @@ public class PuntoCassa extends JFrame implements ActionListener { lblMessaggioErrore = new javax.swing.JLabel(); pnlTop = new javax.swing.JPanel(); pnlCliente = new javax.swing.JPanel(); - jPanel1 = new javax.swing.JPanel(); + subPnlTessera = new javax.swing.JPanel(); lblCodice1 = new javax.swing.JLabel(); lblSaldo = new javax.swing.JLabel(); lblCodice2 = new javax.swing.JLabel(); @@ -1074,7 +693,7 @@ public class PuntoCassa extends JFrame implements ActionListener { lblResiduo = new javax.swing.JLabel(); lblCodice5 = new javax.swing.JLabel(); lblGratuita = new javax.swing.JLabel(); - jPanel2 = new javax.swing.JPanel(); + subPnlCliente = new javax.swing.JPanel(); lblCodice = new javax.swing.JLabel(); lblCategoria = new javax.swing.JLabel(); lblDenominazione = new javax.swing.JLabel(); @@ -1174,7 +793,7 @@ public class PuntoCassa extends JFrame implements ActionListener { pnlCliente.setToolTipText(""); - jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Tessera")); + subPnlTessera.setBorder(javax.swing.BorderFactory.createTitledBorder("Tessera")); lblCodice1.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N lblCodice1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); @@ -1236,46 +855,46 @@ public class PuntoCassa extends JFrame implements ActionListener { lblGratuita.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N lblGratuita.setText("[...]"); - javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); - jPanel1.setLayout(jPanel1Layout); - jPanel1Layout.setHorizontalGroup( - jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanel1Layout.createSequentialGroup() - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanel1Layout.createSequentialGroup() + javax.swing.GroupLayout subPnlTesseraLayout = new javax.swing.GroupLayout(subPnlTessera); + subPnlTessera.setLayout(subPnlTesseraLayout); + subPnlTesseraLayout.setHorizontalGroup( + subPnlTesseraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(subPnlTesseraLayout.createSequentialGroup() + .addGroup(subPnlTesseraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(subPnlTesseraLayout.createSequentialGroup() .addContainerGap() - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addGroup(jPanel1Layout.createSequentialGroup() - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(subPnlTesseraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(subPnlTesseraLayout.createSequentialGroup() + .addGroup(subPnlTesseraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lblCodice2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lblCodice1, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE)) .addGap(8, 8, 8) - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(subPnlTesseraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lblPunti, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lblSaldo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) - .addGroup(jPanel1Layout.createSequentialGroup() - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(subPnlTesseraLayout.createSequentialGroup() + .addGroup(subPnlTesseraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lblCodice3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lblCodice4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lblCodice5)) + .addComponent(lblCodice5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(subPnlTesseraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lblResiduo, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE) .addComponent(lblTipoPagamento, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lblGratuita, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE))) .addComponent(btnImpostaCliente, javax.swing.GroupLayout.DEFAULT_SIZE, 252, Short.MAX_VALUE) .addComponent(jTxtTessera))) - .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(subPnlTesseraLayout.createSequentialGroup() .addGap(48, 48, 48) .addComponent(jBtnReadCard, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jcmbSC, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap()) ); - jPanel1Layout.setVerticalGroup( - jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanel1Layout.createSequentialGroup() - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + subPnlTesseraLayout.setVerticalGroup( + subPnlTesseraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(subPnlTesseraLayout.createSequentialGroup() + .addGroup(subPnlTesseraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jcmbSC, javax.swing.GroupLayout.PREFERRED_SIZE, 3, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jBtnReadCard, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) @@ -1283,30 +902,30 @@ public class PuntoCassa extends JFrame implements ActionListener { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnImpostaCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(subPnlTesseraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lblSaldo) - .addComponent(lblCodice1)) + .addComponent(lblCodice1, javax.swing.GroupLayout.Alignment.TRAILING)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(subPnlTesseraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lblPunti) .addComponent(lblCodice2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(subPnlTesseraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lblTipoPagamento) .addComponent(lblCodice3)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(subPnlTesseraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lblResiduo) - .addComponent(lblCodice4)) + .addComponent(lblCodice4, javax.swing.GroupLayout.Alignment.TRAILING)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addGroup(subPnlTesseraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblCodice5) .addComponent(lblGratuita))) ); lblCodice5.getAccessibleContext().setAccessibleName("Gtratuità Residue:"); - jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Cliente")); + subPnlCliente.setBorder(javax.swing.BorderFactory.createTitledBorder("Cliente")); lblCodice.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N lblCodice.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); @@ -1368,65 +987,65 @@ public class PuntoCassa extends JFrame implements ActionListener { lblFascia.setForeground(new java.awt.Color(255, 0, 0)); lblFascia.setText("[...]"); - javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); - jPanel2.setLayout(jPanel2Layout); - jPanel2Layout.setHorizontalGroup( - jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanel2Layout.createSequentialGroup() - .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) - .addComponent(lblOrganizzazione5) - .addComponent(lblOrganizzazione4) - .addComponent(lblOrganizzazione3) - .addComponent(lblOrganizzazione2) + javax.swing.GroupLayout subPnlClienteLayout = new javax.swing.GroupLayout(subPnlCliente); + subPnlCliente.setLayout(subPnlClienteLayout); + subPnlClienteLayout.setHorizontalGroup( + subPnlClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(subPnlClienteLayout.createSequentialGroup() + .addGroup(subPnlClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(lblOrganizzazione5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblOrganizzazione4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblOrganizzazione3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblOrganizzazione2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lblCodice, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lblDenominazione, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lblOrganizzazione, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lblOrganizzazione1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(lblConvenzione) - .addComponent(lblAzienda) - .addComponent(lblScadTessera) - .addComponent(lblNascita) - .addComponent(lblNome) - .addComponent(lblCognome) + .addGroup(subPnlClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(lblConvenzione, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 262, Short.MAX_VALUE) + .addComponent(lblAzienda, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblScadTessera, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblNascita, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblNome, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblCognome, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lblCategoria, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lblFascia, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(0, 0, 0)) ); - jPanel2Layout.setVerticalGroup( - jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanel2Layout.createSequentialGroup() + subPnlClienteLayout.setVerticalGroup( + subPnlClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, subPnlClienteLayout.createSequentialGroup() .addContainerGap() - .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addGroup(subPnlClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblCodice) .addComponent(lblCategoria)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addGroup(subPnlClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblDenominazione) .addComponent(lblCognome)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addGroup(subPnlClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblNome) .addComponent(lblOrganizzazione)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addGroup(subPnlClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblOrganizzazione1) .addComponent(lblNascita)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addGroup(subPnlClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblOrganizzazione3) .addComponent(lblAzienda)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addGroup(subPnlClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblOrganizzazione4) .addComponent(lblConvenzione)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addGroup(subPnlClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblOrganizzazione5) .addComponent(lblFascia)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addGroup(subPnlClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblOrganizzazione2) .addComponent(lblScadTessera)) .addGap(6, 6, 6)) @@ -1437,14 +1056,14 @@ public class PuntoCassa extends JFrame implements ActionListener { pnlClienteLayout.setHorizontalGroup( pnlClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pnlClienteLayout.createSequentialGroup() - .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(subPnlTessera, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(subPnlCliente, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pnlClienteLayout.setVerticalGroup( pnlClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(jPanel2) + .addComponent(subPnlTessera, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(subPnlCliente, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pnlTop.add(pnlCliente); @@ -1456,7 +1075,7 @@ public class PuntoCassa extends JFrame implements ActionListener { pnlCategorie.setBorder(javax.swing.BorderFactory.createTitledBorder("Categoria")); pnlCategorie.setLayout(new java.awt.GridLayout(10, 1, 1, 1)); pnlTop.add(pnlCategorie); - pnlCategorie.setBounds(0, 0, 11, 32); + pnlCategorie.setBounds(0, 0, 9, 32); pnlConto.setBackground(new java.awt.Color(255, 255, 153)); pnlConto.setBorder(javax.swing.BorderFactory.createTitledBorder("Conto")); @@ -1527,7 +1146,6 @@ public class PuntoCassa extends JFrame implements ActionListener { }); pnlConto.add(jbtnChiudi); - jbtnStampa.setBackground(new java.awt.Color(255, 255, 255)); jbtnStampa.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbtnStampaActionPerformed(evt); @@ -1546,7 +1164,7 @@ public class PuntoCassa extends JFrame implements ActionListener { pnlConto.add(txtTotalePunti); pnlTop.add(pnlConto); - pnlConto.setBounds(286, 150, 265, 120); + pnlConto.setBounds(286, 150, 257, 120); pnlAzioni.setBackground(new java.awt.Color(255, 204, 204)); pnlAzioni.setBorder(javax.swing.BorderFactory.createTitledBorder("Azioni")); @@ -1641,7 +1259,7 @@ public class PuntoCassa extends JFrame implements ActionListener { pnlAzioni.add(jbtnEsci); pnlTop.add(pnlAzioni); - pnlAzioni.setBounds(0, 153, 315, 75); + pnlAzioni.setBounds(0, 153, 378, 73); pnlLista.setBackground(new java.awt.Color(204, 255, 204)); pnlLista.setBorder(javax.swing.BorderFactory.createTitledBorder("Lista")); @@ -1672,7 +1290,7 @@ public class PuntoCassa extends JFrame implements ActionListener { pnlProdotti.setBorder(javax.swing.BorderFactory.createTitledBorder("Prodotto")); pnlProdotti.setLayout(new java.awt.GridLayout(6, 2, 2, 2)); pnlTop.add(pnlProdotti); - pnlProdotti.setBounds(0, 0, 10, 33); + pnlProdotti.setBounds(0, 0, 8, 33); pnlLista1.setBackground(new java.awt.Color(204, 255, 204)); pnlLista1.setBorder(javax.swing.BorderFactory.createTitledBorder("Lista")); @@ -1797,7 +1415,7 @@ public class PuntoCassa extends JFrame implements ActionListener { .addComponent(jChLogin) .addGap(0, 0, Short.MAX_VALUE)) .addComponent(jBtnDB1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(btnTermina)) + .addComponent(btnTermina, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 262, Short.MAX_VALUE)) .addContainerGap()) ); pnlLoginLayout.setVerticalGroup( @@ -1877,12 +1495,12 @@ public class PuntoCassa extends JFrame implements ActionListener { // ** Imposta dimensioni e posizione dei panel // ========================================================================== private void resize() { - int x, y, w, h, tw, th, ptw, pth; + int x, y, w, h, tw, th; // ----------------------------------------------------------------------- // *** Dimensioni del frame // ----------------------------------------------------------------------- - this.setSize(displayWidth, displayHeight); + this.setSize(displayWidth + deltaWidth, displayHeight + deltaHeight); tw = this.getWidth(); th = this.getHeight(); @@ -1890,26 +1508,40 @@ public class PuntoCassa extends JFrame implements ActionListener { // *** Posizione della status bar // ----------------------------------------------------------------------- x = 0; - y = th - 50; + y = th - 60; w = (tw / 8); - h = 50; - lblUtenteLoggato.setLocation(x, y); - lblUtenteLoggato.setSize(w, h); - lblInfo.setLocation(w, y); - lblInfo.setSize(w * 2 + 60 -lblDB.getWidth(), h); - - lblInfo2.setLocation(w * 3 + 60-lblDB.getWidth(), y); -// lblInfo2.setSize(tw - (w * 2 + 10) - 131, h); - int larg=tw - (w * 2 + 10) - 359; - lblInfo2.setSize(larg, h); - - lblStatoConnessione.setLocation(tw - 181-lblDB.getWidth(), y); - lblStatoConnessione.setSize(175, h); + h = 60; - lblDB.setLocation(tw - 181-lblDB.getWidth()+lblStatoConnessione.getWidth(), y); + int part = (displayWidth - lblDB.getWidth()) / 7; + + lblUtenteLoggato.setLocation(x, y); + //lblUtenteLoggato.setSize(w, h); + lblUtenteLoggato.setSize(part, h); + + //lblInfo.setLocation(w, y); + lblInfo.setLocation(lblUtenteLoggato.getLocation().x + lblUtenteLoggato.getSize().width, y); + //lblInfo.setSize(w * 2 + 60 - lblDB.getWidth(), h); + //lblInfo.setSize(296, h); + lblInfo.setSize((int)(part * 1.5), h); + + //lblInfo2.setLocation(w * 3 + 60 - lblDB.getWidth(), y); + lblInfo2.setLocation(lblInfo.getLocation().x + lblInfo.getSize().width, y); +// lblInfo2.setSize(tw - (w * 2 + 10) - 131, h); + int larg = tw - (w * 2 + 10) - 359; + //lblInfo2.setSize(larg, h); + //lblInfo2.setSize(444, h); + lblInfo2.setSize(part * 3, h); + + //lblStatoConnessione.setLocation(tw - 181 - lblDB.getWidth(), y); + lblStatoConnessione.setLocation(lblInfo2.getLocation().x + lblInfo2.getSize().width, y); + //lblStatoConnessione.setSize(175, h); + //lblStatoConnessione.setSize(116, h); + lblStatoConnessione.setSize((int)(part * 1.5), h); + + //lblDB.setLocation(tw - 181 - lblDB.getWidth() + lblStatoConnessione.getWidth(), y); + lblDB.setLocation(lblStatoConnessione.getLocation().x + lblStatoConnessione.getSize().width, y); + //lblDB.setSize(60, h); -// txtUtenteLoggato.setLocation(0, 0); -// txtStatoConnessione.setLocation(w - txtStatoConnessione.getWidth(), 0); // ----------------------------------------------------------------------- // *** Posizione del panel Errore // ----------------------------------------------------------------------- @@ -1938,7 +1570,8 @@ public class PuntoCassa extends JFrame implements ActionListener { w = tw + 5; h = th - lblUtenteLoggato.getHeight(); pnlTop.setLocation(x, y); - pnlTop.setSize(w, h); + //pnlTop.setSize(w, h); + pnlTop.setSize(displayWidth, h); // ----------------------------------------------------------------------- // *** Posizionamento degli oggetti nel panel Top (operativo) @@ -1971,8 +1604,10 @@ public class PuntoCassa extends JFrame implements ActionListener { // ----------------------------------------------------------------------- x = x + w; y = 0; - w = tw - x - 10; - h = (int) (25 * th / 100); + //w = tw - x - 10; + w = tw - x; + //h = (int) (25 * th / 100); + h = pnlProdotti.getHeight() / 6 * 2; pnlLista.setLocation(x, y); pnlLista.setSize(w, h); scpLista.setLocation(0, 0); @@ -1984,8 +1619,8 @@ public class PuntoCassa extends JFrame implements ActionListener { int Col1 = (w / 100) * 80; MyTableModel model = new MyTableModel(); - String[] Col = {"Prodotto", "Prezzo", "Punti"}; - model.setColumname(Col); + String[] col = {"Prodotto", "Prezzo", "Punti"}; + model.setColumname(col); Object[][] data = null; model.setRow(data); @@ -1995,22 +1630,16 @@ public class PuntoCassa extends JFrame implements ActionListener { tblLista.getColumnModel().getColumn(1).setCellRenderer(new DecimalFormatRenderer()); tblLista.getColumnModel().getColumn(2).setPreferredWidth(50); -// tblLista.getColumnModel().getColumn(3).setPreferredWidth(0); -// tblLista.getColumnModel().getColumn(3).setMaxWidth(0); -// tblLista.getColumnModel().getColumn(3).setMinWidth(0); -// tblLista.getColumnModel().getColumn(3).setResizable(false); tblLista.setVisible(true); // ----------------------------------------------------------------------- // ** Panel Lista1 // ----------------------------------------------------------------------- -// x = x + w; y = h; -// w = tw - x - 10; -// h = (int) (50 * th / 100)/2; pnlLista1.setBorder(javax.swing.BorderFactory.createTitledBorder("Composizione")); - pnlLista1.setLocation(x, y); - pnlLista1.setSize(w, 70); + pnlLista1.setLocation(x, y); + //pnlLista1.setSize(w, 70); + pnlLista1.setSize(w, pnlProdotti.getHeight() / 6); scpLista1.setLocation(0, 0); scpLista1.setSize(w, h); scpLista1.setBackground(Color.BLUE); @@ -2019,8 +1648,8 @@ public class PuntoCassa extends JFrame implements ActionListener { tblLista1.setShowGrid(true); MyTableModel model1 = new MyTableModel(); - String[] ColVassoio = {"Vassoio", "Prezzo"}; - model1.setColumname(ColVassoio); + String[] colVassoio = {"Vassoio", "Prezzo"}; + model1.setColumname(colVassoio); Object[][] data1 = null; model1.setRow(data1); @@ -2035,11 +1664,14 @@ public class PuntoCassa extends JFrame implements ActionListener { // ----------------------------------------------------------------------- x = 0; y = pnlCategorie.getHeight(); - w = pnlCategorie.getWidth() + pnlProdotti.getWidth() - 120; + //w = pnlCategorie.getWidth() + pnlProdotti.getWidth() - 120; + w = displayWidth / 10 * 6; //h = pnlConto.getHeight(); h = th - pnlProdotti.getHeight(); pnlCliente.setLocation(x, y); pnlCliente.setSize(w, h); + subPnlCliente.setSize(pnlCliente.getSize().width / 2, pnlCliente.getSize().height); + subPnlTessera.setSize(pnlCliente.getSize().width / 2, pnlCliente.getSize().height); // ----------------------------------------------------------------------- // ** Panel Conto @@ -2050,7 +1682,8 @@ public class PuntoCassa extends JFrame implements ActionListener { h = 220;//th-y; pnlConto.setLocation(x, y); - pnlConto.setSize(w, h - 10); + //pnlConto.setSize(w, h - 10); + pnlConto.setSize(w, pnlProdotti.getHeight() / 6 * 3); ImageIcon icon = new ImageIcon(imgPath + "freccia_down.jpg"); Image img = icon.getImage(); Image newimg = img.getScaledInstance(50, 50, java.awt.Image.SCALE_SMOOTH); @@ -2068,7 +1701,7 @@ public class PuntoCassa extends JFrame implements ActionListener { Image newimg3 = img3.getScaledInstance(50, 50, java.awt.Image.SCALE_SMOOTH); icon3 = new ImageIcon(newimg3); jBtnBuoni.setIcon(icon3); - + ImageIcon iconFulmine = new ImageIcon(imgPath + "fulmine.jpg"); Image imgF = iconFulmine.getImage(); Image newimgF = imgF.getScaledInstance(50, 50, java.awt.Image.SCALE_SMOOTH); @@ -2079,10 +1712,14 @@ public class PuntoCassa extends JFrame implements ActionListener { // ** Panel Azioni // ----------------------------------------------------------------------- //x = 0; - x = pnlLista.getX() - 120; - y = pnlConto.getY() + pnlConto.getHeight();//pnlProdotti.getHeight() + pnlCliente.getHeight(); - w = pnlLista.getWidth() + 120; //pnlCategorie.getWidth() + pnlProdotti.getWidth(); - h = th - (pnlLista.getHeight() + pnlLista1.getHeight() + pnlConto.getHeight()); //th-y; + //x = pnlLista.getX() - 120; + x = pnlCliente.getWidth(); + //y = pnlConto.getY() + pnlConto.getHeight();//pnlProdotti.getHeight() + pnlCliente.getHeight(); + y = pnlCliente.getY(); + //w = pnlLista.getWidth() + 120; //pnlCategorie.getWidth() + pnlProdotti.getWidth(); + w = displayWidth / 10 * 4; + //h = th - (pnlLista.getHeight() + pnlLista1.getHeight() + pnlConto.getHeight()); //th-y; + h = th - pnlProdotti.getHeight(); pnlAzioni.setLocation(x, y); pnlAzioni.setSize(w, h); @@ -2113,50 +1750,35 @@ public class PuntoCassa extends JFrame implements ActionListener { tipo = cmd.substring(0, i); switch (tipo) { - case "CATEGORIA": - PulsantiCategoria(id, cmd); -// for (k = this.pnlProdotti.getComponentCount(); k > 0; k--) { -// this.pnlProdotti.remove(k - 1); -// } -// this.caricaDati("PRODOTTI", id); -// //spengo altri togglebutton -// for (Integer y =0;y pulsantiCategoria(id, cmd); - break; - - case "PRODOTTO": - if (CassaAperta) { - sql = "SELECT prodotti.id as idProdotto,prodotti.nome, prodotti.prezzo_base,tariffe.Punti as Punti_Base,tariffe.prezzo as Prezzo,tariffe.punti as Punti,prodotti.id_Categoria FROM prodotti left join tariffe on prodotti.id=tariffe.id_prodotto where prodotti.id = " + id + " and Tariffe.id_fascia=" + idProfiloTariffario; + case "PRODOTTO" -> { + if (isCassaAperta) { + sql = "SELECT " + + "prodotti.id as idProdotto," + + "prodotti.nome, " + + "prodotti.prezzo_base," + + "tariffe.Punti as Punti_Base," + + "tariffe.prezzo as Prezzo," + + "tariffe.punti as Punti," + + "prodotti.id_Categoria " + + "FROM prodotti " + + "left join tariffe on prodotti.id=tariffe.id_prodotto " + + "where prodotti.id = " + id + " and Tariffe.id_fascia=" + idProfiloTariffario; try { //spengo altri togglebutton for (Integer y = 0; y < this.pnlProdotti.getComponentCount(); y++) { JToggleButton bt = (JToggleButton) this.pnlProdotti.getComponent(y); - if (bt.getActionCommand() != cmd) { + if (!bt.getActionCommand().equals(cmd)) { bt.setSelected(false); } - } jbtnSu.setEnabled(true); jbtnGiu.setEnabled(true); jbtnElimina.setEnabled(true); jbtnAnnulla.setEnabled(true); -// if (FlagRicevuta) { -// jbtnStampa.setEnabled(true); -// } -// jbtnDuplica.setEnabled(true); doLayout(); @@ -2165,128 +1787,55 @@ public class PuntoCassa extends JFrame implements ActionListener { rs = st.executeQuery(sql); MyTableModel model = (MyTableModel) tblLista.getModel(); - //cerco numero composizioni - /*Integer Composizioni=0; - for (Integer y=0;y0){ - Composizioni++; - }*/ -// Double SaldoTessera=0.0;Double TotAcquisto=0.0; -// SaldoTessera=Double.parseDouble(lblSaldo.getText().replace("€ ", "").replace(",", ".")); -// TotAcquisto=Double.parseDouble(txtTotaleCassa.getText().replace("€ ", "").replace(",", ".")); while (rs.next()) { - //System.out.println("Punti " + rs.getInt("Punti")); - Double Prezzo = 0.0; - Integer Punti = 0; + Double prezzo = 0.0; + Integer punti = 0; if (rs.getDouble("Prezzo") > 0) { - Prezzo = rs.getDouble("Prezzo"); + prezzo = rs.getDouble("Prezzo"); } else { - Prezzo = rs.getDouble("prezzo_base"); + prezzo = rs.getDouble("prezzo_base"); } - + if (rs.getDouble("Punti") > 0) { - Punti = rs.getInt("Punti"); + punti = rs.getInt("Punti"); } else { - Punti = rs.getInt("Punti_Base"); + punti = rs.getInt("Punti_Base"); } //14-01-2019 if (model.getRowCount() > 0) { - //è una coposizione non la metto + //è una composizione non la metto if (rs.getLong("id_Categoria") == 0L) { - JOptionPane.showOptionDialog(this, "Composizione già presente!", "Attenzione", + JOptionPane.showOptionDialog(this, "Composizione gia presente!", "Attenzione", JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); return; } - - } - /* - if(Composizioni>0 && rs.getLong("id_Categoria")==0L){ - JOptionPane.showOptionDialog(this, "Composizione già presente!", "Attenzione", - JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); - return; - }*/ - - //if ((SaldoTessera < (TotAcquisto + Prezzo)) && idModoPagamento==0L) { - //if (SaldoAcquisti(Prezzo)==false && idModoPagamento==0L) { - //14-01-19<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - if (Gratuita_Residue > 0 || (FLAG_BONUS == 1 && Bonus_Residui > 0)) { - //Prezzo=0.0; } //21-12-8<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - model.addRow(new Object[]{rs.getString("nome"), Prezzo, Punti, rs.getLong("idProdotto"), Prezzo, rs.getLong("id_Categoria")}); - - /* - //9-5-18<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - if (jbtnChiudi.isEnabled()) { - if (SaldoAcquisti(Prezzo) == false && CercaTestoModoPagamento().equalsIgnoreCase("A scalare") && Gratuita_Residue <= 0 && ConsentiCredito == false) { - JOptionPane.showOptionDialog(this, "Saldo tessera insufficiente!", "Attenzione", - JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); - return; - } else { - //model.addRow(new Object[]{rs.getString("nome"), Prezzo, Punti, rs.getLong("idProdotto"), Prezzo, rs.getLong("id_Categoria")}); - - //modificare<<<<<<<<<<<<<<<<<<<<< - if (SaldoAcquisti(Prezzo) == false && CercaTestoModoPagamento().equalsIgnoreCase("A scalare") && ConsentiCredito) { - if (JOptionPane.showConfirmDialog(null, "Saldo insufficiente. Vuoi autorizzare comunque la transazione?", "Saldo", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { - model.addRow(new Object[]{rs.getString("nome"), Prezzo, Punti, rs.getLong("idProdotto"), Prezzo, rs.getLong("id_Categoria")}); - MessaggioSaldoUnaVolta=true; - } else { - return; - } - } else { - model.addRow(new Object[]{rs.getString("nome"), Prezzo, Punti, rs.getLong("idProdotto"), Prezzo, rs.getLong("id_Categoria")}); - - } - - } - }else{ - model.addRow(new Object[]{rs.getString("nome"), Prezzo, Punti, rs.getLong("idProdotto"), Prezzo, rs.getLong("id_Categoria")}); - if (idTessera!=0L){jbtnChiudi.setEnabled(true);} - }*/ + model.addRow(new Object[]{rs.getString("nome"), prezzo, punti, rs.getLong("idProdotto"), prezzo, rs.getLong("id_Categoria")}); } if (model.getRowCount() > 0) { tblLista.setRowSelectionInterval(model.getRowCount() - 1, model.getRowCount() - 1); } tblLista.setModel(model); - ControllaCompleti(model); - ControllaExtra(model); - SommaColonne(model); + controllaCompleti(model); + controllaExtra(model); + sommaColonne(model); //inizio 21-12-18<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< if (jbtnChiudi.isEnabled()) { - if (SaldoAcquisti(0.0) == false && CercaTestoModoPagamento().equalsIgnoreCase("A scalare") && Gratuita_Residue <= 0 && (Bonus_Residui <= 0 || FLAG_BONUS == 0) && ConsentiCredito == false) { + if (saldoAcquisti(0.0) == false + && cercaTestoModoPagamento().equalsIgnoreCase("A scalare") + && gratuitaResidue <= 0 + && (bonusResidui <= 0 || flagBonus == 0) + && consentiCredito == false) { JOptionPane.showOptionDialog(this, "Saldo tessera insufficiente!", "Attenzione", JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); jbtnEliminaActionPerformed(null); return; - } else { - //model.addRow(new Object[]{rs.getString("nome"), Prezzo, Punti, rs.getLong("idProdotto"), Prezzo, rs.getLong("id_Categoria")}); - //04-02-2019 - /* - if (SaldoAcquisti(0.0) == false && CercaTestoModoPagamento().equalsIgnoreCase("A scalare") && ConsentiCredito) { - if (JOptionPane.showConfirmDialog(null, "Saldo insufficiente. Vuoi autorizzare comunque la transazione?", "Saldo", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { - //model.addRow(new Object[]{rs.getString("nome"), UltimoPrezzo, UltimiPunti, rs.getLong("idProdotto"), UltimoPrezzo, rs.getLong("id_Categoria")}); - MessaggioSaldoUnaVolta=true; - } else { - jbtnEliminaActionPerformed(null); - return; - } - } else { - //model.addRow(new Object[]{rs.getString("nome"), UltimoPrezzo, UltimiPunti, rs.getLong("idProdotto"), UltimoPrezzo, rs.getLong("id_Categoria")}); - - } - */ - } } else { - //model.addRow(new Object[]{rs.getString("nome"), UltimoPrezzo, UltimiPunti, rs.getLong("idProdotto"), UltimoPrezzo, rs.getLong("id_Categoria")}); if (idTessera != 0L) { jbtnChiudi.setEnabled(true); } @@ -2295,48 +1844,30 @@ public class PuntoCassa extends JFrame implements ActionListener { //stessa procedura in Cercates //prendo l'ultimo valore della griglia - if (model.getRowCount() > 0) { -// Double UP = Double.parseDouble(model.getValueAt(model.getRowCount() - 1, ColImporto).toString()); -// String UProd = model.getValueAt(model.getRowCount() - 1, 0).toString(); -// DecimalFormat df2 = new DecimalFormat("##0.00"); -// String PrezzoDisplay = ("E " + df2.format(UP)); -// String fa = "FASCIA " + lblFascia.getText().replaceAll("Fascia", "").trim(); +// if (model.getRowCount() > 0) {// +// +// Double totAcquisto = 0.0; +// try { +// +// if (txtTotaleCassa.getText().length() > 0) { +// String saldo = txtTotaleCassa.getText().replace("? ", "").replace(".", ""); +// saldo = saldo.replace(",", "."); +// totAcquisto = Double.valueOf(saldo); +// } +// } catch (Exception ex) { +// LogManager.getLogger(PuntoCassa.class).error(ex); +// } +// //DecimalFormat df2 = new DecimalFormat("##0.00"); +// //String prezzoDisplay = ("E " + df2.format(totAcquisto)); +// /*String fa = "FASCIA " + lblFascia.getText().replaceAll("Fascia", "").trim(); // if (fa.length() >= 10) { -// fa = fa.substring(fa.length() - 10, fa.length()); +// fa = fa.substring(fa.length() - 10, fa.length()); // } else { -// fa = SpaziBianchi(fa, 10, true); -// } -// -// if (UProd.length() > 20) { -// UProd = UProd.substring(0, 20); -// } else { -// UProd = SpaziBianchi(UProd, 20, true); -// } -// Display(UProd + fa, PrezzoDisplay);//fa+uprod - - Double TotAcquisto = 0.0; - try { - - if (txtTotaleCassa.getText().length() > 0) { - String Saldo = txtTotaleCassa.getText().replace("€ ", "").replace(".", ""); - Saldo = Saldo.replace(",", "."); - TotAcquisto = Double.parseDouble(Saldo); - } - } catch (Exception ex) { - } - DecimalFormat df2 = new DecimalFormat("##0.00"); - String PrezzoDisplay = ("E " + df2.format(TotAcquisto)); - String fa = "FASCIA " + lblFascia.getText().replaceAll("Fascia", "").trim(); - if (fa.length() >= 10) { - fa = fa.substring(fa.length() - 10, fa.length()); - } else { - fa = SpaziBianchi(fa, 10, true); - } - - String UProd = SpaziBianchi("Totale ", 20, true); - //Aggiornamento12-04-2019 - //Display(UProd + fa, PrezzoDisplay);//fa+uprod - } +// fa = spaziBianchi(fa, 10, true); +// }*/ +// +// //String uProd = spaziBianchi("Totale ", 20, true); +// } rs.close(); st.close(); dbConnection.close(); @@ -2345,28 +1876,27 @@ public class PuntoCassa extends JFrame implements ActionListener { System.out.println(ex.getMessage()); } } - break; + } - default: - break; + default -> { + } } } - private void PulsantiCategoria(String id, String cmd) { + private void pulsantiCategoria(String id, String cmd) { for (Integer k = this.pnlProdotti.getComponentCount(); k > 0; k--) { this.pnlProdotti.remove(k - 1); } this.caricaDati("PRODOTTI", id); //spengo altri togglebutton - if (this.pnlCategorie.getComponentCount()>2){ + if (this.pnlCategorie.getComponentCount() > 2) { for (Integer y = 0; y < this.pnlCategorie.getComponentCount(); y++) { JToggleButton bt = (JToggleButton) this.pnlCategorie.getComponent(y); - if (bt.getActionCommand() != cmd) { + if (!bt.getActionCommand().equals(cmd)) { bt.setSelected(false); } else { if (bt.isSelected() == false) { - //this.caricaDati("PRODOTTI", "-1"); this.caricaPannello(); } @@ -2376,172 +1906,87 @@ public class PuntoCassa extends JFrame implements ActionListener { } } - private Boolean SaldoAcquisti(Double Prezzo) { - Boolean OK = false; - Double SaldoTessera = 0.0; - Double TotAcquisto = 0.0; + private Boolean saldoAcquisti(Double prezzo) { + Boolean ok = false; + Double saldoTessera = 0.0; + Double totAcquisto = 0.0; try { if (lblSaldo.getText().length() > 0) { - String Saldo = lblSaldo.getText().replace("€ ", "").trim().replace(".", ""); - Saldo = Saldo.replace("[", ""); - Saldo = Saldo.replace("]", ""); - Saldo = Saldo.replace(",", "."); - if (Saldo.length() > 0) { - SaldoTessera = Double.parseDouble(Saldo); + String saldo = lblSaldo.getText().replace("€ ", "").trim().replace(".", ""); + saldo = saldo.replace("[", ""); + saldo = saldo.replace("]", ""); + saldo = saldo.replace(",", "."); + if (saldo.length() > 0) { + saldoTessera = Double.valueOf(saldo); } } if (txtTotaleCassa.getText().length() > 0) { - String Saldo = txtTotaleCassa.getText().replace("€ ", "").replace(".", ""); - Saldo = Saldo.replace(",", "."); - TotAcquisto = Double.parseDouble(Saldo); + String totaleCassa = txtTotaleCassa.getText().replace("€ ", "").replace(".", ""); + totaleCassa = totaleCassa.replace(",", "."); + totAcquisto = Double.valueOf(totaleCassa); } } catch (Exception e) { + LogManager.getLogger(PuntoCassa.class).error(e); } - Double S = SaldoTessera - (TotAcquisto + Prezzo); - if (S >= SaldoMinimoStop) { - OK = true; + Double s = saldoTessera - (totAcquisto + prezzo); + if (s >= saldoMinimoStop) { + ok = true; } -// if (SaldoTessera >= (TotAcquisto + Prezzo)) { -// OK = true; -// } - return OK; + + return ok; } - private void SommaColonne(MyTableModel model) { - Double T = model.Somma(ColImporto); + /** + * funzione che calcola i prezzi dei prodotti e il totale in base alla fascia dello studente + * oppure utilizza la fascia di default + * @param model + */ + private void sommaColonne(MyTableModel model) { + Double t = model.somma(colImporto); MyTableModel model2 = (MyTableModel) tblLista1.getModel(); if (model2.getRowCount() > 0) { - T = T + model2.Somma(1); + t = t + model2.somma(1); } DecimalFormat df2 = new DecimalFormat("#,###,###,##0.00"); - txtTotaleCassa.setText("€ " + df2.format(T)); + txtTotaleCassa.setText("€ " + df2.format(t)); - int P = model.SommaInt(2); - txtTotalePunti.setText("Punti " + P); + int p = model.sommaInt(2); + txtTotalePunti.setText("Punti " + p); //if(idModoPagamento==0L){ - if (CercaTestoModoPagamento().equalsIgnoreCase("A scalare")) { - Double SaldoCarta = 0.0; + if (cercaTestoModoPagamento().equalsIgnoreCase("A scalare")) { + Double saldoCarta = 0.0; if (lblSaldo.getText().trim().length() > 0) { - String Saldo = lblSaldo.getText().replace("€ ", "").trim().replace(".", ""); - Saldo = Saldo.replace("[", ""); - Saldo = Saldo.replace("]", ""); - Saldo = Saldo.replace(",", "."); - if (Saldo.length() > 0) { - SaldoCarta = Double.parseDouble(Saldo); + String saldo = lblSaldo.getText().replace("€ ", "").trim().replace(".", ""); + saldo = saldo.replace("[", ""); + saldo = saldo.replace("]", ""); + saldo = saldo.replace(",", "."); + if (saldo.length() > 0) { + saldoCarta = Double.valueOf(saldo); } - - //SaldoCarta=Double.parseDouble(lblSaldo.getText().trim().replace("€ ", "").replace(",", ".")); } - SaldoCarta = SaldoCarta - T; - lblResiduo.setText("€ " + df2.format(SaldoCarta)); - + saldoCarta = saldoCarta - t; + lblResiduo.setText("€ " + df2.format(saldoCarta)); } } -// private void CaricaCompleti() { -//// String Query="Select co.id_vassoio, co.id_categoria_prodotti, pr2.id as id_Prodotto, co.quantita, ta.prezzo, ta.punti "; -//// String From=" FROM composizioni co,tariffe ta,prodotti pr,prodotti pr2 " + -//// " WHERE pr.id_vassoio = co.id_vassoio AND co.id_categoria_prodotti = pr2.id_categoria " + -//// " AND ta.id_prodotto = pr.id AND ta.id_fascia =" + idProfiloTariffario + -//// " AND pr.id_categoria = 0 " + -//// " ORDER BY ta.prezzo, co.id_vassoio, co.id_categoria_prodotti, pr2.id"; -// String Query = "Select distinct co.id_vassoio, co.id_categoria_prodotti, co.quantita, ta.prezzo, ta.punti"; -// String From = " FROM composizioni co,tariffe ta,prodotti pr,prodotti pr2 " -// + " WHERE pr.id_vassoio = co.id_vassoio AND co.id_categoria_prodotti = pr2.id_categoria " -// + " AND ta.id_prodotto = pr.id AND ta.id_fascia =" + idProfiloTariffario -// + " AND pr.id_categoria = 0 " -// + " ORDER BY ta.prezzo, co.id_vassoio, co.id_categoria_prodotti"; -// -// String Query2 = "Select distinct co.id_vassoio, co.id_categoria_prodotti, co.quantita, ta.prezzo, ta.punti, " -// + "(select count (*) from composizioni where id_vassoio=co.id_vassoio) as nr"; -// String From2 = " FROM composizioni co,tariffe ta,prodotti pr,prodotti pr2 " -// + " WHERE pr.id_vassoio = co.id_vassoio AND co.id_categoria_prodotti = pr2.id_categoria " -// + " AND ta.id_prodotto = pr.id AND ta.id_fascia =" + idProfiloTariffario -// + " AND pr.id_categoria = 0 " -// + " ORDER BY ta.prezzo, nr, co.id_vassoio, co.id_categoria_prodotti"; -// System.out.println(Query + From); -// System.out.println(Query2 + From2); -// try { -// -// Integer Size = Integer.parseInt(MySelect("Select count(distinct co.id_vassoio) as nrows " + From, "nrows")); -// Integer SizeDett = Integer.parseInt(MySelect("Select count(*) as nrows from (" + Query + From + ")", "nrows")); -// Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); -// -// Statement st = dbConnection.createStatement(); -// -// Completi = new Object[Size][3]; -// CompletiDett = new Object[SizeDett]; -// -// Integer r = 0; -// Integer rr = -1; -// ResultSet rs = st.executeQuery(Query2 + From2); -// Long idVassoio = -10L; -// while (rs.next()) { -// Object[] Campi = new Object[6]; -// Campi[0] = rs.getLong("id_vassoio"); -// Campi[1] = rs.getLong("id_categoria_prodotti"); -// Campi[2] = rs.getLong("quantita"); -// //Campi[3]=rs.getLong("id_Prodotto"); -// Campi[3] = rs.getDouble("prezzo"); -// Campi[4] = rs.getLong("punti"); -// Campi[5] = 0.0;//pezzi scelti -// CompletiDett[r] = Campi; -// if (idVassoio != Long.parseLong(Campi[0].toString())) { -// idVassoio = Long.parseLong(Campi[0].toString()); -// rr++; -// } -// -//// System.out.println("rr: " + rr); -// try { -// Completi[rr][0] = Campi[0]; -// Completi[rr][1] = rs.getDouble("prezzo"); -// Completi[rr][2] = 0.0; -// } catch (Exception e) { -// JOptionPane.showMessageDialog(this, "Errore: dati disallineati nelle tariffe prodotto!"); -// } -// r++; -// } -// rs.close(); -// st.close(); -// dbConnection.close(); -// } catch (SQLException e) { -// JOptionPane.showMessageDialog(this, "Errore MySelect ['" + e.getMessage() + " " + Query + "']"); -// -// } -// } - - private void ControllaExtra(MyTableModel model) { - //9-5-18<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - //jbtnChiudi.setEnabled(true); - -// if (FlagRicevuta) { -// jbtnStampa.setEnabled(true); -// } - if (FlagExtra == false) { + private void controllaExtra(MyTableModel model) { + if (flagExtra == false) { for (int i = 0; i < model.getRowCount(); i++) { Object row[] = model.getRow(i); - Double p = Double.parseDouble(row[ColImporto].toString()); + Double p = Double.valueOf(row[colImporto].toString()); if (p != 0) { - //if (MessaggioFlagExtraUnaVolta == false) { - JOptionPane.showMessageDialog(this, "Composizione errata, questo prodotto sarà eliminato!"); - // MessaggioFlagExtraUnaVolta = true; - //} - //16-10-18<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -// jbtnChiudi.setEnabled(false); -// jbtnStampa.setEnabled(false); - + JOptionPane.showMessageDialog(this, "Composizione errata, questo prodotto sarà eliminato!"); jbtnEliminaActionPerformed(null); - break; } } } else { for (int i = 0; i < model.getRowCount(); i++) { Object row[] = model.getRow(i); - Double p = Double.parseDouble(row[ColImporto].toString()); + Double p = Double.valueOf(row[colImporto].toString()); if (p != 0) { JOptionPane.showMessageDialog(this, "Nella lista sono presenti degli extra!"); break; @@ -2551,314 +1996,94 @@ public class PuntoCassa extends JFrame implements ActionListener { } } - - + //02/09/2021 - private void ControllaCompleti(MyTableModel model) { - if (PassaggiEsauritiNoComposizione == true) { + private void controllaCompleti(MyTableModel model) { + if (passaggiEsauritiNoComposizione == true) { return; } MyTableModel model1 = (MyTableModel) tblLista1.getModel(); - ClearTable(model1); - //pulisco lista -// MyTableModel model1 = (MyTableModel) tblLista1.getModel(); -// for (int y = 0; y < model1.getRowCount(); y++) { -// model1.deleteRow(y); -// doLayout(); -// } - - - Boolean ComposizionePresente = false; - StringBuilder sb=new StringBuilder(); + //clearTable(model1); + model1.clearTable(); + Boolean composizionePresente = false; + StringBuilder sb = new StringBuilder(); //verifico se sono presenti composizioni for (int i = 0; i < model.getRowCount(); i++) { Object row[] = model.getRow(i); - Double p = Double.parseDouble(row[4].toString()); - model.setValueAt(p, i, ColImporto); + Double p = Double.valueOf(row[4].toString()); + model.setValueAt(p, i, colImporto); sb.append(model.getValueAt(i, 3)); sb.append(","); if (Long.parseLong(row[5].toString()) == 0L) { - ComposizionePresente = true; - if (Gratuita_Residue > 0) {//Gratuita_ResidueProg - ClearTable(model1); - //Gratuita_ResidueProg--; + composizionePresente = true; + if (gratuitaResidue > 0) {//Gratuita_ResidueProg + //clearTable(model1); + model1.clearTable(); model1.addRow(new Object[]{model.getValueAt(i, 0), 0.00, model.getValueAt(i, 3)}); - } else if (FLAG_BONUS == 1 && Bonus_Residui > 0) { - ClearTable(model1); - //Bonus_ResiduiProg--; + } else if (flagBonus == 1 && bonusResidui > 0) { + //clearTable(model1); + model1.clearTable(); model1.addRow(new Object[]{model.getValueAt(i, 0), 0.00, model.getValueAt(i, 3)}); } else { - ClearTable(model1); + //clearTable(model1); + model1.clearTable(); model1.addRow(new Object[]{model.getValueAt(i, 0), model.getValueAt(i, 1), model.getValueAt(i, 3)}); } - model.setValueAt(0.0, i, ColImporto); + model.setValueAt(0.0, i, colImporto); } } - + doLayout(); - - if (ComposizionePresente == false && sb.toString().length()>0) { - //aggiorno array Completi -// for (int y = 0; y < CompletiDett.length; y++) { -// Object[] Campi = new Object[6]; -// Campi = (Object[]) CompletiDett[y]; -//// if (Long.parseLong(Campi[2].toString()) <= Long.parseLong(Campi[5].toString())) { -// if (Long.parseLong(Campi[5].toString()) > 0) { -// //cerco id_vassoio e aggiorno -// for (int i = 0; i < Completi.length; i++) { -// if (Long.parseLong(Campi[0].toString()) == Long.parseLong(Completi[i][0].toString())) { -// //12-1-18 -// //Completi[i][2] = Long.parseLong(Completi[i][2].toString()) + 1; -// Completi[i][2] = Long.parseLong(Completi[i][2].toString()) + Long.parseLong(Campi[5].toString()); -// } -// } -// } -// } - //trovo il completo giusto -// Long idVassoio = 0L, max = 0L; -// Double Prezzo = 0.0; -// for (int i = 0; i < Completi.length; i++) { -// Long NPezzi = Long.parseLong(Completi[i][2].toString()); -//// Double Prezzo2=Double.parseDouble(Completi[i][1].toString()); -// -// if (NPezzi > 0 && NPezzi > max) { -// max = Long.parseLong(Completi[i][2].toString()); -// idVassoio = Long.parseLong(Completi[i][0].toString()); -// Prezzo = Double.parseDouble(Completi[i][1].toString()); -// } -// -// } -// if (Long.parseLong(idVassoio.toString()) > 0) { -// //MyTableModel model1 = (MyTableModel) tblLista1.getModel(); -// //if(model1.getRowCount()>0){model1.deleteRow(0);} -// //cancello dalla lista prodotti i prezzi della composizione -// for (int y = 0; y < CompletiDett.length; y++) { -// Object[] Campi = new Object[6]; -// Campi = (Object[]) CompletiDett[y]; -// if (idVassoio == Long.parseLong(Campi[0].toString())) { -// for (int i = 0; i < model.getRowCount(); i++) { -// if (Long.parseLong(Campi[1].toString()) == Long.parseLong(model.getValueAt(i, ColCategoria).toString())) { -// Double p = 0.00; -// model.setValueAt(p, i, ColImporto); -// //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -// // se la quantità per la stessa categoria è >1 devo azzerare tutti i successivi -// int qtà = Integer.parseInt(Campi[2].toString()) - 1; -// if (qtà > 0) { -// for (int j = i + 1; j < model.getRowCount(); j++) { -// if (Long.parseLong(Campi[1].toString()) == Long.parseLong(model.getValueAt(j, ColCategoria).toString())) { -// model.setValueAt(p, j, ColImporto); -// qtà--; -// if (qtà <= 0) { -// break; -// } -// } -// } -// } -// //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -// break; -// } -// } -// } -// } + if (composizionePresente == false && sb.toString().length() > 0) { + //azzero prezzi dei componenti della composizione + //23-09-22 + for (int i = 0; i < model.getRowCount(); i++) { + model.setValueAt(0.00, i, colImporto); + } - //azzero prezzi dei componenti della composizione - //23-09-22 - //for (int i = 0; i < model.getRowCount()-1; i++) { - for (int i = 0; i < model.getRowCount(); i++) { - model.setValueAt(0.00, i, ColImporto); + String idVassoio = Utils.mySelect("SELECT seleziona_composizione('" + sb.toString().substring(0, sb.toString().length() - 1) + "') " + + "as idCompleto from dual", + "idCompleto", + this); + if (Long.parseLong(idVassoio) != -1) { + String nomeVassoio = Utils.mySelect("Select nome from vassoi where id=" + idVassoio, "nome", + this); + String prezzo = Utils.mySelect("Select prezzo from tariffe where id_fascia=" + idProfiloTariffario + " " + + "and id_prodotto=" + idVassoio, "prezzo", + this); + + //clearTable(model1); + model1.clearTable(); + if (gratuitaResidue > 0) {//Gratuita_ResidueProg + model1.addRow(new Object[]{nomeVassoio, 0.00, idVassoio}); + } else if (flagBonus == 1 && bonusResidui > 0) { + model1.addRow(new Object[]{nomeVassoio, 0.00, idVassoio}); + } else { + model1.addRow(new Object[]{nomeVassoio, prezzo, idVassoio}); } - - String idVassoio = MySelect("SELECT seleziona_composizione('" + sb.toString().substring(0,sb.toString().length()-1) + "') as idCompleto from dual", "idCompleto"); - if (Long.parseLong(idVassoio)!=-1) - { - String Completo = MySelect("Select nome from vassoi where id=" + idVassoio, "nome"); - String Prezzo = MySelect("Select prezzo from tariffe where id_fascia=" + idProfiloTariffario + " and id_prodotto=" + idVassoio, "prezzo"); - if (Gratuita_Residue > 0) {//Gratuita_ResidueProg - ClearTable(model1); - //Gratuita_ResidueProg--; - model1.addRow(new Object[]{Completo, 0.00, idVassoio}); - } else if (FLAG_BONUS == 1 && Bonus_Residui > 0) { - ClearTable(model1); - //Bonus_ResiduiProg--; - model1.addRow(new Object[]{Completo, 0.00, idVassoio}); - } else { - ClearTable(model1); - model1.addRow(new Object[]{Completo, Prezzo, idVassoio}); - } - - //azzero elemento appena inserito se fa parte di una composizione - model.setValueAt(0.00, model.getRowCount()-1, ColImporto); - doLayout(); - }else{ - JOptionPane.showMessageDialog(this, "Composizione errata, questo prodotto sarà eliminato!"); - jbtnEliminaActionPerformed(null); - } + //azzero elemento appena inserito se fa parte di una composizione + model.setValueAt(0.00, model.getRowCount() - 1, colImporto); + doLayout(); + } else { + JOptionPane.showMessageDialog(this, "Composizione errata, questo prodotto sarà eliminato!"); + jbtnEliminaActionPerformed(null); + } // } } - - if (ComposizionePresente == true && sb.toString().length()>0 && model.getRowCount()>1) { - JOptionPane.showMessageDialog(this, "Composizione presente, questo prodotto sarà eliminato!"); - jbtnEliminaActionPerformed(null); + + if (composizionePresente == true && sb.toString().length() > 0 && model.getRowCount() > 1) { + JOptionPane.showMessageDialog(this, "Composizione presente, questo prodotto sarà eliminato!"); + jbtnEliminaActionPerformed(null); } } -// private void ControllaCompleti(MyTableModel model) { -// if (PassaggiEsauritiNoComposizione == true) { -// return; -// } -// -// //pulisco lista -// MyTableModel model1 = (MyTableModel) tblLista1.getModel(); -// //Gratuita_ResidueProg=Gratuita_Residue; -// //Bonus_ResiduiProg=Bonus_Residui; -// for (int y = 0; y < model1.getRowCount(); y++) { -// model1.deleteRow(y); -// doLayout(); -// } -//// if (model1.getRowCount() > 0) { -//// model1.deleteRow(0); -//// doLayout(); -//// } -// -// //ripulisco array scelte -// for (int y = 0; y < CompletiDett.length; y++) { -// Object[] Campi = new Object[6]; -// Campi = (Object[]) CompletiDett[y]; -// Campi[5] = 0L; -// CompletiDett[y] = Campi; -// } -// for (int y = 0; y < Completi.length; y++) { -// Completi[y][2] = 0L; -// } -// //cerco id_categoria -// for (int i = 0; i < model.getRowCount(); i++) { -// Object row[] = model.getRow(i); -// for (int y = 0; y < CompletiDett.length; y++) { -// Object[] Campi = new Object[6]; -// Campi = (Object[]) CompletiDett[y]; -// //12-1-18 -// //if (Long.parseLong(Campi[1].toString()) == Long.parseLong(row[ColCategoria].toString())) { -// if (Long.parseLong(Campi[1].toString()) == Long.parseLong(row[ColCategoria].toString()) && Long.parseLong(Campi[5].toString()) < Long.parseLong(Campi[2].toString())) { -// Campi[5] = Long.parseLong(Campi[5].toString()) + 1; -// CompletiDett[y] = Campi; -// System.out.println("idVassoio: " + Campi[0].toString() + " - pz scelti per cat: " + Campi[5].toString() + " - max cat: " + Campi[2].toString()); -// -// ////break; -// } -// } -// -// } -// -// Boolean ComposizionePresente = false; -// //verifico se sono presenti composizioni -// for (int i = 0; i < model.getRowCount(); i++) { -// Object row[] = model.getRow(i); -// Double p = Double.parseDouble(row[4].toString()); -// model.setValueAt(p, i, ColImporto); -// if (Long.parseLong(row[5].toString()) == 0L) { -// ComposizionePresente = true; -// if (Gratuita_Residue > 0) {//Gratuita_ResidueProg -// //Gratuita_ResidueProg--; -// model1.addRow(new Object[]{model.getValueAt(i, 0), 0.00, model.getValueAt(i, 3)}); -// } else if (FLAG_BONUS == 1 && Bonus_Residui > 0) { -// //Bonus_ResiduiProg--; -// model1.addRow(new Object[]{model.getValueAt(i, 0), 0.00, model.getValueAt(i, 3)}); -// } else { -// model1.addRow(new Object[]{model.getValueAt(i, 0), model.getValueAt(i, 1), model.getValueAt(i, 3)}); -// } -// -// model.setValueAt(0.0, i, ColImporto); -// } -// -// } -// -// if (ComposizionePresente == false) { -// //aggiorno array Completi -// for (int y = 0; y < CompletiDett.length; y++) { -// Object[] Campi = new Object[6]; -// Campi = (Object[]) CompletiDett[y]; -//// if (Long.parseLong(Campi[2].toString()) <= Long.parseLong(Campi[5].toString())) { -// if (Long.parseLong(Campi[5].toString()) > 0) { -// //cerco id_vassoio e aggiorno -// for (int i = 0; i < Completi.length; i++) { -// if (Long.parseLong(Campi[0].toString()) == Long.parseLong(Completi[i][0].toString())) { -// //12-1-18 -// //Completi[i][2] = Long.parseLong(Completi[i][2].toString()) + 1; -// Completi[i][2] = Long.parseLong(Completi[i][2].toString()) + Long.parseLong(Campi[5].toString()); -// } -// } -// } -// } -// //trovo il completo giusto -// Long idVassoio = 0L, max = 0L; -// Double Prezzo = 0.0; -// for (int i = 0; i < Completi.length; i++) { -// Long NPezzi = Long.parseLong(Completi[i][2].toString()); -//// Double Prezzo2=Double.parseDouble(Completi[i][1].toString()); -// -// if (NPezzi > 0 && NPezzi > max) { -// max = Long.parseLong(Completi[i][2].toString()); -// idVassoio = Long.parseLong(Completi[i][0].toString()); -// Prezzo = Double.parseDouble(Completi[i][1].toString()); -// } -// -// } -// -// if (Long.parseLong(idVassoio.toString()) > 0) { -// //MyTableModel model1 = (MyTableModel) tblLista1.getModel(); -// //if(model1.getRowCount()>0){model1.deleteRow(0);} -// //cancello dalla lista prodotti i prezzi della composizione -// for (int y = 0; y < CompletiDett.length; y++) { -// Object[] Campi = new Object[6]; -// Campi = (Object[]) CompletiDett[y]; -// if (idVassoio == Long.parseLong(Campi[0].toString())) { -// for (int i = 0; i < model.getRowCount(); i++) { -// if (Long.parseLong(Campi[1].toString()) == Long.parseLong(model.getValueAt(i, ColCategoria).toString())) { -// Double p = 0.00; -// model.setValueAt(p, i, ColImporto); -// //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -// // se la quantità per la stessa categoria è >1 devo azzerare tutti i successivi -// int qtà = Integer.parseInt(Campi[2].toString()) - 1; -// if (qtà > 0) { -// for (int j = i + 1; j < model.getRowCount(); j++) { -// if (Long.parseLong(Campi[1].toString()) == Long.parseLong(model.getValueAt(j, ColCategoria).toString())) { -// model.setValueAt(p, j, ColImporto); -// qtà--; -// if (qtà <= 0) { -// break; -// } -// } -// } -// } -// //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -// break; -// } -// } -// } -// } -// -// String Completo = MySelect("Select nome from vassoi where id=" + idVassoio, "nome"); -// if (Gratuita_Residue > 0) {//Gratuita_ResidueProg -// //Gratuita_ResidueProg--; -// model1.addRow(new Object[]{Completo, 0.00, idVassoio}); -// } else if (FLAG_BONUS == 1 && Bonus_Residui > 0) { -// //Bonus_ResiduiProg--; -// model1.addRow(new Object[]{Completo, 0.00, idVassoio}); -// } else { -// model1.addRow(new Object[]{Completo, Prezzo, idVassoio}); -// } -// -// } -// } -// -// } - // ======================Com==================================================== + // ========================================================================== // ** Carica i dati di base per la maschera principale // ========================================================================== public void caricaDati(String tipo, String id) { @@ -2868,12 +2093,10 @@ public class PuntoCassa extends JFrame implements ActionListener { Statement st; ResultSet rs; JToggleButton b; -// this.pnlCategorie.setLayout(new GridLayout(2,1,1,1)); JPanel pnl = this.pnlCategorie; switch (tipo) { - case "CATEGORIE": - //sql = "SELECT id, nome FROM categorie_prodotti WHERE nome IS NOT NULL ORDER BY id"; + case "CATEGORIE" -> { sql = "SELECT distinct c.id, c.nome, c.descrizione FROM categorie_prodotti c " + " INNER JOIN prodotti p ON p.id_categoria = c.ID " + " INNER JOIN catalogo_punti_cassa l ON l.id_prodotto = p.ID " @@ -2882,46 +2105,20 @@ public class PuntoCassa extends JFrame implements ActionListener { System.out.println(sql); azione = "CATEGORIA"; pnl = this.pnlCategorie; - break; + } - case "PRODOTTI": - //sql = "SELECT id, nome FROM prodotti WHERE nome IS NOT NULL AND id_categoria = " + id + " ORDER BY id"; - //sql = "SELECT distinct prodotti.id, prodotti.nome FROM prodotti inner join tariffe on prodotti.id=tariffe.id_prodotto inner join catalogo_punti_cassa on prodotti.id=CATALOGO_PUNTI_CASSA.ID_Prodotto WHERE nome IS NOT NULL AND prodotti.id_categoria = " + id + " and catalogo_punti_cassa.id_Punto_cassa=" + idPuntoCassa + " and tariffe.id_fascia=" + idProfiloTariffario + " ORDER BY Prodotti.id"; - //sql="Select p.id, p.nome, nvl(t.prezzo, p.prezzo_base) as prezzo, nvl(t.punti, 0) as punti from prodotti p left join tariffe t on t.id_prodotto = p.id where p.id_categoria = " + id + " and p.id_Vassoio is null and (t.id_fascia is null or t.id_fascia = " + idProfiloTariffario +") and catalogo_punti_cassa.id_Punto_cassa=" + idPuntoCassa; - //if (id.equalsIgnoreCase("-1")) { - /*28-03-2019 - sql = "SELECT p.ID, p.nome, NVL (t.prezzo, p.prezzo_base) AS prezzo,NVL (t.punti, 0) AS punti,cat.nome as Categoria "; - String sql2 = " FROM prodotti p , tariffe t, catalogo_punti_cassa c,categorie_prodotti cat " - + " WHERE p.flag_catalogo_variabile = 1" - + " AND p.id_categoria = cat.id " - + " AND t.id_prodotto = p.id " - + " AND t.id_fascia = " + idProfiloTariffario - + " AND c.id_prodotto = p.id AND c.id_punto_cassa =" + idPuntoCassa + " order by cat.descrizione,p.id"; - MyApplication MyA = new MyApplication(); - String nrec = MyA.MySelect(this, "SELECT count(*) as nrec " + sql2, "nrec"); - if (Integer.parseInt(nrec) <= 0) { - MenùGiornoPresente = false; - String idComposizione = MyA.MySelect(this, "select id from Categorie_Prodotti where Upper(Nome)='COMPOSIZIONE'", "id"); - caricaDati("PRODOTTI", idComposizione); - break; - } else { - MenùGiornoPresente = true; - sql = sql + sql2; - } - */ - //} else { - sql = "SELECT p.ID, p.nome, NVL (t.prezzo, p.prezzo_base) AS prezzo,NVL (t.punti, 0) AS punti FROM prodotti p , tariffe t, catalogo_punti_cassa c " - + " WHERE p.id_categoria = " + id - + " AND t.id_prodotto = p.id " - + " AND t.id_fascia = " + idProfiloTariffario - + " AND c.id_prodotto = p.id AND c.id_punto_cassa =" + idPuntoCassa - + " ORDER BY p.flag_catalogo_variabile desc, p.nome"; - - System.out.println(sql); - //} + case "PRODOTTI" -> { + sql = "SELECT p.ID, p.nome, NVL (t.prezzo, p.prezzo_base) AS prezzo,NVL (t.punti, 0) AS punti FROM prodotti p , tariffe t, catalogo_punti_cassa c " + + " WHERE p.id_categoria = " + id + + " AND t.id_prodotto = p.id " + + " AND t.id_fascia = " + idProfiloTariffario + + " AND c.id_prodotto = p.id AND c.id_punto_cassa =" + idPuntoCassa + + " ORDER BY p.flag_catalogo_variabile desc, p.nome"; + + System.out.println(sql); azione = "PRODOTTO"; pnl = this.pnlProdotti; - break; + } } try { Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); @@ -2934,7 +2131,7 @@ public class PuntoCassa extends JFrame implements ActionListener { rowcount++; } if (rowcount > 0) { - NumeroCategorie = rowcount; + numeroCategorie = rowcount; rs.beforeFirst(); pnl.setLayout(new GridLayout(rowcount + 1, 1, 1, 1)); } @@ -2945,54 +2142,18 @@ public class PuntoCassa extends JFrame implements ActionListener { while (rs.next()) { nome = "" + rs.getString("nome") + ""; b = new JToggleButton(nome); - b.setEnabled(CassaAperta); - - //getImage(rs.getString("id"),rs.getString("nome") ); -// File imageCheck = new File(imgPath + rs.getString("id") + ".jpg"); -// ImageIcon img; -// if (imageCheck.exists()) { -// img = new ImageIcon(imageCheck.getAbsolutePath()); -// b.setIcon(img); -// b.setHorizontalAlignment(SwingConstants.CENTER); -// b.setHorizontalTextPosition(SwingConstants.CENTER); -// b.setVerticalAlignment(SwingConstants.TOP); -// b.setVerticalTextPosition(SwingConstants.TOP); -// } else { + b.setEnabled(isCassaAperta); b.setHorizontalAlignment(SwingConstants.CENTER); b.setVerticalAlignment(SwingConstants.CENTER); b.setVerticalTextPosition(SwingConstants.CENTER); -// } - b.setText(nome); -// Font f=new Font("Tahoma",0,12); -// b.setFont(f); - -/*28-03-2019------------ - if (id.equalsIgnoreCase("-1")) { - switch (rs.getString("Categoria").toUpperCase()) { - case "PRIMO": - Color c = new Color(255, 204, 204); - b.setBackground(c); - break; - case "SECONDO": - b.setBackground(Color.CYAN); - break; - case "CONTORNO": - b.setBackground(Color.GREEN); - break; - default: - b.setBackground(Color.yellow); - break; - - } - }-----------*/ b.setName(rs.getString("id")); b.setActionCommand(azione + "[" + rs.getString("id") + "]"); b.addActionListener(this); b.setVisible(true); if (tipo.equalsIgnoreCase("CATEGORIE")) { -// Color c=new Color(255,0, 102, 102); - Font f = new Font("Tahoma", Font.BOLD, 14); + //Font f = new Font("Tahoma", Font.BOLD, 14); + Font f = new Font("Tahoma", Font.BOLD, hFont); b.setFont(f); b.setForeground(Color.RED); @@ -3003,7 +2164,8 @@ public class PuntoCassa extends JFrame implements ActionListener { if (tipo.equalsIgnoreCase("CATEGORIE")) { JToggleButton bGost = new JToggleButton("[DEFAULT]"); bGost.setName("btnDefault"); - Font f = new Font("Tahoma", Font.BOLD, 14); + //Font f = new Font("Tahoma", Font.BOLD, 14); + Font f = new Font("Tahoma", Font.BOLD, hFont); bGost.setFont(f); bGost.setForeground(Color.RED); bGost.setActionCommand("CATEGORIA[0]"); @@ -3022,12 +2184,12 @@ public class PuntoCassa extends JFrame implements ActionListener { } } + public void caricaPannello() { String azione = "PRODOTTO"; String where = ""; Statement st; ResultSet rs; - JToggleButton b; String sql = "select * from (SELECT p.ID, p.nome, NVL (t.prezzo, p.prezzo_base) AS prezzo,NVL (t.punti, 0) AS punti,cat.nome as Categoria "; String sql2 = " FROM prodotti p , tariffe t, catalogo_punti_cassa c,categorie_prodotti cat " + " WHERE p.flag_catalogo_variabile = 1" @@ -3035,70 +2197,68 @@ public class PuntoCassa extends JFrame implements ActionListener { + " AND t.id_prodotto = p.id " + " AND t.id_fascia = " + idProfiloTariffario + " AND c.id_prodotto = p.id AND c.id_punto_cassa =" + idPuntoCassa; - MyApplication MyA = new MyApplication(); - String nrec = MyA.MySelect(this, "SELECT count(*) as nrec " + sql2, "nrec"); + //MyApplication myApp = new MyApplication(); + String nrec = Utils.mySelect("SELECT count(*) as nrec " + sql2, "nrec", + this); if (Integer.parseInt(nrec) <= 0) { menuGiornoPresente = false; - String idComposizione = MyA.MySelect(this, "select id from Categorie_Prodotti where Upper(Nome)='COMPOSIZIONE'", "id"); + String idComposizione = Utils.mySelect("select id from Categorie_Prodotti where Upper(Nome)='COMPOSIZIONE'", "id", + this); caricaDati("PRODOTTI", idComposizione); } else { menuGiornoPresente = true; sql = sql + sql2; } - JPanel pnl = this.pnlProdotti; + //JPanel pnl = this.pnlProdotti; + var listaBottoni = new ArrayList(); - pnl.setLayout(new GridLayout(6, 5, 1, 1)); - pnl.removeAll(); + for (Integer r = 0; r < 6; r++) { Color c2 = new Color(255, 153, 255); switch (r) { - case 0: - where = " and upper(cat.CODICE)='PRIM' "; - break; - case 1: + case 0 -> where = " and upper(cat.CODICE)='PRIM' "; + case 1 -> { where = " and upper(cat.CODICE)='SECO' "; c2 = Color.CYAN; - break; - case 2: + } + case 2 -> { where = " and upper(cat.CODICE)='CONT' "; c2 = new Color(146, 208, 80); - break; - case 3: + } + case 3 -> { where = " and upper(cat.CODICE)='DESS' "; c2 = Color.yellow; - break; - case 4: + } + case 4 -> { where = " and (upper(cat.CODICE)='INSA' OR upper(cat.CODICE)='UNI' OR upper(cat.CODICE)='UNR2') "; c2 = Color.GREEN; - break; - case 5: + } + case 5 -> { where = " and (upper(cat.CODICE)='SALA' OR upper(cat.CODICE)='PIZZ') "; c2 = new Color(255, 217, 102); - break; + } } - Integer np=0; + Integer np = 0; try { Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); st = dbConnection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); rs = st.executeQuery(sql + where + " order by p.id) where ROWNUM <= 7"); - Font f=new Font("Tahoma", Font.BOLD,13); - String Jolly=""; - String idJolly=""; + //Font f = new Font("Tahoma", Font.BOLD, 13); + Font f = new Font("Tahoma", Font.BOLD, hFont); + String jolly = ""; + String idJolly = ""; while (rs.next()) { - if (rs.getString("nome").toUpperCase().indexOf("JOLLY")>=0) { - Jolly= "" + rs.getString("nome") + ""; - idJolly= rs.getString("id"); + if (rs.getString("nome").toUpperCase().indexOf("JOLLY") >= 0) { + jolly = "" + rs.getString("nome") + ""; + idJolly = rs.getString("id"); } else { String nome = "" + rs.getString("nome") + ""; JToggleButton bt = new JToggleButton(nome); bt.setBackground(c2); - - bt.setEnabled(CassaAperta); - + bt.setEnabled(isCassaAperta); bt.setFont(f); -// MyCanvas tl = new MyCanvas(nome); Insets ins = new Insets(0, 0, 0, 0); bt.setMargin(ins); bt.setHorizontalAlignment(SwingConstants.LEFT); @@ -3107,31 +2267,23 @@ public class PuntoCassa extends JFrame implements ActionListener { bt.setName(rs.getString("id")); bt.setActionCommand(azione + "[" + rs.getString("id") + "]"); bt.addActionListener(this); -// bt.add(tl); bt.setVisible(true); -// JLabel text3 = new JLabel(); -// text3.setText(nome); -// text3.setFont(f); -// text3.setLocation(0, 0); -// text3.setHorizontalAlignment(SwingConstants.LEFT); -// text3.setVerticalAlignment(SwingConstants.TOP); -// text3.setVerticalTextPosition(SwingConstants.TOP); -// text3.setSize(200,200); -// bt.add(text3); -// bt.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10)); - pnl.add(bt); + //this.pnlProdotti.add(bt); + listaBottoni.add(bt); np++; - if(np==5){break;} + if (np == 5) { + break; + } } } for (Integer c = np; c < 6; c++) { JToggleButton bt; - if (c == 5 && Jolly.length() > 1) { - bt = new JToggleButton(Jolly); + if (c == 5 && jolly.length() > 1) { + bt = new JToggleButton(jolly); bt.setName(idJolly); - bt.setActionCommand(azione + "[" + idJolly + "]"); + bt.setActionCommand(azione + "[" + idJolly + "]"); } else { bt = new JToggleButton(""); bt.setName("0"); @@ -3139,7 +2291,7 @@ public class PuntoCassa extends JFrame implements ActionListener { } bt.setBackground(c2); bt.setFont(f); - bt.setEnabled(CassaAperta); + bt.setEnabled(isCassaAperta); Insets ins = new Insets(0, 0, 0, 0); bt.setMargin(ins); bt.setHorizontalAlignment(SwingConstants.LEFT); @@ -3147,185 +2299,32 @@ public class PuntoCassa extends JFrame implements ActionListener { bt.setVerticalTextPosition(SwingConstants.TOP); bt.addActionListener(this); bt.setVisible(true); - pnl.add(bt); + //this.pnlProdotti.add(bt); + listaBottoni.add(bt); } rs.close(); st.close(); dbConnection.close(); - - } catch (SQLException e) { + LogManager.getLogger(PuntoCassa.class).error(e); } - } - - this.revalidate(); - this.repaint(); + this.pnlProdotti.setLayout(new GridLayout(6, 5, 1, 1)); + this.pnlProdotti.removeAll(); + for(JToggleButton bt : listaBottoni){ + this.pnlProdotti.add(bt); + } + + this.pnlProdotti.revalidate(); + this.pnlProdotti.repaint(); + //this.revalidate(); + //this.repaint(); } - /* - public void caricaDati(String tipo, String id) { - String sql = ""; - String azione = ""; - String nome = ""; - Statement st; - ResultSet rs; - JToggleButton b; -// this.pnlCategorie.setLayout(new GridLayout(2,1,1,1)); - JPanel pnl = this.pnlCategorie; - switch (tipo) { - case "CATEGORIE": - //sql = "SELECT id, nome FROM categorie_prodotti WHERE nome IS NOT NULL ORDER BY id"; - sql = "SELECT distinct c.id, c.nome, c.descrizione FROM categorie_prodotti c " - + " INNER JOIN prodotti p ON p.id_categoria = c.ID " - + " INNER JOIN catalogo_punti_cassa l ON l.id_prodotto = p.ID " - + " INNER JOIN punti_cassa x ON l.id_punto_cassa = x.ID " - + " WHERE x.id =" + idPuntoCassa + " order by c.descrizione"; - System.out.println(sql); - azione = "CATEGORIA"; - pnl = this.pnlCategorie; - break; - - case "PRODOTTI": - //sql = "SELECT id, nome FROM prodotti WHERE nome IS NOT NULL AND id_categoria = " + id + " ORDER BY id"; - //sql = "SELECT distinct prodotti.id, prodotti.nome FROM prodotti inner join tariffe on prodotti.id=tariffe.id_prodotto inner join catalogo_punti_cassa on prodotti.id=CATALOGO_PUNTI_CASSA.ID_Prodotto WHERE nome IS NOT NULL AND prodotti.id_categoria = " + id + " and catalogo_punti_cassa.id_Punto_cassa=" + idPuntoCassa + " and tariffe.id_fascia=" + idProfiloTariffario + " ORDER BY Prodotti.id"; - //sql="Select p.id, p.nome, nvl(t.prezzo, p.prezzo_base) as prezzo, nvl(t.punti, 0) as punti from prodotti p left join tariffe t on t.id_prodotto = p.id where p.id_categoria = " + id + " and p.id_Vassoio is null and (t.id_fascia is null or t.id_fascia = " + idProfiloTariffario +") and catalogo_punti_cassa.id_Punto_cassa=" + idPuntoCassa; - if (id.equalsIgnoreCase("-1")) { - sql = "SELECT p.ID, p.nome, NVL (t.prezzo, p.prezzo_base) AS prezzo,NVL (t.punti, 0) AS punti,cat.nome as Categoria "; - String sql2 = " FROM prodotti p , tariffe t, catalogo_punti_cassa c,categorie_prodotti cat " - + " WHERE p.flag_catalogo_variabile = 1" - + " AND p.id_categoria = cat.id " - + " AND t.id_prodotto = p.id " - + " AND t.id_fascia = " + idProfiloTariffario - + " AND c.id_prodotto = p.id AND c.id_punto_cassa =" + idPuntoCassa + " order by cat.descrizione,p.id"; - MyApplication MyA = new MyApplication(); - String nrec = MyA.MySelect(this, "SELECT count(*) as nrec " + sql2, "nrec"); - if (Integer.parseInt(nrec) <= 0) { - MenùGiornoPresente = false; - String idComposizione = MyA.MySelect(this, "select id from Categorie_Prodotti where Upper(Nome)='COMPOSIZIONE'", "id"); - caricaDati("PRODOTTI", idComposizione); - break; - } else { - MenùGiornoPresente = true; - sql = sql + sql2; - } - } else { - sql = "SELECT p.ID, p.nome, NVL (t.prezzo, p.prezzo_base) AS prezzo,NVL (t.punti, 0) AS punti FROM prodotti p , tariffe t, catalogo_punti_cassa c " - + " WHERE p.id_categoria = " + id - + " AND t.id_prodotto = p.id " - + " AND t.id_fascia = " + idProfiloTariffario - + " AND c.id_prodotto = p.id AND c.id_punto_cassa =" + idPuntoCassa - + " ORDER BY p.flag_catalogo_variabile desc, p.nome"; - } - azione = "PRODOTTO"; - pnl = this.pnlProdotti; - break; - } - try { - Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); - st = dbConnection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); - rs = st.executeQuery(sql); - - if (tipo.equalsIgnoreCase("CATEGORIE")) { - int rowcount = 0; - while (rs.next()) { - rowcount++; - } - if (rowcount > 0) { - NumeroCategorie = rowcount; - rs.beforeFirst(); - pnl.setLayout(new GridLayout(rowcount + 1, 1, 1, 1)); - } - } - - pnl.removeAll(); - - while (rs.next()) { - nome = "" + rs.getString("nome") + ""; - b = new JToggleButton(nome); - b.setEnabled(CassaAperta); - - //getImage(rs.getString("id"),rs.getString("nome") ); -// File imageCheck = new File(imgPath + rs.getString("id") + ".jpg"); -// ImageIcon img; -// if (imageCheck.exists()) { -// img = new ImageIcon(imageCheck.getAbsolutePath()); -// b.setIcon(img); -// b.setHorizontalAlignment(SwingConstants.CENTER); -// b.setHorizontalTextPosition(SwingConstants.CENTER); -// b.setVerticalAlignment(SwingConstants.TOP); -// b.setVerticalTextPosition(SwingConstants.TOP); -// } else { - b.setHorizontalAlignment(SwingConstants.CENTER); - b.setVerticalAlignment(SwingConstants.CENTER); - b.setVerticalTextPosition(SwingConstants.CENTER); -// } - - b.setText(nome); -// Font f=new Font("Tahoma",0,12); -// b.setFont(f); - -/*28-03-2019------------ - if (id.equalsIgnoreCase("-1")) { - switch (rs.getString("Categoria").toUpperCase()) { - case "PRIMO": - Color c = new Color(255, 204, 204); - b.setBackground(c); - break; - case "SECONDO": - b.setBackground(Color.CYAN); - break; - case "CONTORNO": - b.setBackground(Color.GREEN); - break; - default: - b.setBackground(Color.yellow); - break; - - } - }-----------*/ - /* - b.setName(rs.getString("id")); - b.setActionCommand(azione + "[" + rs.getString("id") + "]"); - b.addActionListener(this); - b.setVisible(true); - if (tipo.equalsIgnoreCase("CATEGORIE")) { -// Color c=new Color(255,0, 102, 102); - Font f = new Font("Tahoma", Font.BOLD, 14); - b.setFont(f); - b.setForeground(Color.RED); - - } - pnl.add(b); - } - - if (tipo.equalsIgnoreCase("CATEGORIE")) { - JToggleButton bGost = new JToggleButton("[DEFAULT]"); - bGost.setName("btnDefault"); - Font f = new Font("Tahoma", Font.BOLD, 14); - bGost.setFont(f); - bGost.setForeground(Color.RED); - bGost.setActionCommand("CATEGORIA[-1]"); - bGost.addActionListener(this); - bGost.setVisible(false); - pnl.add(bGost); - } - - this.revalidate(); - this.repaint(); - rs.close(); - st.close(); - dbConnection.close(); - - } catch (SQLException e) { - } - - } -*/ - private void CaricaModiPagamento() { + private void caricaModiPagamento() { try { Statement st; ResultSet rs; @@ -3334,11 +2333,7 @@ public class PuntoCassa extends JFrame implements ActionListener { rs = st.executeQuery("Select * from Tipi_Pagamenti order by id"); while (rs.next()) { - ModiPagamento.append(rs.getString("id") + ';' + rs.getString("nome") + "|"); -//03-07-2017 -// if (rs.getString("nome").equalsIgnoreCase("Contanti")){ -// idModoPagamento=rs.getLong("id"); -// } + modiPagamento.append(rs.getString("id")).append(';').append(rs.getString("nome")).append("|"); } this.revalidate(); this.repaint(); @@ -3347,30 +2342,33 @@ public class PuntoCassa extends JFrame implements ActionListener { dbConnection.close(); } catch (SQLException e) { + LogManager.getLogger(PuntoCassa.class).error(e); } } + // ========================================================================== // ** Quando viene chiusa la form esce dall'applicazione // ========================================================================== private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm - Object[] options = {"Sì", "No"}; + Object[] options = {"Si", "No"}; Object selectedValue = JOptionPane.showOptionDialog(this, "Confermi chiusura programma?", "Attenzione", JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[1]); if (Integer.parseInt(selectedValue.toString()) == 0) { - MyInsert("UPDATE PARAMETRI set valore='NO' where chiave='FlagDownloadInCorso'"); - Long nrec = MySelectInteger("SELECT count(*) as nrec FROM acquisti", "nrec"); + Utils.myInsert("UPDATE PARAMETRI set valore='NO' where chiave='FlagDownloadInCorso'", this); + Long nrec = Utils.mySelectInteger("SELECT count(*) as nrec FROM acquisti", "nrec", + this); if (nrec > 0) { if (JOptionPane.showConfirmDialog(null, "Attenzione, ci sono " + nrec + " passaggi non ancora trasferiti al database centrale,\nconferma chiusura programma?", "Acquisti", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { - StatoAttivoNonLoggato(); + statoAttivoNonLoggato(); System.exit(0); } else { return; } } - StatoAttivoNonLoggato(); + statoAttivoNonLoggato(); System.exit(0); } @@ -3379,81 +2377,86 @@ public class PuntoCassa extends JFrame implements ActionListener { // ========================================================================== // ** Click sul btnLogin // ========================================================================== - private Boolean Turno() { - Boolean OK = false; - String Query = "select t.dalle, t.alle, t.id, t.nome from turni t, turni_punti_distribuzione x, punti_distribuzione p, punti_cassa c where x.id_turno = t.id and x.id_punto_distribuzione = p.id and c.id_punto_distribuzione = p.id and c.id =" + idPuntoCassa; + private Boolean turno() { + Boolean ok = false; + String query = "select t.dalle, t.alle, t.id, t.nome from turni t, turni_punti_distribuzione x, punti_distribuzione p, punti_cassa c " + + "where x.id_turno = t.id " + + "and x.id_punto_distribuzione = p.id " + + "and c.id_punto_distribuzione = p.id and c.id =" + idPuntoCassa; try { - String[] mo = MySelect("Select sysdate as mo from dual", "mo").split(" "); + String[] nowString = Utils.mySelect("Select sysdate as mo from dual", "mo", + this).split(" "); Statement st; ResultSet rs; Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); st = dbConnection.createStatement(); - rs = st.executeQuery(Query); + rs = st.executeQuery(query); while (rs.next()) { - String Dalle = rs.getString("dalle"); - String Alle = rs.getString("alle"); + String dalle = rs.getString("dalle"); + String alle = rs.getString("alle"); try { - //Date Adesso=new Date(); - Date Adesso = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ENGLISH).parse(mo[0] + " " + mo[1]); - Date Da = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ENGLISH).parse(mo[0] + " " + Dalle); - Date A = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ENGLISH).parse(mo[0] + " " + Alle); + Date now = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ENGLISH).parse(nowString[0] + " " + nowString[1]); + Date da = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ENGLISH).parse(nowString[0] + " " + dalle); + Date a = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ENGLISH).parse(nowString[0] + " " + alle); - //JOptionPane.showMessageDialog(this, Da + " e " + Adesso.compareTo(A)); - if (Adesso.after(Da) && Adesso.before(A)) { + if (now.after(da) && now.before(a)) { idTurno = rs.getLong("id"); - NomeTurno = rs.getString("nome"); + nomeTurno = rs.getString("nome"); idTurnoAttuale = idTurno; - NomeTurnoAttuale = NomeTurno; - OK = true; + nomeTurnoAttuale = nomeTurno; + ok = true; break; } } catch (Exception e) { + LogManager.getLogger(PuntoCassa.class).error(e); } } rs.close(); st.close(); dbConnection.close(); } catch (SQLException e) { - - JOptionPane.showMessageDialog(this, "Errore DB ['" + Query + "']"); + JOptionPane.showMessageDialog(this, "Errore DB ['" + query + "']"); } - return OK; + return ok; } - private void TurnoAttuale() { - String Query = "select t.dalle, t.alle, t.id, t.nome from turni t, turni_punti_distribuzione x, punti_distribuzione p, punti_cassa c where x.id_turno = t.id and x.id_punto_distribuzione = p.id and c.id_punto_distribuzione = p.id and c.id =" + idPuntoCassa; + private void turnoAttuale() { + String query = "select t.dalle, t.alle, t.id, t.nome from turni t, turni_punti_distribuzione x, punti_distribuzione p, punti_cassa c " + + "where x.id_turno = t.id and x.id_punto_distribuzione = p.id " + + "and c.id_punto_distribuzione = p.id and c.id =" + idPuntoCassa; try { - String[] mo = MySelect("Select sysdate as mo from dual", "mo").split(" "); + String[] mo = Utils.mySelect("Select sysdate as mo from dual", "mo", + this).split(" "); Statement st; ResultSet rs; Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); st = dbConnection.createStatement(); - rs = st.executeQuery(Query); + rs = st.executeQuery(query); while (rs.next()) { - String Dalle = rs.getString("dalle"); - String Alle = rs.getString("alle"); + String dalle = rs.getString("dalle"); + String alle = rs.getString("alle"); try { - //Date Adesso=new Date(); - Date Adesso = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ENGLISH).parse(mo[0] + " " + mo[1]); - Date Da = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ENGLISH).parse(mo[0] + " " + Dalle); - Date A = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ENGLISH).parse(mo[0] + " " + Alle); + Date adesso = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ENGLISH).parse(mo[0] + " " + mo[1]); + Date da = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ENGLISH).parse(mo[0] + " " + dalle); + Date a = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ENGLISH).parse(mo[0] + " " + alle); - //JOptionPane.showMessageDialog(this, Da + " e " + Adesso.compareTo(A)); - if (Adesso.after(Da) && Adesso.before(A)) { + //JOptionPane.showMessageDialog(this, da + " e " + now.compareTo(a)); + if (adesso.after(da) && adesso.before(a)) { idTurnoAttuale = rs.getLong("id"); - NomeTurnoAttuale = rs.getString("nome"); + nomeTurnoAttuale = rs.getString("nome"); break; } } catch (Exception e) { + LogManager.getLogger(PuntoCassa.class).error(e); } } rs.close(); @@ -3461,16 +2464,17 @@ public class PuntoCassa extends JFrame implements ActionListener { dbConnection.close(); } catch (SQLException e) { - JOptionPane.showMessageDialog(this, "Errore DB ['" + Query + "']"); + JOptionPane.showMessageDialog(this, "Errore DB ['" + query + "']"); } } - private void ImpostaAmbiente() { + private void impostaAmbiente() { // ----------------------------------------------------------- // ** id punto cassa // ----------------------------------------------------------- - idPuntoCassa = MySelectInteger("select Punti_Cassa.id as idPC from Punti_Cassa where Punti_Cassa.id=" + idPuntoCassa, "idPC"); + idPuntoCassa = Utils.mySelectInteger("select Punti_Cassa.id as idPC from Punti_Cassa where Punti_Cassa.id=" + idPuntoCassa, "idPC", + this); // ----------------------------------------------------------- // ** Imposta l'ambiente @@ -3478,11 +2482,8 @@ public class PuntoCassa extends JFrame implements ActionListener { txtUsername.setEnabled(false); txtPassword.setEnabled(false); btnLogin.setEnabled(false); - AddRemoveKeyDispatcher(true); - - //database di produzione si inceppa nello scarico immagini - //ScaricaImmagini(); - AggiungiImmaginiPulsanti(); + addRemoveKeyDispatcher(true); + aggiungiImmaginiPulsanti(); if (jChLogin.isSelected() == false && utenteLoggato.length() <= 0) { utenteLoggato = txtUsername.getText(); } @@ -3495,215 +2496,74 @@ public class PuntoCassa extends JFrame implements ActionListener { pnlTop.setVisible(true); pnlProdotti.setVisible(true); jBtnStorno.setEnabled(false); - //jBtnTicket.setEnabled(false); - //jBtnCarta.setEnabled(false); jBtnAsporto.setEnabled(false); -// jBtnBuoni.setEnabled(false); jbtnSu.setEnabled(false); jbtnGiu.setEnabled(false); jbtnElimina.setEnabled(false); jbtnAnnulla.setEnabled(false); -// jbtnStampa.setEnabled(false); jbtnDuplica.setEnabled(false); - String Pulsante = MySelect("SELECT p.flag_imposta_tessera as Pulsante FROM punti_distribuzione p, punti_cassa c WHERE c.id_punto_distribuzione = p.id AND c.id =" + idPuntoCassa, "Pulsante"); - if (Integer.parseInt(Pulsante) == 1) { - BottoneImposta = true; + String pulsante = Utils.mySelect("SELECT p.flag_imposta_tessera as Pulsante " + + "FROM punti_distribuzione p, punti_cassa c " + + "WHERE c.id_punto_distribuzione = p.id AND c.id =" + idPuntoCassa, "Pulsante", + this); + if (Integer.parseInt(pulsante) == 1) { + bottoneImposta = true; btnImpostaCliente.setVisible(true); btnImpostaCliente.setEnabled(true); jTxtTessera.setEnabled(true); } else { - BottoneImposta = false; -// btnImpostaCliente.setVisible(false); + bottoneImposta = false; btnImpostaCliente.setEnabled(false); jTxtTessera.setEnabled(false); } - //tasto imposta -// String QueryTasto="select count(*) as res from punti_cassa pc, punti_distribuzione pd where pc.id_punto_distribuzione = pd.id " + -// " and pd.flag_imposta_tessera = 1 and pc.id =" + idPuntoCassa; -// MyApplication MyA=new MyApplication(); -// Integer Visibile=Integer.parseInt(MyA.MySelect(this, QueryTasto, "res")); -// if(Visibile==0){ -//// btnImpostaCliente.setVisible(false); -// btnImpostaCliente.setEnabled(false); -// jTxtTessera.setEnabled(false); -// } if (idPuntoCassa != 0) { - AggiornaProgressivi(); - //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -/* - // ----------------------------------------------------------- - // ** progressivo assoluto scontrino - // ----------------------------------------------------------- - - String prog = MySelect("select nvl(max(prog_assoluto),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa, "Prog"); - Progressivo = Long.parseLong(prog); - - - // ----------------------------------------------------------- - // ** progressivo giorno turno scontrino - // ----------------------------------------------------------- - Date Adesso=new Date(); - String progT = MySelect("select nvl(max(prog_turno),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + AggiustaData(Adesso) , "Prog"); - ProgressivoTurno = Long.parseLong(progT); - - - // ----------------------------------------------------------- - // ** progressivo giorno scontrino - // ---------------------c-------------------------------------- - -// String[] El = MySelect("select nvl(max(prog_giorno),0) || '|' || count(*) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and data=" + AggiustaData(Adesso) , "Prog").split("\\|"); -// String progG=El[0]; -// if (Long.parseLong(El[1])<= 0) { -// MyInsert("Insert into Progressivi (data,id_Punto_cassa,id_Turno,prog_assoluto,prog_giorno,prog_turno) " + -// " values (" + AggiustaData(Adesso) + "," + idPuntoCassa + "," + idTurno + "," + Progressivo + ",0,0)"); -//// " values (" + AggiustaData(Adesso) + "," + idPuntoCassa + "," + idTurno + "," + prog + ",0,0)"); -// } - - String progG = MySelect("select nvl(max(prog_giorno),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and data=" + AggiustaData(Adesso) , "Prog"); - ProgressivoGiorno = Long.parseLong(progG); - - - String ControlloTurno=MySelect("select count(*) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and data=" + AggiustaData(Adesso) + " and id_Turno=" + idTurno , "Prog"); - if (Long.parseLong(ControlloTurno)<=0){ - MyInsert("Insert into Progressivi (data,id_Punto_cassa,id_Turno,prog_assoluto,prog_giorno,prog_turno) " + - " values (" + AggiustaData(Adesso) + "," + idPuntoCassa + "," + idTurno + "," + Progressivo + "," + ProgressivoGiorno + ",0)"); -// - } - - Progressivo++; - ProgressivoGiorno++; - ProgressivoTurno++; - - - - // ----------------------------------------------------------- - // ** incassi turno pagamento a scalare - // ----------------------------------------------------------- - String progPS = MySelect("select nvl(sum(incasso_turno_scalare),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + AggiustaData(Adesso), "Prog"); - ProgressivoScalare = Double.parseDouble(progPS); - - // ----------------------------------------------------------- - // ** incassi turno pagamento a contanti - // ----------------------------------------------------------- - String progPC = MySelect("select nvl(sum(incasso_turno_contanti),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + AggiustaData(Adesso), "Prog"); - ProgressivoContanti = Double.parseDouble(progPC); - - // ----------------------------------------------------------- - // ** incassi turno pagamento ticket - // ----------------------------------------------------------- - String progPT = MySelect("select nvl(sum(incasso_turno_ticket),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + AggiustaData(Adesso), "Prog"); - ProgressivoTicket = Double.parseDouble(progPT); - - AggiornaLabelInfo(); - - //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - */ - //KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(keyDispatcher); + aggiornaProgressivi(); if (btnImpostaCliente.isVisible()) { btnImpostaCliente.setEnabled(false); } jBtnprodotti.setEnabled(false); - //jBtnMeteo.setEnabled(false); - //jBtnDB.setEnabled(false); - Meteo(); + meteo(); if (btnImpostaCliente.isVisible()) { - btnImpostaCliente.setEnabled(BottoneImposta); + btnImpostaCliente.setEnabled(bottoneImposta); } jBtnprodotti.setEnabled(true); - //jBtnMeteo.setEnabled(true); - //jBtnDB.setEnabled(true); - jbtnDuplica.setText("Duplica
Prodotto"); jbtnElimina.setText("Elimina
Prodotto"); - CaricaModiPagamento(); - - VerificaModoPagamento(); - PulsantiModoPagamento(); + caricaModiPagamento(); + verificaModoPagamento(); + pulsantiModoPagamento(); //modifica 09-5-2018------------------------------------ - if (FlagPrecaricaLista) { - AbilitaPulsanti(pnlCategorie, true,true); - AbilitaPulsanti(pnlProdotti, true,true); - idProfiloTariffarioDefault = MySelectInteger("select Valore from Parametri where upper(chiave)='IDFASCIADEFAULT'", "Valore"); + if (flagPrecaricaLista) { + abilitaPulsanti(pnlCategorie, true, true); + abilitaPulsanti(pnlProdotti, true, true); + idProfiloTariffarioDefault = Utils.mySelectInteger("select Valore from Parametri where upper(chiave)='IDFASCIADEFAULT'", "Valore", + this); System.out.print("" + idProfiloTariffarioDefault); - ApriCassaDefault(); + apriCassaDefault(); } - //modifica 09-5-2018------------------------------------ - -// jbtnDuplica.setLayout(new BorderLayout()); -// JLabel label1 = new JLabel("Duplica"); -// label1.setFont(jbtnDuplica.getFont()); -// JLabel label2 = new JLabel("Prodotto"); -// label2.setFont(jbtnDuplica.getFont()); -// jbtnDuplica.add(BorderLayout.CENTER,label1); -// jbtnDuplica.add(BorderLayout.SOUTH,label2); - //label1.setLocation(10, 10); -// jTxtTessera.requestFocus(); -// -// jTxtTessera.getDocument().addDocumentListener(new DocumentListener() { -// public void changedUpdate(DocumentEvent e) { -//// warn(); -// } -// public void removeUpdate(DocumentEvent e) { -//// warn(); -// } -// public void insertUpdate(DocumentEvent e) { -// warn(); -// } -// -// public void warn() { -// if(StatoCardLettore){return;} -// if (jTxtTessera.getText().length()>0 ){ -// StatoCardLettore=true; -//// timerCardLettore = new java.util.Timer(); -//// timerCardLettore.schedule(new CardTaskLettore(PuntoCassa.this),1000, 1*5000); -// -// final Timer timer = new Timer(); -// -// final TimerTask task = new TimerTask() { -// @Override -// public void run() { -// String[] txt=jTxtTessera.getText().split("ò"); -// if (txt.length>0){ -// String Tessera=txt[1].trim().replace("_", ""); -// jTxtTessera.setText(Tessera); -// CercaTessera(); -// System.out.println(Tessera); -// } -// -// -// timer.cancel(); -// timer.purge(); -// StatoCardLettore=false; -// -// } -// }; -// timer.schedule(task, 1000); -// -// -// } -// } -// }); } else { JOptionPane.showMessageDialog(this, "ID Punto Cassa non configurato!"); } } - private void VerificaDB() { + + private void verificaDB() { final Timer timer = new Timer(); final TimerTask task = new TimerTask() { @Override public void run() { - Long res=MySelectInteger("SELECT db_remoto_connesso as Stato FROM dual", "Stato"); - if (res==1){ + Long res = Utils.mySelectInteger("SELECT db_remoto_connesso as Stato FROM dual", "Stato", + PuntoCassa.this); + if (res == 1) { lblDB.setBackground(Color.green); - }else{ + } else { lblDB.setBackground(Color.red); } lblDB.setOpaque(true); @@ -3714,129 +2574,135 @@ public class PuntoCassa extends JFrame implements ActionListener { timer.schedule(task, 1000, 10000); } - public void AggiornaProgressivi() { + + public void aggiornaProgressivi() { // ----------------------------------------------------------- // ** progressivo assoluto scontrino // ----------------------------------------------------------- - String prog = MySelect("select nvl(max(prog_assoluto),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa, "Prog"); - -// if(Progressivo < Long.parseLong(prog)){ - Progressivo = Long.parseLong(prog); + String prog = Utils.mySelect("select nvl(max(prog_assoluto),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa, "Prog", + this); + +// if(progressivo < Long.parseLong(prog)){ + progressivo = Long.valueOf(prog); // } // ----------------------------------------------------------- // ** progressivo giorno turno scontrino // ----------------------------------------------------------- - Date Adesso = new Date(); - String progT = MySelect("select nvl(max(prog_turno),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + AggiustaData(Adesso), "Prog"); -// if(ProgressivoTurno < Long.parseLong(progT)){ - ProgressivoTurno = Long.parseLong(progT);// + 1; -// } + Date now = new Date(); + String progT = Utils.mySelect("select nvl(max(prog_turno),0) as Prog from Progressivi where id_Punto_cassa=" + + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + formattaData(now), + "Prog", + this); + progressivoTurno = Long.valueOf(progT); - // ----------------------------------------------------------- - // ** progressivo giorno scontrino - // ---------------------c-------------------------------------- -// String[] El = MySelect("select nvl(max(prog_giorno),0) || '|' || count(*) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and data=" + AggiustaData(Adesso) , "Prog").split("\\|"); -// String progG=El[0]; -// if (Long.parseLong(El[1])<= 0) { -// MyInsert("Insert into Progressivi (data,id_Punto_cassa,id_Turno,prog_assoluto,prog_giorno,prog_turno) " + -// " values (" + AggiustaData(Adesso) + "," + idPuntoCassa + "," + idTurno + "," + Progressivo + ",0,0)"); -//// " values (" + AggiustaData(Adesso) + "," + idPuntoCassa + "," + idTurno + "," + prog + ",0,0)"); -// } - String progG = MySelect("select nvl(max(prog_giorno),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and data=" + AggiustaData(Adesso), "Prog"); -// if(ProgressivoGiorno < Long.parseLong(progG)){ - ProgressivoGiorno = Long.parseLong(progG);// + 1; -// } + String progG = Utils.mySelect("select nvl(max(prog_giorno),0) as Prog from Progressivi where id_Punto_cassa=" + + idPuntoCassa + " and data=" + formattaData(now), "Prog", + this); + progressivoGiorno = Long.valueOf(progG); - String ControlloTurno = MySelect("select count(*) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and data=" + AggiustaData(Adesso) + " and id_Turno=" + idTurno, "Prog"); - if (Long.parseLong(ControlloTurno) <= 0) { - MyInsert("Insert into Progressivi (data,id_Punto_cassa,id_Turno,prog_assoluto,prog_giorno,prog_turno) " - + " values (" + AggiustaData(Adesso) + "," + idPuntoCassa + "," + idTurno + "," + Progressivo + "," + ProgressivoGiorno + ",0)"); -// + String controlloTurno = Utils.mySelect("select count(*) as Prog from Progressivi where id_Punto_cassa=" + + idPuntoCassa + " and data=" + formattaData(now) + " and id_Turno=" + idTurno, "Prog", + this); + if (Long.parseLong(controlloTurno) <= 0) { + Utils.myInsert("Insert into Progressivi (data,id_Punto_cassa,id_Turno,prog_assoluto,prog_giorno,prog_turno) " + + " values (" + formattaData(now) + "," + idPuntoCassa + "," + idTurno + "," + progressivo + "," + progressivoGiorno + ",0)", + this); } -// Progressivo++; -// ProgressivoGiorno++; -// ProgressivoTurno++; - - // ----------------------------------------------------------- // ** incassi turno pagamento a scalare // ----------------------------------------------------------- - String progPS = MySelect("select nvl(sum(incasso_turno_scalare),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + AggiustaData(Adesso), "Prog"); - ProgressivoScalare = Double.parseDouble(progPS); + String progPS = Utils.mySelect("select nvl(sum(incasso_turno_scalare),0) as Prog from Progressivi where id_Punto_cassa=" + + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + formattaData(now), "Prog", + this); + progressivoScalare = Double.valueOf(progPS); // ----------------------------------------------------------- // ** incassi turno pagamento a contanti // ----------------------------------------------------------- - String progPC = MySelect("select nvl(sum(incasso_turno_contanti),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + AggiustaData(Adesso), "Prog"); - ProgressivoContanti = Double.parseDouble(progPC); + String progPC = Utils.mySelect("select nvl(sum(incasso_turno_contanti),0) as Prog from Progressivi where id_Punto_cassa=" + + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + formattaData(now), "Prog", + this); + progressivoContanti = Double.valueOf(progPC); // ----------------------------------------------------------- // ** incassi turno pagamento ticket // ----------------------------------------------------------- - String progPT = MySelect("select nvl(sum(incasso_turno_ticket),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + AggiustaData(Adesso), "Prog"); - ProgressivoTicket = Double.parseDouble(progPT); + String progPT = Utils.mySelect("select nvl(sum(incasso_turno_ticket),0) as Prog from Progressivi where id_Punto_cassa=" + + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + formattaData(now), "Prog", + this); + progressivoTicket = Double.valueOf(progPT); // ----------------------------------------------------------- // ** incassi turno pagamento differito // ----------------------------------------------------------- - String progDI = MySelect("select nvl(sum(incasso_turno_differito),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + AggiustaData(Adesso), "Prog"); - ProgressivoDifferito = Double.parseDouble(progDI); - AggiornaLabelInfo(); - - if (CercaTestoModoPagamento().equalsIgnoreCase("A scalare") && jTxtTessera.getText().length()>0) { - VerificaSaldo(jTxtTessera.getText()); - + String progDI = Utils.mySelect("select nvl(sum(incasso_turno_differito),0) as Prog from Progressivi where id_Punto_cassa=" + + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + formattaData(now), "Prog", + this); + progressivoDifferito = Double.valueOf(progDI); + aggiornaLabelInfo(); + + if (cercaTestoModoPagamento().equalsIgnoreCase("A scalare") && jTxtTessera.getText().length() > 0) { + verificaSaldo(jTxtTessera.getText()); + } } - private void AggiornaLabelInfo() { - Long Prog = Progressivo;// - 1; - Long ProgGG = ProgressivoGiorno;// - 1; - Long ProgTurno = ProgressivoTurno;// - 1; - if(Progressivo<=0) - Prog=0L; - if(ProgressivoGiorno<=0) - ProgGG=0L; - if(ProgressivoTurno<=0) - ProgTurno=0L; - - lblInfo.setText("Passaggi: Tot. [" + Prog + "], giorno [" + ProgGG + "], turno [" + ProgTurno + "]"); + private void aggiornaLabelInfo() { + Long prog = progressivo;// - 1; + Long progGG = progressivoGiorno;// - 1; + Long progTurno = progressivoTurno;// - 1; + if (progressivo <= 0) { + prog = 0L; + } + if (progressivoGiorno <= 0) { + progGG = 0L; + } + if (progressivoTurno <= 0) { + progTurno = 0L; + } + + lblInfo.setText("Passaggi: Tot. [" + prog + "], giorno [" + progGG + "], turno [" + progTurno + "]"); DecimalFormat df2 = new DecimalFormat("#,###,###,##0.00"); - lblInfo2.setText("Incassi [" + NomeTurno + "]: Tot. [" + df2.format(ProgressivoScalare + ProgressivoContanti + ProgressivoTicket + ProgressivoDifferito) + "] SC [" + df2.format(ProgressivoScalare) + "], CO [" + df2.format(ProgressivoContanti) + "], TI [" + df2.format(ProgressivoTicket) + "], DI [" + df2.format(ProgressivoDifferito) + "]"); + lblInfo2.setText("Incassi [" + nomeTurno + "]: Tot. [" + + df2.format(progressivoScalare + progressivoContanti + progressivoTicket + progressivoDifferito) + "] SC [" + + df2.format(progressivoScalare) + "], CO [" + + df2.format(progressivoContanti) + "], TI [" + + df2.format(progressivoTicket) + "], DI [" + + df2.format(progressivoDifferito) + "]"); } - public void AddRemoveKeyDispatcher(Boolean Aggiungi) { - if (Aggiungi) { - if (KeyDespatcherAttivo == false) { + public void addRemoveKeyDispatcher(Boolean aggiungi) { + if (aggiungi) { + if (keyDespatcherAttivo == false) { KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(keyDispatcher); - KeyDespatcherAttivo = true; + keyDespatcherAttivo = true; } } else { KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(keyDispatcher); - KeyDespatcherAttivo = false; + keyDespatcherAttivo = false; } } - private void Meteo() { - String Spia = MySelect("select controlla_meteo(" + idPuntoCassa + ") as res from dual", "res"); - if (Integer.parseInt(Spia) == 1) { - if (MyMeteo == null) { - MyMeteo = new frmMeteo(this, idPuntoCassa, true); + private void meteo() { + String spia = Utils.mySelect("select controlla_meteo(" + idPuntoCassa + ") as res from dual", "res", + this); + if (Integer.parseInt(spia) == 1) { + if (myMeteoForm == null) { + myMeteoForm = new FrmMeteo(this, idPuntoCassa, true); this.setEnabled(false); - Integer w = CalcolaLarghezzaAltezza(300, LargControlli); - Integer h = CalcolaLarghezzaAltezza(70, AltControlli); + Integer w = calcolaLarghezzaAltezza(300, largControlli); + Integer h = calcolaLarghezzaAltezza(70, altControlli); - MyMeteo.setSize(w, h); - MyMeteo.setLocationRelativeTo(null); - //MyD.setLocation((this.getWidth() - this.getLocation().y) / 2, (this.getHeight() - this.getLocation().x) / 2); - MyMeteo.setVisible(true); + myMeteoForm.setSize(w, h); + myMeteoForm.setLocationRelativeTo(null); + myMeteoForm.setVisible(true); } } @@ -3865,16 +2731,15 @@ public class PuntoCassa extends JFrame implements ActionListener { if (isComposizione) { JOptionPane.showOptionDialog(this, "Composizione già presente!", "Attenzione", JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); - return; } else { model.addRow(row); tblLista.setRowSelectionInterval(model.getRowCount() - 1, model.getRowCount() - 1); tblLista.setModel(model); - ControllaCompleti(model); - ControllaExtra(model); - SommaColonne(model); + controllaCompleti(model); + controllaExtra(model); + sommaColonne(model); } } }//GEN-LAST:event_jbtnDuplicaActionPerformed @@ -3889,48 +2754,46 @@ public class PuntoCassa extends JFrame implements ActionListener { private void jbtnStampaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnStampaActionPerformed -// Chiudi(); -// Stampa(); - - - Boolean ok= MyInsert("UPDATE PARAMETRI set valore='NO' where chiave='FlagDownloadInCorso'"); - if (ok){ + Boolean ok = Utils.myInsert("UPDATE PARAMETRI set valore='NO' where chiave='FlagDownloadInCorso'", + this); + if (ok) { JOptionPane.showOptionDialog(this, "Operazione correttamente eseguita.", "Attenzione", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, null, null); - }else { - JOptionPane.showOptionDialog(this, "Errore nell'aggiornamento del parametro!", "Attenzione", + } else { + JOptionPane.showOptionDialog(this, "Errore nell'aggiornamento del parametro!", "Attenzione", JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); } }//GEN-LAST:event_jbtnStampaActionPerformed - private void CancellaComposizioni() { + private void cancellaComposizioni() { try { MyTableModel model1 = (MyTableModel) tblLista1.getModel(); - ClearTable(model1); + //clearTable(model1); + model1.clearTable(); } catch (Exception e) { } } private void jbtnEliminaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnEliminaActionPerformed - CancellaComposizioni(); + cancellaComposizioni(); MyTableModel model = (MyTableModel) tblLista.getModel(); - Integer Riga = tblLista.getSelectedRow(); - if (Riga >= 0) { - model.deleteRow(Riga); + Integer riga = tblLista.getSelectedRow(); + if (riga >= 0) { + model.deleteRow(riga); //ripristino i prezzi for (Integer i = 0; i < model.getRowCount(); i++) { - model.setValueAt(model.getValueAt(i, ColImporto2), i, ColImporto); + model.setValueAt(model.getValueAt(i, colImporto2), i, colImporto); } //doLayout(); if (tblLista.getRowCount() > 0) { - if (Riga > 0) { - tblLista.setRowSelectionInterval(Riga - 1, Riga - 1); + if (riga > 0) { + tblLista.setRowSelectionInterval(riga - 1, riga - 1); } else { tblLista.setRowSelectionInterval(0, 0); } } - ControllaCompleti(model); - ControllaExtra(model); - SommaColonne(model); + controllaCompleti(model); + controllaExtra(model); + sommaColonne(model); //spengo altri togglebutton for (Integer y = 0; y < this.pnlProdotti.getComponentCount(); y++) { @@ -3942,7 +2805,6 @@ public class PuntoCassa extends JFrame implements ActionListener { jbtnGiu.setEnabled(false); jbtnElimina.setEnabled(false); jbtnAnnulla.setEnabled(false); - //jbtnStampa.setEnabled(false); jbtnDuplica.setEnabled(false); } @@ -3952,68 +2814,62 @@ public class PuntoCassa extends JFrame implements ActionListener { }//GEN-LAST:event_jbtnEliminaActionPerformed private void jbtnChiudiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnChiudiActionPerformed - - if (VerificaPrenotazioni()){ - Chiudi(); - } - + if (verificaPrenotazioni()) { + chiudi(); + } }//GEN-LAST:event_jbtnChiudiActionPerformed - - private boolean VerificaPrenotazioni() { - boolean ok=true; - if (idTessera > 0L && idPrenotazione>0L) { + + private boolean verificaPrenotazioni() { + boolean ok = true; + if (idTessera > 0L && idPrenotazione > 0L) { MyTableModel model = (MyTableModel) tblLista.getModel(); - StringBuilder ElencoIdProdotti = new StringBuilder(); + StringBuilder elencoIdProdotti = new StringBuilder(); for (int i = model.getRowCount() - 1; i >= 0; i--) { - Long idCateg = Long.parseLong(model.getValueAt(i, ColCategoria).toString()); + Long idCateg = Long.valueOf(model.getValueAt(i, colCategoria).toString()); if (idCateg != 0L) { - ElencoIdProdotti.append(model.getValueAt(i, ColIDProdotto)); - ElencoIdProdotti.append(","); + elencoIdProdotti.append(model.getValueAt(i, colIDProdotto)); + elencoIdProdotti.append(","); } } - ok=ControllaDiscrepanzePrenotazioni(ElencoIdProdotti.toString()); - AggiornaPrenotazioni(ElencoIdProdotti.toString()); + ok = controllaDiscrepanzePrenotazioni(elencoIdProdotti.toString()); + aggiornaPrenotazioni(elencoIdProdotti.toString()); } return ok; } - private String GetNumeroTessera() { - MyApplication MyA = new MyApplication(); + + private String getNumeroTessera() { + MyApplication myApp = new MyApplication(); String nTessera = ""; try { - MyA.idTesseraA = ""; + myApp.idTesseraA = ""; String[] listReader; - listReader = MyA.SC.listReaders(); - MyA.SC.setReader(listReader[0]); + listReader = myApp.smartCard.listReaders(); + myApp.smartCard.setReader(listReader[0]); - MyA.SC.connect("T=1"); - MyA.SC.getCurrentCardATR(); + myApp.smartCard.connect("T=1"); + myApp.smartCard.getCurrentCardATR(); String nTess = ""; - MyA.sendAPDU(this, "d000", "00", "A4", "00", "00", "02", ""); - MyA.sendAPDU(this, "d100", "00", "A4", "00", "00", "02", ""); - MyA.sendAPDU(this, "d101", "00", "A4", "00", "00", "02", ""); - String[] CF = MyA.sendAPDU(this, "", "00", "B0", "00", "00", "00", "140").split("\\|"); + myApp.sendAPDU(this, "d000", "00", "A4", "00", "00", "02", ""); + myApp.sendAPDU(this, "d100", "00", "A4", "00", "00", "02", ""); + myApp.sendAPDU(this, "d101", "00", "A4", "00", "00", "02", ""); + String[] CF = myApp.sendAPDU(this, "", "00", "B0", "00", "00", "00", "140").split("\\|"); - MyA.sendAPDU(this, "3f00", "00", "A4", "00", "00", "02", ""); - MyA.sendAPDU(this, "1000", "00", "A4", "00", "00", "02", ""); - MyA.sendAPDU(this, "1003", "00", "A4", "00", "00", "02", ""); - nTess = MyA.sendAPDU(this, "", "00", "B0", "00", "00", "00", "14"); + myApp.sendAPDU(this, "3f00", "00", "A4", "00", "00", "02", ""); + myApp.sendAPDU(this, "1000", "00", "A4", "00", "00", "02", ""); + myApp.sendAPDU(this, "1003", "00", "A4", "00", "00", "02", ""); + nTess = myApp.sendAPDU(this, "", "00", "B0", "00", "00", "00", "14"); - MyA.SC.disconnect(); + myApp.smartCard.disconnect(); if (CF.length > 1) { - //CodFisLetto = CF[0]; - //ScadenzaLetta = MyA.AggiustaDateTessera(CF[1]); - nTessera = nTess; - //jTxtDatiTessera.setText("Cod. Fis.: " + CodFisLetto + "\n" + "Scadenza: " + ScadenzaLetta + "\n" + "N° Tessera: " + nTessera); - } } catch (Exception ex) { - //JOptionPane.showMessageDialog(this, ex.getMessage(),"Read Card Exception",JOptionPane.ERROR_MESSAGE); - JOptionPane.showMessageDialog(this, "Card Reader non collegato o errore di lettura!", "jBtnReadCardActionPerformed", JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(this, "Card Reader non collegato o errore di lettura!", + "jBtnReadCardActionPerformed", JOptionPane.ERROR_MESSAGE); } finally { @@ -4025,45 +2881,36 @@ public class PuntoCassa extends JFrame implements ActionListener { // TODO add your handling code here: resize(); }//GEN-LAST:event_formWindowDeiconified - private void Tastiera2(java.awt.event.MouseEvent evt) { - MyApplication MyA = new MyApplication(); + private void setTastiera(java.awt.event.MouseEvent evt) { + setTastieraAfterEvent(evt); + } + + private void setTastiera(java.awt.event.FocusEvent evt) { + setTastieraAfterEvent(evt); + } + + private void setTastieraAfterEvent(ComponentEvent evt) { + MyApplication myApp = new MyApplication(); if (jChLogin.isSelected() == false) { - if (MyA.TastieraVideo) { - if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { - MyA.UltimoTxt = " "; + if (myApp.tastieraVideo) { + if (myApp.ultimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { + myApp.ultimoTxt = " "; } else { - MyA.UltimoTxt = evt.getComponent().toString(); + myApp.ultimoTxt = evt.getComponent().toString(); Rectangle pnl = pnlLogin.getBounds(); - Tastiera((JTextField) evt.getComponent(), pnl.x, pnl.y); - } - } - } - } - - //java.awt.event.FocusEvent - private void Tastiera2(java.awt.event.FocusEvent evt) { - MyApplication MyA = new MyApplication(); - if (jChLogin.isSelected() == false) { - if (MyA.TastieraVideo) { - if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { - MyA.UltimoTxt = " "; - } else { - MyA.UltimoTxt = evt.getComponent().toString(); - Rectangle pnl = pnlLogin.getBounds(); - Tastiera((JTextField) evt.getComponent(), pnl.x, pnl.y); + setTastiera((JTextField) evt.getComponent(), pnl.x, pnl.y); } } } } + + private void jbtnEsciActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnEsciActionPerformed - Object[] options = {"Sì", "No"}; + Object[] options = {"Si", "No"}; Object selectedValue = JOptionPane.showOptionDialog(this, "Confermi chiusura sessione?", "Attenzione", JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]); - if (Integer.parseInt(selectedValue.toString()) != 0) { - return; - } else { - + if (Integer.parseInt(selectedValue.toString()) == 0) { pnlErrore.setVisible(false); pnlLogin.setVisible(true); pnlTop.setVisible(false); @@ -4078,229 +2925,130 @@ public class PuntoCassa extends JFrame implements ActionListener { btnLogin.setEnabled(true); pnlCategorie.removeAll(); pnlProdotti.removeAll(); - AddRemoveKeyDispatcher(false); + addRemoveKeyDispatcher(false); jChLoginActionPerformed(null); - Azzera(); - StatoAttivoNonLoggato(); - } -// idTessera=0L; -// idProfiloTariffario=0L; -// idModoPagamento=0L; -// CassaAperta=false; -// txtTotaleCassa.setText(""); -// txtTotalePunti.setText(""); -// -//// pnlCategorie.setVisible(false); -//// pnlProdotti.setVisible(false); -//// AbilitaPulsanti(pnlCategorie, false); -//// AbilitaPulsanti(pnlProdotti, false); -//// pnlCategorie.setVisible(true); -//// pnlProdotti.setVisible(true); -// -// jTxtTessera.setText(""); -// pnlProdotti.removeAll(); -// pnlProdotti.repaint(); -// lblCategoria.setText(""); -// lblCognome.setText(""); -// lblNome.setText(""); -// lblNascita.setText(""); -// lblMatricola.setText(""); -// lblAzienda.setText(""); -// lblConvenzione.setText(""); -// lblFascia.setText(""); -// -// jBtnStorno.setEnabled(false); -// -// MyTableModel model=(MyTableModel)tblLista.getModel(); -// for (int i = model.getRowCount() - 1; i >= 0; i--) { -// model.deleteRow(i); -// -// } -// -// MyTableModel model2 = (MyTableModel) tblLista1.getModel(); -// for (int i = model2.getRowCount() - 1; i >= 0; i--) { -// model2.deleteRow(i); -// } + azzera(); + statoAttivoNonLoggato(); + } }//GEN-LAST:event_jbtnEsciActionPerformed private void jBtnStornoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnStornoActionPerformed - ApriStorno(false); + apriStorno(false); }//GEN-LAST:event_jBtnStornoActionPerformed - private void ApriStorno(Boolean DaPassaggi) { - frmStorno MyD = new frmStorno(this, idTessera, idPuntoCassa, imgPath, DaPassaggi); + private void apriStorno(Boolean daPassaggi) { + FrmStorno jFrameStorno = new FrmStorno(this, idTessera, idPuntoCassa, imgPath, daPassaggi); this.setEnabled(false); - Integer w = CalcolaLarghezzaAltezza(550, LargControlli); - Integer h = CalcolaLarghezzaAltezza(250, AltControlli); + Integer w = calcolaLarghezzaAltezza(550, largControlli); + Integer h = calcolaLarghezzaAltezza(250, altControlli); - MyD.setSize(w, h); - MyD.setLocationRelativeTo(null); - //MyD.setLocation((this.getWidth() - this.getLocation().y) / 2, (this.getHeight() - this.getLocation().x) / 2); - MyD.setVisible(true); + jFrameStorno.setSize(w, h); + jFrameStorno.setLocationRelativeTo(null); + jFrameStorno.setVisible(true); } private void jBtnprodottiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnprodottiActionPerformed - frmProdotti MyD = new frmProdotti(this, imgPath); + FrmProdotti jFrameProdotti = new FrmProdotti(this, imgPath); this.setEnabled(false); - Integer w = CalcolaLarghezzaAltezza(550, LargControlli); - Integer h = CalcolaLarghezzaAltezza(250, AltControlli); + Integer w = calcolaLarghezzaAltezza(550, largControlli); + Integer h = calcolaLarghezzaAltezza(250, altControlli); - MyD.setSize(w, h); - MyD.setLocationRelativeTo(null); - //MyD.setLocation((this.getWidth() - this.getLocation().y) / 2, (this.getHeight() - this.getLocation().x) / 2); - MyD.setVisible(true); + jFrameProdotti.setSize(w, h); + jFrameProdotti.setLocationRelativeTo(null); + jFrameProdotti.setVisible(true); }//GEN-LAST:event_jBtnprodottiActionPerformed - private void SelezionaTipoPagamento(int idTipo) { - /* - if(idModoPagamento==0L || idModoPagamento==2L){ - ClickContanti(); - return; - } - if(idModoPagamento==1L){ - ClickTicket(); - return; - } - - if(CercaTestoModoPagamento().equalsIgnoreCase("A scalare") || CercaTestoModoPagamento().equalsIgnoreCase("Ticket")){ - ClickContanti(); - return; - } - if(CercaTestoModoPagamento().equalsIgnoreCase("Contanti")){ - ClickTicket(); - return; - } - */ - String Tipo = SetModoPagamento(idTipo); - /* - if (CassaAperta == false) { - CassaAperta = true; - idProfiloTariffario = 0L; - idTessera = 0L; - AbilitaPulsanti(pnlCategorie, true); - AbilitaPulsanti(pnlProdotti, true); - CaricaCompleti(); - }*/ + private void selezionaTipoPagamento(int idTipo) { + String tipo = setModoPagamento(idTipo); + + lblTipoPagamento.setText(tipo); + if (tipo.equalsIgnoreCase("A scalare") && jTxtTessera.getText().length() > 0) { + verificaSaldo(jTxtTessera.getText()); - lblTipoPagamento.setText(Tipo); - //PulsantiModoPagamento(); - if (Tipo.equalsIgnoreCase("A scalare") && jTxtTessera.getText().length() > 0 ) { - //if (Tipo.equalsIgnoreCase("A scalare") && jTxtTessera.getText().length()>0 && FlagPrecaricaLista==false) { - VerificaSaldo(jTxtTessera.getText()); - } } - public void ClickModoPagamento(String ModoPagamento) { - if (CassaAperta == false) { - CassaAperta = true; + public void clickModoPagamento(String ModoPagamento) { + if (isCassaAperta == false) { + isCassaAperta = true; idProfiloTariffario = 0L; idTessera = 0L; - - //AbilitaPulsanti(pnlCategorie, true); - //AbilitaPulsanti(pnlProdotti, true); -// CaricaCompleti(); - } lblResiduo.setText("[...]"); lblSaldo.setText("[...]"); - lblTipoPagamento.setText(ModoPagamento); - //PulsantiModoPagamento(); } -// public void ClickTicket(){ -// if (CassaAperta == false) { -// CassaAperta = true; -// idProfiloTariffario = 0L; -// idTessera = 0L; -// AbilitaPulsanti(pnlCategorie, true); -// AbilitaPulsanti(pnlProdotti, true); -// CaricaCompleti(); -// } -// //AggiungImmagini(jBtnTicket,"Contanti.png",50,50); -// -//// idModoPagamento = 2L; -//// String Tipo = MySelect("Select Nome from Tipi_Pagamenti where id=2", "Nome"); -//// lblTipoPagamento.setText(Tipo); -//// //jBtnCarta.setEnabled(true); -// } - public void ClickCarta() { - if (SaldoAcquisti(0.0) == false && ConsentiCredito == false) { + public void clickCarta() { + if (saldoAcquisti(0.0) == false && consentiCredito == false) { JOptionPane.showOptionDialog(this, "Saldo tessera insufficiente!", "Attenzione", JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); return; - } - if (CassaAperta == true) { - //idModoPagamento = 0L; + + if (isCassaAperta == true) { lblResiduo.setText("[...]"); - //String Tipo = MySelect("Select Nome from Tipi_Pagamenti where id=0", "Nome"); - SetModoPagamento("A scalare"); - String Tipo = CercaTestoModoPagamento(); - lblTipoPagamento.setText(Tipo); - //PulsantiModoPagamento(); + setModoPagamento("A scalare"); + String tipo = cercaTestoModoPagamento(); + lblTipoPagamento.setText(tipo); + } } - private void AggiornaDB(Boolean Messaggio) { + private void aggiornaDB(Boolean messaggio) { try { - Boolean Aggiorna = false; - if (Messaggio) { - Object[] options = {"Sì", "No"}; + Boolean aggiorna = false; + if (messaggio) { + Object[] options = {"Si", "No"}; Object selectedValue = JOptionPane.showOptionDialog(this, "Confermi aggiornamento del database locale?", "Attenzione", JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]); if (Integer.parseInt(selectedValue.toString()) != 0) { return; } else { - Aggiorna = true; + aggiorna = true; } } else { - Aggiorna = true; + aggiorna = true; } - if (Aggiorna) { + if (aggiorna) { - MyProgress = new frmProgress(this); + myProgressForm = new FrmProgress(this); this.setEnabled(false); - Integer w = CalcolaLarghezzaAltezza(300, LargControlli); - Integer h = CalcolaLarghezzaAltezza(100, AltControlli); - MyProgress.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - MyProgress.setResizable(false); - //MyD.getRootPane().setWindowDecorationStyle(JRootPane.NONE); - MyProgress.setTitle("Aggiornamento Database..."); - MyProgress.setSize(w, h); - MyProgress.setLocationRelativeTo(null); - MyProgress.setVisible(true); - MyProgress.repaint(); + Integer w = calcolaLarghezzaAltezza(300, largControlli); + Integer h = calcolaLarghezzaAltezza(100, altControlli); + myProgressForm.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + myProgressForm.setResizable(false); + myProgressForm.setTitle("Aggiornamento Database..."); + myProgressForm.setSize(w, h); + myProgressForm.setLocationRelativeTo(null); + myProgressForm.setVisible(true); + myProgressForm.repaint(); EventQueue.invokeLater(new Runnable() { @Override public void run() { try { - //jBtnDB.setEnabled(false); Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); String plsql = "begin lancia_aggiorna_tabelle('S'); end;"; CallableStatement st = dbConnection.prepareCall(plsql); st.execute(); st.close(); dbConnection.close(); - //jBtnDB.setEnabled(true); - PuntoCassa.this.MyProgress.dispose(); + PuntoCassa.this.myProgressForm.dispose(); //12/09/2016 if (PuntoCassa.this.pnlLogin.isVisible() == false) { //23-12-15 - - PuntoCassa.this.ImpostaAmbiente(); - + PuntoCassa.this.impostaAmbiente(); PuntoCassa.this.setEnabled(true); } - //SELECT esito FROM esiti where id = (select max(id) from esiti); - String Esito = MySelect("SELECT esito FROM esiti where id = (select max(id) from esiti)", "esito"); - JOptionPane.showOptionDialog(PuntoCassa.this, Esito, "Aggiornamento Database", JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); + + String esito = Utils.mySelect("SELECT esito FROM esiti where id = (select max(id) from esiti)", "esito", + PuntoCassa.this); + JOptionPane.showOptionDialog(PuntoCassa.this, esito, "Aggiornamento Database", JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); } catch (Exception e) { JOptionPane.showMessageDialog(PuntoCassa.this, "Errore " + e.getMessage()); } @@ -4319,91 +3067,87 @@ public class PuntoCassa extends JFrame implements ActionListener { private void jBtnReadCardActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnReadCardActionPerformed // TODO add your handling code here: jTxtTessera.setText(""); - - String nTessera = GetNumeroTessera(); + String nTessera = getNumeroTessera(); jTxtTessera.setText(nTessera); }//GEN-LAST:event_jBtnReadCardActionPerformed private void jTxtTesseraFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTxtTesseraFocusGained - MyApplication MyA = new MyApplication(); - if (MyA.TastieraVideo) { - if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { - MyA.UltimoTxt = " "; + MyApplication myApp = new MyApplication(); + if (myApp.tastieraVideo) { + if (myApp.ultimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { + myApp.ultimoTxt = " "; } else { - MyA.UltimoTxt = evt.getComponent().toString(); + myApp.ultimoTxt = evt.getComponent().toString(); Rectangle pnl = pnlLogin.getBounds(); - Tastiera((JTextField) evt.getComponent(), pnl.x, pnl.y); + setTastiera((JTextField) evt.getComponent(), pnl.x, pnl.y); } } }//GEN-LAST:event_jTxtTesseraFocusGained private void btnImpostaClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImpostaClienteActionPerformed - frmCerca MyD = new frmCerca(this, jTxtTessera, imgPath, "", FlagMostraDataDiNascita); + FrmCerca jFrameCerca = new FrmCerca(this, jTxtTessera, imgPath, "", flagMostraDataDiNascita); this.setEnabled(false); - Integer w = CalcolaLarghezzaAltezza(650, LargControlli); - Integer h = CalcolaLarghezzaAltezza(250, AltControlli); + Integer w = calcolaLarghezzaAltezza(650, largControlli); + Integer h = calcolaLarghezzaAltezza(250, altControlli); + + jFrameCerca.setSize(w, h); + jFrameCerca.setLocationRelativeTo(null); + jFrameCerca.setVisible(true); - MyD.setSize(w, h); - MyD.setLocationRelativeTo(null); - //MyD.setLocation((this.getWidth() - this.getLocation().y) / 2, (this.getHeight() - this.getLocation().x) / 2); - MyD.setVisible(true); - //CercaTessera(); }//GEN-LAST:event_btnImpostaClienteActionPerformed private void jbtnAnnullaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnAnnullaActionPerformed MyTableModel model = (MyTableModel) tblLista.getModel(); if (model.getRowCount() > 0) { - Object[] options = {"Sì", "No"}; + Object[] options = {"Si", "No"}; Object selectedValue = JOptionPane.showOptionDialog(this, "Desideri annullare tutte le righe?", "Attenzione", JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]); - if (Integer.parseInt(selectedValue.toString()) != 0) { - return; - } else { - Annulla(); + if (Integer.parseInt(selectedValue.toString()) == 0) { + annulla(); doLayout(); - } + } } }//GEN-LAST:event_jbtnAnnullaActionPerformed - private void Annulla() { + private void annulla() { try { MyTableModel model = (MyTableModel) tblLista.getModel(); MyTableModel model1 = (MyTableModel) tblLista1.getModel(); - ClearTable(model); - ClearTable(model1); + //clearTable(model); + //clearTable(model1); + model.clearTable(); + model1.clearTable(); jbtnSu.setEnabled(false); jbtnGiu.setEnabled(false); jbtnElimina.setEnabled(false); jbtnAnnulla.setEnabled(false); - //jbtnStampa.setEnabled(false); jbtnDuplica.setEnabled(false); - SommaColonne(model); + sommaColonne(model); - if(idTessera == 0L){ - jbtnChiudi.setEnabled(false); - }else{ + if (idTessera == 0L) { + jbtnChiudi.setEnabled(false); + } else { jbtnChiudi.setEnabled(true); } - //spengo altri togglebutton for (Integer y = 0; y < this.pnlProdotti.getComponentCount(); y++) { JToggleButton bt = (JToggleButton) this.pnlProdotti.getComponent(y); bt.setSelected(false); } - } catch (Exception e) { + LogManager.getLogger(PuntoCassa.class).error(e); } } private void jBtnAsportoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnAsportoActionPerformed if (jBtnAsporto.isSelected()) { - AggiungImmagini(jBtnAsporto, "da asporto.jpg", 50, 50); + aggiungImmagini(jBtnAsporto, "da asporto.jpg", 50, 50); } else { - AggiungImmagini(jBtnAsporto, "coltello e forchetta.jpg", 50, 50); + aggiungImmagini(jBtnAsporto, "coltello e forchetta.jpg", 50, 50); } }//GEN-LAST:event_jBtnAsportoActionPerformed @@ -4412,37 +3156,35 @@ public class PuntoCassa extends JFrame implements ActionListener { }//GEN-LAST:event_txtTotalePuntiActionPerformed private void jBtnMovimentiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnMovimentiActionPerformed - frmMovimenti MyD = new frmMovimenti(this, idTessera, idPuntoCassa, imgPath); + FrmMovimenti jFrameMovimenti = new FrmMovimenti(this, idTessera, idPuntoCassa, imgPath); this.setEnabled(false); - Integer w = CalcolaLarghezzaAltezza(680, LargControlli); - Integer h = CalcolaLarghezzaAltezza(250, AltControlli); + Integer w = calcolaLarghezzaAltezza(680, largControlli); + Integer h = calcolaLarghezzaAltezza(250, altControlli); - MyD.setSize(w, h); - MyD.setLocationRelativeTo(null); - //MyD.setLocation((this.getWidth() - this.getLocation().y) / 2, (this.getHeight() - this.getLocation().x) / 2); - MyD.setVisible(true); + jFrameMovimenti.setSize(w, h); + jFrameMovimenti.setLocationRelativeTo(null); + + jFrameMovimenti.setVisible(true); }//GEN-LAST:event_jBtnMovimentiActionPerformed private void jBtnBuoniActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnBuoniActionPerformed - //Display("Tes 1234567890 Fa C1","Importo","E 1,55"); - frmCerca MyD = new frmCerca(this, jTxtTessera, imgPath, "BP", FlagMostraDataDiNascita); - this.setEnabled(false); - Integer w = CalcolaLarghezzaAltezza(650, LargControlli); - Integer h = CalcolaLarghezzaAltezza(250, AltControlli); - MyD.setSize(w, h); - MyD.setLocationRelativeTo(null); - - //MyD.setLocation((this.getWidth() - this.getLocation().y) / 2, (this.getHeight() - this.getLocation().x) / 2); - MyD.setVisible(true); + FrmCerca jFrameCerca = new FrmCerca(this, jTxtTessera, imgPath, "BP", flagMostraDataDiNascita); + this.setEnabled(false); + Integer w = calcolaLarghezzaAltezza(650, largControlli); + Integer h = calcolaLarghezzaAltezza(250, altControlli); + + jFrameCerca.setSize(w, h); + jFrameCerca.setLocationRelativeTo(null); + + jFrameCerca.setVisible(true); }//GEN-LAST:event_jBtnBuoniActionPerformed private void jBtnDB1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnDB1ActionPerformed // TODO add your handling code here: - //jBtnDBActionPerformed(null); - AggiornaDB(true); + aggiornaDB(true); }//GEN-LAST:event_jBtnDB1ActionPerformed private void jChLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChLoginActionPerformed @@ -4450,94 +3192,68 @@ public class PuntoCassa extends JFrame implements ActionListener { txtUsername.setEnabled(!jChLogin.isSelected()); txtPassword.setEnabled(!jChLogin.isSelected()); btnLogin.setEnabled(!jChLogin.isSelected()); - AddRemoveKeyDispatcher(jChLogin.isSelected()); + addRemoveKeyDispatcher(jChLogin.isSelected()); }//GEN-LAST:event_jChLoginActionPerformed private void btnTerminaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTerminaActionPerformed // TODO add your handling code here: - //System.exit(0); exitForm(null); }//GEN-LAST:event_btnTerminaActionPerformed private void txtPasswordMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtPasswordMouseClicked - Tastiera2(evt); + setTastiera(evt); }//GEN-LAST:event_txtPasswordMouseClicked private void txtPasswordFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtPasswordFocusGained - Tastiera2(evt); - // MyApplication MyA = new MyApplication(); - // if (MyA.TastieraVideo) { - // if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { - // MyA.UltimoTxt = " "; - // } else { - // MyA.UltimoTxt = evt.getComponent().toString(); - // - // Rectangle pnl = pnlLogin.getBounds(); - // Tastiera((JTextField) evt.getComponent(), pnl.x, pnl.y); - // } - // } + setTastiera(evt); }//GEN-LAST:event_txtPasswordFocusGained private void txtUsernameMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtUsernameMouseClicked - Tastiera2(evt); + setTastiera(evt); }//GEN-LAST:event_txtUsernameMouseClicked private void txtUsernameFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtUsernameFocusGained - Tastiera2(evt); + setTastiera(evt); - // MyApplication MyA = new MyApplication(); - // if (MyA.TastieraVideo) { - // if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { - // MyA.UltimoTxt = " "; - // } else { - // MyA.UltimoTxt = evt.getComponent().toString(); - // - // Rectangle pnl = pnlLogin.getBounds(); - // Tastiera((JTextField) evt.getComponent(), pnl.x, pnl.y); - // } - // } }//GEN-LAST:event_txtUsernameFocusGained private void btnLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLoginActionPerformed - if (Turno()) { + if (turno()) { String sql, pwd; - int counter = 0; - int hash = 0; - Statement st; - ResultSet rs; + int counter; + //int hash = 0; + //Statement st; + //ResultSet rs; - pwd = new String(); - sql = new String(); + //pwd = new String(); + //sql = new String(); // ======================================================================= // *** Verifica la correttezza delle credenziali inserite - Account // ======================================================================= sql = "SELECT count(*) as counter FROM accounts WHERE username = '" + this.txtUsername.getText() + "'"; - // try { - // Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); - // st = dbConnection.createStatement(); - // rs = st.executeQuery(sql); - // while (rs.next()) { - // counter = rs.getInt("counter"); - // } - MyApplication MyA = new MyApplication(); - counter = Integer.parseInt(MyA.MySelect(this, sql, "Counter")); + //MyApplication myApp = new MyApplication(); + counter = Integer.parseInt(Utils.mySelect(sql, "Counter", this)); // ==================================================================== // ** Verifica la password // ==================================================================== if (counter == 1) { - Encoding en = new Encoding(); - pwd = txtPassword.getText(); + //Encoding en = new Encoding(); + pwd = new String(txtPassword.getPassword()); sql = "SELECT id || '|' || id_Stato as res FROM accounts WHERE username = '" + this.txtUsername.getText() + "' " - + "and password = '" + en.encodeString(pwd) + "'"; - String[] El = MyA.MySelect(this, sql, "res").split("\\|"); - if (MyA.isNumeric(El[0])) { - idAccount = Long.parseLong(El[0]); - if (Integer.parseInt(El[1]) == 2) { - String Messaggio = MyA.MySelect(this, "Select Descrizione from Stati_Accounts where id=" + El[1], "descrizione"); - JOptionPane.showMessageDialog(this, Messaggio + "."); + + "and password = '" + Encoding.encodeString(pwd) + "'"; + //String[] el = myApp.mySelect(this, sql, "res").split("\\|"); + String[] el = Utils.mySelect(sql, "res",this).split("\\|"); + //if (myApp.isNumeric(el[0])) { + if (Utils.isNumeric(el[0])) { + idAccount = Long.valueOf(el[0]); + if (Integer.parseInt(el[1]) == 2) { + //String messaggio = myApp.mySelect(this, "Select Descrizione from Stati_Accounts where id=" + el[1], "descrizione"); + String messaggio = Utils.mySelect("Select Descrizione from Stati_Accounts where id=" + el[1], "descrizione", + this); + JOptionPane.showMessageDialog(this, messaggio + "."); return; } @@ -4546,43 +3262,25 @@ public class PuntoCassa extends JFrame implements ActionListener { } if (idAccount > 0L) { - // sql = "select a.id as id_account from accounts a, profili p where p.id_account = a.id and p.id_ruolo = 10000000004" - // + " and a.username = '" + txtUsername.getText() + "' and a.password = '" + en.encodeString(pwd) + "'"; - // try { sql = "SELECT count(*) as Counter FROM profili p WHERE p.id_account = " + idAccount + " AND p.id_ruolo IN (3, 10000000004)"; - counter = Integer.parseInt(MyA.MySelect(this, sql, "Counter")); - // st = dbConnection.createStatement(); - // rs = st.executeQuery(sql); - // while (rs.next()) { - // idAccount = rs.getLong("id_account"); - // counter = 1; - // } - // } catch (SQLException e) { - // JOptionPane.showMessageDialog(this, "Errore DB ['" + sql + "']"); - // - // } + //counter = Integer.parseInt(myApp.mySelect(this, sql, "Counter")); + counter = Integer.parseInt(Utils.mySelect(sql, "Counter", this)); - // da modificare<<<<<<<<<<<<<<<<<<<<<<<<<<< - - if (counter >0){ - ImpostaAmbiente(); + if (counter > 0) { + impostaAmbiente(); txtUsername.setText(""); txtPassword.setText(""); - StatoAttivoLoggato(); - - VerificaAggiornamentoDB(); + statoAttivoLoggato(); + verificaAggiornamentoDB(); } else { JOptionPane.showMessageDialog(this, "L'utente non dispone dei privilegi per l'utilizzo del modulo cassa."); } - + } else { JOptionPane.showMessageDialog(this, "Password errata."); } - // sql = "SELECT count(*) as counter FROM accounts WHERE username = '" - // + txtUsername.getText() + "' AND password = '" - // + en.encodeString(pwd) + "'"; // -------------------------------------------------------------- // *** Errore SQL in verifica password // -------------------------------------------------------------- @@ -4593,16 +3291,6 @@ public class PuntoCassa extends JFrame implements ActionListener { JOptionPane.showMessageDialog(this, "Account sconosciuto."); } - // rs.close(); - // st.close(); - // dbConnection.close(); - // - // } catch (SQLException e) { - // // -------------------------------------------------------------- - // // *** Errore SQL in verifica account - // // -------------------------------------------------------------- - // JOptionPane.showMessageDialog(this, "Errore DB ['" + sql + "']"); - // } } else { JOptionPane.showMessageDialog(this, "Impossibile eseguire il Login al sistema:\nNessun Turno Attivo!"); } @@ -4610,7 +3298,7 @@ public class PuntoCassa extends JFrame implements ActionListener { //a scalare private void jTBP0ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTBP0ActionPerformed if (jTBP0.isSelected()) { - try{ + try { jTBP0.setEnabled(false); jTBP1.setSelected(false); jTBP1.setEnabled(true); @@ -4618,13 +3306,15 @@ public class PuntoCassa extends JFrame implements ActionListener { jTBP2.setEnabled(true); jTBP3.setSelected(false); jTBP3.setEnabled(true); - SelezionaTipoPagamento(0); + selezionaTipoPagamento(0); + + MyTableModel modelX = (MyTableModel) tblLista.getModel(); + sommaColonne(modelX); + + } catch (Exception ex) { + LogManager.getLogger(PuntoCassa.class).error(ex); + } - MyTableModel modelX = (MyTableModel) tblLista.getModel(); - SommaColonne(modelX); - - }catch(Exception ex){} - } }//GEN-LAST:event_jTBP0ActionPerformed //contanti @@ -4638,7 +3328,7 @@ public class PuntoCassa extends JFrame implements ActionListener { jTBP2.setEnabled(true); jTBP3.setSelected(false); jTBP3.setEnabled(true); - SelezionaTipoPagamento(1); + selezionaTipoPagamento(1); } }//GEN-LAST:event_jTBP1ActionPerformed //ticket @@ -4651,7 +3341,7 @@ public class PuntoCassa extends JFrame implements ActionListener { jTBP0.setEnabled(true); jTBP3.setSelected(false); jTBP3.setEnabled(true); - SelezionaTipoPagamento(2); + selezionaTipoPagamento(2); } }//GEN-LAST:event_jTBP2ActionPerformed //differito @@ -4664,351 +3354,256 @@ public class PuntoCassa extends JFrame implements ActionListener { jTBP2.setEnabled(true); jTBP0.setSelected(false); jTBP0.setEnabled(true); - SelezionaTipoPagamento(3); + selezionaTipoPagamento(3); } }//GEN-LAST:event_jTBP3ActionPerformed - private void Tastiera(JTextField jTxt, Integer MyX, Integer MyY) { + private void setTastiera(JTextField jTxt, Integer MyX, Integer MyY) { - MyKeyBoard myk = new MyKeyBoard(this, false); - myk.txt = jTxt; - myk.Parent = this; + MyKeyBoard keyboard = new MyKeyBoard(this, false); + keyboard.txt = jTxt; + keyboard.parent = this; Rectangle s = this.getBounds(); Rectangle s2 = jTxt.getBounds(); Integer l = s.x + s2.x + MyX; if (l + 800 > s.x + s.width) { l = s.x + s.width - 800; } - myk.setBounds(l, s.y + s2.y + 60 + MyY, 800, 300); - myk.setVisible(true); + keyboard.setBounds(l, s.y + s2.y + 60 + MyY, 800, 300); + keyboard.setVisible(true); } - private Boolean VerificaSaldo(String NTessera) { - /*Double Tot =0.0; - MyTableModel model = (MyTableModel) tblLista.getModel(); - for (int i = model.getRowCount() - 1; i >= 0; i--) { - Tot=Tot+Double.parseDouble(model.getValueAt(i, ColImporto).toString()); - }*/ - Boolean OK = false; + private Boolean verificaSaldo(String numeroTessera) { + Boolean isSaldoOK = false; //andare su viewtessere -// String QuerySaldo="select t.saldo || '|' || cf.saldo_minimo_alert || '|' || cf.saldo_minimo_stop || '|' || t.punti || '|' as saldi " + -// " from tessere t, utenti u, categorie_utenti c, convenzioni_fasce cf" + -// " where t.numero = '" + NTessera + "' and t.id_utente = u.id" + -// " and u.id_categoria = c.id and cf.id_categoria_utenti = c.id"; - String QuerySaldo = "select t.saldo || '|' || cf.saldo_minimo_alert || '|' || cf.saldo_minimo_stop || '|' || t.punti || '|' as saldi " + String querySaldo = "select t.saldo || '|' || cf.saldo_minimo_alert || '|' || cf.saldo_minimo_stop || '|' || t.punti || '|' as saldi " + " from tessere t, utenti u, categorie_utenti c, categorie_utenti_fasce cf" - + " where t.numero = '" + NTessera + "' and t.id_utente = u.id" + + " where t.numero = '" + numeroTessera + "' and t.id_utente = u.id" + " and u.id_categoria = c.id and cf.id_categoria_utenti = c.id"; - String[] SaldoMinimo = MySelect(QuerySaldo, "saldi").split("\\|"); - Double Saldo = 0.0; - if (SaldoMinimo.length > 0 && SaldoMinimo[0].length() > 0) { - Saldo = Double.parseDouble(SaldoMinimo[0].replace(",", ".")); + String[] saldoMinimo = Utils.mySelect(querySaldo, "saldi", this).split("\\|"); + Double saldo = 0.0; + if (saldoMinimo.length > 0 && saldoMinimo[0].length() > 0) { + saldo = Double.valueOf(saldoMinimo[0].replace(",", ".")); } - Double SaldoAlert = 0.0; - if (SaldoMinimo.length > 1 && SaldoMinimo[1].length() > 0) { - SaldoAlert = Double.parseDouble(SaldoMinimo[1].replace(",", ".")); + Double saldoAlert = 0.0; + if (saldoMinimo.length > 1 && saldoMinimo[1].length() > 0) { + saldoAlert = Double.valueOf(saldoMinimo[1].replace(",", ".")); } - Double SaldoStop = 0.0; - if (SaldoMinimo.length > 2 && SaldoMinimo[2].length() > 0) { - SaldoStop = Double.parseDouble(SaldoMinimo[2].replace(",", ".")); + Double saldoStop = 0.0; + if (saldoMinimo.length > 2 && saldoMinimo[2].length() > 0) { + saldoStop = Double.valueOf(saldoMinimo[2].replace(",", ".")); } - SaldoMinimoStop = SaldoStop; - String Punti = ""; - if (SaldoMinimo.length >= 4) { - Punti = SaldoMinimo[3]; + saldoMinimoStop = saldoStop; + String punti = ""; + if (saldoMinimo.length >= 4) { + punti = saldoMinimo[3]; } DecimalFormat df2 = new DecimalFormat("#,###,###,##0.00"); - lblSaldo.setText("€ " + df2.format(Saldo)); - + lblSaldo.setText("€ " + df2.format(saldo)); + //24-01-2020-------------------------- MyTableModel model = (MyTableModel) tblLista.getModel(); - Double T = model.Somma(ColImporto); + Double t = model.somma(colImporto); MyTableModel model2 = (MyTableModel) tblLista1.getModel(); if (model2.getRowCount() > 0) { - T = T + model2.Somma(1); + t = t + model2.somma(1); } //--------------------------- - lblResiduo.setText("€ " + df2.format(Saldo-T)); - lblPunti.setText(Punti); - //String Tipo=MySelect("Select Nome from Tipi_Pagamenti where id=0", "Nome"); - String Tipo = CercaTestoModoPagamento(); - lblTipoPagamento.setText(Tipo); - //PulsantiModoPagamento(); + lblResiduo.setText("€ " + df2.format(saldo - t)); + lblPunti.setText(punti); + String tipo = cercaTestoModoPagamento(); + lblTipoPagamento.setText(tipo); - //21/12/2016 if (Gratuita_Residue <= 0) {<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - if (Gratuita_Residue <= 0 && (FLAG_BONUS == 0 || Bonus_Residui <= 0)) { - if ((Saldo-CalcolaTotale()) <= SaldoStop) { - //JOptionPane.showMessageDialog(this, "Saldo insufficiente per l'acquisto!", "Saldo", JOptionPane.ERROR_MESSAGE); - /*frmPagamento MyD = new frmPagamento(this,idPuntoCassa,idModoPagamento); + //21/12/2016 if (gratuitaResidue <= 0) {<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + //11/06/24 rimozione controllo su gratuita e bonus + //if (gratuitaResidue <= 0 && (flagBonus == 0 || bonusResidui <= 0)) { + if ((saldo - calcolaTotale()) <= saldoStop) { - this.setEnabled(false); - Integer w = CalcolaLarghezzaAltezza(490, LargControlli); - Integer h = CalcolaLarghezzaAltezza(142, AltControlli); - - MyD.setSize(w, h); - - MyD.setLocationRelativeTo(null); - //MyD.setLocation((this.getWidth() - this.getLocation().y) / 2, (this.getHeight() - this.getLocation().x) / 2); - MyD.setVisible(true); */ - //pnlPagamento ModoPag=new pnlPagamento(); - //JOptionPane.showMessageDialog(null,ModoPag,"Scegli modo pagamento",JOptionPane.); - - //04-02-2019 - /* - if (ConsentiCredito == true) { - if (MessaggioSaldoUnaVolta == false) { - if (JOptionPane.showConfirmDialog(null, "Saldo insufficiente. Vuoi autorizzare comunque la transazione?", "Saldo", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { - MessaggioSaldoUnaVolta = true; - return true; - } - } else { - return true; - } - } - - - MyDialog Dialog = new MyDialog(this, "Scegli modalità pagamento...", true); - Integer w = CalcolaLarghezzaAltezza(490, LargControlli); - Integer h = CalcolaLarghezzaAltezza(142, AltControlli); - - Dialog.setSize(w, h); - - Dialog.setLocationRelativeTo(null); - Dialog.setVisible(true); - - //if (idModoPagamento == 0) { - if (CercaTestoModoPagamento().equalsIgnoreCase("A scalare")) { - OK = false; - } else { - OK = true; - } - */ - //31-10-2019 se lista precaricata e saldo <0 devo chudere - if (StoCalcolando == false) { - if (CercaTestoModoPagamento().equalsIgnoreCase("A scalare")) { - if ((Saldo - CalcolaTotale()) < 0) { + //if (stoCalcolando == false) { + if (cercaTestoModoPagamento().equalsIgnoreCase("A scalare")) { + if ((saldo - calcolaTotale()) < 0) { JOptionPane.showMessageDialog(this, "Saldo insufficiente!", "Saldo", JOptionPane.OK_OPTION); - LogTessera(); - Azzera(); + logTessera(); + azzera(); return true; } } - } - OK = true; - } else if (Saldo <= SaldoAlert) { - //JOptionPane.showMessageDialog(this, "Ultimo passaggio consentito con il saldo rilevato sulla tessera!", "Saldo Alert", JOptionPane.ERROR_MESSAGE); - JOptionPane.showMessageDialog(this, "Saldo ridotto, potrebbero non essere disponibili tutti i prodotti!", "Saldo Alert", JOptionPane.ERROR_MESSAGE); - - OK = true; + //} + isSaldoOK = true; + } else if (saldo <= saldoAlert) { + JOptionPane.showMessageDialog(this, + "Saldo ridotto, potrebbero non essere disponibili tutti i prodotti!", + "Saldo Alert", JOptionPane.ERROR_MESSAGE); + isSaldoOK = true; } else { - OK = true; + isSaldoOK = true; } - } - return OK; + //} + return isSaldoOK; } - private String CercaTestoModoPagamento() { - String Testo = ""; - String[] El = ModiPagamento.toString().split("\\|"); - for (int i = 0; i < El.length; i++) { - String[] t = El[i].split(";"); + private String cercaTestoModoPagamento() { + String testo = ""; + String[] el = modiPagamento.toString().split("\\|"); + for (String el1 : el) { + String[] t = el1.split(";"); if (t[0].equalsIgnoreCase(idModoPagamento.toString())) { - Testo = t[1]; + testo = t[1]; break; } } - return Testo; + return testo; } - private void SetModoPagamento(String Modo) { + private void setModoPagamento(String Modo) { - String[] El = ModiPagamento.toString().split("\\|"); - for (int i = 0; i < El.length; i++) { - String[] t = El[i].split(";"); + String[] el = modiPagamento.toString().split("\\|"); + for (String el1 : el) { + String[] t = el1.split(";"); if (t[1].equalsIgnoreCase(Modo)) { - idModoPagamento = Long.parseLong(t[0]); + idModoPagamento = Long.valueOf(t[0]); break; } } - //PulsantiModoPagamento(); + } - private String SetModoPagamento(Integer Tipo) { - String Testo = ""; - if (ModiPagamento.toString().length() > 5) { - String[] El = ModiPagamento.toString().split("\\|"); + private String setModoPagamento(Integer Tipo) { + String testo = ""; + if (modiPagamento.toString().length() > 5) { + String[] el = modiPagamento.toString().split("\\|"); int i = Tipo; - //for (int i=0;i a scalare + * 1 -> contanti + * 2 -> ticket + * 3 -> differito + */ + private void pulsantiModoPagamento() { switch (Integer.parseInt(idModoPagamento.toString())) { - case 0: + case 0 -> { jTBP0.setEnabled(true); jTBP0.setSelected(true); jTBP0ActionPerformed(null); - if (UnSoloTipoPagamento) { + if (flagImpostaTipoPagamento) { jTBP1.setEnabled(false); jTBP2.setEnabled(false); jTBP3.setEnabled(false); } - break; - case 1: + } + case 1 -> { jTBP1.setEnabled(true); jTBP1.setSelected(true); jTBP1ActionPerformed(null); - if (UnSoloTipoPagamento) { + if (flagImpostaTipoPagamento) { jTBP0.setEnabled(false); jTBP2.setEnabled(false); jTBP3.setEnabled(false); } - break; - case 2: + } + case 2 -> { jTBP2.setEnabled(true); jTBP2.setSelected(true); jTBP2ActionPerformed(null); - if (UnSoloTipoPagamento) { + if (flagImpostaTipoPagamento) { jTBP1.setEnabled(false); jTBP0.setEnabled(false); jTBP3.setEnabled(false); } - break; - case 3: + } + case 3 -> { jTBP3.setEnabled(true); jTBP3.setSelected(true); jTBP3ActionPerformed(null); - if (UnSoloTipoPagamento) { + if (flagImpostaTipoPagamento) { jTBP1.setEnabled(false); jTBP2.setEnabled(false); jTBP0.setEnabled(false); } - break; + } } } - private void Chiudi() { + private void chiudi() { //04-02-2019--------------------------------------------- MyTableModel model = (MyTableModel) tblLista.getModel(); if (model.getRowCount() > 0) { - String NTessera = jTxtTessera.getText(); + String numTessera = jTxtTessera.getText(); - if (CercaTestoModoPagamento().equalsIgnoreCase("A scalare")) { + if (cercaTestoModoPagamento().equalsIgnoreCase("A scalare")) { - String QuerySaldo = "select t.saldo || '|' || cf.saldo_minimo_alert || '|' || cf.saldo_minimo_stop || '|' || t.punti || '|' as saldi " + String querySaldo = "select t.saldo || '|' || cf.saldo_minimo_alert || '|' || cf.saldo_minimo_stop || '|' || t.punti || '|' as saldi " + " from tessere t, utenti u, categorie_utenti c, categorie_utenti_fasce cf" - + " where t.numero = '" + NTessera + "' and t.id_utente = u.id" + + " where t.numero = '" + numTessera + "' and t.id_utente = u.id" + " and u.id_categoria = c.id and cf.id_categoria_utenti = c.id"; - String[] SaldoMinimo = MySelect(QuerySaldo, "saldi").split("\\|"); - Double Saldo = 0.0; - String Residuo = lblResiduo.getText().trim().replace("€", ""); - if (Residuo.equalsIgnoreCase("[...]")) { - Residuo = "0"; + String[] saldoMinimo = Utils.mySelect(querySaldo, "saldi",this).split("\\|"); + Double saldo = 0.0; + String residuo = lblResiduo.getText().trim().replace("€", ""); + if (residuo.equalsIgnoreCase("[...]")) { + residuo = "0"; } - Residuo = Residuo.replace(".", ""); - Residuo = Residuo.replace(",", "."); - Saldo = Double.parseDouble(Residuo); + residuo = residuo.replace(".", ""); + residuo = residuo.replace(",", "."); + saldo = Double.valueOf(residuo); - Double SaldoAlert = 0.0; - if (SaldoMinimo.length > 1 && SaldoMinimo[1].length() > 0) { - SaldoAlert = Double.parseDouble(SaldoMinimo[1].replace(",", ".")); + Double saldoAlert = 0.0; + if (saldoMinimo.length > 1 && saldoMinimo[1].length() > 0) { + saldoAlert = Double.valueOf(saldoMinimo[1].replace(",", ".")); } - if (Gratuita_Residue <= 0 && (FLAG_BONUS == 0 || Bonus_Residui <= 0)) { - if (Saldo <= SaldoAlert) { - //Boolean ChiediModoPagamento = false; - if (ConsentiCredito == true) { - if (MessaggioSaldoUnaVolta == false) { - if (JOptionPane.showConfirmDialog(null, "Saldo insufficiente. Vuoi autorizzare comunque la transazione?", "Saldo", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { - MessaggioSaldoUnaVolta = true; + if (gratuitaResidue <= 0 && (flagBonus == 0 || bonusResidui <= 0)) { + if (saldo <= saldoAlert) { + if (consentiCredito == true) { + if (messaggioSaldoUnaVolta == false) { + if (JOptionPane.showConfirmDialog(null, "Saldo insufficiente. Vuoi autorizzare comunque la transazione?", + "Saldo", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { + messaggioSaldoUnaVolta = true; } else { return; } } - } else { - //ChiediModoPagamento = true; - } + } } } - /* - if (ChiediModoPagamento) { - MyDialog Dialog = new MyDialog(this, "Scegli modalità pagamento...", true); - Integer w = CalcolaLarghezzaAltezza(490, LargControlli); - Integer h = CalcolaLarghezzaAltezza(142, AltControlli); - - Dialog.setSize(w, h); - - Dialog.setLocationRelativeTo(null); - Dialog.setVisible(true); - - //da modificare<<<<<<<<<<<<<<<<<<<<<<< - if (CercaTestoModoPagamento().equalsIgnoreCase("A scalare")) { - return; - } else { - //OK = true; - } - }*/ //-------------------------------------------------------- } else { -//Pagamento non A Scalare - String QuerySaldo = "select t.saldo " + //Pagamento non a Scalare + String querySaldo = "select t.saldo " + " from tessere t, utenti u, categorie_utenti c, categorie_utenti_fasce cf" - + " where t.numero = '" + NTessera + "' and t.id_utente = u.id" + + " where t.numero = '" + numTessera + "' and t.id_utente = u.id" + " and u.id_categoria = c.id and cf.id_categoria_utenti = c.id"; - Double Saldo = Double.parseDouble(MySelect(QuerySaldo, "saldo")); - Double CostoPasto = Double.parseDouble(txtTotaleCassa.getText().replace("€", "").trim().replace(",", ".")); - if (Saldo > CostoPasto) { + Double saldo = Double.valueOf(Utils.mySelect(querySaldo, "saldo", this)); + Double costoPasto = Double.valueOf(txtTotaleCassa.getText().replace("€", "").trim().replace(",", ".")); + if (saldo > costoPasto) { Object[] options = {"A Scalare", "Contanti"}; - Object selectedValue = JOptionPane.showOptionDialog(this, "Attenzione, c'è saldo sufficiente sulla tessera,\nscegli la modalità di pagamento da utilizzare", "Modalità Pagamento", + Object selectedValue = JOptionPane.showOptionDialog(this, + "Attenzione, c'è saldo sufficiente sulla tessera,\nscegli la modalità di pagamento da utilizzare", "Modalità Pagamento", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null); if (Integer.parseInt(selectedValue.toString()) == 0) { - //if (JOptionPane.showConfirmDialog(null, "Attenzione, c'è saldo sufficiente sulla tessera, sicuro che vuoi pagare in contanti?", "Modalità Pagamento", JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION) { jTBP0.setSelected(true); jTBP0ActionPerformed(null); -// Chiudi(); -// return; + } else { jTBP1.setSelected(true); jTBP1ActionPerformed(null); @@ -5018,275 +3613,262 @@ public class PuntoCassa extends JFrame implements ActionListener { } } - Boolean SpiaProgressivo = false; - //MyTableModel model=(MyTableModel)tblLista.getModel(); - Date Adesso = new Date(); - String FlagPassaggioTessera = "0"; - if (PassaggioTessera) { - FlagPassaggioTessera = "1"; + Boolean spiaProgressivo = false; + //Date adesso = new Date(); + LocalDateTime adesso = LocalDateTime.now(); + String flagPassaggioTessera = "0"; + if (passaggioTessera) { + flagPassaggioTessera = "1"; } - /*Integer id=1; - id=MySelectInteger("Select max(id) as id from Acquisti", "id"); - id++;*/ - String Tessera = idTessera.toString(); - String FlagAsporto = "0"; - if (jBtnAsporto.isSelected()) { - FlagAsporto = "1"; - } - //if (idTessera==0L){Tessera="null";} - //String Composizione=SpaziBianchi("",20,false); - //09-05-2019 - /* - for (int i = 0; i 20){ - Composizione=Composizione.substring(0, 20); - } - Composizione=SpaziBianchi(Composizione,20,true); - break; - } + String tessera = idTessera.toString(); + String flagAsporto = "0"; + if (jBtnAsporto.isSelected()) { + flagAsporto = "1"; } - */ - String Composizione = SpaziBianchi("", 20, false); + + //09-05-2019 + String composizione = Utils.spaziBianchi("", 20, false); MyTableModel model2 = (MyTableModel) tblLista1.getModel(); for (int i = 0; i < model2.getRowCount(); i++) { - String Completo = model2.getValueAt(i, 0).toString(); - String Pasto = ""; - if (Completo.length() > 0) { - String TT[] = Completo.split("]", -1); + String completo = model2.getValueAt(i, 0).toString(); + String pasto = ""; + if (completo.length() > 0) { + String TT[] = completo.split("]", -1); if (TT.length > 0) { - Pasto = "Pasto:" + TT[0].replace("[", ""); + pasto = "Pasto:" + TT[0].replace("[", ""); } } - Composizione = SpaziBianchi(Pasto, 10, true); + composizione = Utils.spaziBianchi(pasto, 10, true); break; } //controllo passaggi if (model.getRowCount() > 0) { - String ControlloPassaggi = "SELECT count(*) as passaggi FROM st_acquisti st INNER JOIN prodotti pr ON st.id_prodotto = pr.id WHERE pr.id_categoria = 0 AND trunc(st.data) = trunc(sysdate) AND st.id_tessera = " + idTessera + " AND st.id_turno=" + idTurno; - Long AbilitatoPassaggi = MySelectInteger(ControlloPassaggi, "passaggi"); - if (AbilitatoPassaggi > 0) { - AbilitatoPassaggi = AbilitatoPassaggi + 1; - if (JOptionPane.showConfirmDialog(null, "Sei sicuro di voler registrare il passaggio n° " + AbilitatoPassaggi + " sulla tessera " + jTxtTessera.getText() + "?", "Secondo Passaggio", JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION) { - Azzera(); - AggiornaLabelInfo(); + String controlloPassaggi = "SELECT count(*) as passaggi FROM st_acquisti st " + + "INNER JOIN prodotti pr ON st.id_prodotto = pr.id " + + "WHERE pr.id_categoria = 0 " + + "AND trunc(st.data) = trunc(sysdate) " + + "AND st.id_tessera = " + idTessera + + " AND st.id_turno=" + idTurno; + Long abilitatoPassaggi = Utils.mySelectInteger(controlloPassaggi, "passaggi", + this); + if (abilitatoPassaggi > 0) { + abilitatoPassaggi = abilitatoPassaggi + 1; + if (JOptionPane.showConfirmDialog(null, + "Sei sicuro di voler registrare il passaggio n° " + abilitatoPassaggi + " sulla tessera " + jTxtTessera.getText() + "?", + "Secondo Passaggio", JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION) { + azzera(); + aggiornaLabelInfo(); return; } } } if (idTessera > 0L) { - StringBuilder ElencoIdProdotti = new StringBuilder(); + StringBuilder elencoIdProdotti = new StringBuilder(); for (int i = model.getRowCount() - 1; i >= 0; i--) { - Long idCateg = Long.parseLong(model.getValueAt(i, ColCategoria).toString()); + Long idCateg = Long.valueOf(model.getValueAt(i, colCategoria).toString()); if (idCateg != 0L) { - //04/03/2022 non è possibile acquistare prodotti che non siano partedi una composizione -// String Imp1 = model.getValueAt(i, ColImporto).toString(); -// String Imp2 = model.getValueAt(i, ColImporto2).toString(); - String Vassoio = "1"; -// if (Imp1.equalsIgnoreCase(Imp2)) { -// Vassoio = "0"; -// } - MyInsert("Insert into Acquisti (id,id_Tessera,id_Prodotto,id_Punto_Cassa,Data,Importo,Punti,Num_Progressivo,id_Tipo_Pagamento,flag_in_vassoio,id_Turno,flag_asporto,flag_passaggio_tessera)values(-1," + Tessera + "," + model.getValueAt(i, ColIDProdotto) + "," + idPuntoCassa + "," + AggiustaDateOra(Adesso) + "," + model.getValueAt(i, ColImporto) + "," + model.getValueAt(i, ColPunti) + "," + Progressivo + "," + idModoPagamento + "," + Vassoio + "," + idTurno + "," + FlagAsporto + "," + FlagPassaggioTessera + ")"); + //04/03/2022 non e possibile acquistare prodotti che non siano partedi una composizione + String vassoio = "1"; + Utils.myInsert("Insert into Acquisti " + + "(id,id_Tessera,id_Prodotto,id_Punto_Cassa,Data,Importo,Punti," + + "Num_Progressivo,id_Tipo_Pagamento,flag_in_vassoio,id_Turno,flag_asporto,flag_passaggio_tessera)" + + "values(-1," + tessera + "," + model.getValueAt(i, colIDProdotto) + "," + //+ idPuntoCassa + "," + formattaDataOra(adesso) + "," + + idPuntoCassa + "," + formatLocalDateTime(adesso) + "," + + model.getValueAt(i, colImporto) + "," + model.getValueAt(i, colPunti) + "," + + progressivo + "," + idModoPagamento + "," + vassoio + "," + idTurno + "," + + flagAsporto + "," + flagPassaggioTessera + ")", + this); - AggiornaProgressivoPagamentiTurno(Double.parseDouble(model.getValueAt(i, ColImporto).toString())); - - ElencoIdProdotti.append(model.getValueAt(i, ColIDProdotto)); - ElencoIdProdotti.append(","); - //id++; + aggiornaProgressivoPagamentiTurno(Double.valueOf(model.getValueAt(i, colImporto).toString())); + elencoIdProdotti.append(model.getValueAt(i, colIDProdotto)); + elencoIdProdotti.append(","); } model.deleteRow(i); - SpiaProgressivo = true; + spiaProgressivo = true; } - //MyTableModel model2 = (MyTableModel) tblLista1.getModel(); + for (int i = model2.getRowCount() - 1; i >= 0; i--) { - String FlagGratuita = "0"; - String FlagBonus = "0"; - if (Gratuita_Residue > 0) {// && Gratuita_Residue>Gratuita_ResidueProg){ - FlagGratuita = "1"; - } else if (Bonus_Residui > 0) { - FlagBonus = "1"; + String flagGratuita = "0"; + String flagBonus = "0"; + if (gratuitaResidue > 0) {// && gratuitaResidue>Gratuita_ResidueProg){ + flagGratuita = "1"; + } else if (bonusResidui > 0) { + flagBonus = "1"; } - MyInsert("Insert into Acquisti (id,id_Tessera,id_Prodotto,id_Punto_Cassa,Data,Importo,Punti,Num_Progressivo,id_Tipo_Pagamento,id_Turno,flag_gratuita,flag_bonus,flag_asporto,flag_passaggio_tessera)values(-1," + Tessera + "," + model2.getValueAt(i, 2) + "," + idPuntoCassa + "," + AggiustaDateOra(Adesso) + "," + model2.getValueAt(i, 1) + ",0," + Progressivo + "," + idModoPagamento + "," + idTurno + "," + FlagGratuita + "," + FlagBonus + "," + FlagAsporto + "," + FlagPassaggioTessera + ")"); - AggiornaProgressivoPagamentiTurno(Double.parseDouble(model2.getValueAt(i, 1).toString())); - //id++; + Utils.myInsert("Insert into Acquisti " + + "(id,id_Tessera,id_Prodotto,id_Punto_Cassa,Data,Importo,Punti,Num_Progressivo,id_Tipo_Pagamento," + + "id_Turno,flag_gratuita,flag_bonus,flag_asporto,flag_passaggio_tessera)" + + "values(-1," + tessera + "," + model2.getValueAt(i, 2) + "," + idPuntoCassa + "," + + //formattaDataOra(adesso) + "," + model2.getValueAt(i, 1) + ",0," + progressivo + "," + + formatLocalDateTime(adesso) + "," + model2.getValueAt(i, 1) + ",0," + progressivo + "," + + idModoPagamento + "," + idTurno + "," + flagGratuita + "," + flagBonus + "," + + flagAsporto + "," + flagPassaggioTessera + ")", + this); + aggiornaProgressivoPagamentiTurno(Double.valueOf(model2.getValueAt(i, 1).toString())); model2.deleteRow(i); - SpiaProgressivo = true; + spiaProgressivo = true; } } else { - StringBuilder ElencoIdProdotti = new StringBuilder(); + StringBuilder elencoIdProdotti = new StringBuilder(); for (int i = model.getRowCount() - 1; i >= 0; i--) { - Long idCateg = Long.parseLong(model.getValueAt(i, ColCategoria).toString()); + Long idCateg = Long.valueOf(model.getValueAt(i, colCategoria).toString()); if (idCateg != 0L) { - //04/03/2022 non è possibile acquistare prodotti che non siano partedi una composizione -// String Imp1 = model.getValueAt(i, ColImporto).toString(); -// String Imp2 = model.getValueAt(i, ColImporto2).toString(); - String Vassoio = "1"; -// if (Imp1.equalsIgnoreCase(Imp2)) { -// Vassoio = "0"; -// } - MyInsert("Insert into Acquisti (id,id_Prodotto,id_Punto_Cassa,Data,Importo,Punti,Num_Progressivo,id_Tipo_Pagamento,flag_in_vassoio,id_Turno,flag_asporto,flag_passaggio_tessera)values(-1," + model.getValueAt(i, ColIDProdotto) + "," + idPuntoCassa + "," + AggiustaDateOra(Adesso) + "," + model.getValueAt(i, ColImporto) + "," + model.getValueAt(i, ColPunti) + "," + Progressivo + "," + idModoPagamento + "," + Vassoio + "," + idTurno + "," + FlagAsporto + "," + FlagPassaggioTessera + ")"); + //04/03/2022 non e possibile acquistare prodotti che non siano partedi una composizione + String vassoio = "1"; + Utils.myInsert("Insert into Acquisti (id,id_Prodotto,id_Punto_Cassa,Data,Importo,Punti,Num_Progressivo,id_Tipo_Pagamento," + + "flag_in_vassoio,id_Turno,flag_asporto,flag_passaggio_tessera)values(-1," + //+ model.getValueAt(i, colIDProdotto) + "," + idPuntoCassa + "," + formattaDataOra(adesso) + "," + + model.getValueAt(i, colIDProdotto) + "," + idPuntoCassa + "," + formatLocalDateTime(adesso) + "," + + model.getValueAt(i, colImporto) + "," + model.getValueAt(i, colPunti) + + "," + progressivo + "," + idModoPagamento + "," + vassoio + "," + idTurno + "," + + flagAsporto + "," + flagPassaggioTessera + ")", + this); - AggiornaProgressivoPagamentiTurno(Double.parseDouble(model.getValueAt(i, ColImporto).toString())); + aggiornaProgressivoPagamentiTurno(Double.valueOf(model.getValueAt(i, colImporto).toString())); - ElencoIdProdotti.append(model.getValueAt(i, ColIDProdotto)); - ElencoIdProdotti.append(","); - //id++; + elencoIdProdotti.append(model.getValueAt(i, colIDProdotto)); + elencoIdProdotti.append(","); } model.deleteRow(i); - SpiaProgressivo = true; + spiaProgressivo = true; } - //MyTableModel model2 = (MyTableModel) tblLista1.getModel(); for (int i = model2.getRowCount() - 1; i >= 0; i--) { - String FlagGratuita = "0"; - String FlagBonus = "0"; - if (Gratuita_Residue > 0) {// && Gratuita_Residue>Gratuita_ResidueProg){ - FlagGratuita = "1"; - } else if (FLAG_BONUS == 1 && Bonus_Residui > 0) { - FlagBonus = "1"; + String flagGratuita = "0"; + String flagBonusPerInsert = "0"; + if (gratuitaResidue > 0) {// && gratuitaResidue>Gratuita_ResidueProg){ + flagGratuita = "1"; + } else if (flagBonus == 1 && bonusResidui > 0) { + flagBonusPerInsert = "1"; } - MyInsert("Insert into Acquisti (id,id_Prodotto,id_Punto_Cassa,Data,Importo,Punti,Num_Progressivo,id_Tipo_Pagamento,id_Turno,flag_gratuita,flag_bonus,flag_asporto,flag_passaggio_tessera)values(-1," + model2.getValueAt(i, 2) + "," + idPuntoCassa + "," + AggiustaDateOra(Adesso) + "," + model2.getValueAt(i, 1) + ",0," + Progressivo + "," + idModoPagamento + "," + idTurno + "," + FlagGratuita + "," + FlagBonus + "," + FlagAsporto + "," + FlagPassaggioTessera + ")"); - AggiornaProgressivoPagamentiTurno(Double.parseDouble(model2.getValueAt(i, 1).toString())); + Utils.myInsert("Insert into Acquisti (id,id_Prodotto,id_Punto_Cassa,Data,Importo,Punti,Num_Progressivo,id_Tipo_Pagamento," + + "id_Turno,flag_gratuita,flag_bonus,flag_asporto,flag_passaggio_tessera)values(-1," + //+ model2.getValueAt(i, 2) + "," + idPuntoCassa + "," + formattaDataOra(adesso) + "," + + model2.getValueAt(i, 2) + "," + idPuntoCassa + "," + formatLocalDateTime(adesso) + "," + + model2.getValueAt(i, 1) + ",0," + progressivo + "," + idModoPagamento + "," + idTurno + + "," + flagGratuita + "," + flagBonusPerInsert + "," + flagAsporto + "," + flagPassaggioTessera + ")", + this); + aggiornaProgressivoPagamentiTurno(Double.valueOf(model2.getValueAt(i, 1).toString())); model2.deleteRow(i); - SpiaProgressivo = true; + spiaProgressivo = true; } } //aggiorno progressivi------------- - if (SpiaProgressivo) { - Progressivo++; - ProgressivoGiorno++; - ProgressivoTurno++; - MyInsert("Update Progressivi set Prog_assoluto=" + Progressivo + ",prog_giorno=" + ProgressivoGiorno + ",prog_Turno=" + ProgressivoTurno + ",incasso_turno_contanti=" + ProgressivoContanti + ",incasso_turno_ticket=" + ProgressivoTicket + ",incasso_turno_scalare=" + ProgressivoScalare + ",incasso_turno_differito=" + ProgressivoDifferito + " where id_Punto_cassa=" + idPuntoCassa + " and id_turno=" + idTurno + " and data=" + AggiustaData(Adesso)); + if (spiaProgressivo) { + progressivo++; + progressivoGiorno++; + progressivoTurno++; + Utils.myInsert("Update Progressivi set Prog_assoluto=" + progressivo + ",prog_giorno=" + progressivoGiorno + + ",prog_Turno=" + progressivoTurno + ",incasso_turno_contanti=" + progressivoContanti + + ",incasso_turno_ticket=" + progressivoTicket + ",incasso_turno_scalare=" + progressivoScalare + + ",incasso_turno_differito=" + progressivoDifferito + //+ " where id_Punto_cassa=" + idPuntoCassa + " and id_turno=" + idTurno + " and data=" + formattaData(adesso)); + + " where id_Punto_cassa=" + idPuntoCassa + " and id_turno=" + idTurno + " and data=" + formatLocalDateTime(adesso), + this); } -// -// //controllo passaggi -// String ControlloPassaggi = "SELECT count(*) as passaggi FROM st_acquisti st INNER JOIN prodotti pr ON st.id_prodotto = pr.id WHERE pr.id_categoria = 0 AND trunc(st.data) = trunc(sysdate) AND st.id_tessera = " + idTessera + " AND st.id_turno=" + idTurno; -// Long AbilitatoPassaggi = MySelectInteger(ControlloPassaggi, "passaggi"); -// if (AbilitatoPassaggi > 1) { -//// JOptionPane.showMessageDialog(this, "Attenzione questo è il secondo passaggio nello stesso turno su questa cassa.", "Numero Passaggi", JOptionPane.INFORMATION_MESSAGE); -// Object[] options = {"Sì", "No"}; -// Object selectedValue =JOptionPane.showOptionDialog(this, "Sei sicuro di voler registrare il secondo passaggio sulla tessera " + Tessera + "?", "Secondo Passaggio", -// JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null); -// if (Integer.parseInt(selectedValue.toString()) == 1) { -// Annulla(); -// Azzera(); -// return; -// } -// } - //aggiornamento 12-04-2019 - /* - String tp = lblTipoPagamento.getText().trim(); - if (tp.length() > 11) { - tp = tp.substring(0, 10); + String residuo = lblResiduo.getText().replace("€", "").trim(); + if (residuo.equalsIgnoreCase("[...]")) { + residuo = "0"; + } + if (residuo.length() > 6) { + residuo = residuo.substring(0, 5); } else { - tp = SpaziBianchi(tp, 11, true); - } - tp = tp + " E" + SpaziBianchi(txtTotaleCassa.getText().trim().replace("€", ""), 7, false); - - String Punti = lblPunti.getText(); - if (Punti.length() > 6) { - Punti = Punti.substring(0, 5); - } else { - Punti = SpaziBianchi(Punti, 6, false); - } - */ - String Residuo = lblResiduo.getText().replace("€", "").trim(); - if (Residuo.equalsIgnoreCase("[...]")) { - Residuo = "0"; - } - if (Residuo.length() > 6) { - Residuo = Residuo.substring(0, 5); - } else { - Residuo = SpaziBianchi(Residuo, 6, false); + residuo = Utils.spaziBianchi(residuo, 6, false); } - //Aggiornamento 12-04-2019 - //String Riga2 = "P " + Punti + " S E " + Residuo; - //Display(tp + Riga2, null); - Integer Bonus = 0; - if (FLAG_BONUS == 1 && Bonus_Residui > 0) { - Bonus = Bonus_Residui--; - //String Riga2 = " Saldo " + Residuo + " Bon. " + Bonus ; - //Display(Composizione + Riga2, null); - }//else{ - //String Riga2 = " Saldo " + Residuo ; - //Display(Composizione + Riga2, null); - //} - Composizione = SpaziBianchi(Composizione + "Bonus:" + Bonus, 20, true); - String Riga2 = "Saldo " + Residuo; - Display(Composizione + Riga2, null); + //Aggiornamento 12-04-2019 + Integer bonus = 0; + if (flagBonus == 1 && bonusResidui > 0) { + bonus = bonusResidui--; + + } + composizione = Utils.spaziBianchi(composizione + "Bonus:" + bonus, 20, true); + String Riga2 = "Saldo " + residuo; + display(composizione + Riga2, null); timerDisplay.schedule(new TimerTask() { @Override public void run() { - StatoAttivoLoggato(); -// timerDisplay.cancel(); -// timerDisplay.purge(); + statoAttivoLoggato(); } }, 8000); - Azzera(); - AggiornaLabelInfo(); -// jTxtTessera.requestFocus(); + azzera(); + aggiornaLabelInfo(); } - private boolean ControllaDiscrepanzePrenotazioni(String ElencoIdProdotto) { - boolean ok=true; - if (ElencoIdProdotto.length() > 0) { - ElencoIdProdotto = ElencoIdProdotto.substring(0, ElencoIdProdotto.length() - 1); - String El[] = ElencoIdProdotto.split(","); - String Query = "SELECT count(*) as nr FROM VIEW_PRENOTAZIONI_TURNO WHERE id_Modalita in (2,3) and id_stato in (0,1) AND id_turno =" + idTurnoAttuale + " AND id_tessera = " + idTessera + " and id_Prenotazione=" + idPrenotazione; - int rowCount = Integer.parseInt(MySelect(Query, "nr")); - if(rowCount>0){ - if (rowCount == El.length) { - Query = "SELECT count(*) as nr FROM VIEW_PRENOTAZIONI_TURNO WHERE id_Modalita in (2,3) and id_stato in (0,1) AND id_turno =" + idTurnoAttuale + " AND id_tessera = " + idTessera + " AND id_Prodotto in (" + ElencoIdProdotto + ") and id_Prenotazione=" + idPrenotazione; - rowCount = Integer.parseInt(MySelect(Query, "nr")); - if (rowCount == El.length) { + private boolean controllaDiscrepanzePrenotazioni(String elencoIdProdotto) { + boolean ok = true; + if (elencoIdProdotto.length() > 0) { + elencoIdProdotto = elencoIdProdotto.substring(0, elencoIdProdotto.length() - 1); + String[] el = elencoIdProdotto.split(","); + String query = "SELECT count(*) as nr FROM VIEW_PRENOTAZIONI_TURNO " + + "WHERE id_Modalita in (2,3) " + + "and id_stato in (0,1) " + + "AND id_turno =" + idTurnoAttuale + + " AND id_tessera = " + idTessera + + " and id_Prenotazione=" + idPrenotazione; + int rowCount = Integer.parseInt(Utils.mySelect(query, "nr", this)); + if (rowCount > 0) { + if (rowCount == el.length) { + query = "SELECT count(*) as nr FROM VIEW_PRENOTAZIONI_TURNO " + + "WHERE id_Modalita in (2,3) " + + "and id_stato in (0,1) " + + "AND id_turno =" + idTurnoAttuale + + " AND id_tessera = " + idTessera + + " AND id_Prodotto in (" + elencoIdProdotto + ") " + + "and id_Prenotazione=" + idPrenotazione; + rowCount = Integer.parseInt(Utils.mySelect(query, "nr", this)); + if (rowCount == el.length) { return true; } } - - Object[] options = {"Sì", "No"}; - Object selectedValue =JOptionPane.showOptionDialog(this, "I prodotti selezionati sono diversi dai prenotati!\nVuoi proseguire?", "Prenotazione", - JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null); + + Object[] options = {"Si", "No"}; + Object selectedValue = JOptionPane.showOptionDialog(this, + "I prodotti selezionati sono diversi dai prenotati!\nVuoi proseguire?", "Prenotazione", + JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null); if (Integer.parseInt(selectedValue.toString()) == 1) { - AzzeraDopoStorno(); + azzeraDopoStorno(); return false; } - } + } } return ok; } - private void AggiornaPrenotazioni(String ElencoIdProdotto){ + private void aggiornaPrenotazioni(String elencoIdProdotto) { try { - if (ElencoIdProdotto.length()>0){ - //ElencoIdProdotto=ElencoIdProdotto.substring(0,ElencoIdProdotto.length()-1); - - //String Query="SELECT id FROM VIEW_PRENOTAZIONI_TURNO WHERE id_stato = 1 AND id_turno =" + idTurnoAttuale + " AND id_tessera = " + idTessera + " AND id_Prodotto in (" + ElencoIdProdotto + ")"; - String Query="SELECT id FROM VIEW_PRENOTAZIONI_TURNO WHERE id_Modalita in (2,3) and id_stato in (0,1) AND id_turno =" + idTurnoAttuale + " AND id_tessera = " + idTessera + " and id_Prenotazione=" + idPrenotazione; + if (elencoIdProdotto.length() > 0) { + String query = "SELECT id FROM VIEW_PRENOTAZIONI_TURNO " + + "WHERE id_Modalita in (2,3) " + + "and id_stato in (0,1) " + + "AND id_turno =" + idTurnoAttuale + + " AND id_tessera = " + idTessera + + " and id_Prenotazione=" + idPrenotazione; Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); Statement st = dbConnection.createStatement(); - ResultSet rs = st.executeQuery(Query); + ResultSet rs = st.executeQuery(query); while (rs.next()) { - MyInsert("Update PRENOTAZIONI_PASTI set id_Stato=2 where id=" + rs.getString("id")); + Utils.myInsert("Update PRENOTAZIONI_PASTI set id_Stato=2 where id=" + rs.getString("id"), + this); } rs.close(); st.close(); @@ -5294,68 +3876,56 @@ public class PuntoCassa extends JFrame implements ActionListener { } } catch (SQLException | NumberFormatException e) { System.err.println(e.getClass().getName() + ": " + e.getMessage()); - } finally { - - - } - - } - private void AggiornaProgressivoPagamentiTurno(Double Importo) { - /* - if (idModoPagamento == 0) { - ProgressivoScalare = ProgressivoScalare + Importo; - } - if (idModoPagamento == 1) { - ProgressivoContanti = ProgressivoContanti + Importo; - } - if (idModoPagamento == 2) { - ProgressivoTicket = ProgressivoTicket + Importo; - } - */ - if (CercaTestoModoPagamento().equalsIgnoreCase("A scalare")) { - ProgressivoScalare = ProgressivoScalare + Importo; - } - if (CercaTestoModoPagamento().equalsIgnoreCase("Contanti")) { - ProgressivoContanti = ProgressivoContanti + Importo; - } - if (CercaTestoModoPagamento().equalsIgnoreCase("Ticket")) { - ProgressivoTicket = ProgressivoTicket + Importo; - } - if (CercaTestoModoPagamento().equalsIgnoreCase("Differito")) { - ProgressivoDifferito = ProgressivoDifferito + Importo; } } - private void Azzera() { + private void aggiornaProgressivoPagamentiTurno(Double importo) { + + if (cercaTestoModoPagamento().equalsIgnoreCase("A scalare")) { + progressivoScalare = progressivoScalare + importo; + } + if (cercaTestoModoPagamento().equalsIgnoreCase("Contanti")) { + progressivoContanti = progressivoContanti + importo; + } + if (cercaTestoModoPagamento().equalsIgnoreCase("Ticket")) { + progressivoTicket = progressivoTicket + importo; + } + if (cercaTestoModoPagamento().equalsIgnoreCase("Differito")) { + progressivoDifferito = progressivoDifferito + importo; + } + + } + + private void azzera() { try { MyTableModel model = (MyTableModel) tblLista.getModel(); MyTableModel model1 = (MyTableModel) tblLista1.getModel(); - ClearTable(model); - ClearTable(model1); + /*clearTable(model); + clearTable(model1);*/ + model.clearTable(); + model1.clearTable(); } catch (Exception e) { } - MessaggioSaldoUnaVolta = false; + messaggioSaldoUnaVolta = false; idTessera = 0L; - idPrenotazione= 0L; + idPrenotazione = 0L; idProfiloTariffario = 0L; - //idModoPagamento = 0L; - //SetModoPagamento("Contanti"); - SetModoPagamento(ModoPagamentoDefault); - CassaAperta = false; + setModoPagamento(modoPagamentoDefault); + isCassaAperta = false; txtTotaleCassa.setText("€ 0,00"); txtTotalePunti.setText("Punti 0"); pnlCategorie.setVisible(false); pnlProdotti.setVisible(false); - if (FlagPrecaricaLista == false) { - AbilitaPulsanti(pnlCategorie, false,false); - AbilitaPulsanti(pnlProdotti, false,false); + if (flagPrecaricaLista == false) { + abilitaPulsanti(pnlCategorie, false, false); + abilitaPulsanti(pnlProdotti, false, false); } pnlCategorie.setVisible(true); pnlProdotti.setVisible(true); - Bonus_Residui=0; + bonusResidui = 0; jTxtTessera.setText(""); pnlProdotti.removeAll(); pnlProdotti.repaint(); @@ -5368,51 +3938,43 @@ public class PuntoCassa extends JFrame implements ActionListener { lblConvenzione.setText(""); lblFascia.setText(""); jBtnStorno.setEnabled(false); - //jBtnCarta.setEnabled(false); jBtnAsporto.setEnabled(false); -// jBtnBuoni.setEnabled(false); - //jBtnTicket.setEnabled(false); jbtnSu.setEnabled(false); jbtnGiu.setEnabled(false); jbtnElimina.setEnabled(false); jbtnAnnulla.setEnabled(false); - //jbtnStampa.setEnabled(false); jbtnDuplica.setEnabled(false); lblSaldo.setText("[...]"); lblPunti.setText("[...]"); lblTipoPagamento.setText("[...]"); - //jBtnCarta.setEnabled(false); - TestoRFIDCard = new StringBuilder(); - TestoSwipCard = new StringBuilder(); -// TestoCarteCF = new StringBuilder(); - StatoCardLettore = false; + testoRFIDCard = new StringBuilder(); + testoSwipCard = new StringBuilder(); + statoCardLettore = false; if (btnImpostaCliente.isVisible()) { - btnImpostaCliente.setEnabled(BottoneImposta); + btnImpostaCliente.setEnabled(bottoneImposta); } jBtnBuoni.setEnabled(true); lblResiduo.setText("[...]"); lblGratuita.setText("[...]"); jBtnAsporto.setSelected(false); jBtnAsportoActionPerformed(null); - PassaggioTessera = false; - PassaggiEsauritiNoComposizione = false; - SaldoMinimoStop = 0.0; - MyApplication MyP = new MyApplication(); - MyP.UnaVolta = false; - Gratuita_Residue=0; - //MessaggioFlagExtraUnaVolta = false; -// TesseraCFLetta=false; + passaggioTessera = false; + passaggiEsauritiNoComposizione = false; + saldoMinimoStop = 0.0; + MyApplication myApp = new MyApplication(); + myApp.unaVolta = false; + gratuitaResidue = 0; //9-5-18<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - if (FlagPrecaricaLista) { - ApriCassaDefault(); + if (flagPrecaricaLista) { + apriCassaDefault(); } } - public void ApriCassaDefault() { + public void apriCassaDefault() { lblCategoria.setText(""); lblCognome.setText(""); lblNome.setText(""); @@ -5422,310 +3984,296 @@ public class PuntoCassa extends JFrame implements ActionListener { lblConvenzione.setText(""); lblFascia.setText(""); - //Display(Message_Display, " "," "); - if (CassaAperta == false) { + if (isCassaAperta == false) { - TurnoAttuale(); + turnoAttuale(); if ((idTurnoAttuale - idTurno) != 0) { - ProgressivoTurno = 1L; - ProgressivoContanti = 0.00; - ProgressivoScalare = 0.00; - ProgressivoTicket = 0.00; - ProgressivoDifferito = 0.00; - if (NomeTurnoAttuale.equalsIgnoreCase("Pranzo")) { - ProgressivoGiorno = 1L; + progressivoTurno = 1L; + progressivoContanti = 0.00; + progressivoScalare = 0.00; + progressivoTicket = 0.00; + progressivoDifferito = 0.00; + if (nomeTurnoAttuale.equalsIgnoreCase("Pranzo")) { + progressivoGiorno = 1L; } idTurno = idTurnoAttuale; - NomeTurno = NomeTurnoAttuale; + nomeTurno = nomeTurnoAttuale; - Date Adesso = new Date(); - String ControlloTurno = MySelect("select count(*) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and data=" + AggiustaData(Adesso) + " and id_Turno=" + idTurno, "Prog"); - if (Long.parseLong(ControlloTurno) <= 0) { - MyInsert("Insert into Progressivi (data,id_Punto_cassa,id_Turno,prog_assoluto,prog_giorno,prog_turno) " - + " values (" + AggiustaData(Adesso) + "," + idPuntoCassa + "," + idTurno + "," + Progressivo + "," + ProgressivoGiorno + ",0)"); + Date adesso = new Date(); + String controlloTurno = Utils.mySelect("select count(*) as Prog from Progressivi " + + "where id_Punto_cassa=" + idPuntoCassa + + " and data=" + formattaData(adesso) + + " and id_Turno=" + idTurno, "Prog", + this); + if (Long.parseLong(controlloTurno) <= 0) { + Utils.myInsert("Insert into Progressivi (data,id_Punto_cassa,id_Turno,prog_assoluto,prog_giorno,prog_turno) " + + " values (" + formattaData(adesso) + "," + idPuntoCassa + "," + idTurno + "," + + progressivo + "," + progressivoGiorno + ",0)", + this); } - AggiornaLabelInfo(); + aggiornaLabelInfo(); } - CassaAperta = true; + isCassaAperta = true; idProfiloTariffario = idProfiloTariffarioDefault;//0L - SetModoPagamento(ModoPagamentoDefault); -// CaricaCompleti(); + setModoPagamento(modoPagamentoDefault); - //this.caricaDati("PRODOTTI", "-1"); this.caricaPannello(); - AbilitaPulsanti(pnlCategorie, true,true); + abilitaPulsanti(pnlCategorie, true, true); jbtnChiudi.setEnabled(false); } } - public void CercaTessera() {//String QueryCF) { - MyApplication MyP = new MyApplication(); - MyP.UnaVolta = false; - SetModoPagamento(ModoPagamentoDefault); - String NTessera = jTxtTessera.getText(); -// TestoCarteCF=new StringBuilder(); - String Query = "SELECT DISTINCT c.nome || '|' || u.cognome || '|' || u.nome || '|' || TO_CHAR (u.data_di_nascita, 'dd/mm/yyyy') || '|' || u.matricola || '|' || a.nome || '|' || c.nome || '|' || f.nome || '|' || t.ID || '|' || TO_CHAR (t.data_scadenza, 'dd/mm/yyyy') || '|' || t.id_stato || '|' || u.ID || '|' || f.ID || '|' || t.gratuita_residue || '|' || t.bonus_residui AS ris " - + " FROM categorie_utenti c, tessere t, utenti u, categorie_utenti_fasce cf, fasce f, aziende a WHERE t.id_utente = u.ID AND u.id_categoria = c.ID AND c.id_azienda = a.ID AND cf.id_categoria_utenti = c.ID AND cf.id_fascia = f.ID AND t.numero = '" + NTessera + "'"; -// if(QueryCF.length()>0){ -// Query=QueryCF; -// } + /** + * funzione richiamata in seguito alla selezione di una tessera + * + */ + public void cercaTessera() {//String QueryCF) { + MyApplication myApp = new MyApplication(); + myApp.unaVolta = false; + setModoPagamento(modoPagamentoDefault); + String numeroTessera = jTxtTessera.getText(); + String query = "SELECT DISTINCT c.nome || '|' || u.cognome || '|' || u.nome || '|' || " + + "TO_CHAR (u.data_di_nascita, 'dd/mm/yyyy') || '|' || u.matricola || '|' || a.nome || '|' " + + "|| c.nome || '|' || f.nome || '|' || t.ID || '|' || " + + "TO_CHAR (t.data_scadenza, 'dd/mm/yyyy') || '|' || t.id_stato || '|' || u.ID || '|' || f.ID || '|' " + + "|| t.gratuita_residue || '|' || t.bonus_residui AS ris " + + " FROM categorie_utenti c, tessere t, utenti u, categorie_utenti_fasce cf, fasce f, aziende a " + + "WHERE t.id_utente = u.ID " + + "AND u.id_categoria = c.ID " + + "AND c.id_azienda = a.ID " + + "AND cf.id_categoria_utenti = c.ID " + + "AND cf.id_fascia = f.ID " + + "AND t.numero = '" + numeroTessera + "'"; - String res = MySelect(Query, "ris"); + String res = Utils.mySelect(query, "ris", this); if (res.length() > 0) { String dati[] = res.split("\\|", -1); Date now = new Date(); - Date Scadenza = new Date(); + Date scadenza = new Date(); SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); - idProfiloTariffario = Long.parseLong(dati[12]); - if (idProfiloTariffario == idProfiloTariffarioDefault) { + idProfiloTariffario = Long.valueOf(dati[12]); + if (idProfiloTariffario.equals(idProfiloTariffarioDefault)) { JOptionPane.showOptionDialog(this, "Impostato Profilo Tariffario di default!", "Attenzione", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, null, null); } - Integer idStato = Integer.parseInt(dati[10]); - idTessera = Long.parseLong(dati[8]); - LogIDTessera = idTessera.toString(); + Integer idStato = Integer.valueOf(dati[10]); + idTessera = Long.valueOf(dati[8]); + logIDTessera = idTessera.toString(); - LogTessera(); + logTessera(); try { // controllo abilitazione tessera - String ControlloPunto = "Select controlla_abilitazione('" + NTessera + "'," + idPuntoCassa + ") as T from dual"; - Long Abilitato = MySelectInteger(ControlloPunto, "T"); - if (Abilitato == 0) { - //JOptionPane.showMessageDialog(this, "Tessera non abilitata per questo punto di distribuzione!\nConsenti passaggio?",JOptionPane.YES_NO_OPTION); - Object[] options = {"Sì", "No"}; + String controlloPunto = "Select controlla_abilitazione('" + numeroTessera + "'," + idPuntoCassa + ") as T from dual"; + Long abilitato = Utils.mySelectInteger(controlloPunto, "T", this); + if (abilitato == 0) { + Object[] options = {"Si", "No"}; Object selectedValue = JOptionPane.showOptionDialog(this, "Tessera non abilitata per questo punto di distribuzione!\nConsenti passaggio?", "Attenzione", JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]); if (Integer.parseInt(selectedValue.toString()) != 0) { return; } else { - MyInsert("Insert into Forzature (id,id_account,id_Punto_Cassa,id_Tessera,id_Tipo_Forzatura) values (-1," + idAccount + "," + idPuntoCassa + "," + idTessera + ",1)"); + Utils.myInsert("Insert into Forzature (id,id_account,id_Punto_Cassa,id_Tessera,id_Tipo_Forzatura) values (-1," + + idAccount + "," + idPuntoCassa + "," + idTessera + ",1)", + this); } } //controllo passaggi - String ControlloPassaggi = "Select controlla_passaggi('" + NTessera + "'," + idPuntoCassa + ") as T from dual"; - Long AbilitatoPassaggi = MySelectInteger(ControlloPassaggi, "T"); + String controlloPassaggi = "Select controlla_passaggi('" + numeroTessera + "'," + idPuntoCassa + ") as T from dual"; + Long abilitatoPassaggi = Utils.mySelectInteger(controlloPassaggi, "T", this); - if (AbilitatoPassaggi == 0L) { + if (abilitatoPassaggi == 0L) { //05/09/2022 - String queryPassaggi="select count(*) as NRec from st_acquisti a inner join prodotti p on a.id_prodotto=p.id inner join Tipi_Pagamenti tp on a.id_tipo_pagamento=tp.id where TRUNC(data) = TRUNC(SYSDATE) and id_tessera=" + idTessera + " and flag_in_vassoio=0 and id_punto_cassa=" + idPuntoCassa; - Long NPassaggi = MySelectInteger(queryPassaggi, "NRec"); + String queryPassaggi = "select count(*) as NRec from st_acquisti a inner join prodotti p on a.id_prodotto=p.id inner join Tipi_Pagamenti tp on a.id_tipo_pagamento=tp.id where TRUNC(data) = TRUNC(SYSDATE) and id_tessera=" + idTessera + " and flag_in_vassoio=0 and id_punto_cassa=" + idPuntoCassa; + Long numeroPassaggi = Utils.mySelectInteger(queryPassaggi, "NRec", this); //fine---- - if (FlagEsegueStorni && NPassaggi>0) { - //JOptionPane.showMessageDialog(this, "Tessera non abilitata per questo punto di distribuzione!\nConsenti passaggio?",JOptionPane.YES_NO_OPTION); - Object[] options = {"Sì", "No"}; + if (flagEsegueStorni && numeroPassaggi > 0) { + Object[] options = {"Si", "No"}; Object selectedValue = JOptionPane.showOptionDialog(this, "N° passaggi giornalieri esauriti. Non è possibile usufruire del pasto!\nSi desidera effettuare uno storno per un pasto erroneamente addebitato?", "Attenzione", JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[1]); if (Integer.parseInt(selectedValue.toString()) == 0) { - ApriStorno(true); + apriStorno(true); } else { - AzzeraDopoStorno(); + azzeraDopoStorno(); return; -// //16-04-2019 -// //CancellaComposizioni(); -// Annulla(); -// timerDisplay.schedule(new TimerTask() { -// -// @Override -// public void run() { -// Azzera(); -// AggiornaLabelInfo(); -// -// } -// }, 500); -// -// //Chiudi(); -// PassaggiEsauritiNoComposizione = true; -// -// //30-11-15 -// //Azzera(); -// //return; + } } else { JOptionPane.showMessageDialog(this, "N° passaggi giornalieri esauriti. Non è possibile usufruire del pasto!"); - AzzeraDopoStorno(); + azzeraDopoStorno(); return; } } //aggiungo un giorno altrimenti in caso di scadenza nello stesso giorno //considera le ore - Scadenza = formatter.parse(dati[9]); + scadenza = formatter.parse(dati[9]); Calendar c = Calendar.getInstance(); - c.setTime(Scadenza); + c.setTime(scadenza); c.add(Calendar.DATE, 1); - Scadenza = c.getTime(); + scadenza = c.getTime(); - //JOptionPane.showMessageDialog(this, Scadenza + ' ' + now); - if (Scadenza.after(now) && idStato != 2) { - //String res1 = MySelect("Select Cognome || ' ' || Nome || ';' || id_Categoria as ris from utenti where id=" + dati[1], "ris"); - //String dati2[] = res1.split(";"); + if (scadenza.after(now) && idStato != 2) { - String ModoP = CercaTestoModoPagamento(); - -// CaricaCompleti(); + String modoPagamento = cercaTestoModoPagamento(); lblCategoria.setText(dati[0]); lblCognome.setText(dati[1]); lblNome.setText(dati[2]); - if (FlagMostraDataDiNascita) { + if (flagMostraDataDiNascita) { lblNascita.setText(dati[3]); } - - //lblScadTessera.setText(dati[9]);//dati[4] + lblAzienda.setText(dati[5]); lblConvenzione.setText(dati[6]); lblFascia.setText(dati[7]); - jBtnStorno.setEnabled(FlagEsegueStorni); + jBtnStorno.setEnabled(flagEsegueStorni); jBtnAsporto.setEnabled(true); jbtnChiudi.setEnabled(true); - - //VerificaModoPagamento(); + if (btnImpostaCliente.isVisible()) { btnImpostaCliente.setEnabled(false); jBtnBuoni.setEnabled(false); } - if (FlagPrecaricaLista == false) { - CassaAperta = true; - AbilitaPulsanti(pnlCategorie, true,true); - AbilitaPulsanti(pnlProdotti, true,true); + if (flagPrecaricaLista == false) { + isCassaAperta = true; + abilitaPulsanti(pnlCategorie, true, true); + abilitaPulsanti(pnlProdotti, true, true); } if (dati.length > 13) { if (dati[13].length() > 0) { - Gratuita_Residue = Integer.parseInt(dati[13]); - } - //Gratuita_ResidueProg = Gratuita_Residue; + gratuitaResidue = Integer.parseInt(dati[13]); + } lblGratuita.setText(dati[13]); } - Bonus_Residui = 0; + bonusResidui = 0; if (dati.length > 14) { if (dati[14].length() > 0) { - Bonus_Residui = Integer.parseInt(dati[14]); + bonusResidui = Integer.parseInt(dati[14]); } } - lblScadTessera.setText("" + Bonus_Residui); - //CaricaCompleti(); + lblScadTessera.setText("" + bonusResidui); - if (ModoP.equalsIgnoreCase("A scalare")) { - //VerificaSaldo(NTessera); + if (modoPagamento.equalsIgnoreCase("A scalare")) { //modifica 09-11-18 - if (CalcolaTotale() > 0.00 && FlagPrecaricaLista == false) { - VerificaSaldo(NTessera); + if (calcolaTotale() > 0.00 && flagPrecaricaLista == false) { + verificaSaldo(numeroTessera); } //fine modifica - } else { - MyApplication MyA = new MyApplication(); - String Punti = MyA.MySelect(this, "Select Punti from Tessere where numero='" + NTessera + "'", "Punti"); - lblPunti.setText(Punti); - String Tipo = CercaTestoModoPagamento(); - lblTipoPagamento.setText(Tipo); + //MyApplication myApplication = new MyApplication(); + //String punti = myApplication.mySelect(this, "Select Punti from Tessere where numero='" + numeroTessera + "'", "Punti"); + String punti = Utils.mySelect("Select Punti from Tessere where numero='" + numeroTessera + "'", "Punti", + this); + lblPunti.setText(punti); + String tipo = cercaTestoModoPagamento(); + lblTipoPagamento.setText(tipo); } - StoCalcolando=true; - PulsantiModoPagamento(); - StoCalcolando=false; - //this.caricaDati("PRODOTTI", "-1"); - this.caricaPannello(); - AbilitaPulsanti(pnlCategorie, true,true); - StatoTesseraLetta(Gratuita_Residue, Bonus_Residui); + + //statoTesseraLetta(gratuitaResidue, bonusResidui); //28-09-2016 quando c'è una sola categoria faccio click - if (NumeroCategorie == 1) { + if (numeroCategorie == 1) { Component[] components = pnlCategorie.getComponents(); JToggleButton bt = (JToggleButton) components[0]; - //bt.doClick(); + } //FlagDefaultAsporto - if (Asporto) { + if (asporto) { jBtnAsporto.setSelected(true); jBtnAsportoActionPerformed(null); } MyTableModel model = (MyTableModel) tblLista.getModel(); - if (FlagPrecaricaLista) { - ForzaPrezzi(model); + if (flagPrecaricaLista) { + forzaPrezzi(model); } - ControllaCompleti(model); - ControllaExtra(model); - SommaColonne(model); + controllaCompleti(model); + controllaExtra(model); + sommaColonne(model); //modifica 09-11-18 - if (ModoP.equalsIgnoreCase("A scalare")) { - if (CalcolaTotale() > 0.00 && FlagPrecaricaLista) { - VerificaSaldo(NTessera); + if (modoPagamento.equalsIgnoreCase("A scalare")) { + if (calcolaTotale() > 0.00 && flagPrecaricaLista) { + verificaSaldo(numeroTessera); } } //fine modifica - //SommaColonne(model); //05-06-2020 - if (AbilitatoPassaggi != 0L) { - ControllaPrenotazioni(); + if (abilitatoPassaggi != 0L) { + controllaPrenotazioni(); } + + stoCalcolando = true; + pulsantiModoPagamento(); + stoCalcolando = false; + this.caricaPannello(); + abilitaPulsanti(pnlCategorie, true, true); + } else { JOptionPane.showMessageDialog(this, "Tessera Scaduta o Disabilitata!"); - LogTessera(); - Azzera(); + logTessera(); + azzera(); } } catch (ParseException e) { - LogTesseraErrore = e.getMessage().toString(); - LogTessera(); - Azzera(); + logTesseraErrore = e.getMessage(); + logTessera(); + azzera(); } } else { JOptionPane.showMessageDialog(this, "Errore in lettura della tessera!"); - LogTessera(); - Azzera(); + logTessera(); + azzera(); } } -// private void ControllaPrenotazioni() { -// String Query = "select * from (SELECT id_Prenotazione as nr FROM VIEW_PRENOTAZIONI_TURNO WHERE (id_Modalita=2 or id_Modalita=3) and id_stato = 1 AND id_turno =" + idTurnoAttuale + " AND id_tessera = " + idTessera + " order by id_prenotazione) where rownum = 1 "; -// String idP = MySelect(Query, "nr"); -// if (idP.length() > 0) { -// Long rowCount = Long.parseLong(idP); -// idPrenotazione = rowCount; -// if (rowCount > 0L) { -// if (JOptionPane.showConfirmDialog(null, "Prenotazione presente. Inserisco i prodotti?", "Prenotazione", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { -// InserisciPrenotazioni(); -// } -// } -// } -// } - private void ControllaPrenotazioni() { + private void controllaPrenotazioni() { try { - //String Query = "select * from (SELECT id_Prenotazione as nr FROM VIEW_PRENOTAZIONI_TURNO WHERE (id_Modalita=2 or id_Modalita=3) and id_stato = 1 AND id_turno =" + idTurnoAttuale + " AND id_tessera = " + idTessera + " order by id_prenotazione) where rownum = 1 "; - String Query="SELECT * FROM (SELECT id_Prenotazione as nr FROM VIEW_PRENOTAZIONI_TURNO WHERE id_modalita in (2,3) AND id_stato IN (0,1) AND id_turno = " + idTurnoAttuale + " AND id_tessera = " + idTessera + " order by id_prenotazione) where rownum = 1"; - String idP = MySelect(Query, "nr"); + + String query = "SELECT * FROM (SELECT id_Prenotazione as nr FROM VIEW_PRENOTAZIONI_TURNO " + + "WHERE id_modalita in (2,3) " + + "AND id_stato IN (0,1) " + + "AND id_turno = " + idTurnoAttuale + " " + + "AND id_tessera = " + idTessera + " " + + "order by id_prenotazione) " + + "where rownum = 1"; + String idP = Utils.mySelect(query, "nr", this); if (idP.length() > 0) { - Long rowCount = Long.parseLong(idP); + Long rowCount = Long.valueOf(idP); idPrenotazione = rowCount; if (rowCount > 0L) { - Query = "SELECT Distinct Nome FROM VIEW_PRENOTAZIONI_TURNO v join prodotti p on v.ID_PRODOTTO=p.ID WHERE id_Modalita in (2,3) and id_stato in (0,1) AND id_turno =" + idTurnoAttuale + " AND id_tessera = " + idTessera + " and id_prenotazione=" + idPrenotazione + " order by Nome"; + query = "SELECT Distinct Nome FROM VIEW_PRENOTAZIONI_TURNO v join prodotti p on v.ID_PRODOTTO=p.ID " + + "WHERE id_Modalita in (2,3) " + + "and id_stato in (0,1) " + + "AND id_turno =" + idTurnoAttuale + + " AND id_tessera = " + idTessera + + " and id_prenotazione=" + idPrenotazione + + " order by Nome"; Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); Statement st = dbConnection.createStatement(); - ResultSet rs = st.executeQuery(Query); - StringBuilder s =new StringBuilder(""); + ResultSet rs = st.executeQuery(query); + StringBuilder s = new StringBuilder(""); while (rs.next()) { s.append(rs.getString("Nome")); s.append("\n"); @@ -5736,9 +4284,9 @@ public class PuntoCassa extends JFrame implements ActionListener { dbConnection.close(); if (JOptionPane.showConfirmDialog(null, "Prenotazione presente:\n" + s.toString() + "Inserisco i prodotti?", "Prenotazione", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { - InserisciPrenotazioni(); + inserisciPrenotazioni(); } - + } } } catch (SQLException | NumberFormatException e) { @@ -5747,33 +4295,36 @@ public class PuntoCassa extends JFrame implements ActionListener { } } - private void InserisciPrenotazioni() { + + private void inserisciPrenotazioni() { try { MyTableModel model = (MyTableModel) tblLista.getModel(); MyTableModel model1 = (MyTableModel) tblLista1.getModel(); - ClearTable(model); - ClearTable(model1); - SommaColonne(model); - - String Query = "SELECT * FROM VIEW_PRENOTAZIONI_TURNO WHERE id_Modalita in (2,3) and id_stato in (0,1) AND id_turno =" + idTurnoAttuale + " AND id_tessera = " + idTessera + " and id_prenotazione=" + idPrenotazione; + /*clearTable(model); + clearTable(model1);*/ + model.clearTable(); + model1.clearTable(); + sommaColonne(model); + + String query = "SELECT * FROM VIEW_PRENOTAZIONI_TURNO " + + "WHERE id_Modalita in (2,3) " + + "and id_stato in (0,1) " + + "AND id_turno =" + idTurnoAttuale + + " AND id_tessera = " + idTessera + + " and id_prenotazione=" + idPrenotazione; Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); Statement st = dbConnection.createStatement(); - ResultSet rs = st.executeQuery(Query); - //Long idPrenotazione=0L; + ResultSet rs = st.executeQuery(query); + while (rs.next()) { -// if (idPrenotazione!=rs.getLong("ID_PRENOTAZIONE") && idPrenotazione!=0L){ -// break; -// } + java.awt.event.ActionEvent evt; evt = new java.awt.event.ActionEvent(new Object(), 0, "PRODOTTO[" + rs.getString("ID_PRODOTTO") + "]"); actionPerformed(evt); - -// idPrenotazione=rs.getLong("ID_PRENOTAZIONE"); } -// this.idPrenotazione=idPrenotazione; rs.close(); st.close(); dbConnection.close(); @@ -5784,57 +4335,52 @@ public class PuntoCassa extends JFrame implements ActionListener { } } - public void AzzeraDopoStorno() { - Annulla(); + public void azzeraDopoStorno() { + + annulla(); timerDisplay.schedule(new TimerTask() { @Override public void run() { - Azzera(); - AggiornaProgressivi(); - //AggiornaLabelInfo(); + azzera(); + aggiornaProgressivi(); } }, 500); - //Chiudi(); - PassaggiEsauritiNoComposizione = true; - } - private Double CalcolaTotale() { - Double TotAcquisto = 0.00; - if (txtTotaleCassa.getText().length() > 0) { - String Saldo = txtTotaleCassa.getText().replace("€ ", "").replace(".", ""); - Saldo = Saldo.replace(",", "."); - TotAcquisto = Double.parseDouble(Saldo); - } - return TotAcquisto; + passaggiEsauritiNoComposizione = true; } - private void ForzaPrezzi(MyTableModel model) { + private Double calcolaTotale() { + Double totAcquisto = 0.00; + if (txtTotaleCassa.getText().length() > 0) { + String saldo = txtTotaleCassa.getText().replace("€ ", "").replace(".", ""); + saldo = saldo.replace(",", "."); + totAcquisto = Double.valueOf(saldo); + } + return totAcquisto; + } + + private void forzaPrezzi(MyTableModel model) { for (int y = 0; y < model.getRowCount(); y++) { Object row[] = model.getRow(y); String idProdotto = row[3].toString(); - String Query = "SELECT Punti || '|' || prezzo as res FROM tariffe where id_Prodotto = " + idProdotto + " and id_fascia=" + idProfiloTariffario; - String res = MySelect(Query, "res"); + String query = "SELECT Punti || '|' || prezzo as res FROM tariffe " + + "where id_Prodotto = " + idProdotto + + " and id_fascia=" + idProfiloTariffario; + String res = Utils.mySelect(query, "res", this); if (res.length() > 0) { - String[] El = res.split("\\|", -1); - Double Prezzo = 0.0; - Integer Punti = 0; - Punti = Integer.parseInt(El[0]); - + String[] el = res.split("\\|", -1); + Double prezzo; + Integer punti; + punti = Integer.valueOf(el[0]); - Prezzo = Double.parseDouble(El[1].replace(",", ".")); - - - -// row[ColImporto]=Prezzo; -// row[ColPunti]=Punti; -// model.addRow(row); + prezzo = Double.valueOf(el[1].replace(",", ".")); - model.setValueAt(Prezzo, y, ColImporto); - model.setValueAt(Prezzo, y, ColImporto2); - model.setValueAt(Punti, y, ColPunti); + model.setValueAt(prezzo, y, colImporto); + model.setValueAt(prezzo, y, colImporto2); + model.setValueAt(punti, y, colPunti); doLayout(); } @@ -5842,229 +4388,8 @@ public class PuntoCassa extends JFrame implements ActionListener { } - //prima modifica del 09-05-18<<<<<<<<<<<<<<<<<<<<<<<<<< -// public void CercaTesseraOLD() { -// lblCategoria.setText(""); -// lblCognome.setText(""); -// lblNome.setText(""); -// lblNascita.setText(""); -// lblScadTessera.setText(""); -// lblAzienda.setText(""); -// lblConvenzione.setText(""); -// lblFascia.setText(""); -// -// //Display(Message_Display, " "," "); -// if (CassaAperta == false) { -// -// TurnoAttuale(); -// if ((idTurnoAttuale - idTurno) != 0) { -// -// ProgressivoTurno = 1L; -// ProgressivoContanti = 0.00; -// ProgressivoScalare = 0.00; -// ProgressivoTicket = 0.00; -// ProgressivoDifferito = 0.00; -// if (NomeTurnoAttuale.equalsIgnoreCase("Pranzo")) { -// ProgressivoGiorno = 1L; -// } -// idTurno = idTurnoAttuale; -// NomeTurno = NomeTurnoAttuale; -// -// Date Adesso = new Date(); -// String ControlloTurno = MySelect("select count(*) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and data=" + AggiustaData(Adesso) + " and id_Turno=" + idTurno, "Prog"); -// if (Long.parseLong(ControlloTurno) <= 0) { -// MyInsert("Insert into Progressivi (data,id_Punto_cassa,id_Turno,prog_assoluto,prog_giorno,prog_turno) " -// + " values (" + AggiustaData(Adesso) + "," + idPuntoCassa + "," + idTurno + "," + Progressivo + "," + ProgressivoGiorno + ",0)"); -// } -// -// AggiornaLabelInfo(); -// } -// -// CassaAperta = true; -// idProfiloTariffario = 0L; -// //idModoPagamento=0L; -// //SetModoPagamento("Contanti"); -// SetModoPagamento(ModoPagamentoDefault); -// String NTessera = jTxtTessera.getText(); -// // String ControlloPunto="select count(*) as T from view_tessere_abilitate where id_punto_cassa =" + idPuntoCassa + " and numero = '" + NTessera + "'"; -// -// //String res = MySelect("Select data_scadenza || ';' || id_utente || ';' || id_fascia || ';' || id_Stato || ';' || id as ris from tessere where numero='" + NTessera + "'", "ris"); -// //String res = MySelect("SELECT t.data_scadenza || ';'|| u.id || ';'||t.id_fascia|| ';'|| t.id_stato|| ';'||t.id || ';'|| u.nome|| ';'|| u.cognome|| ';'|| c.nome as ris FROM tessere t, utenti u, categorie_utenti c, stati_tessere s WHERE t.id_utente = u.id AND u.id_categoria = c.id AND t.id_stato = s.id AND t.numero = '" + NTessera + "'", "ris"); -// //String res=MySelect("SELECT data_scadenza || ';'|| id_utente || ';'|| id_fascia|| ';'|| id_stato|| ';'|| id_Tessera || ';'|| nome|| ';'|| cognome|| ';'|| categoria as ris FROM view_tessere where numero = '" + NTessera + "'", "ris"); -// //select c.nome as categoria, u.cognome, u.nome, u.data_di_nascita, u.matricola, a.nome as azienda, c.nome as convenzione, f.nome as fascia, t.id as id_tessera, t.data_scadenza, t.id_stato, u.id as id_utente, f.id as id_fascia -//// String Query="select distinct c.nome || '|'|| u.cognome || '|'|| u.nome || '|'|| to_char(u.data_di_nascita,'dd/mm/yyyy') || '|'|| u.matricola || '|'|| a.nome || '|'|| c.nome || '|'|| f.nome || '|'|| t.id || '|'|| to_char(t.data_scadenza,'dd/mm/yyyy') || '|'|| t.id_stato || '|'|| u.id || '|'|| f.id || '|'|| t.gratuita_residue as ris" + -//// " from categorie_utenti c, tessere t, utenti u, convenzioni_fasce cf, fasce f, convenzioni co, aziende a where u.id_categoria = c.id" + -//// " and t.id_utente = u.id and cf.id_categoria_utenti = c.id and cf.id_fascia = f.id and cf.id_convenzione = co.id and co.id_azienda = a.id" + -//// " and t.numero = '" + NTessera + "'"; -// String Query = "SELECT DISTINCT c.nome || '|' || u.cognome || '|' || u.nome || '|' || TO_CHAR (u.data_di_nascita, 'dd/mm/yyyy') || '|' || u.matricola || '|' || a.nome || '|' || c.nome || '|' || f.nome || '|' || t.ID || '|' || TO_CHAR (t.data_scadenza, 'dd/mm/yyyy') || '|' || t.id_stato || '|' || u.ID || '|' || f.ID || '|' || t.gratuita_residue AS ris " -// + " FROM categorie_utenti c, tessere t, utenti u, categorie_utenti_fasce cf, fasce f, aziende a WHERE t.id_utente = u.ID AND u.id_categoria = c.ID AND c.id_azienda = a.ID AND cf.id_categoria_utenti = c.ID AND cf.id_fascia = f.ID AND t.numero = '" + NTessera + "'"; -// String res = MySelect(Query, "ris"); -// -// if (res.length() > 0) { -// String dati[] = res.split("\\|"); -// -// Date now = new Date(); -// -// Date Scadenza = new Date(); -// SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); -// -// idProfiloTariffario = Long.parseLong(dati[12]); -// Integer idStato = Integer.parseInt(dati[10]); -// idTessera = Long.parseLong(dati[8]); -// -// try { -// // controllo abilitazione tessera -// String ControlloPunto = "Select controlla_abilitazione('" + NTessera + "'," + idPuntoCassa + ") as T from dual"; -// Long Abilitato = MySelectInteger(ControlloPunto, "T"); -// if (Abilitato == 0) { -// //JOptionPane.showMessageDialog(this, "Tessera non abilitata per questo punto di distribuzione!\nConsenti passaggio?",JOptionPane.YES_NO_OPTION); -// Object[] options = {"Sì", "No"}; -// Object selectedValue = JOptionPane.showOptionDialog(this, "Tessera non abilitata per questo punto di distribuzione!\nConsenti passaggio?", "Attenzione", -// JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]); -// if (Integer.parseInt(selectedValue.toString()) != 0) { -// return; -// } else { -// MyInsert("Insert into Forzature (id,id_account,id_Punto_Cassa,id_Tessera,id_Tipo_Forzatura) values (-1," + idAccount + "," + idPuntoCassa + "," + idTessera + ",1)"); -// -// } -// -// } -// -// //controllo passaggi -// String ControlloPassaggi = "Select controlla_passaggi('" + NTessera + "'," + idPuntoCassa + ") as T from dual"; -// Long AbilitatoPassaggi = MySelectInteger(ControlloPassaggi, "T"); -// -// //da togliere<<<<<<<<<<<<<<<<<<<<<<<<< -// //AbilitatoPassaggi = 0L; -// if (AbilitatoPassaggi == 0L) { -// //JOptionPane.showMessageDialog(this, "Tessera non abilitata per questo punto di distribuzione!\nConsenti passaggio?",JOptionPane.YES_NO_OPTION); -// //Object[] options = { "Sì", "No" }; -// JOptionPane.showOptionDialog(this, "N° passaggi giornalieri esauriti. Non è possibile usufruire del pasto!", "Attenzione", -// JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); -// //Chiudi(); -// CancellaComposizioni(); -// PassaggiEsauritiNoComposizione = true; -// -// //30-11-15 -// //Azzera(); -// //return; -// } -// -// //aggiungo un giorno altrimenti in caso di scadenza nello stesso giorno -// //considera le ore -// Scadenza = formatter.parse(dati[9]); -// Calendar c = Calendar.getInstance(); -// c.setTime(Scadenza); -// c.add(Calendar.DATE, 1); -// Scadenza = c.getTime(); -// -// //JOptionPane.showMessageDialog(this, Scadenza + ' ' + now); -// if (Scadenza.after(now) && idStato != 2) { -// //String res1 = MySelect("Select Cognome || ' ' || Nome || ';' || id_Categoria as ris from utenti where id=" + dati[1], "ris"); -// //String dati2[] = res1.split(";"); -// -// String ModoP = CercaTestoModoPagamento(); -// -//// if (ModoP.equalsIgnoreCase("A scalare")) { -//// if (VerificaSaldo(NTessera)) { -// CaricaCompleti(); -// lblCategoria.setText(dati[0]); -// lblCognome.setText(dati[1]); -// lblNome.setText(dati[2]); -// if (FlagMostraDataDiNascita) { -// lblNascita.setText(dati[3]); -// } -// lblScadTessera.setText(dati[9]);//dati[4] -// lblAzienda.setText(dati[5]); -// lblConvenzione.setText(dati[6]); -// lblFascia.setText(dati[7]); -// jBtnStorno.setEnabled(true); -// //jBtnCarta.setEnabled(true); -// jBtnAsporto.setEnabled(true); -//// jBtnBuoni.setEnabled(true); -// //jBtnTicket.setEnabled(true); -// //VerificaModoPagamento(); -// if (btnImpostaCliente.isVisible()) { -// btnImpostaCliente.setEnabled(false); -// } -// //AbilitaPulsanti(pnlCategorie, true); -// //AbilitaPulsanti(pnlProdotti, true); -// if (dati.length > 13) { -// if (dati[13].length() > 0) { -// Gratuita_Residue = Integer.parseInt(dati[13]); -// } -// //Gratuita_ResidueProg = Gratuita_Residue; -// lblGratuità.setText(dati[13]); -// } -// //CaricaCompleti(); -// -// if (ModoP.equalsIgnoreCase("A scalare")) { -// -// VerificaSaldo(NTessera); -// -// } else { -// MyApplication MyA = new MyApplication(); -// String Punti = MyA.MySelect(this, "Select Punti from Tessere where numero='" + NTessera + "'", "Punti"); -// lblPunti.setText(Punti); -// String Tipo = CercaTestoModoPagamento(); -// lblTipoPagamento.setText(Tipo); -// -// } -// PulsantiModoPagamento(); -// //this.caricaDati("PRODOTTI", "-1"); -// this.caricaPannello(); -// StatoTesseraLetta(0, 0); -// -// //28-09-2016 quando c'è una sola categoria faccio click -// if (NumeroCategorie == 1) { -// Component[] components = pnlCategorie.getComponents(); -// JToggleButton bt = (JToggleButton) components[0]; -// bt.doClick(); -// } -//// } else { -//// Azzera(); -////// CassaAperta=false; -////// idProfiloTariffario=0L; -////// idTessera=0L; -////// idModoPagamento=0L; -//// } -// -// //FlagDefaultAsporto -// if (Asporto) { -// jBtnAsporto.setSelected(true); -// jBtnAsportoActionPerformed(null); -// } -// -// } else { -// JOptionPane.showMessageDialog(this, "Tessera Scaduta o Disabilitata!"); -// Azzera(); -//// CassaAperta=false; -//// idProfiloTariffario=0L; -//// idTessera=0L; -//// idModoPagamento=0L; -// } -// } catch (ParseException e) { -// Azzera(); -//// CassaAperta=false; -//// idProfiloTariffario=0L; -//// idTessera=0L; -//// idModoPagamento=0L; -// } -// } else { -// -// JOptionPane.showMessageDialog(this, "Errore in lettura della tessera!"); -// Azzera(); -// } -// } -//// String[] Dati=MySelect("Select nome || ' ' || cognome as nc from utenti", dbTipo); -//// lblCodiceDati.setText(Dati[0]); -//// lblDenominazioneDati.setText(Dati[0]); -//// lblOrganizzazioneDati.setText(Dati[2]); -// -// } - - private void AbilitaPulsanti(JPanel aPanel, Boolean Abilita,Boolean Apertura) { - Component c = null; + private void abilitaPulsanti(JPanel aPanel, Boolean abilita, Boolean apertura) { + Component c; Component[] components = aPanel.getComponents(); if (components != null) { @@ -6072,42 +4397,25 @@ public class PuntoCassa extends JFrame implements ActionListener { for (int i = 0; i < numComponents; i++) { c = components[i]; if (c != null) { - - //c.setEnabled(Abilita); JToggleButton bt = (JToggleButton) c; if (bt == null) { - c.setEnabled(Abilita); + c.setEnabled(abilita); } else { try { - if (bt.getText().equalsIgnoreCase("Composizione") && PassaggiEsauritiNoComposizione && aPanel.getName().equalsIgnoreCase("pnlCategorie")) { + if (bt.getText().equalsIgnoreCase("Composizione") && passaggiEsauritiNoComposizione && aPanel.getName().equalsIgnoreCase("pnlCategorie")) { bt.setEnabled(false); } else { - bt.setEnabled(Abilita); + bt.setEnabled(abilita); } - if (bt.getText().equalsIgnoreCase("Composizione") && menuGiornoPresente == false && Apertura ) { + if (bt.getText().equalsIgnoreCase("Composizione") && menuGiornoPresente == false && apertura) { bt.setEnabled(true); bt.setSelected(true); - PulsantiCategoria("0", "Categoria[0]"); - //bt.setSelected(true); -// cmdComposizione=bt.getActionCommand(); -// Integer inizio = cmdComposizione.indexOf("["); -// Integer fine = cmdComposizione.indexOf("]"); -// idComposizione = cmdComposizione.substring(inizio + 1, fine); -//// MenùGiorno=true; -// Timer timer = new Timer(); -// timer.schedule(new TimerTask() { -// @Override -// public void run() { -// PulsantiCategoria(idComposizione, cmdComposizione); -// } -// }, 1000); + pulsantiCategoria("0", "Categoria[0]"); } else { bt.setSelected(false); } - -// bt.setSelected(false); } catch (Exception ex) { } } @@ -6115,86 +4423,62 @@ public class PuntoCassa extends JFrame implements ActionListener { } } - } + } - private void Stampa() { - - setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); - JInternalReport P = new JInternalReport(); - P.TitoloReport = "Scontrino"; - - String Query = "Select Prodotti.Nome as Prodotto,Importo,Acquisti.id from Acquisti inner join Prodotti on Acquisti.id_prodotto=prodotti.id where Num_Progressivo=" + (Progressivo - 1) + " and id_Punto_cassa=" + idPuntoCassa; - String[] ColReport = {"Prodotto", "Importo"}; - String[] ColTypeReport = {"text", "float"}; - String SelectRows = "Select count(*) as nr from Acquisti where Num_Progressivo=" + (Progressivo - 1) + " and id_Punto_cassa=" + idPuntoCassa; - int rowCount = Integer.parseInt(MySelect(SelectRows, "nr")); - Object[][] dataReport = RowData(Query, ColReport, ColTypeReport, rowCount); - P.CreaReport(ColReport, ColTypeReport, dataReport); - - P.setVisible(true); - P.show(); - setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - - } - - public Object[][] RowData(String Query, String[] Cols, String[] ColType, int rowCount) { + public Object[][] rowData(String query, String[] cols, String[] colType, int rowCount) { Object[][] rows = null; try { Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); Statement st = dbConnection.createStatement(); - ResultSet rs = st.executeQuery(Query); + ResultSet rs = st.executeQuery(query); rows = new Object[rowCount][]; int r = 0; while (rs.next()) { - Object[] row = new Object[Cols.length]; - for (int i = 0; i < Cols.length; i++) { - if (rs.getString(Cols[i].replace(" ", "_")) == null) { + Object[] row = new Object[cols.length]; + for (int i = 0; i < cols.length; i++) { + if (rs.getString(cols[i].replace(" ", "_")) == null) { row[i] = ""; } else { - row[i] = rs.getString(Cols[i].replace(" ", "_")); + row[i] = rs.getString(cols[i].replace(" ", "_")); } - switch (ColType[i]) { - case "text": - if (rs.getString(Cols[i].replace(" ", "_")) == null) { + switch (colType[i]) { + + case "text" -> { + if (rs.getString(cols[i].replace(" ", "_")) == null) { row[i] = ""; } else { - row[i] = rs.getString(Cols[i].replace(" ", "_")); + row[i] = rs.getString(cols[i].replace(" ", "_")); } - break; - case "integer": - if (rs.getString(Cols[i].replace(" ", "_")) == null) { + } + case "integer" -> { + if (rs.getString(cols[i].replace(" ", "_")) == null) { row[i] = 0; } else { - row[i] = rs.getInt(Cols[i].replace(" ", "_")); + row[i] = rs.getInt(cols[i].replace(" ", "_")); } - break; - case "boolean": - if (rs.getString(Cols[i].replace(" ", "_")) == null) { + } + case "boolean" -> { + if (rs.getString(cols[i].replace(" ", "_")) == null) { row[i] = false; } else { - row[i] = rs.getBoolean(Cols[i].replace(" ", "_")); + row[i] = rs.getBoolean(cols[i].replace(" ", "_")); } - break; - case "float": - if (rs.getString(Cols[i].replace(" ", "_")) == null) { + } + case "float" -> { + if (rs.getString(cols[i].replace(" ", "_")) == null) { row[i] = 0.00; } else { - String v = rs.getString(Cols[i].replace(" ", "_")); + String v = rs.getString(cols[i].replace(" ", "_")); - row[i] = Float.parseFloat(v.replace(",", ".")); + row[i] = Float.valueOf(v.replace(",", ".")); } + } - break; } } rows[r] = row; r++; - /*int id = rs.getInt("id"); - String name = rs.getString("name"); - int age = rs.getInt("age"); - String address = rs.getString("address"); - float salary = rs.getFloat("salary");*/ } rs.close(); @@ -6210,130 +4494,36 @@ public class PuntoCassa extends JFrame implements ActionListener { } - private String MySelect(String Query, String Campo) { - String res = ""; - try { - Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); - Statement st = dbConnection.createStatement(); - ResultSet rs = st.executeQuery(Query); - while (rs.next()) { + - res = rs.getString(Campo); - } - rs.close(); - st.close(); - dbConnection.close(); - } catch (SQLException e) { - JOptionPane.showMessageDialog(this, "Errore MySelect ['" + e.getMessage() + " " + Query + "']"); + - } - if (res == null) { - res = ""; - } - return res; - } - - private Boolean MyInsert(String Query) { - System.out.println(Query); - Boolean res = false; - try { - Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); - Statement st = dbConnection.createStatement(); - ResultSet rs = st.executeQuery(Query); - rs.close(); - st.close(); - dbConnection.close(); - res = true; - } catch (Exception e) { - JOptionPane.showMessageDialog(this, "Errore MySelect ['" + e.getMessage() + " " + Query + "']"); - - } - return res; - } - - private Long MySelectInteger(String Query, String Campo) { - Long res = 0L; - try { - Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); - Statement st = dbConnection.createStatement(); - ResultSet rs = st.executeQuery(Query); - while (rs.next()) { - - res = rs.getLong(Campo); - } - rs.close(); - st.close(); - dbConnection.close(); - } catch (SQLException e) { - JOptionPane.showMessageDialog(this, "Errore MySelectInteger ['" + e.getMessage() + " " + Query + "']"); - - } - - return res; - } - - public void InsertImage() { - - String filenamepath = new String("L:\\Lavoro\\Goffredo\\risorse\\Brioche.jpg"); - try { - -//File file =new File(getClass().getClassLoader().getResource(filenamepath).getFile()); - File file = new File(filenamepath); - Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); - Statement stat = dbConnection.createStatement(); - PreparedStatement ps = dbConnection.prepareStatement("Update Prodotti set icona=?"); -// bind the data...... - - System.out.println("Lenght:" + file.getAbsolutePath()); - InputStream inputimage = new FileInputStream(file); - ps.setBinaryStream(1, inputimage, (int) file.length()); - ps.execute(); - ps.close(); - dbConnection.close(); - } catch (Exception e) { - - System.out.println("Error at Image Insert:" + e); - e.printStackTrace(); - - } - - } + + public void getImage(String idProdotto) { - String FullName = null; - InputStream gifdata = null; + String fullName = null; + InputStream gifData = null; try { - String Query = "select icona from Prodotti where id=" + idProdotto; + String query = "select icona from Prodotti where id=" + idProdotto; // create prepare Statement pst -//System.out.println("write from data base1 "); Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); - PreparedStatement pst = dbConnection.prepareStatement(Query); - -//System.out.println("write from data base:2 "); -//pst.setString(1,Name); -//System.out.println("write from data base:3 "); + PreparedStatement pst = dbConnection.prepareStatement(query); ResultSet result = pst.executeQuery(); - -//System.out.println("write from data base:4 "); if (result.next()) { - -// Name = result.getString(1); -//System.out.println("write from data base:5 "); - //FullName = "L:\\Lavoro\\Goffredo\\risorse\\copia.jpg"; - FullName = imgPath + idProdotto + ".jpg"; + fullName = imgPath + idProdotto + ".jpg"; //using Srteam Method''''' - gifdata = result.getBinaryStream(1); -//System.out.println("write from data base:6 "); + gifData = result.getBinaryStream(1); //create file - if (gifdata != null) { - File giffile = new File(FullName); + if (gifData != null) { + File gifFile = new File(fullName); //write the byte array into a local file. - FileOutputStream file = new FileOutputStream(giffile); + FileOutputStream file = new FileOutputStream(gifFile); int chunk = 0; - while ((chunk = gifdata.read()) != -1) { + while ((chunk = gifData.read()) != -1) { file.write(chunk); @@ -6349,11 +4539,10 @@ public class PuntoCassa extends JFrame implements ActionListener { e.printStackTrace(); } -// return FullName; } - private byte[] getPhoto(String Query) + /*private byte[] getPhoto(String query) throws Exception, SQLException { String req = ""; Blob img; @@ -6361,8 +4550,8 @@ public class PuntoCassa extends JFrame implements ActionListener { Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); Statement stmt = dbConnection.createStatement(); - // Query - req = Query; + // query + req = query; ResultSet rset = stmt.executeQuery(req); @@ -6375,49 +4564,47 @@ public class PuntoCassa extends JFrame implements ActionListener { stmt.close(); dbConnection.close(); return imgData; - } + }*/ - private String AggiustaDateOra(Date Data) { + /*private String formattaDataOra(Date data) { SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); - String data = "to_date('" + formatter.format(Data) + "','dd/mm/yyyy HH24:MI:SS')"; - return data; + return "to_date('" + formatter.format(data) + "','dd/mm/yyyy HH24:MI:SS')"; + }*/ + + private String formatLocalDateTime(LocalDateTime data){ + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm:ss"); + return "to_date('" + data.format(formatter) + "','dd/mm/yyyy HH24:MI:SS')"; } - private String AggiustaData(Date Data) { + private String formattaData(Date data) { SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); - String data = "to_date('" + formatter.format(Data) + "','dd/mm/yyyy')"; - return data; + return "to_date('" + formatter.format(data) + "','dd/mm/yyyy')"; } - private void AggiungiImmaginiPulsanti() { - AggiungImmagini(jBtnStorno, "Storno.png", 70, 70); -// AggiungImmagini(jBtnCarta,"tsn.png",80,80); - AggiungImmagini(jBtnAsporto, "coltello e forchetta.jpg", 50, 50); - // AggiungImmagini(jBtnTicket,"Contanti.png",50,50); + private void aggiungiImmaginiPulsanti() { + aggiungImmagini(jBtnStorno, "Storno.png", 70, 70); + aggiungImmagini(jBtnAsporto, "coltello e forchetta.jpg", 50, 50); + aggiungImmagini(jTBP0, "a scalare.png", 50, 50); + aggiungImmagini(jTBP1, "Contanti.png", 50, 50); + aggiungImmagini(jTBP2, "Ticket.png", 50, 50); + aggiungImmagini(jTBP3, "differito.png", 50, 50); + aggiungImmagini(jBtnprodotti, "Prodotti.png", 50, 50); - AggiungImmagini(jTBP0, "a scalare.png", 50, 50); - AggiungImmagini(jTBP1, "Contanti.png", 50, 50); - AggiungImmagini(jTBP2, "Ticket.png", 50, 50); - AggiungImmagini(jTBP3, "differito.png", 50, 50); - AggiungImmagini(jBtnprodotti, "Prodotti.png", 50, 50); - // UIManager.put("ToggleButton.select", Color.BLUE); SwingUtilities.updateComponentTreeUI(jTBP0); - //AggiungImmagini(jBtnMeteo,"Meteo.png",50,50); - //AggiungImmagini(jBtnDB,"DB.png",50,50); - AggiungImmagini(jBtnMovimenti, "Movimenti.png", 50, 50); + aggiungImmagini(jBtnMovimenti, "Movimenti.png", 50, 50); } - private void AggiungImmagini(JButton btn, String Immagine, int width, int height) { - ImageIcon icon = new ImageIcon(imgPath + Immagine); + private void aggiungImmagini(JButton btn, String immagine, int width, int height) { + ImageIcon icon = new ImageIcon(imgPath + immagine); Image img = icon.getImage(); Image newimg = img.getScaledInstance(width, height, java.awt.Image.SCALE_SMOOTH); icon = new ImageIcon(newimg); btn.setIcon(icon); } - private void AggiungImmagini(JToggleButton btn, String Immagine, int width, int height) { - ImageIcon icon = new ImageIcon(imgPath + Immagine); + private void aggiungImmagini(JToggleButton btn, String immagine, int width, int height) { + ImageIcon icon = new ImageIcon(imgPath + immagine); Image img = icon.getImage(); Image newimg = img.getScaledInstance(width, height, java.awt.Image.SCALE_SMOOTH); icon = new ImageIcon(newimg); @@ -6442,20 +4629,20 @@ public class PuntoCassa extends JFrame implements ActionListener { // *** Crea la form base // ================================================================= PuntoCassa p = new PuntoCassa(); - p.AggiungImmagini(p.jBtnDB1, "DB.png", 50, 50); + p.aggiungImmagini(p.jBtnDB1, "DB.png", 50, 50); // ================================================================= // *** Esegue il resize a seconda delle impostazioni video per // *** occupare tutto lo schermo utile // ================================================================= Toolkit toolkit = Toolkit.getDefaultToolkit(); - Dimension screenSize = toolkit.getScreenSize(); - Rectangle winSize = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); -// p.setSize(screenSize.width, winSize.height); -// p.setLocation(0, 0); - p.setSize(1024, 768); - p.setLocation((int) (screenSize.width - 1024) / 2, (int) (screenSize.height - 768) / 2); + Dimension screenSize = toolkit.getScreenSize(); + + //p.setSize(1024, 768); + //p.setLocation((int) (screenSize.width - 1024) / 2, (int) (screenSize.height - 768) / 2); p.resize(); + //p.setSize((int)screenSize.width / 3 * 2, (int)screenSize.height / 3 * 2); + p.setLocation((int) (screenSize.width - p.getSize().width) / 2, (int) (screenSize.height - p.altezzaBarraApplicazioni - p.getSize().height) / 2); // ================================================================= // *** Mostra la form nello stato iniziale @@ -6468,40 +4655,36 @@ public class PuntoCassa extends JFrame implements ActionListener { p.pnlTop.setVisible(false); p.setVisible(true); - -// p.txtUsername.setText("martiri"); -// p.txtPassword.setText("ok"); -// p.txtUsername.setText("marco"); -// p.txtPassword.setText("3104"); - // ricordati >>>>>>>>>> //VerificaAggiornamentoDB(); } }); } - public void ControllaLogInCarta(String nTessera) { - if (Turno()) { + public void controllaLogInCarta(String nTessera) { + if (turno()) { - String Query = "select a.username || '|' || a.id || '|' || a.id_stato as res" + String query = "select a.username || '|' || a.id || '|' || a.id_stato as res" + " from accounts a, utenti u, tessere t, profili p, ruoli r where a.id_utente = u.id" + " and t.id_utente = u.id" + " and p.id_account = a.id" + " and p.id_ruolo = r.id" //+ " and r.id = 10000000004" + //*** Operatore di cassa ***/ + " and t.numero = '" + nTessera + "'"; //*** Numero della tessera letto su smartcard *** - MyApplication MyA = new MyApplication(); - String[] res = MyA.MySelect(this, Query, "res").split("\\|"); + //MyApplication myApp = new MyApplication(); + //String[] res = myApp.mySelect(this, query, "res").split("\\|"); + String[] res = Utils.mySelect(query, "res", this).split("\\|"); if (res.length >= 3) { utenteLoggato = res[0]; - idAccount = Long.parseLong(res[1]); - Integer Stato = Integer.parseInt(res[2]); - if (utenteLoggato.length() > 0 && idAccount > 0L && Stato == 1) { + idAccount = Long.valueOf(res[1]); + Integer stato = Integer.valueOf(res[2]); + if (utenteLoggato.length() > 0 && idAccount > 0L && stato == 1) { String sql = "SELECT count(*) as Counter FROM profili p WHERE p.id_account = " + idAccount + " AND p.id_ruolo = 10000000004"; - Integer counter = Integer.parseInt(MyA.MySelect(this, sql, "Counter")); + //Integer counter = Integer.valueOf(myApp.mySelect(this, sql, "Counter")); + Integer counter = Integer.valueOf(Utils.mySelect(sql, "Counter", this)); if (counter == 1) { - ImpostaAmbiente(); - VerificaAggiornamentoDB(); - + impostaAmbiente(); + verificaAggiornamentoDB(); + } else { idAccount = 0L; utenteLoggato = ""; @@ -6510,9 +4693,11 @@ public class PuntoCassa extends JFrame implements ActionListener { } else { utenteLoggato = ""; idAccount = 0L; - if (Stato == 2) { - String Messaggio = MyA.MySelect(this, "Select Descrizione from Stati_Accounts where id=" + Stato, "descrizione"); - JOptionPane.showMessageDialog(this, Messaggio + "."); + if (stato == 2) { + //String messaggio = myApp.mySelect(this, "Select Descrizione from Stati_Accounts where id=" + stato, "descrizione"); + String messaggio = Utils.mySelect("Select Descrizione from Stati_Accounts where id=" + stato, "descrizione", + this); + JOptionPane.showMessageDialog(this, messaggio + "."); } else { @@ -6522,17 +4707,17 @@ public class PuntoCassa extends JFrame implements ActionListener { } else { JOptionPane.showMessageDialog(this, "Tessera sconosciuta!"); } - CartaLetta = true; + cartaLetta = true; } else { JOptionPane.showMessageDialog(this, "Impossibile eseguire il Login al sistema:\nNessun Turno Attivo!"); } } - private void Display(String Titolo, String Prezzo) { - System.out.println("Display: " + Titolo); - if (Visualizza_Messaggi_Display) { - + private void display(String titolo, String prezzo) { + System.out.println("Display: " + titolo); + if (visualizzaMessaggiDisplay) { + try { SerialPort serialPort = new SerialPort("COM3"); try { @@ -6541,15 +4726,14 @@ public class PuntoCassa extends JFrame implements ActionListener { SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);//Set params. Also you can set params by this string: serialPort.setParams(9600, 8, 1, 0); - String Testo = Titolo; - if (Prezzo != null) { - Testo = Titolo + SpaziBianchi(Prezzo, 40 - Titolo.length(), false); + String testo = titolo; + if (prezzo != null) { + testo = titolo + Utils.spaziBianchi(prezzo, 40 - titolo.length(), false); } - - serialPort.writeBytes(Testo.getBytes());//Write data to port + + serialPort.writeBytes(testo.getBytes());//Write data to port serialPort.closePort();//Close serial port } catch (SerialPortException ex) { - //System.out.println(ex); if (serialPort.isOpened()) { serialPort.closePort(); } @@ -6562,90 +4746,53 @@ public class PuntoCassa extends JFrame implements ActionListener { } } - String SpaziBianchi(String Testo, Integer Num, Boolean Suffisso) { - String res = Testo; - StringBuilder Suff = new StringBuilder(); - if (Testo.length() < Num) { - Integer Delta = Num - Testo.length(); - for (Integer i = 0; i < Delta; i++) { - Suff.append(" "); - } - if (Suffisso == false) { - res = Suff.toString() + Testo; - } else { - res = Testo + Suff.toString(); - } + - } - return res; - } - - private void StatoAttivoNonLoggato() { + private void statoAttivoNonLoggato() { String PC = idPuntoCassa.toString(); if (PC.length() >= 5) { PC = PC.substring(PC.length() - 5, PC.length()); } else { - PC = SpaziBianchi(PC, 5, false); + PC = Utils.spaziBianchi(PC, 5, false); } - String Riga = SpaziBianchi(Message_Display, 20, true) + "POS " + PC + " CHIUSO"; - Display(Riga, null); + String Riga = Utils.spaziBianchi(messageDisplay, 20, true) + "POS " + PC + " CHIUSO"; + display(Riga, null); } - private void StatoAttivoLoggato() { + private void statoAttivoLoggato() { //per evitare che inserendo la tessera successiva mi cancelli il num tessera if (jTxtTessera.getText().trim().length() <= 0) { String PC = idPuntoCassa.toString(); if (PC.length() >= 5) { PC = PC.substring(PC.length() - 5, PC.length()); } else { - PC = SpaziBianchi(PC, 5, false); + PC = Utils.spaziBianchi(PC, 5, false); } - String Riga = SpaziBianchi(Message_Display, 20, true) + "POS " + PC + " APERTO"; - Display(Riga, null); + String riga = Utils.spaziBianchi(messageDisplay, 20, true) + "POS " + PC + " APERTO"; + display(riga, null); } } - private void StatoTesseraLetta(int gratuita, int Bonus) { + /*private void statoTesseraLetta(int gratuita, int bonus) { String tess = jTxtTessera.getText(); if (tess.length() >= 12) { tess = tess.substring(tess.length() - 12, tess.length()); } else { - tess = SpaziBianchi(tess, 12, false); + tess = Utils.spaziBianchi(tess, 12, false); } - String fa = "";//lblFascia.getText().replaceAll("Fascia","").trim(); - /*if(fa.length()>=13){ - fa=fa.substring(fa.length()-13, fa.length()); - }else{*/ - fa = SpaziBianchi(fa, 13, true); - //} + String fa = ""; + fa = Utils.spaziBianchi(fa, 13, true); + if (gratuita > 0) { - } else if (Bonus > 0) { + } else if (bonus > 0) { fa = "BONUS "; } - //Display("TESSERA " + tess + "FASCIA " + fa ,null); - //aggiornamento 14-01-2019 - //aggiornamento 12-04-2019 - //Display("TESSERA " + tess + " " + fa, null); - } - class MyCanvas extends JComponent { - private String texto=""; - public MyCanvas(String Testo){ - texto=Testo; - } - @Override - public void paintComponent(Graphics g) { - if (g instanceof Graphics2D) { - Graphics2D g2 = (Graphics2D) g; - g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, - RenderingHints.VALUE_ANTIALIAS_ON); - g2.drawString(texto, 70, 20); - } - } - } + }*/ + class CardTask extends TimerTask { @@ -6656,41 +4803,123 @@ public class PuntoCassa extends JFrame implements ActionListener { } public void run() { - //Date mo=new Date(); - //System.out.println(mo); - MyApplication MyA = new MyApplication(); + MyApplication myApp = new MyApplication(); try { - MyA.SC.setReader(jcmbSC.getSelectedItem()); - MyA.SC.connect("T=1"); - //System.out.println(MyA.SC.getCurrentCardATR()); - StatoCarta = statiCarta.Inserita; - if (pnlLogin.isVisible() == false && CartaLetta == false) { + myApp.smartCard.setReader(jcmbSC.getSelectedItem()); + myApp.smartCard.connect("T=1"); + statoCarta = StatiCarta.INSERITA; + if (pnlLogin.isVisible() == false && cartaLetta == false) { jBtnReadCardActionPerformed(null); - //btnImpostaClienteActionPerformed(null); - PassaggioTessera = true; - frmA.CercaTessera(); + passaggioTessera = true; + frmA.cercaTessera(); - CartaLetta = true; - } else if (pnlLogin.isVisible() == true && CartaLetta == false) { - frmA.ControllaLogInCarta(GetNumeroTessera()); + cartaLetta = true; + } else if (pnlLogin.isVisible() == true && cartaLetta == false) { + frmA.controllaLogInCarta(getNumeroTessera()); } - -// System.out.println(StatoCarta); } catch (Exception e) { - //JOptionPane.showMessageDialog(frmA, e.getMessage(),"Exception",JOptionPane.ERROR_MESSAGE); - if (StatoCarta == statiCarta.Inserita) { - StatoCarta = statiCarta.Tolta; + if (statoCarta == StatiCarta.INSERITA) { + statoCarta = StatiCarta.RIMOSSA; } else { - StatoCarta = statiCarta.Assente; + statoCarta = StatiCarta.ASSENTE; } - CartaLetta = false; - //System.out.println(StatoCarta); + cartaLetta = false; } } } + + // ========================================================================== + // *** Sottoclasse per la gestione degli eventi a timer + // ========================================================================== + public class timerDBConn extends java.util.TimerTask { + + // ======================================================================= + // ** Implementazione del riferimento alla classe contenitore + // ======================================================================= + private PuntoCassa pc; + Connection dbConnection; + + timerDBConn(PuntoCassa pc) { + this.pc = pc; + } + + PuntoCassa getPuntoCassa() { + return pc; + } + + // ======================================================================= + // ** Contiene il processo da eseguire in background + // ======================================================================= + public void run() { + + String sql; + Statement st = null; + ResultSet rs; + + // ==================================================================== + // * Se non c'è connessione al DB prova a connettersi + // ==================================================================== + try { + Class.forName(dbDriver); + + dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + } catch (Exception ex) { + this.pc.utenteLoggato = ""; + this.pc.lblStatoConnessione.setText("Errore di connessione al db"); + } + //} + + // ==================================================================== + // * Se c'e connessione + // ==================================================================== + // ----------------------------------------------------------------- + // *** Verifica lo stato di attivita della connessione + // ----------------------------------------------------------------- + if (dbTipo.equals("Oracle")) { + sql = "Select Valore as now from Parametri where chiave='UltimoAggTabelle'"; + } else { + sql = "SELECT now() AS now FROM dual"; + } + try { + + st = dbConnection.createStatement(); + rs = st.executeQuery(sql); + while (rs.next()) { + String strRiga = rs.getString("now"); + this.pc.lblStatoConnessione.setText(strRiga + " Vers. " + versione); + + } + + // -------------------------------------------------------------- + // ** Verifica se c'e un utente loggato + // -------------------------------------------------------------- + this.pc.pnlErrore.setVisible(false); + + // -------------------------------------------------------------- + // ** Verifica se c'e un utente loggato + // -------------------------------------------------------------- + if (this.pc.utenteLoggato.equals("")) { + this.pc.pnlLogin.setVisible(true); + } else { + this.pc.pnlLogin.setVisible(false); + } + + rs.close(); + st.close(); + dbConnection.close(); + + } catch (SQLException e) { + this.pc.pnlErrore.setVisible(true); + this.pc.lblMessaggioErrore.setText("Errore di connessione al database!");//Errore query " + sql); + } + + } + } + + // Variables declaration - do not modify//GEN-BEGIN:variables @@ -6705,8 +4934,6 @@ public class PuntoCassa extends JFrame implements ActionListener { private javax.swing.JButton jBtnStorno; private javax.swing.JButton jBtnprodotti; private javax.swing.JCheckBox jChLogin; - private javax.swing.JPanel jPanel1; - private javax.swing.JPanel jPanel2; private javax.swing.JToggleButton jTBP0; private javax.swing.JToggleButton jTBP1; private javax.swing.JToggleButton jTBP2; @@ -6767,6 +4994,8 @@ public class PuntoCassa extends JFrame implements ActionListener { protected javax.swing.JPanel pnlTop; private javax.swing.JScrollPane scpLista; private javax.swing.JScrollPane scpLista1; + private javax.swing.JPanel subPnlCliente; + private javax.swing.JPanel subPnlTessera; private javax.swing.JTable tblLista; private javax.swing.JTable tblLista1; private javax.swing.JPasswordField txtPassword; diff --git a/src/puntocassa/frmCerca.java b/src/puntocassa/frmCerca.java index 448f861..587fb20 100644 --- a/src/puntocassa/frmCerca.java +++ b/src/puntocassa/frmCerca.java @@ -9,7 +9,6 @@ package puntocassa; import java.awt.Color; import java.awt.Font; import java.awt.Image; -import java.awt.KeyboardFocusManager; import java.awt.Rectangle; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; @@ -25,12 +24,13 @@ import javax.swing.JTable; import javax.swing.JTextField; import javax.swing.ListSelectionModel; import javax.swing.table.TableColumn; +import puntocassa.utils.Utils; /** * * @author Marco */ -public class frmCerca extends javax.swing.JFrame { +public class FrmCerca extends javax.swing.JFrame { private PuntoCassa frmPuntoCassa; private JTextField jtxtTessera; @@ -46,11 +46,11 @@ private JTextField jtxtTessera; /** * Creates new form frm */ - public frmCerca(PuntoCassa frm,JTextField jtxtT,String imgPath,String BuoniPasto,Boolean flagMostraDataNascita) { + public FrmCerca(PuntoCassa frm,JTextField jtxtT,String imgPath,String BuoniPasto,Boolean flagMostraDataNascita) { BP=BuoniPasto; frmPuntoCassa=frm; frmPuntoCassa.setEnabled(false); - frmPuntoCassa.AddRemoveKeyDispatcher(false); + frmPuntoCassa.addRemoveKeyDispatcher(false); //KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(frmPuntoCassa.keyDispatcher); // FlagMostraDataNascita=flagMostraDataNascita; jtxtTessera=jtxtT; @@ -361,7 +361,7 @@ private JTextField jtxtTessera; if (DisabilitaPerBuono==false){ MyKeyBoard myk=new MyKeyBoard(this,true); myk.txt=jTxt; - myk.Parent=this; + myk.parent=this; Rectangle s=this.getBounds(); Rectangle s2=jTxt.getBounds(); Integer l=s.x+s2.x+MyX; @@ -429,7 +429,7 @@ private JTextField jtxtTessera; private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed try{ frmPuntoCassa.setEnabled(true); - frmPuntoCassa.AddRemoveKeyDispatcher(true); + frmPuntoCassa.addRemoveKeyDispatcher(true); //KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(frmPuntoCassa.keyDispatcher); frmPuntoCassa.toFront(); frmPuntoCassa.repaint(); @@ -446,7 +446,7 @@ private JTextField jtxtTessera; jtxtTessera.setText(nTessera); this.dispose(); - frmPuntoCassa.CercaTessera(); + frmPuntoCassa.cercaTessera(); } @@ -481,11 +481,11 @@ private JTextField jtxtTessera; }//GEN-LAST:event_jtxtNumTesseraMouseClicked private void Tastiera(java.awt.event.MouseEvent evt) { MyApplication MyA = new MyApplication(); - if (MyA.TastieraVideo) { - if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { - MyA.UltimoTxt = " "; + if (MyA.tastieraVideo) { + if (MyA.ultimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { + MyA.ultimoTxt = " "; } else { - MyA.UltimoTxt = evt.getComponent().toString(); + MyA.ultimoTxt = evt.getComponent().toString(); Tastiera((JTextField) evt.getComponent(), 0, 0); } } @@ -493,11 +493,11 @@ private JTextField jtxtTessera; //java.awt.event.FocusEvent private void Tastiera(java.awt.event.FocusEvent evt) { MyApplication MyA = new MyApplication(); - if (MyA.TastieraVideo) { - if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { - MyA.UltimoTxt = " "; + if (MyA.tastieraVideo) { + if (MyA.ultimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { + MyA.ultimoTxt = " "; } else { - MyA.UltimoTxt = evt.getComponent().toString(); + MyA.ultimoTxt = evt.getComponent().toString(); Tastiera((JTextField) evt.getComponent(), 0, 0); } } @@ -516,7 +516,7 @@ private JTextField jtxtTessera; // int[] cols=new int[1]; // cols[0]=7; // model.setColModificabile(cols); - int rowCount=Integer.parseInt(MyA.MySelect(frmPuntoCassa,QueryCount, "righe")); + int rowCount=Integer.parseInt(Utils.mySelect(QueryCount, "righe", frmPuntoCassa)); Object[][] data = RowData(Query, Colonne,ColType,rowCount); model.setData(data); @@ -708,20 +708,23 @@ private JTextField jtxtTessera; } } } catch (ClassNotFoundException ex) { - java.util.logging.Logger.getLogger(frmCerca.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmCerca.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { - java.util.logging.Logger.getLogger(frmCerca.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmCerca.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { - java.util.logging.Logger.getLogger(frmCerca.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmCerca.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { - java.util.logging.Logger.getLogger(frmCerca.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmCerca.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } // + // + // + // /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { - new frmCerca(null,null,null,null,true).setVisible(true); + new FrmCerca(null,null,null,null,true).setVisible(true); } }); } @@ -747,8 +750,8 @@ private JTextField jtxtTessera; private void CercaValoriDefault() { try { MyApplication MyA = new MyApplication(); - String txtbox = MyA.MySelect(frmPuntoCassa, "Select Valore from PARAMETRI where chiave='ImpostaTesseraCampo'", "Valore"); - String txtboxValore = MyA.MySelect(frmPuntoCassa, "Select Valore from PARAMETRI where chiave='ImpostaTesseraStringa'", "Valore"); + String txtbox = Utils.mySelect("Select Valore from PARAMETRI where chiave='ImpostaTesseraCampo'", "Valore", frmPuntoCassa); + String txtboxValore = Utils.mySelect("Select Valore from PARAMETRI where chiave='ImpostaTesseraStringa'", "Valore", frmPuntoCassa); if (txtbox.equalsIgnoreCase("COGNOME")) { jtxtCognome.requestFocus(); diff --git a/src/puntocassa/frmMeteo.java b/src/puntocassa/frmMeteo.java index 8ee4589..281f2d3 100644 --- a/src/puntocassa/frmMeteo.java +++ b/src/puntocassa/frmMeteo.java @@ -7,10 +7,7 @@ package puntocassa; import java.awt.Font; -import java.awt.KeyboardFocusManager; import java.awt.Rectangle; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; import java.io.File; import java.sql.Connection; import java.sql.DriverManager; @@ -19,7 +16,6 @@ import java.sql.SQLException; import java.sql.Statement; import java.text.SimpleDateFormat; import java.util.Date; -import java.util.Properties; import javax.swing.ImageIcon; import javax.swing.JComboBox; import javax.swing.JOptionPane; @@ -27,12 +23,13 @@ import javax.swing.JTable; import javax.swing.JTextField; import javax.swing.ListSelectionModel; import javax.swing.table.TableColumn; +import puntocassa.utils.Utils; /** * * @author Marco */ -public class frmMeteo extends javax.swing.JFrame { +public class FrmMeteo extends javax.swing.JFrame { private PuntoCassa frmPuntoCassa; private Long idPuntoCassa=0L; @@ -45,12 +42,12 @@ public class frmMeteo extends javax.swing.JFrame { /** * Creates new form frm */ - public frmMeteo(PuntoCassa frm, Long id_Punto_Cassa,Boolean Nuovo) { + public FrmMeteo(PuntoCassa frm, Long id_Punto_Cassa,Boolean Nuovo) { frmPuntoCassa=frm; frmPuntoCassa.setEnabled(false); //KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(frmPuntoCassa.keyDispatcher); - frmPuntoCassa.AddRemoveKeyDispatcher(false); + frmPuntoCassa.addRemoveKeyDispatcher(false); idPuntoCassa=id_Punto_Cassa; Inserimento=Nuovo; initComponents(); @@ -144,7 +141,7 @@ public class frmMeteo extends javax.swing.JFrame { MyKeyBoard myk=new MyKeyBoard(this,false); myk.txt=jTxt; - myk.Parent=this; + myk.parent=this; Rectangle s=this.getBounds(); Rectangle s2=jTxt.getBounds(); Integer l=s.x+s2.x+MyX; @@ -157,7 +154,7 @@ public class frmMeteo extends javax.swing.JFrame { try { frmPuntoCassa.setEnabled(true); //KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(frmPuntoCassa.keyDispatcher); - frmPuntoCassa.AddRemoveKeyDispatcher(true); + frmPuntoCassa.addRemoveKeyDispatcher(true); frmPuntoCassa.toFront(); frmPuntoCassa.repaint(); @@ -216,7 +213,7 @@ public class frmMeteo extends javax.swing.JFrame { // int[] cols=new int[1]; // cols[0]=7; // model.setColModificabile(cols); - int rowCount=Integer.parseInt(MyA.MySelect(frmPuntoCassa,QueryCount, "righe")); + int rowCount=Integer.parseInt(Utils.mySelect(QueryCount, "righe", frmPuntoCassa)); Object[][] data = RowData(Query, Colonne,ColType,rowCount); model.setData(data); @@ -355,20 +352,21 @@ public class frmMeteo extends javax.swing.JFrame { } } } catch (ClassNotFoundException ex) { - java.util.logging.Logger.getLogger(frmMeteo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmMeteo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { - java.util.logging.Logger.getLogger(frmMeteo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmMeteo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { - java.util.logging.Logger.getLogger(frmMeteo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmMeteo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { - java.util.logging.Logger.getLogger(frmMeteo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmMeteo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } // + // /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { - new frmMeteo(null,0L,true).setVisible(true); + new FrmMeteo(null,0L,true).setVisible(true); } }); } diff --git a/src/puntocassa/frmMovimenti.java b/src/puntocassa/frmMovimenti.java index 3881ffc..502830d 100644 --- a/src/puntocassa/frmMovimenti.java +++ b/src/puntocassa/frmMovimenti.java @@ -8,10 +8,7 @@ package puntocassa; import java.awt.Font; import java.awt.Image; -import java.awt.KeyboardFocusManager; import java.awt.Rectangle; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; import java.io.File; import java.sql.Connection; import java.sql.DriverManager; @@ -24,12 +21,13 @@ import javax.swing.JTable; import javax.swing.JTextField; import javax.swing.ListSelectionModel; import javax.swing.table.TableColumn; +import puntocassa.utils.Utils; /** * * @author Marco */ -public class frmMovimenti extends javax.swing.JFrame { +public class FrmMovimenti extends javax.swing.JFrame { private PuntoCassa frmPuntoCassa; private Long idTessera=0L,idPuntoCassa=0L; @@ -42,12 +40,12 @@ public class frmMovimenti extends javax.swing.JFrame { /** * Creates new form frm */ - public frmMovimenti(PuntoCassa frm,Long IDTessera,Long IDPuntoCassa,String imgPath) { + public FrmMovimenti(PuntoCassa frm,Long IDTessera,Long IDPuntoCassa,String imgPath) { frmPuntoCassa=frm; frmPuntoCassa.setEnabled(false); //KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(frmPuntoCassa.keyDispatcher); - frmPuntoCassa.AddRemoveKeyDispatcher(false); + frmPuntoCassa.addRemoveKeyDispatcher(false); idPuntoCassa=IDPuntoCassa; idTessera=IDTessera; @@ -218,7 +216,7 @@ public class frmMovimenti extends javax.swing.JFrame { MyKeyBoard myk=new MyKeyBoard(this,false); myk.txt=jTxt; - myk.Parent=this; + myk.parent=this; Rectangle s=this.getBounds(); Rectangle s2=jTxt.getBounds(); Integer l=s.x+s2.x+MyX; @@ -231,7 +229,7 @@ public class frmMovimenti extends javax.swing.JFrame { try{ frmPuntoCassa.setEnabled(true); //KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(frmPuntoCassa.keyDispatcher); - frmPuntoCassa.AddRemoveKeyDispatcher(true); + frmPuntoCassa.addRemoveKeyDispatcher(true); frmPuntoCassa.toFront(); frmPuntoCassa.repaint(); frmPuntoCassa=null; @@ -285,7 +283,7 @@ public class frmMovimenti extends javax.swing.JFrame { // int[] cols=new int[1]; // cols[0]=7; // model.setColModificabile(cols); - int rowCount=Integer.parseInt(MyA.MySelect(frmPuntoCassa,QueryCount, "righe")); + int rowCount=Integer.parseInt(Utils.mySelect(QueryCount, "righe", frmPuntoCassa)); Object[][] data = RowData(Query, Colonne,ColType,rowCount); model.setData(data); @@ -485,21 +483,23 @@ public class frmMovimenti extends javax.swing.JFrame { } } } catch (ClassNotFoundException ex) { - java.util.logging.Logger.getLogger(frmMovimenti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmMovimenti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { - java.util.logging.Logger.getLogger(frmMovimenti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmMovimenti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { - java.util.logging.Logger.getLogger(frmMovimenti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmMovimenti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { - java.util.logging.Logger.getLogger(frmMovimenti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmMovimenti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } // // + // + // /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { - new frmMovimenti(null,0L,0L,null).setVisible(true); + new FrmMovimenti(null,0L,0L,null).setVisible(true); } }); } diff --git a/src/puntocassa/frmProdotti.java b/src/puntocassa/frmProdotti.java index 72b307f..e46da25 100644 --- a/src/puntocassa/frmProdotti.java +++ b/src/puntocassa/frmProdotti.java @@ -8,7 +8,6 @@ package puntocassa; import java.awt.Font; import java.awt.Image; -import java.awt.KeyboardFocusManager; import java.awt.Rectangle; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; @@ -18,7 +17,6 @@ import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import java.util.Properties; import javax.swing.ImageIcon; import javax.swing.JComboBox; import javax.swing.JOptionPane; @@ -26,12 +24,13 @@ import javax.swing.JTable; import javax.swing.JTextField; import javax.swing.ListSelectionModel; import javax.swing.table.TableColumn; +import puntocassa.utils.Utils; /** * * @author Marco */ -public class frmProdotti extends javax.swing.JFrame { +public class FrmProdotti extends javax.swing.JFrame { private PuntoCassa frmPuntoCassa; @@ -44,12 +43,12 @@ private PuntoCassa frmPuntoCassa; /** * Creates new form frm */ - public frmProdotti(PuntoCassa frm,String imgPath) { + public FrmProdotti(PuntoCassa frm,String imgPath) { frmPuntoCassa=frm; frmPuntoCassa.setEnabled(false); //KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(frmPuntoCassa.keyDispatcher); - frmPuntoCassa.AddRemoveKeyDispatcher(false); + frmPuntoCassa.addRemoveKeyDispatcher(false); initComponents(); String startDir = System.getProperty("user.dir"); @@ -246,10 +245,10 @@ private PuntoCassa frmPuntoCassa; .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jbtnAnnulla2, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) - .addGroup(pnl1Layout.createSequentialGroup() + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() .addComponent(jLblTitolo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(8, 8, 8)) - .addGroup(pnl1Layout.createSequentialGroup() + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(pnl1Layout.createSequentialGroup() .addComponent(jbtnAggiungi, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE) @@ -264,7 +263,7 @@ private PuntoCassa frmPuntoCassa; ); pnl1Layout.setVerticalGroup( pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(pnl1Layout.createSequentialGroup() + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() .addComponent(jLblTitolo, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -300,7 +299,7 @@ private PuntoCassa frmPuntoCassa; getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() .addComponent(pnl1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); @@ -323,7 +322,7 @@ private PuntoCassa frmPuntoCassa; MyKeyBoard myk=new MyKeyBoard(this,false); myk.txt=jTxt; - myk.Parent=this; + myk.parent=this; Rectangle s=this.getBounds(); Rectangle s2=jTxt.getBounds(); Integer l=s.x+s2.x+MyX; @@ -336,7 +335,7 @@ private PuntoCassa frmPuntoCassa; try{ frmPuntoCassa.setEnabled(true); //KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(frmPuntoCassa.keyDispatcher); - frmPuntoCassa.AddRemoveKeyDispatcher(true); + frmPuntoCassa.addRemoveKeyDispatcher(true); frmPuntoCassa.toFront(); frmPuntoCassa.repaint(); frmPuntoCassa=null; @@ -350,8 +349,8 @@ private PuntoCassa frmPuntoCassa; Long cod = 0L; if (jTblProdotti.getSelectedRow() >= 0) { cod = Long.parseLong(model.getValueAt(jTblProdotti.getSelectedRow(), 0).toString()); - Boolean esiste = Boolean.parseBoolean(model.getValueAt(jTblProdotti.getSelectedRow(), 4).toString()); - if (esiste == false) { + Boolean presente = Boolean.parseBoolean(model.getValueAt(jTblProdotti.getSelectedRow(), 4).toString()); + if (presente == false) { MyInsert("Insert into Catalogo_punti_cassa (id,id_prodotto,id_punto_cassa,flag_locale) values(-1," + cod + "," + frmPuntoCassa.idPuntoCassa + ",1)"); frmPuntoCassa.caricaDati("PRODOTTI", "-1"); this.dispose(); @@ -442,8 +441,8 @@ private PuntoCassa frmPuntoCassa; Long cod = 0L; if (jTblProdotti.getSelectedRow() >= 0) { cod = Long.parseLong(model.getValueAt(jTblProdotti.getSelectedRow(), 0).toString()); - Boolean esiste = Boolean.parseBoolean(model.getValueAt(jTblProdotti.getSelectedRow(), 4).toString()); - if (esiste) { + Boolean presente = Boolean.parseBoolean(model.getValueAt(jTblProdotti.getSelectedRow(), 4).toString()); + if (presente) { MyInsert("Delete Catalogo_punti_cassa where id_prodotto=" + cod + " and id_punto_cassa=" + frmPuntoCassa.idPuntoCassa); frmPuntoCassa.caricaDati("PRODOTTI", "-1"); this.dispose(); @@ -453,11 +452,11 @@ private PuntoCassa frmPuntoCassa; }//GEN-LAST:event_jbtnEliminaActionPerformed private void Tastiera(java.awt.event.MouseEvent evt) { MyApplication MyA = new MyApplication(); - if (MyA.TastieraVideo) { - if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { - MyA.UltimoTxt = " "; + if (MyA.tastieraVideo) { + if (MyA.ultimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { + MyA.ultimoTxt = " "; } else { - MyA.UltimoTxt = evt.getComponent().toString(); + MyA.ultimoTxt = evt.getComponent().toString(); Tastiera((JTextField) evt.getComponent(), 0, 0); } } @@ -465,11 +464,11 @@ private PuntoCassa frmPuntoCassa; //java.awt.event.FocusEvent private void Tastiera(java.awt.event.FocusEvent evt) { MyApplication MyA = new MyApplication(); - if (MyA.TastieraVideo) { - if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { - MyA.UltimoTxt = " "; + if (MyA.tastieraVideo) { + if (MyA.ultimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { + MyA.ultimoTxt = " "; } else { - MyA.UltimoTxt = evt.getComponent().toString(); + MyA.ultimoTxt = evt.getComponent().toString(); Tastiera((JTextField) evt.getComponent(), 0, 0); } } @@ -487,7 +486,7 @@ private PuntoCassa frmPuntoCassa; // int[] cols=new int[1]; // cols[0]=7; // model.setColModificabile(cols); - int rowCount=Integer.parseInt(MyA.MySelect(frmPuntoCassa,QueryCount, "righe")); + int rowCount=Integer.parseInt(Utils.mySelect(QueryCount, "righe", frmPuntoCassa)); Object[][] data = RowData(Query, Colonne,ColType,rowCount); model.setData(data); @@ -679,20 +678,21 @@ private PuntoCassa frmPuntoCassa; } } } catch (ClassNotFoundException ex) { - java.util.logging.Logger.getLogger(frmProdotti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmProdotti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { - java.util.logging.Logger.getLogger(frmProdotti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmProdotti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { - java.util.logging.Logger.getLogger(frmProdotti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmProdotti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { - java.util.logging.Logger.getLogger(frmProdotti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmProdotti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } // + // /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { - new frmProdotti(null,null).setVisible(true); + new FrmProdotti(null,null).setVisible(true); } }); } diff --git a/src/puntocassa/frmProgress.form b/src/puntocassa/frmProgress.form index fec8c73..47b28f4 100644 --- a/src/puntocassa/frmProgress.form +++ b/src/puntocassa/frmProgress.form @@ -5,7 +5,7 @@ - + diff --git a/src/puntocassa/frmProgress.java b/src/puntocassa/frmProgress.java index 9734297..954d476 100644 --- a/src/puntocassa/frmProgress.java +++ b/src/puntocassa/frmProgress.java @@ -6,40 +6,21 @@ package puntocassa; -import java.awt.Font; -import java.awt.KeyboardFocusManager; -import java.awt.Rectangle; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; import java.io.File; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Properties; import javax.swing.ImageIcon; -import javax.swing.JComboBox; -import javax.swing.JOptionPane; -import javax.swing.JTable; -import javax.swing.JTextField; -import javax.swing.ListSelectionModel; -import javax.swing.table.TableColumn; /** * * @author Marco */ -public class frmProgress extends javax.swing.JFrame { +public class FrmProgress extends javax.swing.JFrame { private PuntoCassa frmPuntoCassa; /** * Creates new form frm */ - public frmProgress(PuntoCassa frm) { + public FrmProgress(PuntoCassa frm) { frmPuntoCassa=frm; initComponents(); String startDir = System.getProperty("user.dir"); @@ -136,20 +117,21 @@ public class frmProgress extends javax.swing.JFrame { } } } catch (ClassNotFoundException ex) { - java.util.logging.Logger.getLogger(frmProgress.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmProgress.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { - java.util.logging.Logger.getLogger(frmProgress.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmProgress.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { - java.util.logging.Logger.getLogger(frmProgress.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmProgress.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { - java.util.logging.Logger.getLogger(frmProgress.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmProgress.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } // + // /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { - new frmProgress(null).setVisible(true); + new FrmProgress(null).setVisible(true); } }); } diff --git a/src/puntocassa/frmStorno.java b/src/puntocassa/frmStorno.java index 74ff2b5..28640eb 100644 --- a/src/puntocassa/frmStorno.java +++ b/src/puntocassa/frmStorno.java @@ -8,10 +8,7 @@ package puntocassa; import java.awt.Font; import java.awt.Image; -import java.awt.KeyboardFocusManager; import java.awt.Rectangle; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; import java.io.File; import java.sql.Connection; import java.sql.DriverManager; @@ -24,12 +21,13 @@ import javax.swing.JTable; import javax.swing.JTextField; import javax.swing.ListSelectionModel; import javax.swing.table.TableColumn; +import puntocassa.utils.Utils; /** * * @author Marco */ -public class frmStorno extends javax.swing.JFrame { +public class FrmStorno extends javax.swing.JFrame { private PuntoCassa frmPuntoCassa; private Long idTessera=0L,idPuntoCassa=0L; @@ -43,12 +41,12 @@ public class frmStorno extends javax.swing.JFrame { /** * Creates new form frm */ - public frmStorno(PuntoCassa frm,Long IDTessera,Long IDPuntoCassa,String imgPath,Boolean azzera) { + public FrmStorno(PuntoCassa frm,Long IDTessera,Long IDPuntoCassa,String imgPath,Boolean azzera) { frmPuntoCassa=frm; frmPuntoCassa.setEnabled(false); //KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(frmPuntoCassa.keyDispatcher); - frmPuntoCassa.AddRemoveKeyDispatcher(false); + frmPuntoCassa.addRemoveKeyDispatcher(false); idPuntoCassa=IDPuntoCassa; idTessera=IDTessera; @@ -234,7 +232,7 @@ public class frmStorno extends javax.swing.JFrame { MyKeyBoard myk=new MyKeyBoard(this,false); myk.txt=jTxt; - myk.Parent=this; + myk.parent=this; Rectangle s=this.getBounds(); Rectangle s2=jTxt.getBounds(); Integer l=s.x+s2.x+MyX; @@ -248,11 +246,11 @@ public class frmStorno extends javax.swing.JFrame { frmPuntoCassa.setEnabled(true); //KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(frmPuntoCassa.keyDispatcher); - frmPuntoCassa.AddRemoveKeyDispatcher(true); + frmPuntoCassa.addRemoveKeyDispatcher(true); frmPuntoCassa.toFront(); frmPuntoCassa.repaint(); if (Azzera && StornoEffettuato==false){ - frmPuntoCassa.AzzeraDopoStorno(); + frmPuntoCassa.azzeraDopoStorno(); } frmPuntoCassa=null; @@ -284,7 +282,7 @@ public class frmStorno extends javax.swing.JFrame { // frmPuntoCassa.AzzeraDopoStorno(); }else { - frmPuntoCassa.AggiornaProgressivi(); + frmPuntoCassa.aggiornaProgressivi(); } //frmPuntoCassa.CercaTessera(); this.dispose(); @@ -338,7 +336,7 @@ public class frmStorno extends javax.swing.JFrame { // int[] cols=new int[1]; // cols[0]=7; // model.setColModificabile(cols); - int rowCount=Integer.parseInt(MyA.MySelect(frmPuntoCassa,QueryCount, "righe")); + int rowCount=Integer.parseInt(Utils.mySelect(QueryCount, "righe", frmPuntoCassa)); Object[][] data = RowData(Query, Colonne,ColType,rowCount); model.setData(data); @@ -556,20 +554,21 @@ public class frmStorno extends javax.swing.JFrame { } } } catch (ClassNotFoundException ex) { - java.util.logging.Logger.getLogger(frmStorno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmStorno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { - java.util.logging.Logger.getLogger(frmStorno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmStorno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { - java.util.logging.Logger.getLogger(frmStorno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmStorno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { - java.util.logging.Logger.getLogger(frmStorno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(FrmStorno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } // + // /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { - new frmStorno(null,0L,0L,null,false).setVisible(true); + new FrmStorno(null,0L,0L,null,false).setVisible(true); } }); } diff --git a/src/puntocassa/utils/Utils.java b/src/puntocassa/utils/Utils.java new file mode 100644 index 0000000..89b90ff --- /dev/null +++ b/src/puntocassa/utils/Utils.java @@ -0,0 +1,139 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package puntocassa.utils; + +import java.sql.*; +import javax.swing.JOptionPane; +import puntocassa.PuntoCassa; + +/** + * + * @author Francesco DS + */ +public class Utils { + + public static boolean isNumeric(String s) { + return s.matches("[-+]?\\d*\\.?\\d+"); + } + + + public static String mySelect(String query, String campo, PuntoCassa puntoCassa) { + String res = ""; + try { + Connection dbConnection = DriverManager.getConnection(puntoCassa.dbStringa, puntoCassa.dbUsername, puntoCassa.dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(query); + while (rs.next()) { + + res = rs.getString(campo); + } + rs.close(); + st.close(); + dbConnection.close(); + } catch (SQLException e) { + JOptionPane.showMessageDialog(puntoCassa, "Errore MySelect ['" + e.getMessage() + " " + query + "']"); + + } + if (res == null) { + res = ""; + } + return res; + } + + public static Boolean myInsert(String query, PuntoCassa puntoCassa) { + //System.out.println(query); + Boolean res = false; + try { + Connection dbConnection = DriverManager.getConnection(puntoCassa.dbStringa, puntoCassa.dbUsername, puntoCassa.dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(query); + rs.close(); + st.close(); + dbConnection.close(); + res = true; + } catch (Exception e) { + JOptionPane.showMessageDialog(puntoCassa, "Errore MySelect ['" + e.getMessage() + " " + query + "']"); + + } + return res; + } + + public static Long mySelectInteger(String query, String campo, PuntoCassa puntoCassa) { + System.out.println(query); + Long res = 0L; + try { + Connection dbConnection = DriverManager.getConnection(puntoCassa.dbStringa, puntoCassa.dbUsername, puntoCassa.dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(query); + while (rs.next()) { + + res = rs.getLong(campo); + } + rs.close(); + st.close(); + dbConnection.close(); + } catch (SQLException e) { + JOptionPane.showMessageDialog(puntoCassa, "Errore MySelectInteger ['" + e.getMessage() + " " + query + "']"); + + } + + return res; + } + + + public static String spaziBianchi(String testo, Integer Num, Boolean suffisso) { + String res = testo; + StringBuilder suff = new StringBuilder(); + if (testo.length() < Num) { + Integer delta = Num - testo.length(); + for (Integer i = 0; i < delta; i++) { + suff.append(" "); + } + if (suffisso == false) { + res = suff.toString() + testo; + } else { + res = testo + suff.toString(); + } + + } + return res; + } + + public static String trovaScadenza(String testo) { + String scadenza = ""; + String tag = "#"; + Integer pi = testo.lastIndexOf(tag); + if (pi > 0) { + scadenza = testo.substring(pi - 9, pi - 1); + } + + return scadenza; + } + + public static String luhn(String dati) { + + Integer s = 0; + for (Integer i = 0; i < dati.length(); i++) { + Integer d = Integer.valueOf(dati.substring(i, i + 1)); + if (i % 2 == 0) { + Integer doppio = d * 2; + if (doppio >= 10) { + doppio = 1 + (doppio % 10); + } + s = s + doppio; + } else { + s = s + d; + } + } + Integer resto = s % 10; + if (resto == 0) { + return "0"; + } else { + Integer ris = 10 - resto; + return "" + ris; + } + + } +}