Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

add files

  • Loading branch information...
commit 62f3e6bb278d37d8b65dedd179e4407b3ae728c9 0 parents
tianyawang authored

Showing 152 changed files with 52,543 additions and 0 deletions. Show diff stats Hide diff stats

  1. +22 0 .gitattributes
  2. +163 0 .gitignore
  3. +66 0 GSReport/BLReport/BLReport.csproj
  4. +261 0 GSReport/BLReport/BLReports.cs
  5. +68 0 GSReport/BLReport/BLStation.cs
  6. +58 0 GSReport/BLReport/BLUser.cs
  7. +36 0 GSReport/BLReport/Properties/AssemblyInfo.cs
  8. +67 0 GSReport/DAReport/DAReport.csproj
  9. +943 0 GSReport/DAReport/DAReports.cs
  10. +292 0 GSReport/DAReport/DAStation.cs
  11. +274 0 GSReport/DAReport/DAUser.cs
  12. +38 0 GSReport/DAReport/DAWorkLog.cs
  13. +1,476 0 GSReport/DAReport/DBUtility/SQLHelper.cs
  14. +55 0 GSReport/DAReport/DBUtility/SqlDataReaderExtensions.cs
  15. +30 0 GSReport/DAReport/Encrypt.cs
  16. +36 0 GSReport/DAReport/Properties/AssemblyInfo.cs
  17. +38 0 GSReport/GSReport.sln
  18. +3 0  GSReport/Report/Content/Data/Files/readme.txt
  19. +3 0  GSReport/Report/Content/Data/MathImage/readme.txt
  20. BIN  GSReport/Report/Content/Data/MathImage/sqrt2
  21. +3 0  GSReport/Report/Content/Data/ZipFile/readme.txt
  22. +345 0 GSReport/Report/Content/Site.css
  23. BIN  GSReport/Report/Content/images/ui-bg_diagonals-thick_18_b81900_40x40.png
  24. BIN  GSReport/Report/Content/images/ui-bg_diagonals-thick_20_666666_40x40.png
  25. BIN  GSReport/Report/Content/images/ui-bg_flat_10_000000_40x100.png
  26. BIN  GSReport/Report/Content/images/ui-bg_glass_100_f6f6f6_1x400.png
  27. BIN  GSReport/Report/Content/images/ui-bg_glass_100_fdf5ce_1x400.png
  28. BIN  GSReport/Report/Content/images/ui-bg_glass_65_ffffff_1x400.png
  29. BIN  GSReport/Report/Content/images/ui-bg_gloss-wave_35_f6a828_500x100.png
  30. BIN  GSReport/Report/Content/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
  31. BIN  GSReport/Report/Content/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
  32. BIN  GSReport/Report/Content/images/ui-icons_222222_256x240.png
  33. BIN  GSReport/Report/Content/images/ui-icons_228ef1_256x240.png
  34. BIN  GSReport/Report/Content/images/ui-icons_ef8c08_256x240.png
  35. BIN  GSReport/Report/Content/images/ui-icons_ffd27a_256x240.png
  36. BIN  GSReport/Report/Content/images/ui-icons_ffffff_256x240.png
  37. +357 0 GSReport/Report/Content/jquery-ui-1.8.16.custom.css
  38. BIN  GSReport/Report/Content/style/bar.gif
  39. BIN  GSReport/Report/Content/style/btn_40.gif
  40. BIN  GSReport/Report/Content/style/logo_big.gif
  41. BIN  GSReport/Report/Content/style/logo_small.gif
  42. BIN  GSReport/Report/Content/style/nav_right.gif
  43. BIN  GSReport/Report/Content/style/noimage.gif
  44. +105 0 GSReport/Report/Content/style/style.css
  45. +226 0 GSReport/Report/Content/style/syntaxhighlighter/shCore.css
  46. +330 0 GSReport/Report/Content/style/syntaxhighlighter/shCoreDefault.css
  47. +331 0 GSReport/Report/Content/style/syntaxhighlighter/shCoreDjango.css
  48. +339 0 GSReport/Report/Content/style/syntaxhighlighter/shCoreEclipse.css
  49. +324 0 GSReport/Report/Content/style/syntaxhighlighter/shCoreEmacs.css
  50. +328 0 GSReport/Report/Content/style/syntaxhighlighter/shCoreFadeToGrey.css
  51. +324 0 GSReport/Report/Content/style/syntaxhighlighter/shCoreMDUltra.css
  52. +324 0 GSReport/Report/Content/style/syntaxhighlighter/shCoreMidnight.css
  53. +324 0 GSReport/Report/Content/style/syntaxhighlighter/shCoreRDark.css
  54. +117 0 GSReport/Report/Content/style/syntaxhighlighter/shThemeDefault.css
  55. +120 0 GSReport/Report/Content/style/syntaxhighlighter/shThemeDjango.css
  56. +128 0 GSReport/Report/Content/style/syntaxhighlighter/shThemeEclipse.css
  57. +113 0 GSReport/Report/Content/style/syntaxhighlighter/shThemeEmacs.css
  58. +117 0 GSReport/Report/Content/style/syntaxhighlighter/shThemeFadeToGrey.css
  59. +113 0 GSReport/Report/Content/style/syntaxhighlighter/shThemeMDUltra.css
  60. +113 0 GSReport/Report/Content/style/syntaxhighlighter/shThemeMidnight.css
  61. +113 0 GSReport/Report/Content/style/syntaxhighlighter/shThemeRDark.css
  62. BIN  GSReport/Report/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png
  63. BIN  GSReport/Report/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png
  64. BIN  GSReport/Report/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png
  65. BIN  GSReport/Report/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png
  66. BIN  GSReport/Report/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png
  67. BIN  GSReport/Report/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png
  68. BIN  GSReport/Report/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png
  69. BIN  GSReport/Report/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png
  70. BIN  GSReport/Report/Content/themes/base/images/ui-icons_222222_256x240.png
  71. BIN  GSReport/Report/Content/themes/base/images/ui-icons_2e83ff_256x240.png
  72. BIN  GSReport/Report/Content/themes/base/images/ui-icons_454545_256x240.png
  73. BIN  GSReport/Report/Content/themes/base/images/ui-icons_888888_256x240.png
  74. BIN  GSReport/Report/Content/themes/base/images/ui-icons_cd0a0a_256x240.png
  75. +635 0 GSReport/Report/Content/themes/base/jquery-ui.css
  76. +127 0 GSReport/Report/Controllers/AccountController.cs
  77. +28 0 GSReport/Report/Controllers/HomeController.cs
  78. +171 0 GSReport/Report/Controllers/ReportController.cs
  79. +78 0 GSReport/Report/Controllers/StationController.cs
  80. +66 0 GSReport/Report/Controllers/UserController.cs
  81. +1 0  GSReport/Report/Global.asax
  82. +40 0 GSReport/Report/Global.asax.cs
  83. +280 0 GSReport/Report/Models/AccountModels.cs
  84. +35 0 GSReport/Report/Models/CurrentUserModel.cs
  85. +35 0 GSReport/Report/Properties/AssemblyInfo.cs
  86. +234 0 GSReport/Report/Report.csproj
  87. +7,117 0 GSReport/Report/Scripts/MicrosoftAjax.debug.js
  88. +6 0 GSReport/Report/Scripts/MicrosoftAjax.js
  89. +408 0 GSReport/Report/Scripts/MicrosoftMvcAjax.debug.js
  90. +25 0 GSReport/Report/Scripts/MicrosoftMvcAjax.js
  91. +883 0 GSReport/Report/Scripts/MicrosoftMvcValidation.debug.js
  92. +55 0 GSReport/Report/Scripts/MicrosoftMvcValidation.js
  93. +9,035 0 GSReport/Report/Scripts/jquery-1.4.4-vsdoc.js
  94. +7,177 0 GSReport/Report/Scripts/jquery-1.4.4.js
  95. +171 0 GSReport/Report/Scripts/jquery-1.4.4.min.js
  96. +11,630 0 GSReport/Report/Scripts/jquery-ui.js
  97. +409 0 GSReport/Report/Scripts/jquery-ui.min.js
  98. +165 0 GSReport/Report/Scripts/jquery.unobtrusive-ajax.js
  99. +5 0 GSReport/Report/Scripts/jquery.unobtrusive-ajax.min.js
  100. +1,286 0 GSReport/Report/Scripts/jquery.validate-vsdoc.js
  101. +1,150 0 GSReport/Report/Scripts/jquery.validate.js
  102. +20 0 GSReport/Report/Scripts/jquery.validate.min.js
  103. +319 0 GSReport/Report/Scripts/jquery.validate.unobtrusive.js
  104. +5 0 GSReport/Report/Scripts/jquery.validate.unobtrusive.min.js
  105. +55 0 GSReport/Report/Views/Account/ChangePassword.aspx
  106. +12 0 GSReport/Report/Views/Account/ChangePasswordSuccess.aspx
  107. +19 0 GSReport/Report/Views/Account/LogOn.aspx
  108. +63 0 GSReport/Report/Views/Account/Register.aspx
  109. +12 0 GSReport/Report/Views/Home/About.aspx
  110. +5 0 GSReport/Report/Views/Home/Index.aspx
  111. +54 0 GSReport/Report/Views/Report/DailyAmountReport.aspx
  112. +86 0 GSReport/Report/Views/Report/DailyCardReport.aspx
  113. +62 0 GSReport/Report/Views/Report/ShortOver.aspx
  114. +43 0 GSReport/Report/Views/Report/SpiltBill.aspx
  115. +89 0 GSReport/Report/Views/Report/TrafficReport.aspx
  116. +79 0 GSReport/Report/Views/Report/Truck5Report.aspx
  117. +79 0 GSReport/Report/Views/Report/Truck6Report.aspx
  118. +213 0 GSReport/Report/Views/Report/chargedepartmentReport.aspx
  119. +115 0 GSReport/Report/Views/Report/stationReport.aspx
  120. +11 0 GSReport/Report/Views/Shared/Error.aspx
  121. +14 0 GSReport/Report/Views/Shared/LogOnUserControl.ascx
  122. +45 0 GSReport/Report/Views/Shared/Reports.Master
  123. +66 0 GSReport/Report/Views/Shared/Site.Master
  124. +25 0 GSReport/Report/Views/Station/Add.aspx
  125. +26 0 GSReport/Report/Views/Station/AddClass.aspx
  126. +32 0 GSReport/Report/Views/Station/CollectionClasses.aspx
  127. +26 0 GSReport/Report/Views/Station/Details.aspx
  128. +29 0 GSReport/Report/Views/Station/Index.aspx
  129. +43 0 GSReport/Report/Views/User/Add.aspx
  130. +46 0 GSReport/Report/Views/User/Details.aspx
  131. +33 0 GSReport/Report/Views/User/Index.aspx
  132. +58 0 GSReport/Report/Views/Web.config
  133. +30 0 GSReport/Report/Web.Debug.config
  134. +31 0 GSReport/Report/Web.Release.config
  135. +91 0 GSReport/Report/Web.config
  136. +19 0 GSReport/ReportModel/CollectionClassModel.cs
  137. +55 0 GSReport/ReportModel/Common/Encryptor.cs
  138. +66 0 GSReport/ReportModel/Common/EntityInfo.cs
  139. +90 0 GSReport/ReportModel/Common/UtilityHelper.cs
  140. +70 0 GSReport/ReportModel/DailyAmountReport.cs
  141. +48 0 GSReport/ReportModel/DailyCardReport.cs
  142. +18 0 GSReport/ReportModel/MonthAmountReport.cs
  143. +36 0 GSReport/ReportModel/Properties/AssemblyInfo.cs
  144. +69 0 GSReport/ReportModel/ReportModel.csproj
  145. +28 0 GSReport/ReportModel/ShortOverReport.cs
  146. +21 0 GSReport/ReportModel/SplitBillReport.cs
  147. +14 0 GSReport/ReportModel/StationModel.cs
  148. +121 0 GSReport/ReportModel/TrafficeFlowReport.cs
  149. +58 0 GSReport/ReportModel/Truck5ReportModel.cs
  150. +57 0 GSReport/ReportModel/Truck6ReportModel.cs
  151. +37 0 GSReport/ReportModel/UserModel.cs
  152. +25 0 GSReport/ReportModel/WorkLog.cs
22 .gitattributes
... ... @@ -0,0 +1,22 @@
  1 +# Auto detect text files and perform LF normalization
  2 +* text=auto
  3 +
  4 +# Custom for Visual Studio
  5 +*.cs diff=csharp
  6 +*.sln merge=union
  7 +*.csproj merge=union
  8 +*.vbproj merge=union
  9 +*.fsproj merge=union
  10 +*.dbproj merge=union
  11 +
  12 +# Standard to msysgit
  13 +*.doc diff=astextplain
  14 +*.DOC diff=astextplain
  15 +*.docx diff=astextplain
  16 +*.DOCX diff=astextplain
  17 +*.dot diff=astextplain
  18 +*.DOT diff=astextplain
  19 +*.pdf diff=astextplain
  20 +*.PDF diff=astextplain
  21 +*.rtf diff=astextplain
  22 +*.RTF diff=astextplain
163 .gitignore
... ... @@ -0,0 +1,163 @@
  1 +#################
  2 +## Eclipse
  3 +#################
  4 +
  5 +*.pydevproject
  6 +.project
  7 +.metadata
  8 +bin/
  9 +tmp/
  10 +*.tmp
  11 +*.bak
  12 +*.swp
  13 +*~.nib
  14 +local.properties
  15 +.classpath
  16 +.settings/
  17 +.loadpath
  18 +
  19 +# External tool builders
  20 +.externalToolBuilders/
  21 +
  22 +# Locally stored "Eclipse launch configurations"
  23 +*.launch
  24 +
  25 +# CDT-specific
  26 +.cproject
  27 +
  28 +# PDT-specific
  29 +.buildpath
  30 +
  31 +
  32 +#################
  33 +## Visual Studio
  34 +#################
  35 +
  36 +## Ignore Visual Studio temporary files, build results, and
  37 +## files generated by popular Visual Studio add-ons.
  38 +
  39 +# User-specific files
  40 +*.suo
  41 +*.user
  42 +*.sln.docstates
  43 +
  44 +# Build results
  45 +[Dd]ebug/
  46 +[Rr]elease/
  47 +*_i.c
  48 +*_p.c
  49 +*.ilk
  50 +*.meta
  51 +*.obj
  52 +*.pch
  53 +*.pdb
  54 +*.pgc
  55 +*.pgd
  56 +*.rsp
  57 +*.sbr
  58 +*.tlb
  59 +*.tli
  60 +*.tlh
  61 +*.tmp
  62 +*.vspscc
  63 +.builds
  64 +*.dotCover
  65 +
  66 +## TODO: If you have NuGet Package Restore enabled, uncomment this
  67 +#packages/
  68 +
  69 +# Visual C++ cache files
  70 +ipch/
  71 +*.aps
  72 +*.ncb
  73 +*.opensdf
  74 +*.sdf
  75 +
  76 +# Visual Studio profiler
  77 +*.psess
  78 +*.vsp
  79 +
  80 +# ReSharper is a .NET coding add-in
  81 +_ReSharper*
  82 +
  83 +# Installshield output folder
  84 +[Ee]xpress
  85 +
  86 +# DocProject is a documentation generator add-in
  87 +DocProject/buildhelp/
  88 +DocProject/Help/*.HxT
  89 +DocProject/Help/*.HxC
  90 +DocProject/Help/*.hhc
  91 +DocProject/Help/*.hhk
  92 +DocProject/Help/*.hhp
  93 +DocProject/Help/Html2
  94 +DocProject/Help/html
  95 +
  96 +# Click-Once directory
  97 +publish
  98 +
  99 +# Others
  100 +[Bb]in
  101 +[Oo]bj
  102 +sql
  103 +TestResults
  104 +*.Cache
  105 +ClientBin
  106 +stylecop.*
  107 +~$*
  108 +*.dbmdl
  109 +Generated_Code #added for RIA/Silverlight projects
  110 +
  111 +# Backup & report files from converting an old project file to a newer
  112 +# Visual Studio version. Backup files are not needed, because we have git ;-)
  113 +_UpgradeReport_Files/
  114 +Backup*/
  115 +UpgradeLog*.XML
  116 +
  117 +
  118 +
  119 +############
  120 +## Windows
  121 +############
  122 +
  123 +# Windows image file caches
  124 +Thumbs.db
  125 +
  126 +# Folder config file
  127 +Desktop.ini
  128 +
  129 +
  130 +#############
  131 +## Python
  132 +#############
  133 +
  134 +*.py[co]
  135 +
  136 +# Packages
  137 +*.egg
  138 +*.egg-info
  139 +dist
  140 +build
  141 +eggs
  142 +parts
  143 +bin
  144 +var
  145 +sdist
  146 +develop-eggs
  147 +.installed.cfg
  148 +
  149 +# Installer logs
  150 +pip-log.txt
  151 +
  152 +# Unit test / coverage reports
  153 +.coverage
  154 +.tox
  155 +
  156 +#Translations
  157 +*.mo
  158 +
  159 +#Mr Developer
  160 +.mr.developer.cfg
  161 +
  162 +# Mac crap
  163 +.DS_Store
66 GSReport/BLReport/BLReport.csproj
... ... @@ -0,0 +1,66 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3 + <PropertyGroup>
  4 + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
  5 + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
  6 + <ProductVersion>8.0.30703</ProductVersion>
  7 + <SchemaVersion>2.0</SchemaVersion>
  8 + <ProjectGuid>{61BDE7DA-F37C-413B-BF81-E14137815DE0}</ProjectGuid>
  9 + <OutputType>Library</OutputType>
  10 + <AppDesignerFolder>Properties</AppDesignerFolder>
  11 + <RootNamespace>BLReport</RootNamespace>
  12 + <AssemblyName>BLReport</AssemblyName>
  13 + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
  14 + <FileAlignment>512</FileAlignment>
  15 + </PropertyGroup>
  16 + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
  17 + <DebugSymbols>true</DebugSymbols>
  18 + <DebugType>full</DebugType>
  19 + <Optimize>false</Optimize>
  20 + <OutputPath>bin\Debug\</OutputPath>
  21 + <DefineConstants>DEBUG;TRACE</DefineConstants>
  22 + <ErrorReport>prompt</ErrorReport>
  23 + <WarningLevel>4</WarningLevel>
  24 + </PropertyGroup>
  25 + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
  26 + <DebugType>pdbonly</DebugType>
  27 + <Optimize>true</Optimize>
  28 + <OutputPath>bin\Release\</OutputPath>
  29 + <DefineConstants>TRACE</DefineConstants>
  30 + <ErrorReport>prompt</ErrorReport>
  31 + <WarningLevel>4</WarningLevel>
  32 + </PropertyGroup>
  33 + <ItemGroup>
  34 + <Reference Include="System" />
  35 + <Reference Include="System.Core" />
  36 + <Reference Include="System.Xml.Linq" />
  37 + <Reference Include="System.Data.DataSetExtensions" />
  38 + <Reference Include="Microsoft.CSharp" />
  39 + <Reference Include="System.Data" />
  40 + <Reference Include="System.Xml" />
  41 + </ItemGroup>
  42 + <ItemGroup>
  43 + <Compile Include="BLReports.cs" />
  44 + <Compile Include="BLStation.cs" />
  45 + <Compile Include="BLUser.cs" />
  46 + <Compile Include="Properties\AssemblyInfo.cs" />
  47 + </ItemGroup>
  48 + <ItemGroup>
  49 + <ProjectReference Include="..\DAReport\DAReport.csproj">
  50 + <Project>{DE6D324E-8F2C-4DA4-9F85-ECCFD9E7EF58}</Project>
  51 + <Name>DAReport</Name>
  52 + </ProjectReference>
  53 + <ProjectReference Include="..\ReportModel\ReportModel.csproj">
  54 + <Project>{7FDDC80A-F428-4322-885C-6DBB435C0CE2}</Project>
  55 + <Name>ReportModel</Name>
  56 + </ProjectReference>
  57 + </ItemGroup>
  58 + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  59 + <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  60 + Other similar extension points exist, see Microsoft.Common.targets.
  61 + <Target Name="BeforeBuild">
  62 + </Target>
  63 + <Target Name="AfterBuild">
  64 + </Target>
  65 + -->
  66 +</Project>
261 GSReport/BLReport/BLReports.cs
... ... @@ -0,0 +1,261 @@
  1 +using System;
  2 +using System.Collections.Generic;
  3 +using System.Linq;
  4 +using System.Text;
  5 +using DAReport;
  6 +using ReportModel;
  7 +
  8 +namespace BLReport
  9 +{
  10 + public class BLReports
  11 + {
  12 + private DAReports dareport = new DAReports();
  13 +
  14 + public void AddDailyAmountReport(DailyAmountReport model)
  15 + {
  16 + dareport.AddDailyAmountReport(model);
  17 + }
  18 +
  19 + public void AddDailyCardReport(DailyCardReport model)
  20 + {
  21 + dareport.AddDailyCardReport(model);
  22 + }
  23 +
  24 + public void AddTrafficReport(TrafficeFlowReport model)
  25 + {
  26 + dareport.AddTrafficReport(model);
  27 + }
  28 +
  29 + public void AddTruck5Report(Truck5ReportModel model)
  30 + {
  31 + dareport.AddTruck5Report(model);
  32 + }
  33 +
  34 + public void AddTruck6Report(Truck6ReportModel model)
  35 + {
  36 + dareport.AddTruck6Report(model);
  37 + }
  38 +
  39 + public void SpiltBill(SplitBillReport model)
  40 + {
  41 + dareport.SpiltBill(model);
  42 + }
  43 +
  44 + public void AddShortOver(ShortOverReport model)
  45 + {
  46 + dareport.AddShortOver(model);
  47 + }
  48 +
  49 + #region 收费科报表
  50 +
  51 + public IList<DailyAmountReport> ListDailyReports()
  52 + {
  53 + return dareport.ListDayDailyReports();
  54 + }
  55 +
  56 + public IList<MonthCardReport> ListMonthCardReports()
  57 + {
  58 + IList<MonthCardReport> reports = new List<MonthCardReport>();
  59 +
  60 + BLStation blstation = new BLStation();
  61 + var stations = blstation.GetStations();
  62 +
  63 + var cardreport = dareport.ListMonthCardReports(DateTime.Now.Year, DateTime.Now.Month);
  64 +
  65 + foreach (var item in stations)
  66 + {
  67 + var report = cardreport.FirstOrDefault(t => t.StationID == item.StationID);
  68 + if (report == null)
  69 + {
  70 + reports.Add(new MonthCardReport()
  71 + {
  72 + StationID = item.StationID,
  73 + StationName = item.StationName,
  74 + BrokenCards = 0,
  75 + ReceivedCards = 0,
  76 + SentCards = 0,
  77 + WrongCards = 0
  78 + });
  79 + }
  80 + else
  81 + {
  82 + report.StationName = item.StationName;
  83 + reports.Add(report);
  84 + }
  85 + }
  86 +
  87 + return reports;
  88 + }
  89 +
  90 + public IList<MonthEasyAccessReport> ListMonthEasyAccessReports()
  91 + {
  92 + var eareports = dareport.ListMonthEasyAccessReports(DateTime.Now.Year, DateTime.Now.Month);
  93 + var amountreports = dareport.ListMonthDailyAmountReport(DateTime.Now.Year, DateTime.Now.Month);
  94 +
  95 + IList<MonthEasyAccessReport> reports = new List<MonthEasyAccessReport>();
  96 +
  97 + BLStation blstation = new BLStation();
  98 + var stations = blstation.GetStations();
  99 +
  100 + foreach (var item in stations)
  101 + {
  102 + var eareport = eareports.FirstOrDefault(t => t.StationID == item.StationID);
  103 + var amountreport = amountreports.FirstOrDefault(t => t.StationID == item.StationID);
  104 +
  105 + reports.Add(new MonthEasyAccessReport()
  106 + {
  107 + StationID = item.StationID,
  108 + StationName = item.StationName,
  109 + Amount = amountreport == null ? 0 : amountreport.Amount,
  110 + EasyAccessAmount = amountreport == null ? 0 : amountreport.EasyAccessAmount,
  111 + DownAmount = eareport == null ? 0 : eareport.DownAmount,
  112 + EasyAccess = eareport == null ? 0 : eareport.EasyAccess
  113 + });
  114 +
  115 + }
  116 +
  117 + return reports;
  118 +
  119 +
  120 + }
  121 +
  122 + public IList<MonthAmountReport> ListMonthAmountReport()
  123 + {
  124 + var now = DateTime.Now;
  125 +
  126 + var amountreports = dareport.ListMonthDailyAmountReport(now.Year, now.Month);
  127 + var splitamount = dareport.ListMonthSplitBillReports(now.Year, now.Month);
  128 +
  129 + IList<MonthAmountReport> reports = new List<MonthAmountReport>();
  130 +
  131 + BLStation blstation = new BLStation();
  132 + var stations = blstation.GetStations();
  133 +
  134 +
  135 + foreach (var item in stations)
  136 + {
  137 + var splitreport = splitamount.FirstOrDefault(t => t.StationID == item.StationID);
  138 + var amountreport = amountreports.FirstOrDefault(t => t.StationID == item.StationID);
  139 +
  140 + reports.Add(new MonthAmountReport()
  141 + {
  142 + StationID = item.StationID,
  143 + StationName = item.StationName,
  144 + Amount = amountreport == null ? 0 : amountreport.Amount,
  145 + SplitAmount = splitreport == null ? 0 : splitreport.Amount
  146 + });
  147 +
  148 + }
  149 +
  150 + return reports;
  151 +
  152 + }
  153 +
  154 + public IList<TrafficeFlowReport> ListDailyTrafficReports()
  155 + {
  156 + return dareport.ListDailyTrafficReports();
  157 + }
  158 +
  159 + public IList<Truck5ReportModel> ListMonthTruck5Reports()
  160 + {
  161 + IList<Truck5ReportModel> reports = new List<Truck5ReportModel>();
  162 +
  163 + BLStation blstation = new BLStation();
  164 + var stations = blstation.GetStations();
  165 +
  166 + var cardreport = dareport.ListMonthTruck5Reports(DateTime.Now.Year, DateTime.Now.Month);
  167 +
  168 + foreach (var item in stations)
  169 + {
  170 + var report = cardreport.FirstOrDefault(t => t.StationID == item.StationID);
  171 + if (report == null)
  172 + {
  173 + reports.Add(new Truck5ReportModel()
  174 + {
  175 + StationID = item.StationID,
  176 + StationName = item.StationName,
  177 + DownAmount = 0,
  178 + MoreThan0 = 0,
  179 + MoreThan100 = 0,
  180 + MoreThan30 = 0,
  181 + TruckAmount = 0
  182 + });
  183 + }
  184 + else
  185 + {
  186 + reports.Add(report);
  187 + }
  188 + }
  189 +
  190 + return reports;
  191 + }
  192 +
  193 + public IList<Truck6ReportModel> ListMonthTruck6Reports()
  194 + {
  195 + IList<Truck6ReportModel> reports = new List<Truck6ReportModel>();
  196 +
  197 + BLStation blstation = new BLStation();
  198 + var stations = blstation.GetStations();
  199 +
  200 + var cardreport = dareport.ListMonthTruck6Reports(DateTime.Now.Year, DateTime.Now.Month);
  201 +
  202 + foreach (var item in stations)
  203 + {
  204 + var report = cardreport.FirstOrDefault(t => t.StationID == item.StationID);
  205 + if (report == null)
  206 + {
  207 + reports.Add(new Truck6ReportModel()
  208 + {
  209 + StationID = item.StationID,
  210 + StationName = item.StationName,
  211 + DownAmount = 0,
  212 + MoreThan0 = 0,
  213 + MoreThan100 = 0,
  214 + MoreThan30 = 0,
  215 + TruckAmount = 0
  216 + });
  217 + }
  218 + else
  219 + {
  220 + reports.Add(report);
  221 + }
  222 + }
  223 +
  224 + return reports;
  225 + }
  226 +
  227 + #endregion
  228 +
  229 + #region 收费站报表
  230 +
  231 + public IList<DailyAmountReport> ListStationDailyAmountReport(int stationid,DateTime date)
  232 + {
  233 + return dareport.ListStationDailyAmountReport(stationid,date);
  234 + }
  235 +
  236 + public StationMonthAmountReport GetDailyAmountMonthReport(int stationid, DateTime date)
  237 + {
  238 + return dareport.GetDailyAmountMonthReport(stationid, date);
  239 +
  240 + }
  241 +
  242 + public IList<DailyCardReport> ListStationDailyCardReports(int stationid, DateTime date)
  243 + {
  244 + return dareport.ListStationDailyCardReports(stationid, date);
  245 + }
  246 +
  247 + public MonthCardReport GetDailyCardMonthReport(int stationid, DateTime date)
  248 + {
  249 + return dareport.GetDailyCardMonthReport(stationid, date);
  250 + }
  251 +
  252 + public IList<TrafficeFlowReport> ListStationDailyTrafficReports(int stationid)
  253 + {
  254 + return dareport.ListStationDailyTrafficReports(stationid );
  255 + }
  256 +
  257 +
  258 + #endregion
  259 +
  260 + }
  261 +}
68 GSReport/BLReport/BLStation.cs
... ... @@ -0,0 +1,68 @@
  1 +using System;
  2 +using System.Collections.Generic;
  3 +using System.Linq;
  4 +using System.Text;
  5 +using DAReport;
  6 +using ReportModel;
  7 +
  8 +namespace BLReport
  9 +{
  10 + public class BLStation
  11 + {
  12 + private DAStation dastation = new DAStation();
  13 +
  14 + #region Station
  15 +
  16 + public StationModel GetStation(int id)
  17 + {
  18 + return dastation.GetStation(id);
  19 + }
  20 +
  21 + public IList<StationModel> GetStations()
  22 + {
  23 + return dastation.GetStations();
  24 + }
  25 +
  26 + public int AddStation(string stationname)
  27 + {
  28 + return dastation.AddStation(stationname);
  29 + }
  30 +
  31 + public void DeleteStation(int id)
  32 + {
  33 + dastation.DeleteStation(id);
  34 + }
  35 +
  36 +
  37 + public void UpdateStation(int id, string stationname)
  38 + {
  39 + dastation.UpdateStation(id, stationname);
  40 + }
  41 +
  42 + #endregion
  43 +
  44 + #region class
  45 +
  46 + public IList<CollectionClassModel> GetCollectionClasses(int stationid)
  47 + {
  48 + return dastation.GetCollectionClasses(stationid);
  49 + }
  50 +
  51 + public CollectionClassModel GetCollection(int id)
  52 + {
  53 + return dastation.GetCollectionClass(id);
  54 + }
  55 +
  56 + public int AddCollectionClass(int stationid, string classname)
  57 + {
  58 + return dastation.AddCollectionClass(stationid, classname);
  59 + }
  60 +
  61 + public void DeleteClass(int classid)
  62 + {
  63 + dastation.DeleteCollectionClass(classid);
  64 + }
  65 +
  66 + #endregion
  67 + }
  68 +}
58 GSReport/BLReport/BLUser.cs
... ... @@ -0,0 +1,58 @@
  1 +using System;
  2 +using System.Collections.Generic;
  3 +using System.Linq;
  4 +using System.Text;
  5 +using DAReport;
  6 +using ReportModel;
  7 +using ReportModel.Common;
  8 +
  9 +namespace BLReport
  10 +{
  11 + public class BLUser
  12 + {
  13 + private DAUser daUser = new DAUser();
  14 +
  15 + public int CreateUser(NewUserModel user)
  16 + {
  17 + return daUser.CreateUser(user);
  18 + }
  19 +
  20 + public UserModel GetUser(int userid)
  21 + {
  22 + return daUser.GetUser(userid);
  23 + }
  24 +
  25 + public IList<UserModel> GetUsers()
  26 + {
  27 + return daUser.GetUsers();
  28 + }
  29 +
  30 +
  31 + public void DeleteUser(int id)
  32 + {
  33 + daUser.DeleteUser(id);
  34 + }
  35 +
  36 + public void ResetPassword(int id)
  37 + {
  38 + string newpassword = Guid.NewGuid().ToString().Substring(0, 6);
  39 + daUser.ResetPassword(id, newpassword);
  40 + }
  41 +
  42 + public int ValidateUser(string username, string password)
  43 + {
  44 + return daUser.ValidateUser(username, password);
  45 + }
  46 +
  47 + public bool ChangePassword(int userid, string oldpassword, string newpassword)
  48 + {
  49 + return daUser.ChangePassword(userid, oldpassword, newpassword);
  50 +
  51 + }
  52 +
  53 + public void UpdateUser(UserModel user)
  54 + {
  55 + daUser.UpdateUser(user);
  56 + }
  57 + }
  58 +}
36 GSReport/BLReport/Properties/AssemblyInfo.cs
... ... @@ -0,0 +1,36 @@
  1 +using System.Reflection;
  2 +using System.Runtime.CompilerServices;
  3 +using System.Runtime.InteropServices;
  4 +
  5 +// General Information about an assembly is controlled through the following
  6 +// set of attributes. Change these attribute values to modify the information
  7 +// associated with an assembly.
  8 +[assembly: AssemblyTitle("BLReport")]
  9 +[assembly: AssemblyDescription("")]
  10 +[assembly: AssemblyConfiguration("")]
  11 +[assembly: AssemblyCompany("")]
  12 +[assembly: AssemblyProduct("BLReport")]
  13 +[assembly: AssemblyCopyright("Copyright © 2012")]
  14 +[assembly: AssemblyTrademark("")]
  15 +[assembly: AssemblyCulture("")]
  16 +
  17 +// Setting ComVisible to false makes the types in this assembly not visible
  18 +// to COM components. If you need to access a type in this assembly from
  19 +// COM, set the ComVisible attribute to true on that type.
  20 +[assembly: ComVisible(false)]
  21 +
  22 +// The following GUID is for the ID of the typelib if this project is exposed to COM
  23 +[assembly: Guid("735c239a-34e4-499d-b61b-467c53781056")]
  24 +
  25 +// Version information for an assembly consists of the following four values:
  26 +//
  27 +// Major Version
  28 +// Minor Version
  29 +// Build Number
  30 +// Revision
  31 +//
  32 +// You can specify all the values or you can default the Build and Revision Numbers
  33 +// by using the '*' as shown below:
  34 +// [assembly: AssemblyVersion("1.0.*")]
  35 +[assembly: AssemblyVersion("1.0.0.0")]
  36 +[assembly: AssemblyFileVersion("1.0.0.0")]
67 GSReport/DAReport/DAReport.csproj
... ... @@ -0,0 +1,67 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3 + <PropertyGroup>
  4 + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
  5 + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
  6 + <ProductVersion>8.0.30703</ProductVersion>
  7 + <SchemaVersion>2.0</SchemaVersion>
  8 + <ProjectGuid>{DE6D324E-8F2C-4DA4-9F85-ECCFD9E7EF58}</ProjectGuid>
  9 + <OutputType>Library</OutputType>
  10 + <AppDesignerFolder>Properties</AppDesignerFolder>
  11 + <RootNamespace>DAReport</RootNamespace>
  12 + <AssemblyName>DAReport</AssemblyName>
  13 + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
  14 + <FileAlignment>512</FileAlignment>
  15 + </PropertyGroup>
  16 + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
  17 + <DebugSymbols>true</DebugSymbols>
  18 + <DebugType>full</DebugType>
  19 + <Optimize>false</Optimize>
  20 + <OutputPath>bin\Debug\</OutputPath>
  21 + <DefineConstants>DEBUG;TRACE</DefineConstants>
  22 + <ErrorReport>prompt</ErrorReport>
  23 + <WarningLevel>4</WarningLevel>
  24 + </PropertyGroup>
  25 + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
  26 + <DebugType>pdbonly</DebugType>
  27 + <Optimize>true</Optimize>
  28 + <OutputPath>bin\Release\</OutputPath>
  29 + <DefineConstants>TRACE</DefineConstants>
  30 + <ErrorReport>prompt</ErrorReport>
  31 + <WarningLevel>4</WarningLevel>
  32 + </PropertyGroup>
  33 + <ItemGroup>
  34 + <Reference Include="System" />
  35 + <Reference Include="System.configuration" />
  36 + <Reference Include="System.Core" />
  37 + <Reference Include="System.Xml.Linq" />
  38 + <Reference Include="System.Data.DataSetExtensions" />
  39 + <Reference Include="Microsoft.CSharp" />
  40 + <Reference Include="System.Data" />
  41 + <Reference Include="System.Xml" />
  42 + </ItemGroup>
  43 + <ItemGroup>
  44 + <Compile Include="DAReports.cs" />
  45 + <Compile Include="DAStation.cs" />
  46 + <Compile Include="DAUser.cs" />
  47 + <Compile Include="DAWorkLog.cs" />
  48 + <Compile Include="DBUtility\SqlDataReaderExtensions.cs" />
  49 + <Compile Include="DBUtility\SQLHelper.cs" />
  50 + <Compile Include="Encrypt.cs" />
  51 + <Compile Include="Properties\AssemblyInfo.cs" />
  52 + </ItemGroup>
  53 + <ItemGroup>
  54 + <ProjectReference Include="..\ReportModel\ReportModel.csproj">
  55 + <Project>{7FDDC80A-F428-4322-885C-6DBB435C0CE2}</Project>
  56 + <Name>ReportModel</Name>
  57 + </ProjectReference>
  58 + </ItemGroup>
  59 + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  60 + <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  61 + Other similar extension points exist, see Microsoft.Common.targets.
  62 + <Target Name="BeforeBuild">
  63 + </Target>
  64 + <Target Name="AfterBuild">
  65 + </Target>
  66 + -->
  67 +</Project>
943 GSReport/DAReport/DAReports.cs
... ... @@ -0,0 +1,943 @@
  1 +using System;
  2 +using System.Collections.Generic;
  3 +using System.Linq;
  4 +using System.Text;
  5 +using ReportModel;
  6 +using System.Data.SqlClient;
  7 +using System.Data;
  8 +using DAReport.DBUtility;
  9 +
  10 +namespace DAReport
  11 +{
  12 + public class DAReports
  13 + {
  14 + public void AddDailyAmountReport(DailyAmountReport model)
  15 + {
  16 + try
  17 + {
  18 + string strSQL = @"
  19 + if exists (select id from dailyamountreport
  20 + where stationid=@stationid
  21 + and reportdate=@reportdate and schedue=@schedue)
  22 + begin
  23 + update dailyamountreport set
  24 + amount=@amount,
  25 + easyaccessamount=@easyaccessamount,
  26 + cruser=@cruser,
  27 + crtime=getdate()
  28 + where stationid=@stationid
  29 + and reportdate=@reportdate and schedue=@schedue
  30 + end
  31 + else
  32 + begin
  33 + insert into dailyamountreport(schedue,reportdate,amount,easyaccessamount,cruser,stationid)
  34 + values(@schedue,@reportdate,@amount,@easyaccessamount,@cruser,@stationid)
  35 + end ";
  36 +
  37 +
  38 + SqlParameter[] parms = new SqlParameter[]{
  39 + new SqlParameter("@schedue",SqlDbType.Int),
  40 + new SqlParameter("@reportdate",SqlDbType.DateTime),
  41 + new SqlParameter("@amount",SqlDbType.Decimal),
  42 + new SqlParameter("@easyaccessamount",SqlDbType.Decimal),
  43 + new SqlParameter("@cruser",SqlDbType.Int),
  44 + new SqlParameter("@stationid",SqlDbType.Int),
  45 + };
  46 +
  47 + parms[0].Value = model.Schedue;
  48 + parms[1].Value = model.ReportDate;
  49 + parms[2].Value = model.Amount;
  50 + parms[3].Value = model.EasyAccessAmount;
  51 + parms[4].Value = model.CrUser;
  52 + parms[5].Value = model.StationID;
  53 + SqlHelper.ExecuteNonQuery(SqlHelper.SQLConnectString, CommandType.Text, strSQL, parms);
  54 + }
  55 + catch (Exception ex)
  56 + {
  57 + throw;
  58 + }
  59 + }
  60 +
  61 + public void AddDailyCardReport(DailyCardReport model)
  62 + {
  63 + try
  64 + {
  65 + string strSQL = @"
  66 + if exists (select id from dailycardreport
  67 + where stationid=@stationid
  68 + and reportdate=@reportdate and collectionclassid=@collectionclassid)
  69 + begin
  70 + update dailycardreport set
  71 + SentCards=@SentCards,
  72 + WrongCards=@WrongCards,
  73 + ReceivedCards=@ReceivedCards,
  74 + BrokenCards=@BrokenCards,
  75 + cruser=@cruser,
  76 + crtime=getdate()
  77 + where stationid=@stationid
  78 + and reportdate=@reportdate and collectionclassid=@collectionclassid
  79 + end
  80 + else
  81 + begin
  82 + insert into dailycardreport(ReportDate,StationID,CollectionClassID,sentcards,wrongcards,receivedcards,brokencards,cruser)
  83 + values(@ReportDate,@StationID,@CollectionClassID,@sentcards,@wrongcards,@receivedcards,@brokencards,@cruser)
  84 + end ";
  85 +
  86 +
  87 + SqlParameter[] parms = new SqlParameter[]{
  88 + new SqlParameter("@CollectionClassID",SqlDbType.Int),
  89 + new SqlParameter("@reportdate",SqlDbType.DateTime),
  90 + new SqlParameter("@sentcards",SqlDbType.Int),
  91 + new SqlParameter("@wrongcards",SqlDbType.Int),
  92 + new SqlParameter("@receivedcards",SqlDbType.Int),
  93 + new SqlParameter("@brokencards",SqlDbType.Int),
  94 + new SqlParameter("@cruser",SqlDbType.Int),
  95 + new SqlParameter("@stationid",SqlDbType.Int),
  96 + };
  97 +
  98 + parms[0].Value = model.CollectionClassID;
  99 + parms[1].Value = model.ReportDate;
  100 + parms[2].Value = model.SentCards;
  101 + parms[3].Value = model.WrongCards;
  102 + parms[4].Value = model.ReceivedCards;
  103 + parms[5].Value = model.BrokenCards;
  104 + parms[6].Value = model.CrUser;
  105 + parms[7].Value = model.StationID;
  106 + SqlHelper.ExecuteNonQuery(SqlHelper.SQLConnectString, CommandType.Text, strSQL, parms);
  107 + }
  108 + catch (Exception ex)
  109 + {
  110 + throw;
  111 + }
  112 + }
  113 +
  114 + public void AddTrafficReport(TrafficeFlowReport model)
  115 + {
  116 + try
  117 + {
  118 + string strSQL = @"
  119 + if exists (select id from TrafficFlowReport
  120 + where stationid=@stationid
  121 + and reportdate=@reportdate)
  122 + begin
  123 + update TrafficFlowReport set
  124 + DownAmount=@DownAmount,
  125 + TruckAmount=@TruckAmount,
  126 + MoreThan30=@MoreThan30,
  127 + MoreThan100=@MoreThan100,
  128 + EngineeringVehicles=@EngineeringVehicles,
  129 + EasyAccess=@EasyAccess,
  130 + CrUser=@CrUser,
  131 + crtime=getdate()
  132 + where stationid=@stationid
  133 + and reportdate=@reportdate
  134 + end
  135 + else
  136 + begin
  137 + insert into TrafficFlowReport(ReportDate,StationID,DownAmount,TruckAmount,MoreThan30,MoreThan100,EngineeringVehicles,EasyAccess,CrUser)
  138 + values(@ReportDate,@StationID,@DownAmount,@TruckAmount,@MoreThan30,@MoreThan100,@EngineeringVehicles,@EasyAccess,@CrUser)
  139 + end ";
  140 +
  141 +
  142 + SqlParameter[] parms = new SqlParameter[]{
  143 + new SqlParameter("@reportdate",SqlDbType.DateTime),
  144 + new SqlParameter("@DownAmount",SqlDbType.Int),
  145 + new SqlParameter("@TruckAmount",SqlDbType.Int),
  146 + new SqlParameter("@MoreThan30",SqlDbType.Int),
  147 + new SqlParameter("@MoreThan100",SqlDbType.Int),
  148 + new SqlParameter("@EngineeringVehicles",SqlDbType.Int),
  149 + new SqlParameter("@EasyAccess",SqlDbType.Int),
  150 + new SqlParameter("@cruser",SqlDbType.Int),
  151 + new SqlParameter("@stationid",SqlDbType.Int),
  152 + };
  153 +
  154 + parms[0].Value = model.ReportDate;
  155 + parms[1].Value = model.DownAmount;
  156 + parms[2].Value = model.TruckAmount;
  157 + parms[3].Value = model.MoreThan30;
  158 + parms[4].Value = model.MoreThan100;
  159 + parms[5].Value = model.EngineeringVehicles;
  160 + parms[6].Value = model.EasyAccess;
  161 + parms[7].Value = model.CrUser;
  162 + parms[8].Value = model.StationID;
  163 + SqlHelper.ExecuteNonQuery(SqlHelper.SQLConnectString, CommandType.Text, strSQL, parms);
  164 + }
  165 + catch (Exception ex)
  166 + {
  167 + throw;
  168 + }
  169 + }
  170 +
  171 + public void AddTruck5Report(Truck5ReportModel model)
  172 + {
  173 + try
  174 + {
  175 + string strSQL = @"
  176 + if exists (select id from Truck5Report
  177 + where stationid=@stationid
  178 + and Year=@year and Month=@Month)
  179 + begin
  180 + update Truck5Report set
  181 + DownAmount=@DownAmount,
  182 + TruckAmount=@TruckAmount,
  183 + MoreThan30=@MoreThan30,
  184 + MoreThan100=@MoreThan100,
  185 + MoreThan0=@MoreThan0,
  186 + CrUser=@CrUser,
  187 + crtime=getdate()
  188 + where stationid=@stationid
  189 + and Year=@year and Month=@Month
  190 + end
  191 + else
  192 + begin
  193 + insert into Truck5Report(year,Month,StationID,DownAmount,TruckAmount,MoreThan30,MoreThan100,MoreThan0,CrUser)
  194 + values(@year,@Month,@stationid,@DownAmount,@TruckAmount,@MoreThan30,@MoreThan100,@MoreThan0,@CrUser)
  195 + end ";
  196 +
  197 +
  198 + SqlParameter[] parms = new SqlParameter[]{
  199 + new SqlParameter("@Year",SqlDbType.Int),
  200 + new SqlParameter("@Month",SqlDbType.Int),
  201 + new SqlParameter("@DownAmount",SqlDbType.Int),
  202 + new SqlParameter("@TruckAmount",SqlDbType.Int),
  203 + new SqlParameter("@MoreThan30",SqlDbType.Int),
  204 + new SqlParameter("@MoreThan100",SqlDbType.Int),
  205 + new SqlParameter("@MoreThan0",SqlDbType.Int),
  206 + new SqlParameter("@cruser",SqlDbType.Int),
  207 + new SqlParameter("@stationid",SqlDbType.Int),
  208 + };
  209 +
  210 + parms[0].Value = model.Year;
  211 + parms[1].Value = model.Month;
  212 + parms[2].Value = model.DownAmount;
  213 + parms[3].Value = model.TruckAmount;
  214 + parms[4].Value = model.MoreThan30;
  215 + parms[5].Value = model.MoreThan100;
  216 + parms[6].Value = model.MoreThan0;
  217 + parms[7].Value = model.CrUser;
  218 + parms[8].Value = model.StationID;
  219 + SqlHelper.ExecuteNonQuery(SqlHelper.SQLConnectString, CommandType.Text, strSQL, parms);
  220 + }
  221 + catch (Exception ex)
  222 + {
  223 + throw;
  224 + }
  225 + }
  226 +
  227 + public void AddTruck6Report(Truck6ReportModel model)
  228 + {
  229 + try
  230 + {
  231 + string strSQL = @"
  232 + if exists (select id from Truck6Report
  233 + where stationid=@stationid
  234 + and Year=@year and Month=@Month)
  235 + begin
  236 + update Truck5Report set
  237 + DownAmount=@DownAmount,
  238 + TruckAmount=@TruckAmount,
  239 + MoreThan30=@MoreThan30,
  240 + MoreThan100=@MoreThan100,
  241 + MoreThan0=@MoreThan0,
  242 + CrUser=@CrUser,
  243 + crtime=getdate()
  244 + where stationid=@stationid
  245 + and Year=@year and Month=@Month
  246 + end
  247 + else
  248 + begin
  249 + insert into Truck6Report(year,Month,StationID,DownAmount,TruckAmount,MoreThan30,MoreThan100,MoreThan0,CrUser)
  250 + values(@year,@Month,@stationid,@DownAmount,@TruckAmount,@MoreThan30,@MoreThan100,@MoreThan0,@CrUser)
  251 + end ";
  252 +
  253 +
  254 + SqlParameter[] parms = new SqlParameter[]{
  255 + new SqlParameter("@Year",SqlDbType.Int),
  256 + new SqlParameter("@Month",SqlDbType.Int),
  257 + new SqlParameter("@DownAmount",SqlDbType.Int),
  258 + new SqlParameter("@TruckAmount",SqlDbType.Int),
  259 + new SqlParameter("@MoreThan30",SqlDbType.Int),
  260 + new SqlParameter("@MoreThan100",SqlDbType.Int),
  261 + new SqlParameter("@MoreThan0",SqlDbType.Int),
  262 + new SqlParameter("@cruser",SqlDbType.Int),
  263 + new SqlParameter("@stationid",SqlDbType.Int),
  264 + };
  265 +
  266 + parms[0].Value = model.Year;
  267 + parms[1].Value = model.Month;
  268 + parms[2].Value = model.DownAmount;
  269 + parms[3].Value = model.TruckAmount;
  270 + parms[4].Value = model.MoreThan30;
  271 + parms[5].Value = model.MoreThan100;
  272 + parms[6].Value = model.MoreThan0;
  273 + parms[7].Value = model.CrUser;
  274 + parms[8].Value = model.StationID;
  275 + SqlHelper.ExecuteNonQuery(SqlHelper.SQLConnectString, CommandType.Text, strSQL, parms);
  276 + }
  277 + catch (Exception ex)
  278 + {
  279 + throw;
  280 + }
  281 + }
  282 +
  283 + public void SpiltBill(SplitBillReport model)
  284 + {
  285 + try
  286 + {
  287 + string strSQL = @"
  288 + if exists (select id from SplitBillReport
  289 + where stationid=@stationid
  290 + and Year=@year and Month=@Month)
  291 + begin
  292 + update SplitBillReport set
  293 + Amount=@Amount,
  294 + CrUser=@CrUser,
  295 + crtime=getdate()
  296 + where stationid=@stationid
  297 + and Year=@year and Month=@Month
  298 + end
  299 + else
  300 + begin
  301 + insert into SplitBillReport(year,Month,StationID,Amount,CrUser)
  302 + values(@year,@Month,@StationID,@Amount,@CrUser)
  303 + end ";
  304 +
  305 +
  306 + SqlParameter[] parms = new SqlParameter[]{
  307 + new SqlParameter("@Year",SqlDbType.Int),
  308 + new SqlParameter("@Month",SqlDbType.Int),
  309 + new SqlParameter("@Amount",SqlDbType.Int),
  310 + new SqlParameter("@cruser",SqlDbType.Int),
  311 + new SqlParameter("@stationid",SqlDbType.Int),
  312 + };
  313 +
  314 + parms[0].Value = model.Year;
  315 + parms[1].Value = model.Month;
  316 + parms[2].Value = model.Amount;
  317 + parms[3].Value = model.CrUser;
  318 + parms[4].Value = model.StationID;
  319 + SqlHelper.ExecuteNonQuery(SqlHelper.SQLConnectString, CommandType.Text, strSQL, parms);
  320 + }
  321 + catch (Exception ex)
  322 + {
  323 + throw;
  324 + }
  325 + }
  326 +