Voll Young пре 9 година
родитељ
комит
f7a4f8a59d
100 измењених фајлова са 32081 додато и 0 уклоњено
  1. 81 0
      Business/Business.csproj
  2. 6 0
      Business/Business.csproj.user
  3. 37 0
      Business/FileFlow/Entity/ActionEty.cs
  4. 37 0
      Business/FileFlow/Entity/FlowEty.cs
  5. 53 0
      Business/FileFlow/Entity/FlowListEty.cs
  6. 105 0
      Business/FileFlow/Vo/ActionVo.cs
  7. 226 0
      Business/FileFlow/Vo/FlowListVo.cs
  8. 246 0
      Business/FileFlow/Vo/FlowVo.cs
  9. 36 0
      Business/Properties/AssemblyInfo.cs
  10. 43 0
      Business/Supply/Entity/IngredientsEty.cs
  11. 43 0
      Business/Supply/Entity/PurchaseEty.cs
  12. 40 0
      Business/Supply/Entity/StockEty.cs
  13. 43 0
      Business/Supply/Entity/SupplyEty.cs
  14. 93 0
      Business/Supply/Vo/IngredientsVo.cs
  15. 93 0
      Business/Supply/Vo/PurchaseVo.cs
  16. 90 0
      Business/Supply/Vo/StockVo.cs
  17. 95 0
      Business/Supply/Vo/SupplyVo.cs
  18. 34 0
      Business/System/Dep/Entity/DepEty.cs
  19. 89 0
      Business/System/Dep/Vo/DepVo.cs
  20. 14 0
      Business/System/Op/Entity/OpEty.cs
  21. 92 0
      Business/System/Op/Vo/LmtVo.cs
  22. 62 0
      Business/System/Op/Vo/OpVo.cs
  23. 37 0
      Business/System/User/Entity/UserEty.cs
  24. 154 0
      Business/System/User/Vo/UserVo.cs
  25. BIN
      Business/bin/Debug/Business.dll
  26. BIN
      Business/bin/Debug/Business.pdb
  27. BIN
      Business/bin/Debug/Common.dll
  28. BIN
      Business/bin/Debug/Common.pdb
  29. 7 0
      Business/obj/Debug/Business.csproj.FileListAbsolute.txt
  30. BIN
      Business/obj/Debug/Business.csprojResolveAssemblyReference.cache
  31. BIN
      Business/obj/Debug/Business.dll
  32. BIN
      Business/obj/Debug/Business.pdb
  33. BIN
      Business/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  34. 15 0
      Common/Com.cs
  35. 58 0
      Common/Common.csproj
  36. 17 0
      Common/FileHelper.cs
  37. 36 0
      Common/Properties/AssemblyInfo.cs
  38. 67 0
      Common/SecurityHelper.cs
  39. 232 0
      Common/SqlHelper.cs.cs
  40. 29 0
      Common/XMLhelper.cs
  41. BIN
      Common/bin/Debug/Common.dll
  42. BIN
      Common/bin/Debug/Common.pdb
  43. 4 0
      Common/obj/Debug/Common.csproj.FileListAbsolute.txt
  44. BIN
      Common/obj/Debug/Common.dll
  45. BIN
      Common/obj/Debug/Common.pdb
  46. BIN
      Common/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  47. BIN
      DataBase/LogisticsSystem.mdf
  48. BIN
      DataBase/LogisticsSystem_log.ldf
  49. 44 0
      LogisticsSystem.sln
  50. BIN
      LogisticsSystem.suo
  51. 18 0
      LogisticsSystem/Control/BasePage.cs
  52. 15 0
      LogisticsSystem/Control/Helper/InitHelper.cs
  53. 25 0
      LogisticsSystem/Control/Helper/LogHelper.cs
  54. 70 0
      LogisticsSystem/Control/Helper/LoginHelper.cs
  55. 232 0
      LogisticsSystem/Control/SrvBase.cs
  56. 16 0
      LogisticsSystem/Default.aspx
  57. 13 0
      LogisticsSystem/Default.aspx.cs
  58. 26 0
      LogisticsSystem/Default.aspx.designer.cs
  59. BIN
      LogisticsSystem/Dll/System.Data.SQLite.dll
  60. 1 0
      LogisticsSystem/Global.asax
  61. 49 0
      LogisticsSystem/Global.asax.cs
  62. BIN
      LogisticsSystem/Images/loading.gif
  63. 335 0
      LogisticsSystem/LogisticsSystem.csproj
  64. 27 0
      LogisticsSystem/LogisticsSystem.csproj.user
  65. 35 0
      LogisticsSystem/Properties/AssemblyInfo.cs
  66. 369 0
      LogisticsSystem/Scripts/Base.js
  67. 700 0
      LogisticsSystem/Scripts/FileFrm.js
  68. 526 0
      LogisticsSystem/Scripts/SetFrm.js
  69. 768 0
      LogisticsSystem/Scripts/SupplyFrm.js
  70. 231 0
      LogisticsSystem/Scripts/chat.js
  71. 9789 0
      LogisticsSystem/Scripts/jquery-1.10.2.js
  72. 15040 0
      LogisticsSystem/Scripts/jquery-ui.js
  73. 30 0
      LogisticsSystem/Scripts/upload.js
  74. 72 0
      LogisticsSystem/Setting.Designer.cs
  75. 5 0
      LogisticsSystem/Setting.resx
  76. 51 0
      LogisticsSystem/Site.Master
  77. 17 0
      LogisticsSystem/Site.Master.cs
  78. 71 0
      LogisticsSystem/Site.Master.designer.cs
  79. 107 0
      LogisticsSystem/Styles/BaseStyle.css
  80. 25 0
      LogisticsSystem/Styles/Main.css
  81. 11 0
      LogisticsSystem/Styles/SetStyle.css
  82. 7 0
      LogisticsSystem/Styles/SupplyStyle.css
  83. 92 0
      LogisticsSystem/Styles/chatStyle.css
  84. 49 0
      LogisticsSystem/SysMain/FileFlow/Action.xml
  85. 1 0
      LogisticsSystem/SysMain/FileFlow/ActionSrv.aspx
  86. 181 0
      LogisticsSystem/SysMain/FileFlow/ActionSrv.aspx.cs
  87. 15 0
      LogisticsSystem/SysMain/FileFlow/ActionSrv.aspx.designer.cs
  88. 27 0
      LogisticsSystem/SysMain/FileFlow/FileFrm.aspx
  89. 16 0
      LogisticsSystem/SysMain/FileFlow/FileFrm.aspx.cs
  90. 15 0
      LogisticsSystem/SysMain/FileFlow/FileFrm.aspx.designer.cs
  91. 1 0
      LogisticsSystem/SysMain/FileFlow/FlowListSrv.aspx
  92. 360 0
      LogisticsSystem/SysMain/FileFlow/FlowListSrv.aspx.cs
  93. 15 0
      LogisticsSystem/SysMain/FileFlow/FlowListSrv.aspx.designer.cs
  94. 1 0
      LogisticsSystem/SysMain/FileFlow/FlowSrv.aspx
  95. 195 0
      LogisticsSystem/SysMain/FileFlow/FlowSrv.aspx.cs
  96. 15 0
      LogisticsSystem/SysMain/FileFlow/FlowSrv.aspx.designer.cs
  97. BIN
      LogisticsSystem/SysMain/FileFlow/backgroundDefault.jpg
  98. 17 0
      LogisticsSystem/SysMain/FileFlow/download.aspx
  99. 42 0
      LogisticsSystem/SysMain/FileFlow/download.aspx.cs
  100. 0 0
      LogisticsSystem/SysMain/FileFlow/download.aspx.designer.cs

+ 81 - 0
Business/Business.csproj

@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{DA3B6607-BC99-4181-96B6-92BB97634A06}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Business</RootNamespace>
+    <AssemblyName>Business</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="FileFlow\Entity\ActionEty.cs" />
+    <Compile Include="FileFlow\Entity\FlowEty.cs" />
+    <Compile Include="FileFlow\Entity\FlowListEty.cs" />
+    <Compile Include="FileFlow\Vo\ActionVo.cs" />
+    <Compile Include="FileFlow\Vo\FlowListVo.cs" />
+    <Compile Include="FileFlow\Vo\FlowVo.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Supply\Entity\IngredientsEty.cs" />
+    <Compile Include="Supply\Entity\PurchaseEty.cs" />
+    <Compile Include="Supply\Entity\StockEty.cs" />
+    <Compile Include="Supply\Entity\SupplyEty.cs" />
+    <Compile Include="Supply\Vo\IngredientsVo.cs" />
+    <Compile Include="Supply\Vo\PurchaseVo.cs" />
+    <Compile Include="Supply\Vo\StockVo.cs" />
+    <Compile Include="Supply\Vo\SupplyVo.cs" />
+    <Compile Include="System\Dep\Entity\DepEty.cs" />
+    <Compile Include="System\Dep\Vo\DepVo.cs" />
+    <Compile Include="System\Op\Entity\OpEty.cs" />
+    <Compile Include="System\Op\Vo\LmtVo.cs" />
+    <Compile Include="System\Op\Vo\OpVo.cs" />
+    <Compile Include="System\User\Entity\UserEty.cs" />
+    <Compile Include="System\User\Vo\UserVo.cs" />
+  </ItemGroup>
+  <ItemGroup />
+  <ItemGroup>
+    <ProjectReference Include="..\Common\Common.csproj">
+      <Project>{C4F32C3D-4B70-44F5-9A18-7BCEEB9C7CC2}</Project>
+      <Name>Common</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 6 - 0
Business/Business.csproj.user

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <ProjectView>ProjectFiles</ProjectView>
+  </PropertyGroup>
+</Project>

+ 37 - 0
Business/FileFlow/Entity/ActionEty.cs

@@ -0,0 +1,37 @@
+using System;
+
+namespace Business.FileFlow.Entity
+{
+    public class ActionEty
+    {
+        //ID
+        public string Id { get; set; }
+
+        //Num
+        public int Num { get; set; }
+
+        //名称
+        public string Name { get; set; }
+
+        //备注
+        public string Remark { get; set; }
+
+        //删除标记
+        public bool DelFlag { get; set; }
+
+        //添加人ID
+        public string AddUserId { get; set; }
+
+        //添加时间
+        public DateTime AddTime { get; set; }
+
+        //修改人ID
+        public string UpdateUserId { get; set; }
+
+        //最后修改时间
+        public DateTime LastTime { get; set; }
+
+        //审批人ID
+        public string ApproveId { get; set; }
+    }
+}

+ 37 - 0
Business/FileFlow/Entity/FlowEty.cs

@@ -0,0 +1,37 @@
+using System;
+
+namespace Business.FileFlow.Entity
+{
+    public class FlowEty
+    {
+        //ID
+        public string Id { get; set; }
+
+        //Num
+        public int Num { get; set; }
+
+        //名称
+        public string Name { get; set; }
+
+        //流程操作集合
+        public string ActionIDs{ get; set; }
+
+        //备注
+        public string Remark { get; set; }
+
+        //删除标记
+        public bool DelFlag { get; set; }
+
+        //添加人ID
+        public string AddUserId { get; set; }
+
+        //添加时间
+        public DateTime AddTime { get; set; }
+
+        //修改人ID
+        public string UpdateUserId { get; set; }
+
+        //最后修改时间
+        public DateTime LastTime { get; set; }
+    }
+}

+ 53 - 0
Business/FileFlow/Entity/FlowListEty.cs

@@ -0,0 +1,53 @@
+
+using System;
+
+namespace Business.FileFlow.Entity
+{
+    public class FlowListEty
+    {
+        //ID
+        public string Id { get; set; }
+
+        //Num
+        public int Num { get; set; }
+
+        //名称
+        public string Name { get; set; }
+
+        //备注
+        public string Remark { get; set; }
+
+        //流程ID
+        public string FlowId { get; set; }
+
+        //步骤操作ID
+        public int ActionId { get; set; }
+
+        //删除标记
+        public bool DelFlag { get; set; }
+
+        //添加人ID
+        public string AddUserId { get; set; }
+
+        //添加时间
+        public DateTime AddTime { get; set; }
+
+        //修改人ID
+        public string UpdateUserId { get; set; }
+
+        //最后修改时间
+        public DateTime LastTime { get; set; }
+
+        //内容
+        public string Fcontent { get; set; }
+
+        //附件地址
+        public string SAddr { get; set; }
+
+        //是否结束
+        public bool IsEnd { get; set; }
+
+        //是否通过
+        public bool IsPass { get; set; }
+    }
+}

+ 105 - 0
Business/FileFlow/Vo/ActionVo.cs

@@ -0,0 +1,105 @@
+using System.Data;
+using System.Data.SqlClient;
+using Business.FileFlow.Entity;
+using Common;
+
+namespace Business.FileFlow.Vo
+{
+    public class ActionVo
+    {
+        /// <summary>
+        /// 参数赋值
+        /// </summary>
+        /// <param name="action">实体类ActionEty</param>
+        /// <returns>参数数组</returns>
+        private SqlParameter[] SetPara(ActionEty action)
+        {
+            return new[]
+                {
+                    new SqlParameter("@id", action.Id),
+                    new SqlParameter("@name", action.Name),
+                    new SqlParameter("@remark", action.Remark),
+                    new SqlParameter("@delflag", action.DelFlag),
+                    new SqlParameter("@addUserID", action.AddUserId),
+                    new SqlParameter("@addtime", action.AddTime),
+                    new SqlParameter("@updateUserID", action.UpdateUserId),
+                    new SqlParameter("@lastTime", action.LastTime),
+                    new SqlParameter( "@approveId",action.ApproveId)
+                };
+        }
+
+        /// <summary>
+        /// 新增action记录
+        /// </summary>
+        /// <param name="action">实体类ActionEty</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string InsertAction(ActionEty action)
+        {
+            var sql =
+                "insert into action(id,name,remark,delflag,addUserID,addtime,updateUserID,lastTime,approveId) values(@id,@name,@remark,@delflag,@addUserID,@addtime,@updateUserID,@lastTime,@approveId)";
+            return SqlHelper.ExecSql(sql, SetPara(action));
+        }
+
+        /// <summary>
+        /// 获取全部流程操作信息
+        /// </summary>
+        /// <param name="searchText">查询字段</param>
+        /// <returns>数据表</returns>
+        public DataTable AllAction(string searchText)
+        {
+            var sql =
+                "select p.id,p.name,p.remark,sss.depid,p.approveId as pid,sss.username as approvename,p.lastTime,s.username as addusername ,ss.username as updateusername from action p left join SysUser s on s.userid=p.addUserID left join SysUser ss on ss.userid=p.updateUserID left join SysUser sss on sss.userid=p.approveId where p.delflag ='false' ";
+
+            if (!string.IsNullOrEmpty(searchText))
+            {
+                //根据查询字段 进行查询
+                sql +=
+                    string.Format(
+                        "and( p.name like '%{0}%' or p.remark like '%{0}%' or s.username like '%{0}%' or ss.username like '%{0}%' or sss.username like '%{0}%' )",
+                        searchText);
+            }
+            sql += " order by p.lastTime DESC";
+
+            return SqlHelper.ExecSqlDateTable(sql);
+        }
+
+        /// <summary>
+        /// 更新流程操作信息
+        /// </summary>
+        /// <param name="action">实体类ActionEty</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string UpdateAction(ActionEty action)
+        {
+            var sq1 =
+                "update action set name=@name,remark=@remark,lastTime=@lastTime,updateUserID=@updateUserID,approveId=@approveId where id=@id";
+            return SqlHelper.ExecSql(sq1, SetPara(action));
+        }
+
+        /// <summary>
+        /// 根据id删除流程操作信息
+        /// </summary>
+        /// <param name="id">流程操作id</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string DelAction(string id)
+        {
+            var sql = "update action set delflag='true' where id in (" + id + ")";
+            return SqlHelper.ExecSql(sql);
+        }
+
+        /// <summary>
+        /// 根据userid 获取该用户可审批的操作 用','分割
+        /// </summary>
+        /// <param name="userid">用户ID</param>
+        /// <returns>操作ID集合 用','分割</returns>
+        public string MyActions(string userid)
+        {
+            string myactions = string.Empty;
+            string sql = "select id from action where approveId=@approveId";
+            foreach (DataRow row in SqlHelper.ExecSqlDateTable(sql, new SqlParameter("@approveId", userid)).Rows)
+            {
+                myactions += row["id"]+",";
+            }
+            return myactions.Equals(string.Empty) ? myactions : myactions.TrimEnd(',');
+        }
+    }
+}

+ 226 - 0
Business/FileFlow/Vo/FlowListVo.cs

@@ -0,0 +1,226 @@
+using System;
+using System.Collections;
+using System.Data;
+using System.Data.SqlClient;
+using Business.FileFlow.Entity;
+using Common;
+
+namespace Business.FileFlow.Vo
+{
+    public class FlowListVo
+    {
+        /// <summary>
+        /// 参数赋值
+        /// </summary>
+        /// <param name="flowList">实体类FlowListEty</param>
+        /// <returns>参数数组</returns>
+        private SqlParameter[] SetPara(FlowListEty flowList)
+        {
+            return new[]
+                {
+                    new SqlParameter("@id", flowList.Id),
+                    new SqlParameter("@name", flowList.Name),
+                    new SqlParameter("@remark", flowList.Remark),
+                    new SqlParameter("@flowid", flowList.FlowId),
+                    new SqlParameter("@actionid", flowList.ActionId),
+                    new SqlParameter("@delflag", flowList.DelFlag),
+                    new SqlParameter("@addUserID", flowList.AddUserId),
+                    new SqlParameter("@addtime", flowList.AddTime),
+                    new SqlParameter("@updateUserID", flowList.UpdateUserId),
+                    new SqlParameter("@lastTime", flowList.LastTime),
+                    new SqlParameter("@fcontent", flowList.Fcontent),
+                    new SqlParameter("@sAddr", flowList.SAddr),
+                    new SqlParameter("@isEnd", flowList.IsEnd),
+                    new SqlParameter("@isPass", flowList.IsPass)
+                };
+        }
+
+        /// <summary>
+        /// 新增flowList记录
+        /// </summary>
+        /// <param name="flowList">实体类FlowListEty</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string InsertFlowList(FlowListEty flowList)
+        {
+            var sql =
+                "insert into flowList(id,name,remark,flowid,actionid,delflag,addUserID,addtime,updateUserID,lastTime,fcontent,sAddr,isEnd,isPass) values(@id,@name,@remark,@flowid,@actionid,@delflag,@addUserID,@addtime,@updateUserID,@lastTime,@fcontent,@sAddr,@isEnd,@isPass)";
+            return SqlHelper.ExecSql(sql, SetPara(flowList));
+        }
+
+        /// <summary>
+        /// 根据用户ID 获取我的公文列表信息
+        /// </summary>
+        /// <param name="searchText">查询字段</param>
+        /// <param name="userid">用户ID</param>
+        /// <returns>数据表</returns>
+        public DataTable AllFlowList(string searchText,string userid)
+        {
+            var sql =
+                "select p.id,p.name,f.name as flowname,f.actionIDs,p.actionid, p.lastTime,s.username as addusername,p.isPass,p.isEnd,p.sAddr from flowList p left join SysUser s on s.userid=p.addUserID left join flow f on f.id=p.flowid where p.addUserID=@addUserID and p.delflag ='false' ";
+
+            if (!string.IsNullOrEmpty(searchText))
+            {
+                //根据查询字段 进行查询
+                sql +=
+                    string.Format(
+                        "and( p.name like '%{0}%' or s.username like '%{0}%' or a.name like '%{0}%' or f.name like '%{0}%')",
+                        searchText);
+            }
+            sql += " order by p.isEnd, p.lastTime DESC";
+
+            return SqlHelper.ExecSqlDateTable(sql, new SqlParameter("@addUserID",userid));
+        }
+
+        /// <summary>
+        /// 更新公文列表信息
+        /// </summary>
+        /// <param name="flowList">实体类FlowListEty</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string UpdateFlowList(FlowListEty flowList)
+        {
+            var sq1 =
+                "update flowList set actionid=@actionid,lastTime=@lastTime,remark=@remark,updateUserID=@updateUserID,isEnd=@isEnd,isPass=@isPass where id=@id";
+            return SqlHelper.ExecSql(sq1, SetPara(flowList));
+        }
+
+        /// <summary>
+        /// 根据id删除公文列表信息
+        /// </summary>
+        /// <param name="id">公文列表id</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string DelFlowList(string id)
+        {
+            var sql = "update flowList set delflag='true' where id in (" + id + ")";
+            return SqlHelper.ExecSql(sql);
+        }
+
+        /// <summary>
+        /// 根据id返回FlowListEty实体类
+        /// </summary>
+        /// <param name="id">flowid</param>
+        public FlowListEty GetFlowContById(string id)
+        {
+            var con = new SqlConnection(SqlHelper.ConStr);
+            var cmd = new SqlCommand { Connection = con, CommandType = CommandType.Text, CommandText = "select * from  flowList where id=@id and delflag='false'" };
+            cmd.Parameters.AddWithValue("@id", id);
+            var flow = new FlowListEty();
+            try
+            {
+                con.Open();
+            }
+            catch
+            {
+                return flow;
+            }
+            using (var reader = cmd.ExecuteReader(CommandBehavior.CloseConnection))
+            {
+                if (!reader.HasRows)
+                    return flow;
+                while (reader.Read())
+                {
+                    flow.Id = SqlHelper.ReaderString("id", reader);
+                    flow.Num = SqlHelper.ReaderInt("num", reader);
+                    flow.Name = SqlHelper.ReaderString("name", reader);
+                    flow.Remark = SqlHelper.ReaderString("remark", reader);
+                    flow.FlowId = SqlHelper.ReaderString("flowid", reader);
+                    flow.ActionId = SqlHelper.ReaderInt("actionid", reader);
+                    flow.DelFlag = SqlHelper.ReaderBool("delflag", reader);
+                    flow.AddUserId = SqlHelper.ReaderString("addUserID", reader);
+                    flow.AddTime = SqlHelper.ReaderDateTime("addtime", reader);
+                    flow.UpdateUserId = SqlHelper.ReaderString("updateUserID", reader);
+                    flow.LastTime = SqlHelper.ReaderDateTime("lastTime", reader);
+                    flow.IsEnd = SqlHelper.ReaderBool("isEnd", reader);
+                    flow.IsPass = SqlHelper.ReaderBool("isPass", reader);
+                    flow.Fcontent = SqlHelper.ReaderString("fcontent", reader);
+                    flow.SAddr = SqlHelper.ReaderString("sAddr", reader);
+                }
+            }
+            return flow;
+        }
+
+
+        /// <summary>
+        /// 根据用户id返回FlowListEty实体类链表(我的审批列表)
+        /// </summary>
+        /// <param name="userid">userid</param>
+        /// <param name="sT">查询字段</param>
+        public Hashtable GetFlowListByUserid(string userid,string sT)
+        {
+            var con = new SqlConnection(SqlHelper.ConStr);
+            var cmd = new SqlCommand { Connection = con, CommandType = CommandType.StoredProcedure, CommandText = "myflowList" };
+            SqlParameter para = cmd.Parameters.Add("@user", SqlDbType.VarChar,32);
+            para.Direction = ParameterDirection.Input;
+            para.Value = userid;
+            SqlParameter para2 = cmd.Parameters.Add("@sT", SqlDbType.VarChar, 100);
+            para2.Direction = ParameterDirection.Input;
+            para2.Value = sT;
+            var list = new Hashtable();
+            var adp=new SqlDataAdapter(cmd);
+            var ds = new DataSet();
+            adp.Fill(ds);
+            foreach (DataTable table in ds.Tables)
+            {
+                foreach (DataRow row in table.Rows)
+                {
+                   if(list.ContainsKey(row["id"].ToString()))continue;
+                   var flow = new FlowListEty
+                        {
+                            Id =row["id"].ToString(),
+                            Num = Convert.ToInt32(row["num"]),
+                            Name =row["name"].ToString() ,
+                            Remark =row["remark"].ToString() ,
+                            FlowId =row["flowid"].ToString() ,
+                            ActionId = Convert.ToInt32(row["actionid"]),
+                            DelFlag =(bool)row["delflag"] ,
+                            AddUserId = row["addUserID"].ToString(),
+                            AddTime = Convert.ToDateTime(row["addtime"]),
+                            UpdateUserId =row["updateUserID"].ToString() ,
+                            LastTime = Convert.ToDateTime(row["lastTime"]),
+                            IsEnd =(bool)row["isEnd"] ,
+                            IsPass =(bool) row["isPass"],
+                            Fcontent = row["fcontent"].ToString(),
+                            SAddr =row["sAddr"].ToString(),
+                        };
+                    list[flow.Id] = flow;
+                }
+            }
+            return list;
+        }
+
+        /// <summary>
+        /// 获取我的审批 集合
+        /// </summary>
+        /// <param name="userid">用户ID</param>
+        /// <param name="sT">查询字段</param>
+        /// <returns>我的审批 集合</returns>
+        public Hashtable MyList(string userid,string sT)
+        {
+            var flowVo = new FlowVo();
+            string myActions = new ActionVo().MyActions(userid);        //获取由我审批的操作集合
+            if (myActions.Equals(string.Empty))
+            {
+                return new Hashtable();
+            }
+
+            DataTable actions = new ActionVo().AllAction("");       //读取所有流程操作
+            Hashtable list = GetFlowListByUserid(userid,sT);           //获取所有有关我的公文列表
+            string ids = string.Empty;
+            //过滤 到我审批的公文
+            foreach (FlowListEty flowList in list.Values)
+            {
+                string actionIDs = flowVo.GetAction(flowList.FlowId);
+                ActionEty actionEty = flowVo.NowActionId(actionIDs, actions, flowList.ActionId.ToString());
+                if (!myActions.Contains(actionEty.Id))
+                {
+                    ids += flowList.Id + ",";
+                   
+                }
+            }
+            foreach (string key in ids.TrimEnd(',').Split(','))
+            {
+                list.Remove(key);
+            }
+            return list;        //我的审批公文
+        }
+    }
+}

+ 246 - 0
Business/FileFlow/Vo/FlowVo.cs

@@ -0,0 +1,246 @@
+using System.Collections;
+using System.Data;
+using System.Data.SqlClient;
+using Business.FileFlow.Entity;
+using Common;
+
+namespace Business.FileFlow.Vo
+{
+    public class FlowVo
+    {
+        /// <summary>
+        /// 参数赋值
+        /// </summary>
+        /// <param name="flow">实体类FlowEty</param>
+        /// <returns>参数数组</returns>
+        private SqlParameter[] SetPara(FlowEty flow)
+        {
+            return new[]
+                {
+                    new SqlParameter("@id", flow.Id),
+                    new SqlParameter("@name", flow.Name),
+                    new SqlParameter("@actionIDs", flow.ActionIDs),
+                    new SqlParameter("@remark", flow.Remark),
+                    new SqlParameter("@delflag", flow.DelFlag),
+                    new SqlParameter("@addUserID", flow.AddUserId),
+                    new SqlParameter("@addtime", flow.AddTime),
+                    new SqlParameter("@updateUserID", flow.UpdateUserId),
+                    new SqlParameter("@lastTime", flow.LastTime)
+                };
+        }
+
+        /// <summary>
+        /// 新增flow记录
+        /// </summary>
+        /// <param name="flow">实体类FlowEty</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string InsertFlow(FlowEty flow)
+        {
+            var sql =
+                "insert into flow(id,name,actionIDs,remark,delflag,addUserID,addtime,updateUserID,lastTime) values(@id,@name,@actionIDs,@remark,@delflag,@addUserID,@addtime,@updateUserID,@lastTime)";
+            return SqlHelper.ExecSql(sql, SetPara(flow));
+        }
+
+        /// <summary>
+        /// 获取全部流程信息
+        /// </summary>
+        /// <param name="searchText">查询字段</param>
+        /// <returns>数据表</returns>
+        public DataTable AllFlow(string searchText)
+        {
+            var sql =
+                "select p.id,p.name,p.actionIDs,p.remark,p.lastTime,s.username as addusername ,ss.username as updateusername from flow p left join SysUser s on s.userid=p.addUserID left join SysUser ss on ss.userid=p.updateUserID where p.delflag ='false' ";
+
+            if (!string.IsNullOrEmpty(searchText))
+            {
+                //根据查询字段 进行查询
+                sql +=
+                    string.Format(
+                        "and( p.name like '%{0}%' or p.remark like '%{0}%' or s.username like '%{0}%' or ss.username like '%{0}%')",
+                        searchText);
+            }
+            sql += " order by p.lastTime DESC";
+
+            return SqlHelper.ExecSqlDateTable(sql);
+        }
+
+        /// <summary>
+        /// 更新流程信息
+        /// </summary>
+        /// <param name="flow">实体类FlowEty</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string UpdateFlow(FlowEty flow)
+        {
+            var sq1 =
+                "update flow set name=@name,actionIDs=@actionIDs,remark=@remark,lastTime=@lastTime,updateUserID=@updateUserID where id=@id";
+            return SqlHelper.ExecSql(sq1, SetPara(flow));
+        }
+
+        /// <summary>
+        /// 根据id删除流程信息
+        /// </summary>
+        /// <param name="id">流程id</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string DelFlow(string id)
+        {
+            var sql = "update flow set delflag='true' where id in (" + id + ")";
+            return SqlHelper.ExecSql(sql);
+        }
+
+        /// <summary>
+        /// 根据流程id 获取某一步的操作ID
+        /// </summary>
+        /// <param name="flowid">流程id</param>
+        /// <param name="num">第几步</param>
+        /// <returns>操作id</returns>
+        public string GetAction(string flowid)
+        {
+            string sql = "select actionIDs from flow where id=@id";
+            return SqlHelper.ExecSqlSc(sql, new SqlParameter("@id", flowid)); 
+        }
+
+        /// <summary>
+        /// 根据流程ID获取流程名字
+        /// </summary>
+        /// <param name="flowid"></param>
+        /// <returns></returns>
+        public string GetFlowNameById(string flowid)
+        {
+            string sql = "select name from flow where id=@id";
+            return SqlHelper.ExecSqlSc(sql, new SqlParameter("@id", flowid)); 
+        }
+
+  
+
+        /// <summary>
+        /// 根据id返回FlowEty实体类
+        /// </summary>
+        /// <param name="id">flowid</param>
+        public FlowEty GetFlowById(string id)
+        {
+            var con = new SqlConnection(SqlHelper.ConStr);
+            var cmd = new SqlCommand { Connection = con, CommandType = CommandType.Text, CommandText = "select * from  flow where id=@id and delflag='false'" };
+            cmd.Parameters.AddWithValue("@id", id);
+            var flow = new FlowEty();
+            try
+            {
+                con.Open();
+            }
+            catch
+            {
+                return flow;
+            }
+            using (var reader = cmd.ExecuteReader(CommandBehavior.CloseConnection))
+            {
+                if (!reader.HasRows)
+                    return flow;
+                while (reader.Read())
+                {
+                    flow.Id = SqlHelper.ReaderString("id", reader);
+                    flow.Num = SqlHelper.ReaderInt("num", reader);
+                    flow.Name = SqlHelper.ReaderString("name", reader);
+                    flow.Remark = SqlHelper.ReaderString("remark", reader);
+                    flow.DelFlag = SqlHelper.ReaderBool("delflag", reader);
+                    flow.AddUserId = SqlHelper.ReaderString("addUserID", reader);
+                    flow.AddTime = SqlHelper.ReaderDateTime("addtime", reader);
+                    flow.UpdateUserId = SqlHelper.ReaderString("updateUserID", reader);
+                    flow.LastTime = SqlHelper.ReaderDateTime("lastTime", reader);
+                    flow.ActionIDs = SqlHelper.ReaderString("actionIDs", reader);
+                }
+            }
+            return flow;
+        }
+
+
+        /// <summary>
+        /// 根据actionID获取操作顺序名字
+        /// </summary>
+        /// <param name="actionIDs">流程的actionIDs</param>
+        /// <param name="actionTable">所有流程操作数据表</param>
+        /// <returns>流程操作顺序名字</returns>
+        public string ActionNString(string actionIDs ,DataTable actionTable)
+        {
+
+            Hashtable temphash = FlowAction(actionIDs);           //保存流程操作的顺序号及名字
+            string actionName = string.Empty;
+            for (int i = 0; i < temphash.Count; i++)            //根据顺序号,组织流程操作名字
+            {
+                DataRow[] temprow = actionTable.Select("id='" + temphash[i.ToString()] + "'");
+                actionName += temprow[0]["name"] + "-->";
+            }
+            return actionName.Substring(0, actionName.Length - 3); 
+        }
+
+
+        /// <summary>
+        /// 根据actionID获取操作顺序名字
+        /// </summary>
+        /// <param name="actionIDs">流程的actionIDs</param>
+        /// <param name="actionTable">所有流程操作数据表</param>
+        /// <param name="now">当前执行步骤id</param>
+        /// <returns>流程操作顺序名字</returns>
+        public string ActionNString(string actionIDs, DataTable actionTable,int now)
+        {
+            string actionName = string.Empty;
+            Hashtable temphash = FlowAction(actionIDs);
+            for (int i = 0; i < temphash.Count; i++)        //根据顺序号,组织流程操作名字
+            {
+                DataRow[] temprow = actionTable.Select("id='" + temphash[i.ToString()] + "'");
+
+                if (now == i)
+                {
+                    actionName += "<font color=\"red\">" + temprow[0]["name"] + "</font>-->";
+                }
+                else
+                {
+                    actionName += temprow[0]["name"] + "-->";
+                }
+            }
+            return actionName.Substring(0, actionName.Length - 3);
+        }
+
+        /// <summary>
+        /// 根据actionIDs分离对应的序号和操作id
+        /// </summary>
+        /// <param name="actionIDs">actionIDs</param>
+        /// <returns>Hashtable</returns>
+        public Hashtable FlowAction(string actionIDs)
+        {
+            string[] temp = actionIDs.Split(',');
+            var temphash = new Hashtable();                //保存流程操作的顺序号及名字
+           
+            foreach (string s in temp)
+            {
+                string[] action = s.Split(':');
+                temphash[action[0]] = action[1];
+            }
+            return temphash;
+        }
+
+        /// <summary>
+        /// 根据操作步骤获取操作ID和名字
+        /// </summary>
+        /// <param name="actionIDs">流程操作ids</param>
+        /// <param name="actionTable">所有流程操作数据表</param>
+        /// <param name="now">步骤</param>
+        /// <returns>ActionEty实体类</returns>
+        public ActionEty NowActionId(string actionIDs, DataTable actionTable, string now)
+        {
+            string[] temp = actionIDs.Split(',');
+            var actionEty = new ActionEty();                 //保存流程操作的顺序号及名字
+ 
+            foreach (string s in temp)
+            {
+                string[] action = s.Split(':');
+                if (action[0]==now)
+                {
+                    DataRow[] temprow = actionTable.Select("id='" + action[1] + "'");
+                    actionEty.Id = action[1];                         //操作id 
+                    actionEty.Name = temprow[0]["name"].ToString();    //操作名字
+                    return actionEty;
+                }
+            }
+            return actionEty;
+        }
+    }
+}

+ 36 - 0
Business/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Business")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("微软中国")]
+[assembly: AssemblyProduct("Business")]
+[assembly: AssemblyCopyright("Copyright © 微软中国 2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("75a1edee-b81a-4d42-96dd-d66fe686f5e7")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 43 - 0
Business/Supply/Entity/IngredientsEty.cs

@@ -0,0 +1,43 @@
+using System;
+
+namespace Business.Supply.Entity
+{
+    public class IngredientsEty
+    {
+        //ID
+        public string Id { get; set; }
+
+        //部门ID
+        public string DepId { get; set; }
+
+        //Num
+        public int Num { get; set; }
+
+        //名称
+        public string Name { get; set; }
+
+        //数量
+        public decimal Quantity { get; set; }
+
+        //时间
+        public DateTime Time { get; set; }
+
+        //备注
+        public string Remark { get; set; }
+
+        //删除标记
+        public bool DelFlag { get; set; }
+
+        //添加人ID
+        public string AddUserId { get; set; }
+
+        //添加时间
+        public DateTime AddTime { get; set; }
+
+        //修改人ID
+        public string UpdateUserId { get; set; }
+
+        //最后修改时间
+        public DateTime LastTime { get; set; }
+    }
+}

+ 43 - 0
Business/Supply/Entity/PurchaseEty.cs

@@ -0,0 +1,43 @@
+using System;
+
+namespace Business.Supply.Entity
+{
+    public class PurchaseEty
+    {
+        //ID
+        public string Id { get; set; }
+
+        //Num
+        public int Num { get; set; }
+
+        //名称
+        public string Name { get; set; }
+
+        //价格
+        public decimal Price { get; set; }
+
+        //数量
+        public decimal Quantity { get; set; }
+
+        //时间
+        public DateTime Time { get; set; }
+
+        //备注
+        public string Remark { get; set; }
+
+        //删除标记
+        public bool DelFlag { get; set; }
+
+        //添加人ID
+        public string AddUserId { get; set; }
+
+        //添加时间
+        public DateTime AddTime { get; set; }
+
+        //修改人ID
+        public string UpdateUserId { get; set; }
+
+        //最后修改时间
+        public DateTime LastTime { get; set; }
+    }
+}

+ 40 - 0
Business/Supply/Entity/StockEty.cs

@@ -0,0 +1,40 @@
+using System;
+
+namespace Business.Supply.Entity
+{
+    public class StockEty
+    {
+        //ID
+        public string Id { get; set; }
+
+        //Num
+        public int Num { get; set; }
+
+        //名称
+        public string Name { get; set; }
+
+        //数量
+        public decimal Quantity { get; set; }
+
+        //时间
+        public DateTime Time { get; set; }
+
+        //备注
+        public string Remark { get; set; }
+
+        //删除标记
+        public bool DelFlag { get; set; }
+
+        //添加人ID
+        public string AddUserId { get; set; }
+
+        //添加时间
+        public DateTime AddTime { get; set; }
+
+        //修改人ID
+        public string UpdateUserId { get; set; }
+
+        //最后修改时间
+        public DateTime LastTime { get; set; }
+    }
+}

+ 43 - 0
Business/Supply/Entity/SupplyEty.cs

@@ -0,0 +1,43 @@
+using System;
+
+namespace Business.Supply.Entity
+{
+    public class SupplyEty
+    {
+        //ID
+        public string Id { get; set; }
+
+        //部门ID
+        public string DepId { get; set; }
+
+        //Num
+        public int Num { get; set; }
+
+        //名称
+        public string Name { get; set; }
+
+        //数量
+        public decimal Quantity { get; set; }
+
+        //时间
+        public DateTime Time { get; set; }
+
+        //备注
+        public string Remark { get; set; }
+
+        //删除标记
+        public bool DelFlag { get; set; }
+
+        //添加人ID
+        public string AddUserId { get; set; }
+
+        //添加时间
+        public DateTime AddTime { get; set; }
+
+        //修改人ID
+        public string UpdateUserId { get; set; }
+
+        //最后修改时间
+        public DateTime LastTime { get; set; }
+    }
+}

+ 93 - 0
Business/Supply/Vo/IngredientsVo.cs

@@ -0,0 +1,93 @@
+using System.Data;
+using System.Data.SqlClient;
+using Business.Supply.Entity;
+using Common;
+
+namespace Business.Supply.Vo
+{
+    public class IngredientsVo
+    {
+        /// <summary>
+        /// 参数赋值
+        /// </summary>
+        /// <param name="ingredients">实体类IngredientsEty</param>
+        /// <returns>参数数组</returns>
+        private SqlParameter[] SetPara(IngredientsEty ingredients)
+        {
+            return new[]
+                {
+                    new SqlParameter("@id", ingredients.Id),
+                    new SqlParameter("@name", ingredients.Name),
+                    new SqlParameter("@depid", ingredients.DepId),
+                    new SqlParameter("@time", ingredients.Time),
+                    new SqlParameter("@remark", ingredients.Remark),
+                    new SqlParameter("@delflag", ingredients.DelFlag),
+                    new SqlParameter("@addUserID", ingredients.AddUserId),
+                    new SqlParameter("@addtime", ingredients.AddTime),
+                    new SqlParameter("@updateUserID", ingredients.UpdateUserId),
+                    new SqlParameter("@lastTime", ingredients.LastTime),
+                    new SqlParameter("@quantity",ingredients.Quantity)
+                };
+        }
+
+        /// <summary>
+        /// 新增ingredients记录
+        /// </summary>
+        /// <param name="ingredients">实体类IngredientsEty</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string InsertIngredients(IngredientsEty ingredients)
+        {
+            var sql =
+                "insert into ingredients(id,depid,name,time,remark,delflag,addUserID,addtime,updateUserID,lastTime,quantity) values(@id,@depid,@name,@time,@remark,@delflag,@addUserID,@addtime,@updateUserID,@lastTime,@quantity)";
+            return SqlHelper.ExecSql(sql, SetPara(ingredients));
+        }
+
+        /// <summary>
+        /// 获取全部用料信息
+        /// </summary>
+        /// <param name="searchText">查询字段</param>
+        /// <returns>数据表</returns>
+        public DataTable AllIngredients(string searchText)
+        {
+            var sql =
+                "select p.id,p.name,p.depid,sd.name as depname, p.quantity,p.remark,p.time,p.lastTime,s.username as addusername ,ss.username as updateusername from ingredients p left join SysDep sd on sd.depid=p.depid left join SysUser s on s.userid=p.addUserID left join SysUser ss on ss.userid=p.updateUserID where p.delflag ='false' ";
+
+            if (!string.IsNullOrEmpty(searchText))
+            {
+                //根据查询字段 进行查询
+                sql +=
+                    string.Format(
+                        "and( p.name like '%{0}%' or sd.name like '%{0}%' or p.remark like '%{0}%' or p.quantity like '%{0}%' or s.username like '%{0}%' or ss.username like '%{0}%')",
+                        searchText);
+            }
+            sql += " order by p.lastTime DESC";
+
+            return SqlHelper.ExecSqlDateTable(sql);
+        }
+
+        /// <summary>
+        /// 更新用料信息
+        /// </summary>
+        /// <param name="ingredients">实体类IngredientsEty</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string UpdateIngredients(IngredientsEty ingredients)
+        {
+            var sq1 =
+                "update ingredients set name=@name,depid=@depid,quantity=@quantity,remark=@remark,lastTime=@lastTime,updateUserID=@updateUserID,time=@time where id=@id";
+            return SqlHelper.ExecSql(sq1, SetPara(ingredients));
+        }
+
+        /// <summary>
+        /// 根据id删除用料信息
+        /// </summary>
+        /// <param name="id">用料id</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string DelIngredients(string id)
+        {
+            var sql = "update ingredients set delflag='true' where id in (" + id + ")";
+            return SqlHelper.ExecSql(sql);
+        }
+
+
+    }
+}

+ 93 - 0
Business/Supply/Vo/PurchaseVo.cs

@@ -0,0 +1,93 @@
+using System.Data;
+using System.Data.SqlClient;
+using Business.Supply.Entity;
+using Common;
+
+namespace Business.Supply.Vo
+{
+    public class PurchaseVo
+    {
+        /// <summary>
+        /// 参数赋值
+        /// </summary>
+        /// <param name="purchase">实体类PurchaseEty</param>
+        /// <returns>参数数组</returns>
+        private SqlParameter[] SetPara(PurchaseEty purchase)
+        {
+            return new[]
+                {
+                    new SqlParameter("@id", purchase.Id),
+                    new SqlParameter("@name", purchase.Name),
+                    new SqlParameter("@price", purchase.Price),
+                    new SqlParameter("@time", purchase.Time),
+                    new SqlParameter("@remark", purchase.Remark),
+                    new SqlParameter("@delflag", purchase.DelFlag),
+                    new SqlParameter("@addUserID", purchase.AddUserId),
+                    new SqlParameter("@addtime", purchase.AddTime),
+                    new SqlParameter("@updateUserID", purchase.UpdateUserId),
+                    new SqlParameter("@lastTime", purchase.LastTime),
+                    new SqlParameter("@quantity",purchase.Quantity)
+                };
+        }
+
+        /// <summary>
+        /// 新增purchase记录
+        /// </summary>
+        /// <param name="purchase">实体类PurchaseEty</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string InsertPurchase(PurchaseEty purchase)
+        {
+            var sql =
+                "insert into purchase(id,name,price,time,remark,delflag,addUserID,addtime,updateUserID,lastTime,quantity) values(@id,@name,@price,@time,@remark,@delflag,@addUserID,@addtime,@updateUserID,@lastTime,@quantity)";
+            return SqlHelper.ExecSql(sql, SetPara(purchase));
+        }
+
+        /// <summary>
+        /// 获取全部采购信息
+        /// </summary>
+        /// <param name="searchText">查询字段</param>
+        /// <returns>数据表</returns>
+        public DataTable AllPurchase(string searchText)
+        {
+            var sql =
+                "select p.id,p.name,p.price,p.quantity,p.remark,p.time,p.lastTime,s.username as addusername ,ss.username as updateusername from purchase p left join SysUser s on s.userid=p.addUserID left join SysUser ss on ss.userid=p.updateUserID where p.delflag ='false' ";
+
+            if (!string.IsNullOrEmpty(searchText))
+            {
+                //根据查询字段 进行查询
+                sql +=
+                    string.Format(
+                        "and( p.name like '%{0}%' or p.price like '%{0}%' or p.remark like '%{0}%' or p.quantity like '%{0}%' or s.username like '%{0}%' or ss.username like '%{0}%')",
+                        searchText);
+            }
+            sql += " order by p.lastTime DESC";
+
+            return SqlHelper.ExecSqlDateTable(sql);
+        }
+
+        /// <summary>
+        /// 更新采购信息
+        /// </summary>
+        /// <param name="purchase">实体类PurchaseEty</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string UpdatePurchase(PurchaseEty purchase)
+        {
+            var sq1 =
+                "update purchase set name=@name,price=@price,quantity=@quantity,remark=@remark,lastTime=@lastTime,updateUserID=@updateUserID,time=@time where id=@id";
+            return SqlHelper.ExecSql(sq1, SetPara(purchase));
+        }
+
+        /// <summary>
+        /// 根据id删除采购信息
+        /// </summary>
+        /// <param name="id">采购id</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string DelPurchase(string id)
+        {
+            var sql = "update purchase set delflag='true' where id in ("+id+")";
+            return SqlHelper.ExecSql(sql);
+        }
+
+
+    }
+}

+ 90 - 0
Business/Supply/Vo/StockVo.cs

@@ -0,0 +1,90 @@
+using System.Data;
+using System.Data.SqlClient;
+using Business.Supply.Entity;
+using Common;
+
+namespace Business.Supply.Vo
+{
+    public class StockVo
+    {
+        /// <summary>
+        /// 参数赋值
+        /// </summary>
+        /// <param name="stock">实体类StockEty</param>
+        /// <returns>参数数组</returns>
+        private SqlParameter[] SetPara(StockEty stock)
+        {
+            return new[]
+                {
+                    new SqlParameter("@id", stock.Id),
+                    new SqlParameter("@name", stock.Name),
+                    new SqlParameter("@time", stock.Time),
+                    new SqlParameter("@remark", stock.Remark),
+                    new SqlParameter("@delflag", stock.DelFlag),
+                    new SqlParameter("@addUserID", stock.AddUserId),
+                    new SqlParameter("@addtime", stock.AddTime),
+                    new SqlParameter("@updateUserID", stock.UpdateUserId),
+                    new SqlParameter("@lastTime", stock.LastTime),
+                    new SqlParameter("@quantity",stock.Quantity)
+                };
+        }
+
+        /// <summary>
+        /// 新增stock记录
+        /// </summary>
+        /// <param name="stock">实体类StockEty</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string InsertStock(StockEty stock)
+        {
+            var sql =
+                "insert into stock(id,name,time,remark,delflag,addUserID,addtime,updateUserID,lastTime,quantity) values(@id,@name,@time,@remark,@delflag,@addUserID,@addtime,@updateUserID,@lastTime,@quantity)";
+            return SqlHelper.ExecSql(sql, SetPara(stock));
+        }
+
+        /// <summary>
+        /// 获取全部库存信息
+        /// </summary>
+        /// <param name="searchText">查询字段</param>
+        /// <returns>数据表</returns>
+        public DataTable AllStock(string searchText)
+        {
+            var sql =
+                "select p.id,p.name,p.quantity,p.remark,p.time,p.lastTime,s.username as addusername ,ss.username as updateusername from stock p left join SysUser s on s.userid=p.addUserID left join SysUser ss on ss.userid=p.updateUserID where p.delflag ='false' ";
+
+            if (!string.IsNullOrEmpty(searchText))
+            {
+                //根据查询字段 进行查询
+                sql +=
+                    string.Format(
+                        "and( p.name like '%{0}%' or p.remark like '%{0}%' or p.quantity like '%{0}%' or s.username like '%{0}%' or ss.username like '%{0}%')",
+                        searchText);
+            }
+            sql += " order by p.lastTime DESC";
+
+            return SqlHelper.ExecSqlDateTable(sql);
+        }
+
+        /// <summary>
+        /// 更新库存信息
+        /// </summary>
+        /// <param name="stock">实体类StockEty</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string UpdateStock(StockEty stock)
+        {
+            var sq1 =
+                "update stock set name=@name,quantity=@quantity,remark=@remark,lastTime=@lastTime,updateUserID=@updateUserID,time=@time where id=@id";
+            return SqlHelper.ExecSql(sq1, SetPara(stock));
+        }
+
+        /// <summary>
+        /// 根据id删除库存信息
+        /// </summary>
+        /// <param name="id">库存id</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string DelStock(string id)
+        {
+            var sql = "update stock set delflag='true' where id in (" + id + ")";
+            return SqlHelper.ExecSql(sql);
+        }
+    }
+}

+ 95 - 0
Business/Supply/Vo/SupplyVo.cs

@@ -0,0 +1,95 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+using System.Text;
+using Business.Supply.Entity;
+using Common;
+
+namespace Business.Supply.Vo
+{
+    public class SupplyVo
+    {
+        /// <summary>
+        /// 参数赋值
+        /// </summary>
+        /// <param name="supply">实体类SupplyEty</param>
+        /// <returns>参数数组</returns>
+        private SqlParameter[] SetPara(SupplyEty supply)
+        {
+            return new[]
+                {
+                    new SqlParameter("@id", supply.Id),
+                    new SqlParameter("@name", supply.Name),
+                    new SqlParameter("@depid", supply.DepId),
+                    new SqlParameter("@time", supply.Time),
+                    new SqlParameter("@remark", supply.Remark),
+                    new SqlParameter("@delflag", supply.DelFlag),
+                    new SqlParameter("@addUserID", supply.AddUserId),
+                    new SqlParameter("@addtime", supply.AddTime),
+                    new SqlParameter("@updateUserID", supply.UpdateUserId),
+                    new SqlParameter("@lastTime", supply.LastTime),
+                    new SqlParameter("@quantity",supply.Quantity)
+                };
+        }
+
+        /// <summary>
+        /// 新增supply记录
+        /// </summary>
+        /// <param name="supply">实体类SupplyEty</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string InsertSupply(SupplyEty supply)
+        {
+            var sql =
+                "insert into supply(id,depid,name,time,remark,delflag,addUserID,addtime,updateUserID,lastTime,quantity) values(@id,@depid,@name,@time,@remark,@delflag,@addUserID,@addtime,@updateUserID,@lastTime,@quantity)";
+            return SqlHelper.ExecSql(sql, SetPara(supply));
+        }
+
+        /// <summary>
+        /// 获取全部供应信息
+        /// </summary>
+        /// <param name="searchText">查询字段</param>
+        /// <returns>数据表</returns>
+        public DataTable AllSupply(string searchText)
+        {
+            var sql =
+                "select p.id,p.name,p.depid,sd.name as depname, p.quantity,p.remark,p.time,p.lastTime,s.username as addusername ,ss.username as updateusername from supply p left join SysDep sd on sd.depid=p.depid left join SysUser s on s.userid=p.addUserID left join SysUser ss on ss.userid=p.updateUserID where p.delflag ='false' ";
+
+            if (!string.IsNullOrEmpty(searchText))
+            {
+                //根据查询字段 进行查询
+                sql +=
+                    string.Format(
+                        "and( p.name like '%{0}%' or sd.name like '%{0}%' or p.remark like '%{0}%' or p.quantity like '%{0}%' or s.username like '%{0}%' or ss.username like '%{0}%')",
+                        searchText);
+            }
+            sql += " order by p.lastTime DESC";
+
+            return SqlHelper.ExecSqlDateTable(sql);
+        }
+
+        /// <summary>
+        /// 更新供应信息
+        /// </summary>
+        /// <param name="supply">实体类SupplyEty</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string UpdateSupply(SupplyEty supply)
+        {
+            var sq1 =
+                "update supply set name=@name,depid=@depid,quantity=@quantity,remark=@remark,lastTime=@lastTime,updateUserID=@updateUserID,time=@time where id=@id";
+            return SqlHelper.ExecSql(sq1, SetPara(supply));
+        }
+
+        /// <summary>
+        /// 根据id删除供应信息
+        /// </summary>
+        /// <param name="id">供应id</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string DelSupply(string id)
+        {
+            var sql = "update supply set delflag='true' where id in (" + id + ")";
+            return SqlHelper.ExecSql(sql);
+        }
+    }
+}

+ 34 - 0
Business/System/Dep/Entity/DepEty.cs

@@ -0,0 +1,34 @@
+using System;
+
+namespace Business.System.Dep.Entity
+{
+    public class DepEty
+    {
+        //ID
+        public string Id { get; set; }
+
+        //Num
+        public int Num { get; set; }
+
+        //名称
+        public string Name { get; set; }
+
+        //备注
+        public string Remark { get; set; }
+
+        //删除标记
+        public bool DelFlag { get; set; }
+
+        //添加人ID
+        public string AddUserId { get; set; }
+
+        //添加时间
+        public DateTime AddTime { get; set; }
+
+        //修改人ID
+        public string UpdateUserId { get; set; }
+
+        //最后修改时间
+        public DateTime LastTime { get; set; }
+    }
+}

+ 89 - 0
Business/System/Dep/Vo/DepVo.cs

@@ -0,0 +1,89 @@
+using System.Data;
+using System.Data.SqlClient;
+using Business.System.Dep.Entity;
+using Common;
+
+namespace Business.System.Dep.Vo
+{
+    public class DepVo
+    {
+        /// <summary>
+        /// 参数赋值
+        /// </summary>
+        /// <param name="dep">实体类DepEty</param>
+        /// <returns>参数数组</returns>
+        private SqlParameter[] SetPara(DepEty dep)
+        {
+            return new[]
+                {
+                    new SqlParameter("@depid", dep.Id),
+                    new SqlParameter("@name", dep.Name),
+                    new SqlParameter("@remark", dep.Remark),
+                    new SqlParameter("@delflag", dep.DelFlag),
+                    new SqlParameter("@addUserID", dep.AddUserId),
+                    new SqlParameter("@addtime", dep.AddTime),
+                    new SqlParameter("@updateUserID", dep.UpdateUserId),
+                    new SqlParameter("@lastTime", dep.LastTime)
+                };
+        }
+
+        /// <summary>
+        /// 新增部门记录
+        /// </summary>
+        /// <param name="dep">实体类DepEty</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string InsertSysDep(DepEty dep)
+        {
+            var sql =
+                "insert into SysDep(depid,name,remark,delflag,addUserID,addtime,updateUserID,lastTime) values(@depid,@name,@remark,@delflag,@addUserID,@addtime,@updateUserID,@lastTime)";
+            return SqlHelper.ExecSql(sql, SetPara(dep));
+        }
+
+        /// <summary>
+        /// 获取全部部门信息
+        /// </summary>
+        /// <param name="searchText">查询字段</param>
+        /// <returns>数据表</returns>
+        public DataTable AllSysDep(string searchText)
+        {
+            var sql =
+                "select p.depid,p.name,p.remark,p.lastTime,s.username as addusername ,ss.username as updateusername from SysDep p left join SysUser s on s.userid=p.addUserID left join SysUser ss on ss.userid=p.updateUserID where p.delflag ='false' ";
+
+            if (!string.IsNullOrEmpty(searchText))
+            {
+                //根据查询字段 进行查询
+                sql +=
+                    string.Format(
+                        "and( p.name like '%{0}%' or  p.remark like '%{0}%' or  s.username like '%{0}%' or ss.username like '%{0}%')",
+                        searchText);
+            }
+            sql += " order by p.lastTime DESC";
+
+            return SqlHelper.ExecSqlDateTable(sql);
+        }
+
+        /// <summary>
+        /// 更新部门信息
+        /// </summary>
+        /// <param name="dep">实体类DepEty</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string UpdateSysDep(DepEty dep)
+        {
+            var sq1 =
+                "update SysDep set name=@name,remark=@remark,lastTime=@lastTime,updateUserID=@updateUserID where depid=@depid";
+            return SqlHelper.ExecSql(sq1, SetPara(dep));
+        }
+
+        /// <summary>
+        /// 根据depid删除部门信息
+        /// </summary>
+        /// <param name="depid">部门depid</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string DelSysDep(string depid)
+        {
+            var sql = "update SysDep set delflag='true' where depid in (" + depid + ")";
+            return SqlHelper.ExecSql(sql);
+        }
+
+    }
+}

+ 14 - 0
Business/System/Op/Entity/OpEty.cs

@@ -0,0 +1,14 @@
+namespace Business.System.Op.Entity
+{
+    public class OpEty
+    {
+        //操作代码
+        public string Code { get; set; }
+
+        //操作名字
+        public string Name { get; set; }
+
+        //父操作代码
+        public string ParentCode { get; set; }
+    }
+}

+ 92 - 0
Business/System/Op/Vo/LmtVo.cs

@@ -0,0 +1,92 @@
+using System;
+using System.Data;
+using System.Data.SqlClient;
+using Common;
+
+namespace Business.System.Op.Vo
+{
+    public class LmtVo
+    {
+        /// <summary>
+        /// 根据userid获取用户权限
+        /// </summary>
+        /// <param name="userid">用户ID</param>
+        /// <returns>用户不可操作代码</returns>
+        public string GetLmt(string userid)
+        {
+            string check = "select count(*) from SysLmt where userid=@userid ";
+            string result = SqlHelper.ExecSqlSc(check, new SqlParameter("userid", userid));
+            if (!SqlHelper.CheckSc(result))
+            {
+                return "**";
+            }
+            int count = Convert.ToInt32(result);
+            if (count <= 0)
+            {
+                return "**";
+            }
+
+            string sql = "select ops from SysLmt where userid=@userid ";
+            result=SqlHelper.ExecSqlSc(sql,new SqlParameter( "userid",userid));
+            if (!SqlHelper.CheckSc(result))
+            {
+                result = "**";
+            }
+            return result;
+
+        }
+
+        /// <summary>
+        /// 修改用户权限
+        /// </summary>
+        /// <param name="userid">用户id</param>
+        /// <param name="ops">操作集合</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string UpdateLmt(string userid,string ops)
+        {
+            string sql = "update SysLmt set ops=@ops where userid=@userid ";
+            return SqlHelper.ExecSql(sql, new SqlParameter("@userid", userid), new SqlParameter("@ops", ops));
+        }
+
+
+        /// <summary>
+        /// 获取系统日志
+        /// </summary>
+        /// <param name="searchTime">搜索字段</param>
+        ///  <param name="searchText">搜索字段</param>
+        /// <returns>数据表</returns>
+        public DataTable GetSysLog(string searchTime,string searchText)
+        {
+            var sql =
+                "select top(500) l.time ,u.username,l.remark from SysLog l left join SysUser u on l.userid=u.userid ";
+            if (!string.IsNullOrEmpty(searchTime))
+            {
+                //根据查询字段 进行查询
+                sql +=
+                    string.Format("where (l.time between '{0}' and '{0} 23:59:59') ", searchTime);
+                if (!string.IsNullOrEmpty(searchText))
+                {
+                    //根据查询字段 进行查询
+                    sql +=
+                        string.Format("and  (u.username like '%{0}%' or l.remark like '%{0}%')", searchText);
+                }
+            }
+            else
+            {
+                if (!string.IsNullOrEmpty(searchText))
+                {
+                    //根据查询字段 进行查询
+                    sql +=
+                        string.Format("where ( u.username like '%{0}%' or l.remark like '%{0}%')", searchText);
+                }
+            }
+          
+            sql += " order by l.time DESC";
+
+            return SqlHelper.ExecSqlDateTable(sql);
+        }
+
+
+      
+    }
+}

+ 62 - 0
Business/System/Op/Vo/OpVo.cs

@@ -0,0 +1,62 @@
+using System.Collections;
+using System.Data;
+using System.Data.SqlClient;
+using Business.System.Op.Entity;
+using Common;
+
+namespace Business.System.Op.Vo
+{
+    public class OpVo
+    {
+        /// <summary>
+        /// 获取所有操作
+        /// </summary>
+        /// <returns>数据表</returns>
+        public DataTable AllOp()
+        {
+            var sql = "select * from SysOp order by parentcode";
+            return SqlHelper.ExecSqlDateTable(sql);
+        }
+
+
+        /// <summary>
+        /// 执行sql,返回操作实体类列表
+        /// </summary>
+        /// <param name="sql">sql语句</param>
+        /// <param name="sqlParameters">sql参数</param>
+        public ArrayList OpList(string sql, params SqlParameter[] sqlParameters)
+        {
+            var con = new SqlConnection(SqlHelper.ConStr);
+            var cmd = new SqlCommand { Connection = con, CommandType = CommandType.Text, CommandText = sql };
+            var op = new ArrayList();
+            if (sqlParameters.Length > 0)
+            {
+                SqlHelper.CmdGetParam(cmd, sqlParameters);
+            }
+            try
+            {
+                con.Open();
+            }
+            catch
+            {
+                return op;
+            }
+            using (var reader = cmd.ExecuteReader(CommandBehavior.CloseConnection))
+            {
+                if (!reader.HasRows)
+                    return op;
+                while (reader.Read())
+                {
+                    var opEty = new OpEty
+                    {
+                        Code = SqlHelper.ReaderString("code", reader),
+                        Name = SqlHelper.ReaderString("name", reader),
+                        ParentCode = SqlHelper.ReaderString("parentcode", reader)
+                    };
+                    op.Add(opEty);
+                }
+            }
+            return op;
+        }
+    }
+}

+ 37 - 0
Business/System/User/Entity/UserEty.cs

@@ -0,0 +1,37 @@
+using System;
+
+namespace Business.System.User.Entity
+{
+    public class UserEty
+    {
+        //用户ID
+        public string Userid { get; set; }
+
+        //用户账户
+        public string Useraccount { get; set; }
+
+        //用户密码
+        public string Userpassword { get; set; }
+
+        //用户姓名
+        public string Username { get; set; }
+
+        //用户部门ID
+        public string Depid { get; set; }
+
+        //用户手机号码
+        public string Mobile { get; set; }
+
+        //用户角色ID
+        public string Userroleid { get; set; }
+
+        //用户添加时间
+        public DateTime Addtime { get; set; }
+
+        //用户添加人ID
+        public string Adduserid { get; set; }
+
+        //用户删除标记
+        public bool Delflag { get; set; }
+    }
+}

+ 154 - 0
Business/System/User/Vo/UserVo.cs

@@ -0,0 +1,154 @@
+using System;
+using System.Data;
+using System.Data.SqlClient;
+using Business.System.Op.Vo;
+using Business.System.User.Entity;
+using Common;
+
+namespace Business.System.User.Vo
+{
+    public class UserVo
+    {
+        /// <summary>
+        /// 参数赋值
+        /// </summary>
+        /// <param name="user">实体类UserEty</param>
+        /// <returns>参数数组</returns>
+        private SqlParameter[] SetPara(UserEty user)
+        {
+            return new[]
+                {
+                    new SqlParameter("@userid", user.Userid),
+                    new SqlParameter("@username", user.Username),
+                    new SqlParameter("@delflag", user.Delflag),
+                    new SqlParameter("@adduserid", user.Adduserid),
+                    new SqlParameter("@addtime", user.Addtime),
+                    new SqlParameter("@depid",user.Depid),
+                    new SqlParameter("@mobile",user.Mobile),
+                    new SqlParameter("@useraccount",user.Useraccount),
+                    new SqlParameter("@userpassword",user.Userpassword)
+                };
+        }
+
+        /// <summary>
+        /// 新增user记录
+        /// </summary>
+        /// <param name="user">实体类UserEty</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string InsertUser(UserEty user)
+        {
+            try
+            {
+                //获取全部程序操作
+                DataTable op = new OpVo().AllOp();
+                string ops = string.Empty;
+                foreach (DataRow row in op.Rows)
+                {
+                    ops += row["code"] + ",";
+                }
+                //保存用户权限
+                string lmtSql = "insert into SysLmt values(@userid,@ops)";
+
+                //保存用户
+                var sql =
+                    "insert into SysUser(userid,username,delflag,adduserid,addtime,depid,mobile,useraccount,userpassword) values(@userid,@username,@delflag,@adduserid,@addtime,@depid,@mobile,@useraccount,@userpassword)";
+                
+                //建立事务所需二维数组
+                var sqlT = new object[2, 2];
+                sqlT[0, 0] = lmtSql;
+                sqlT[0, 1] = new[] { new SqlParameter("@userid", user.Userid), new SqlParameter("@ops", ops.TrimEnd(new[] { ',' })) };
+
+                sqlT[1, 0] = sql;
+                sqlT[1, 1] = SetPara(user);
+
+                return SqlHelper.ExecSqlT(sqlT);
+            }
+            catch (Exception exception)
+            {
+                return exception.Message;
+            }
+        }
+
+        /// <summary>
+        /// 更新用户信息
+        /// </summary>
+        /// <param name="user">实体类UserEty</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string UpdateUser(UserEty user)
+        {
+            var sq1 =
+                "update SysUser set username=@username,depid=@depid,mobile=@mobile,useraccount=@useraccount where userid=@userid";
+            return SqlHelper.ExecSql(sq1, SetPara(user));
+        }
+
+        /// <summary>
+        /// 根据userid删除用户信息
+        /// </summary>
+        /// <param name="userid">用户userid</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public string DelUser(string userid)
+        {
+            var sql = "update SysUser set delflag='true' where userid in (" + userid + ")";
+            return SqlHelper.ExecSql(sql);
+        }
+
+        /// <summary>
+        /// 根据部门ID获取该部门所有用户
+        /// </summary>
+        /// <param name="searchText">搜索字段</param>
+        /// <param name="depid">部门ID</param>
+        /// <returns>数据表</returns>
+        public DataTable GetUserByDepid(string searchText,string depid)
+        {
+            var sql =
+                "SELECT  p.userid, p.username, p.mobile, p.useraccount,  p.addtime, vp.username FROM  SysUser p left join SysUser vp on p.adduserid=vp.userid where p.depid=@depid and p.delflag ='false'";
+            if (!string.IsNullOrEmpty(searchText))
+            {
+                //根据查询字段 进行查询
+                sql +=
+                    string.Format(
+                        "and( p.username like '%{0}%' or p.useraccount like '%{0}%' or p.mobile like '%{0}%' or vp.username like '%{0}%') ",
+                        searchText);
+            }
+            sql += " order by p.addtime DESC";
+
+            return SqlHelper.ExecSqlDateTable(sql,new SqlParameter("@depid",depid));    
+        }
+
+        //用户修改密码
+        public string Upwd(string userid,string oPwd,string nPwd)
+        {
+            string check = "select count(*) from SysUser where userid=@userid and userpassword=@userpassword";
+            string result = SqlHelper.ExecSqlSc(check, new SqlParameter("@userid", userid), new SqlParameter("@userpassword", SecurityHelper.Md5Encrypt(oPwd)));
+            if (!SqlHelper.CheckSc(result))
+            {
+                return result.Split(':')[1];
+            }
+            try
+            {
+                int count = Convert.ToInt32(result);
+                if (count <= 0)
+                {
+                    return "用户旧密码错误";
+                }
+                string Up = "update SysUser set userpassword=@userpassword where userid=@userid";
+                return SqlHelper.ExecSql(Up, new SqlParameter("@userid", userid), new SqlParameter("@userpassword", SecurityHelper.Md5Encrypt(nPwd)));
+            }
+            catch (Exception ex)
+            {
+                return ex.Message; 
+            }
+        }
+
+        /// <summary>
+        /// 根据用户ID获取用户名
+        /// </summary>
+        /// <param name="userid">用户ID</param>
+        /// <returns></returns>
+        public string UserName(string userid)
+        {
+            string sql = "select username from SysUser where userid=@userid";
+            return SqlHelper.ExecSqlSc(sql, new SqlParameter("@userid", userid));
+        }
+    }
+}

BIN
Business/bin/Debug/Business.dll


BIN
Business/bin/Debug/Business.pdb


BIN
Business/bin/Debug/Common.dll


BIN
Business/bin/Debug/Common.pdb


+ 7 - 0
Business/obj/Debug/Business.csproj.FileListAbsolute.txt

@@ -0,0 +1,7 @@
+D:\My Project\LogisticsSystem\Business\bin\Debug\Business.dll
+D:\My Project\LogisticsSystem\Business\bin\Debug\Business.pdb
+D:\My Project\LogisticsSystem\Business\bin\Debug\Common.dll
+D:\My Project\LogisticsSystem\Business\bin\Debug\Common.pdb
+D:\My Project\LogisticsSystem\Business\obj\Debug\Business.dll
+D:\My Project\LogisticsSystem\Business\obj\Debug\Business.pdb
+D:\My Project\LogisticsSystem\Business\obj\Debug\Business.csprojResolveAssemblyReference.cache

BIN
Business/obj/Debug/Business.csprojResolveAssemblyReference.cache


BIN
Business/obj/Debug/Business.dll


BIN
Business/obj/Debug/Business.pdb


BIN
Business/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache


+ 15 - 0
Common/Com.cs

@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Common
+{
+    public static class Com
+    {
+        public static string NewGuid()
+        {
+           return Guid.NewGuid().ToString().Replace("-","");
+        }
+    }
+}

+ 58 - 0
Common/Common.csproj

@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{C4F32C3D-4B70-44F5-9A18-7BCEEB9C7CC2}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Common</RootNamespace>
+    <AssemblyName>Common</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Com.cs" />
+    <Compile Include="FileHelper.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="SecurityHelper.cs" />
+    <Compile Include="SqlHelper.cs.cs" />
+    <Compile Include="XMLhelper.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 17 - 0
Common/FileHelper.cs

@@ -0,0 +1,17 @@
+using System.Collections;
+
+namespace Common
+{
+    public class FileHelper
+    {
+        public string GetUploadfiles(Hashtable hash)
+        {
+            string temp = string.Empty;
+            foreach (string key in hash.Keys)
+            {
+                temp += "<input type=\"checkbox\" value=\"" + key + "\"/>" + key + "</br>";
+            }
+            return temp;
+        }
+    }
+}

+ 36 - 0
Common/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Common")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("微软中国")]
+[assembly: AssemblyProduct("Common")]
+[assembly: AssemblyCopyright("Copyright © 微软中国 2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("ec3d4676-aceb-4f03-9b45-a7c2a802a2e4")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 67 - 0
Common/SecurityHelper.cs

@@ -0,0 +1,67 @@
+using System;
+using System.Security.Cryptography;
+using System.Text;
+
+namespace Common
+{
+    public class SecurityHelper
+    {
+        //开发员
+        public static string Me = "VollYoung.com";
+
+        ///   <summary>  
+        ///   给一个字符串进行MD5加密  
+        ///   </summary>  
+        ///   <param   name="strText">待加密字符串</param>  
+        ///   <returns>加密后的字符串</returns>  
+        public static string Md5Encrypt(string strText)
+        {
+            using (MD5 md5Hash = MD5.Create())
+            {
+                string hash = GetMd5Hash(md5Hash, strText);
+
+                return hash;
+            }
+        }
+
+        static string GetMd5Hash(MD5 md5Hash, string input)
+        {
+
+            // Convert the input string to a byte array and compute the hash.
+            byte[] data = md5Hash.ComputeHash(Encoding.UTF8.GetBytes(input));
+
+            // Create a new Stringbuilder to collect the bytes
+            // and create a string.
+            StringBuilder sBuilder = new StringBuilder();
+
+            // Loop through each byte of the hashed data 
+            // and format each one as a hexadecimal string.
+            for (int i = 0; i < data.Length; i++)
+            {
+                sBuilder.Append(data[i].ToString("x2"));
+            }
+
+            // Return the hexadecimal string.
+            return sBuilder.ToString();
+        }
+
+        // Verify a hash against a string.
+        static bool VerifyMd5Hash(MD5 md5Hash, string input, string hash)
+        {
+            // Hash the input.
+            string hashOfInput = GetMd5Hash(md5Hash, input);
+
+            // Create a StringComparer an compare the hashes.
+            StringComparer comparer = StringComparer.OrdinalIgnoreCase;
+
+            if (0 == comparer.Compare(hashOfInput, hash))
+            {
+                return true;
+            }
+            else
+            {
+                return false;
+            }
+        }
+    }
+}

+ 232 - 0
Common/SqlHelper.cs.cs

@@ -0,0 +1,232 @@
+using System;
+using System.Data;
+using System.Data.SqlClient;
+namespace Common
+{
+    public class SqlHelper
+    {
+        //连接字符串
+        public static readonly string ConStr = XMLhelper.GetNode("ConnectStr");
+        /// <summary>
+        /// 执行sql,返回DataSet
+        /// </summary>
+        /// <param name="sql">sql语句</param>
+        /// <returns></returns>
+        public static DataSet ExecSqlDs(string sql)
+        {
+            var con = new SqlConnection(ConStr);
+            var adp = new SqlDataAdapter(sql, con);
+            var ds = new DataSet();
+            adp.Fill(ds, "sql");
+            return ds;
+        }
+
+        /// <summary>
+        /// 执行SQL
+        /// </summary>
+        /// <param name="sql">sql语句</param>
+        /// <param name="sqlParameters">参数</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public static string ExecSql(string sql, params SqlParameter[] sqlParameters)
+        {
+            string result = string.Empty;
+            var con = new SqlConnection(ConStr);
+            var command = new SqlCommand(sql, con) { CommandType = CommandType.Text };
+            if (sqlParameters.Length > 0)
+            {
+                CmdGetParam(command, sqlParameters);
+            }
+            try
+            {
+                con.Open();
+                command.ExecuteNonQuery();
+            }
+            catch (Exception ex)
+            {
+                result = ex.Message;
+            }
+            finally
+            {
+                con.Close();
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 执行SQL
+        /// </summary>
+        /// <param name="sql">sql语句</param>
+        /// <param name="sqlParameters">参数</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public static DataTable ExecSqlDateTable(string sql, params SqlParameter[] sqlParameters)
+        {
+            var con = new SqlConnection(ConStr);
+            var command = new SqlCommand(sql, con) { CommandType = CommandType.Text };
+            var dataSet = new DataSet();
+            if (sqlParameters.Length > 0)
+            {
+                CmdGetParam(command, sqlParameters);
+            }
+            try
+            {
+                var adapter = new SqlDataAdapter(command);
+                adapter.Fill(dataSet);
+            }
+            catch (Exception)
+            {
+                return new DataTable();
+            }
+            return dataSet.Tables.Count > 0 ? dataSet.Tables[0] : new DataTable();
+        }
+
+        /// <summary>
+        /// 执行SQL 返回第一格的值
+        /// </summary>
+        /// <param name="sql">sql语句</param>
+        /// <param name="sqlParameters">参数</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public static string ExecSqlSc(string sql, params SqlParameter[] sqlParameters)
+        {
+            var con = new SqlConnection(ConStr);
+            var command = new SqlCommand(sql, con) { CommandType = CommandType.Text };
+            string result = string.Empty;
+            if (sqlParameters.Length > 0)
+            {
+                CmdGetParam(command, sqlParameters);
+            }
+            try
+            {
+                con.Open();
+                var ex = command.ExecuteScalar();
+                if (ex != null && ex != DBNull.Value)
+                {
+                    result = ex.ToString();
+                }
+            }
+            catch (Exception ex)
+            {
+                result = "*报错False*:" + ex.Message;
+            }
+            finally
+            {
+                con.Close();
+            }
+            return result;
+        }
+
+
+
+        //检查执行ExecSqlSc是否报错
+        public static bool CheckSc(string result)
+        {
+            return !result.Contains("*报错False*:");
+        }
+
+
+        /// <summary>
+        /// sql命令传入参数
+        /// </summary>
+        /// <param name="cmd">sql命令</param>
+        /// <param name="sqlParameters">参数数组</param>
+        public static void CmdGetParam(SqlCommand cmd, SqlParameter[] sqlParameters)
+        {
+            if (sqlParameters.Length <= 0) return;
+            cmd.Parameters.Clear();
+            foreach (var sqlParameter in sqlParameters)
+            {
+                cmd.Parameters.Add(sqlParameter);
+            }
+        }
+
+
+        /// <summary>
+        /// 执行SQL事务
+        /// </summary>
+        /// <param name="sqls">对象二维数组, [,0]为sql语句,[,1]为sql参数数组</param>
+        /// <returns>成功返回空字符串,失败返回错误信息</returns>
+        public static string ExecSqlT(object[,] sqls)
+        {
+
+            string result = string.Empty;
+            var con = new SqlConnection(ConStr);
+            con.Open();
+            SqlTransaction tan = con.BeginTransaction();        //建立事务
+            try
+            {
+                var command = new SqlCommand { Connection = con, CommandType = CommandType.Text, Transaction = tan };
+                
+                //计算有多少组语句需要执行
+                for (int i = 0; i < sqls.GetLength(0); i++)
+                {
+                    command.CommandText =  sqls[i, 0].ToString();   //取出语句
+                    var sqlParameters = (SqlParameter[])sqls[i, 1]; //取出参数
+                    if (sqlParameters.Length > 0)
+                    {
+                        CmdGetParam(command, sqlParameters);        //参数赋值
+                    }
+                    command.ExecuteNonQuery();                     //执行
+                }
+                tan.Commit();         //事务提交
+            }
+            catch (Exception ex)
+            {
+                tan.Rollback();     //事务回滚
+                result = ex.Message;
+            }
+            finally
+            {
+                con.Close();
+            }
+            return result;
+        }
+
+        #region reader读取数据
+
+        /// <summary>
+        /// 从reader返回string
+        /// </summary>
+        /// <param name="columnName">查询的列名</param>
+        /// <param name="reader"></param>
+        /// <returns></returns>
+        public static string ReaderString(string columnName, SqlDataReader reader)
+        {
+            return (string)reader[columnName];
+        }
+
+        /// <summary>
+        /// 从reader返回int
+        /// </summary>
+        /// <param name="columnName">查询的列名</param>
+        /// <param name="reader"></param>
+        /// <returns></returns>
+        public static int ReaderInt(string columnName, SqlDataReader reader)
+        {
+            return Convert.ToInt32(reader[columnName]);
+        }
+
+        /// <summary>
+        /// 从reader返回DateTime
+        /// </summary>
+        /// <param name="columnName">查询的列名</param>
+        /// <param name="reader"></param>
+        /// <returns></returns>
+        public static DateTime ReaderDateTime(string columnName, SqlDataReader reader)
+        {
+            return (DateTime)reader[columnName];
+        }
+
+        /// <summary>
+        /// 从reader返回bool
+        /// </summary>
+        /// <param name="columnName">查询的列名</param>
+        /// <param name="reader"></param>
+        /// <returns></returns>
+        public static bool ReaderBool(string columnName, SqlDataReader reader)
+        {
+            return (bool)reader[columnName];
+        }
+
+
+        #endregion
+    }
+}

+ 29 - 0
Common/XMLhelper.cs

@@ -0,0 +1,29 @@
+using System.Xml;
+
+namespace Common
+{
+    public class XMLhelper
+    {
+        public static XmlDocument Xml = new XmlDocument();
+
+        public static string GetNode(string nodeNmae)
+        {
+            var xn = Xml.SelectSingleNode("root");
+            if (xn == null)
+            {
+                return string.Empty;
+            }
+
+            // 得到根节点的所有子节点
+            XmlNodeList xnl = xn.ChildNodes;
+            foreach (XmlNode xn1 in xnl)
+            {
+                if (xn1.Name == nodeNmae)
+                {
+                    return xn1.InnerText;
+                }
+            }
+            return string.Empty;
+        }
+    }
+}

BIN
Common/bin/Debug/Common.dll


BIN
Common/bin/Debug/Common.pdb


+ 4 - 0
Common/obj/Debug/Common.csproj.FileListAbsolute.txt

@@ -0,0 +1,4 @@
+D:\My Project\LogisticsSystem\Common\bin\Debug\Common.dll
+D:\My Project\LogisticsSystem\Common\bin\Debug\Common.pdb
+D:\My Project\LogisticsSystem\Common\obj\Debug\Common.dll
+D:\My Project\LogisticsSystem\Common\obj\Debug\Common.pdb

BIN
Common/obj/Debug/Common.dll


BIN
Common/obj/Debug/Common.pdb


BIN
Common/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache


BIN
DataBase/LogisticsSystem.mdf


BIN
DataBase/LogisticsSystem_log.ldf


+ 44 - 0
LogisticsSystem.sln

@@ -0,0 +1,44 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LogisticsSystem", "LogisticsSystem\LogisticsSystem.csproj", "{A764ED49-18A2-48B7-9B79-BFBA72EF020E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common", "Common\Common.csproj", "{C4F32C3D-4B70-44F5-9A18-7BCEEB9C7CC2}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Business", "Business\Business.csproj", "{DA3B6607-BC99-4181-96B6-92BB97634A06}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Web Sockets Test - Server", "WebSocket\Web Sockets Test - Server.csproj", "{576C6442-8258-4F9F-B197-E729A80A5249}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SocketSrv", "SocketSrv\SocketSrv.csproj", "{A325110D-D4C4-4207-B5EF-C6D541FAAF4F}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{A764ED49-18A2-48B7-9B79-BFBA72EF020E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{A764ED49-18A2-48B7-9B79-BFBA72EF020E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{A764ED49-18A2-48B7-9B79-BFBA72EF020E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{A764ED49-18A2-48B7-9B79-BFBA72EF020E}.Release|Any CPU.Build.0 = Release|Any CPU
+		{C4F32C3D-4B70-44F5-9A18-7BCEEB9C7CC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{C4F32C3D-4B70-44F5-9A18-7BCEEB9C7CC2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{C4F32C3D-4B70-44F5-9A18-7BCEEB9C7CC2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{C4F32C3D-4B70-44F5-9A18-7BCEEB9C7CC2}.Release|Any CPU.Build.0 = Release|Any CPU
+		{DA3B6607-BC99-4181-96B6-92BB97634A06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{DA3B6607-BC99-4181-96B6-92BB97634A06}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{DA3B6607-BC99-4181-96B6-92BB97634A06}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{DA3B6607-BC99-4181-96B6-92BB97634A06}.Release|Any CPU.Build.0 = Release|Any CPU
+		{576C6442-8258-4F9F-B197-E729A80A5249}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{576C6442-8258-4F9F-B197-E729A80A5249}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{576C6442-8258-4F9F-B197-E729A80A5249}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{576C6442-8258-4F9F-B197-E729A80A5249}.Release|Any CPU.Build.0 = Release|Any CPU
+		{A325110D-D4C4-4207-B5EF-C6D541FAAF4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{A325110D-D4C4-4207-B5EF-C6D541FAAF4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{A325110D-D4C4-4207-B5EF-C6D541FAAF4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{A325110D-D4C4-4207-B5EF-C6D541FAAF4F}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

BIN
LogisticsSystem.suo


+ 18 - 0
LogisticsSystem/Control/BasePage.cs

@@ -0,0 +1,18 @@
+namespace LogisticsSystem.Control
+{
+    public class BasePage : System.Web.UI.Page
+    {
+        protected void Alert(string text)
+        {
+            ClientScript.RegisterStartupScript(ClientScript.GetType(), "alert", "<script>alert('" + text + "');</script>");
+        }
+
+        protected void CheckLogin()
+        {
+            if ((string)Session["Userid"] == "" || Session["Userid"] == null)
+            {
+                Response.Redirect(@"..\..\Default.aspx");
+            }
+        }
+    }
+}

+ 15 - 0
LogisticsSystem/Control/Helper/InitHelper.cs

@@ -0,0 +1,15 @@
+using System.Data;
+using Business.System.Op.Vo;
+using Common;
+
+namespace LogisticsSystem.Control.Helper
+{
+    public static class InitHelper
+    {
+        //用户默认密码
+        public static readonly string DefaultPwd = SecurityHelper.Md5Encrypt(XMLhelper.GetNode("defaultPwd"));
+
+        //所有程序操作
+        public static DataTable Ops = new OpVo().AllOp();
+    }
+}

+ 25 - 0
LogisticsSystem/Control/Helper/LogHelper.cs

@@ -0,0 +1,25 @@
+using System.Data;
+using System.Data.SqlClient;
+using System.Web;
+using Common;
+
+namespace LogisticsSystem.Control.Helper
+{
+    public static class LogHelper
+    {
+        public static void Log(string log)
+        {
+            var sql = "insert into SysLog(userid,remark)  values(@userid,@remark)";
+            var userid = string.Empty;
+            if ((string) HttpContext.Current.Session["Userid"] != "" && HttpContext.Current.Session["Userid"] != null)
+            {
+                userid = (string) HttpContext.Current.Session["Userid"];
+            }
+            else
+            {
+                log = "有人试图没有登陆,执行程序操作:"+log;
+            }
+           SqlHelper.ExecSql(sql, new SqlParameter("@userid",userid ),new SqlParameter( "@remark",log));
+        }
+    }
+}

+ 70 - 0
LogisticsSystem/Control/Helper/LoginHelper.cs

@@ -0,0 +1,70 @@
+using System.Data;
+using System.Data.SqlClient;
+using Business.System.User.Entity;
+using Common;
+
+namespace LogisticsSystem.Control.Helper
+{
+    public class LoginHelper
+    {
+        //用户实体类,保存用户资料
+        public UserEty User = new UserEty();
+
+        /// <summary>
+        /// 登录方法,登录成功更新实体类内容
+        /// </summary>
+        /// <param name="useracc">用户账号</param>
+        /// <param name="userpwd">用户密码</param>
+        /// <returns>登录信息</returns>
+        public string Login(string useracc,string userpwd)
+        {
+            const string sql = "select * from SysUser where useraccount=@useraccount and userpassword=@userpassword and delflag=0";
+            var sqlParameters = new[]
+                {
+                    new SqlParameter( "@useraccount",useracc),
+                    new SqlParameter( "@userpassword", SecurityHelper.Md5Encrypt(userpwd))
+                };
+            return ExecSqlReader(sql, sqlParameters);
+        }
+
+
+        /// <summary>
+        /// 执行sql,返回SqlDataReader
+        /// </summary>
+        /// <param name="sql">sql语句</param>
+        /// <param name="sqlParameters">sql参数</param>
+        private  string ExecSqlReader(string sql, params SqlParameter[] sqlParameters)
+        {
+            var con = new SqlConnection(SqlHelper.ConStr);
+            var cmd = new SqlCommand { Connection = con, CommandType = CommandType.Text, CommandText = sql };
+            if (sqlParameters.Length > 0)
+            {
+                SqlHelper.CmdGetParam(cmd, sqlParameters);
+            }
+            try
+            {
+                con.Open();
+            }
+            catch
+            {
+                return "没数据库连接";
+            }
+            using (var reader = cmd.ExecuteReader(CommandBehavior.CloseConnection))
+            {
+                if (!reader.HasRows)
+                    return "用户名或密码错误";
+                while (reader.Read())
+                {
+                    User.Userid = SqlHelper.ReaderString("userid", reader);
+                    User.Username = SqlHelper.ReaderString("username", reader);
+                    User.Depid = SqlHelper.ReaderString("depid", reader);
+                    User.Mobile = SqlHelper.ReaderString("mobile", reader);
+                    User.Userroleid = SqlHelper.ReaderString("userroleid", reader);
+                    User.Addtime = SqlHelper.ReaderDateTime("addtime", reader);
+                    User.Adduserid = SqlHelper.ReaderString("adduserid", reader);
+                }
+            }
+            return string.Empty;
+        }
+    }
+}

+ 232 - 0
LogisticsSystem/Control/SrvBase.cs

@@ -0,0 +1,232 @@
+using System.Collections;
+using System.Data;
+using System.Text;
+using LogisticsSystem.Control.Helper;
+
+namespace LogisticsSystem.Control
+{
+    public class SrvBase : System.Web.UI.Page
+    {
+        //判断用户是否登陆
+        protected bool CheckUserLogin()
+        {
+            return (string)Session["Userid"] != "" && Session["Userid"] != null;
+        }
+
+        //判断用户是否有权进行操作,并记录操作
+        protected bool CheckUserDo(string dowhich, string type)
+        {
+            if (Session["Userroleid"].ToString() == "Im") return true;
+            string lmt = Session["lmt"].ToString();
+            if (lmt == "**" || lmt.Contains(type))
+            {
+                return false;
+            }
+            DataRow[] row = InitHelper.Ops.Select("code='" + type + "'");
+            if (row.Length <= 0) return true;
+            LogHelper.Log(dowhich + "--" + row[0]["name"]);
+            return true;
+        }
+
+
+
+        //创建标准数据表
+        protected void StanderTable(StringBuilder tableHead, DataTable data, string idName)
+        {
+            try
+            {
+                foreach (DataRow row in data.Rows)
+                {
+                    tableHead.Append("<tr>");
+                    tableHead.Append("<td><input type=\"checkbox\" value=\"" + row[idName] + "\"></td>");
+                    foreach (DataColumn column in data.Columns)
+                    {
+                        if (column.ColumnName == idName) continue;
+                        tableHead.Append("<td>" + row[column] + "</td>");
+                    }
+                    tableHead.Append("</tr>");
+                }
+                tableHead.Append("</table>");
+            }
+            catch
+            {
+                tableHead.Clear();
+                tableHead.Append("获取数据出错");
+            }
+        }
+
+        //创建标准数据表  可加属性 cl keys为需要加属性的td列名 , value为属性值的列名
+        protected void StanderTable(StringBuilder tableHead, DataTable data, string idName, Hashtable cl)
+        {
+            try
+            {
+                foreach (DataRow row in data.Rows)
+                {
+                    tableHead.Append("<tr>");
+                    tableHead.Append("<td><input type=\"checkbox\" value=\"" + row[idName] + "\"></td>");
+                    foreach (DataColumn column in data.Columns)
+                    {
+                        if (column.ColumnName == idName) continue;
+                        if (cl.ContainsValue(column.ColumnName)) continue;
+                        if (cl.ContainsKey(column.ColumnName))
+                        {
+                            tableHead.Append("<td " + cl[column.ColumnName] + "=\"" + row[cl[column.ColumnName].ToString()] + "\">" + row[column] + "</td>");
+                        }
+                        else
+                        {
+                            tableHead.Append("<td>" + row[column] + "</td>");
+                        }
+
+                    }
+                    tableHead.Append("</tr>");
+                }
+                tableHead.Append("</table>");
+            }
+            catch
+            {
+                tableHead.Clear();
+                tableHead.Append("获取数据出错");
+            }
+        }
+
+        //创建标准数据表  可加属性 cl keys为需要加属性的td列名 , value为用户需要添加的值 , keyCname为全套哈希表key与数据表关联的列名
+        protected void VoStanderTable(StringBuilder tableHead, DataTable data, string idName, Hashtable cl,string keyCname)
+        {
+            try
+            {
+                foreach (DataRow row in data.Rows)
+                {
+                    tableHead.Append("<tr>");
+                    tableHead.Append("<td><input type=\"checkbox\" value=\"" + row[idName] + "\"></td>");
+                    foreach (DataColumn column in data.Columns)
+                    {
+                        if (column.ColumnName == idName) continue;
+                        if (cl.ContainsKey(column.ColumnName))
+                        {
+                            tableHead.Append("<td " + column.ColumnName + "=\"" + row[column] + "\">" + ((Hashtable)cl[column.ColumnName])[row[keyCname].ToString()] + "</td>");
+                        }
+                        else
+                        {
+                            tableHead.Append("<td>" + row[column] + "</td>");
+                        }
+
+                    }
+                    tableHead.Append("</tr>");
+                }
+                tableHead.Append("</table>");
+            }
+            catch
+            {
+                tableHead.Clear();
+                tableHead.Append("获取数据出错");
+            }
+        }
+
+        //创建定制数据表  cl keys为需要加属性的td列名 , value为用户需要添加的值 , keyCname为全套哈希表key与数据表关联的列名
+        protected void CusTable(StringBuilder tableHead, DataTable data, Hashtable cl, string keyCname)
+        {
+            try
+            {
+                foreach (DataRow row in data.Rows)
+                {
+                    tableHead.Append("<tr>");
+                    foreach (DataColumn column in data.Columns)
+                    {
+                        if (cl.ContainsKey(column.ColumnName))
+                        {
+                            tableHead.Append("<td>" + ((Hashtable)cl[column.ColumnName])[row[keyCname].ToString()] + "</td>");
+                        }
+                        else
+                        {
+                            tableHead.Append("<td>" + row[column] + "</td>");
+                        }
+
+                    }
+                    tableHead.Append("</tr>");
+                }
+                tableHead.Append("</table>");
+            }
+            catch
+            {
+                tableHead.Clear();
+                tableHead.Append("获取数据出错");
+            }
+        }
+
+       /// <summary>
+       /// 超级定制表
+       /// </summary>
+       /// <param name="tableHead">表头</param>
+       /// <param name="data">数据表</param>
+        /// <param name="cl">cl keys为需要加属性的td列名 , value为用户需要添加的值</param>
+        /// <param name="keyCname"> keyCname为全套哈希表key与数据表关联的列名</param>
+        /// <param name="hashtable">可以加属性 ,  cl keys为需要加属性的td列名 , value为属性值的列名</param>
+        protected void VoCusTable(StringBuilder tableHead, DataTable data, Hashtable cl, string keyCname,Hashtable hashtable)
+        {
+            try
+            {
+                foreach (DataRow row in data.Rows)
+                {
+                    tableHead.Append("<tr>");
+                    foreach (DataColumn column in data.Columns)
+                    {
+                        if (hashtable.ContainsValue(column.ColumnName))continue;
+                        if (hashtable.ContainsKey(column.ColumnName))
+                        {
+                            if (cl.ContainsKey(column.ColumnName))
+                            {
+                                tableHead.Append("<td " + hashtable[column.ColumnName] + "=\"" + row[hashtable[column.ColumnName].ToString()] + "\" >" + ((Hashtable)cl[column.ColumnName])[row[keyCname].ToString()] + "</td>");
+                            }
+                            else
+                            {
+                                tableHead.Append("<td " + hashtable[column.ColumnName] + "=\"" + row[hashtable[column.ColumnName].ToString()] + "\" >" + row[column] + "</td>");
+                            }
+                        }
+                        else
+                        {
+                            if (cl.ContainsKey(column.ColumnName))
+                            {
+                                tableHead.Append("<td>" + ((Hashtable)cl[column.ColumnName])[row[keyCname].ToString()] + "</td>");
+                            }
+                            else
+                            {
+                                tableHead.Append("<td>" + row[column] + "</td>");
+                            }
+                        }
+                    }
+                    tableHead.Append("</tr>");
+                }
+                tableHead.Append("</table>");
+            }
+            catch
+            {
+                tableHead.Clear();
+                tableHead.Append("获取数据出错");
+            }
+        }
+
+
+        //创建标准数据表(没有checkbox)
+        protected void NoCheckTable(StringBuilder tableHead, DataTable data)
+        {
+            try
+            {
+                foreach (DataRow row in data.Rows)
+                {
+                    tableHead.Append("<tr>");
+                    foreach (DataColumn column in data.Columns)
+                    {
+                        tableHead.Append("<td>" + row[column] + "</td>");
+                    }
+                    tableHead.Append("</tr>");
+                }
+                tableHead.Append("</table>");
+            }
+            catch
+            {
+                tableHead.Clear();
+                tableHead.Append("获取数据出错");
+            }
+        }
+    }
+}

+ 16 - 0
LogisticsSystem/Default.aspx

@@ -0,0 +1,16 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="LogisticsSystem.Default" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head runat="server">
+    <title>企业物流系统</title>
+</head>
+<body>
+    <form id="form1" runat="server">
+    <div>
+    
+    </div>
+    </form>
+</body>
+</html>

+ 13 - 0
LogisticsSystem/Default.aspx.cs

@@ -0,0 +1,13 @@
+using System;
+
+namespace LogisticsSystem
+{
+    public partial class Default : System.Web.UI.Page
+    {
+        protected void Page_Load(object sender, EventArgs e)
+        {
+            Session["islogin"] = "true";
+            Response.Redirect(@"SysMain\Login\Login.aspx");
+        }
+    }
+}

+ 26 - 0
LogisticsSystem/Default.aspx.designer.cs

@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace LogisticsSystem
+{
+
+
+    public partial class Default
+    {
+
+        /// <summary>
+        /// form1 control.
+        /// </summary>
+        /// <remarks>
+        /// Auto-generated field.
+        /// To modify move field declaration from designer file to code-behind file.
+        /// </remarks>
+        protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+    }
+}

BIN
LogisticsSystem/Dll/System.Data.SQLite.dll


+ 1 - 0
LogisticsSystem/Global.asax

@@ -0,0 +1 @@
+<%@ Application Codebehind="Global.asax.cs" Inherits="LogisticsSystem.Global" Language="C#" %>

+ 49 - 0
LogisticsSystem/Global.asax.cs

@@ -0,0 +1,49 @@
+using System;
+using System.Threading;
+using Common;
+using SocketSrv;
+namespace LogisticsSystem
+{
+    public class Global : System.Web.HttpApplication
+    {
+
+        void Application_Start(object sender, EventArgs e)
+        {
+            // Code that runs on application startup
+            XMLhelper.Xml.Load(Server.MapPath("~/Setting.resx"));
+
+            WebSocketServerTest WSServerTest = new WebSocketServerTest();
+            Thread thrListenForClients = new Thread(new ThreadStart(WSServerTest.Start));
+            thrListenForClients.Start();		
+            
+        }
+
+        void Application_End(object sender, EventArgs e)
+        {
+            //  Code that runs on application shutdown
+
+        }
+
+        void Application_Error(object sender, EventArgs e)
+        {
+            // Code that runs when an unhandled error occurs
+
+        }
+
+        void Session_Start(object sender, EventArgs e)
+        {
+            // Code that runs when a new session is started
+
+        }
+
+        void Session_End(object sender, EventArgs e)
+        {
+            // Code that runs when a session ends. 
+            // Note: The Session_End event is raised only when the sessionstate mode
+            // is set to InProc in the Web.config file. If session mode is set to StateServer 
+            // or SQLServer, the event is not raised.
+
+        }
+
+    }
+}

BIN
LogisticsSystem/Images/loading.gif


+ 335 - 0
LogisticsSystem/LogisticsSystem.csproj

@@ -0,0 +1,335 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>
+    </ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{A764ED49-18A2-48B7-9B79-BFBA72EF020E}</ProjectGuid>
+    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>LogisticsSystem</RootNamespace>
+    <AssemblyName>LogisticsSystem</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Web.Extensions" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Web" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Configuration" />
+    <Reference Include="System.Web.Services" />
+    <Reference Include="System.EnterpriseServices" />
+    <Reference Include="System.Web.DynamicData" />
+    <Reference Include="System.Web.Entity" />
+    <Reference Include="System.Web.ApplicationServices" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Default.aspx" />
+    <Content Include="Global.asax" />
+    <Content Include="Images\loading.gif" />
+    <Content Include="Scripts\Base.js" />
+    <Content Include="Scripts\chat.js" />
+    <Content Include="Scripts\FileFrm.js" />
+    <Content Include="Scripts\jquery-1.10.2.js" />
+    <Content Include="Scripts\jquery-ui.js" />
+    <Content Include="Scripts\SetFrm.js" />
+    <Content Include="Scripts\SupplyFrm.js" />
+    <Content Include="Scripts\upload.js" />
+    <Content Include="Styles\BaseStyle.css" />
+    <Content Include="Styles\chatStyle.css" />
+    <Content Include="Styles\Main.css" />
+    <Content Include="Styles\SetStyle.css" />
+    <Content Include="Styles\SupplyStyle.css" />
+    <Content Include="SysMain\FileFlow\Action.xml">
+      <SubType>Designer</SubType>
+    </Content>
+    <Content Include="SysMain\FileFlow\ActionSrv.aspx" />
+    <Content Include="SysMain\FileFlow\FileFrm.aspx" />
+    <Content Include="SysMain\FileFlow\FlowListSrv.aspx" />
+    <Content Include="SysMain\FileFlow\FlowSrv.aspx" />
+    <Content Include="SysMain\FileFlow\download.aspx" />
+    <Content Include="SysMain\FileFlow\upload.aspx" />
+    <Content Include="SysMain\FileFlow\uploadSrv.aspx" />
+    <Content Include="SysMain\GoBackBtn.ascx" />
+    <Content Include="SysMain\Login\Login.aspx" />
+    <Content Include="SysMain\MainOp.xml" />
+    <Content Include="SysMain\Main\Chat.aspx" />
+    <Content Include="SysMain\Main\MainFrm.aspx" />
+    <Content Include="SysMain\Main\MainMenu.aspx" />
+    <Content Include="SysMain\Setting\Action.xml">
+      <SubType>Designer</SubType>
+    </Content>
+    <Content Include="SysMain\Setting\DepSrv.aspx" />
+    <Content Include="SysMain\Setting\LimitSrv.aspx" />
+    <Content Include="SysMain\Setting\SetFrm.aspx" />
+    <Content Include="SysMain\Setting\UserSrv.aspx" />
+    <Content Include="SysMain\Supply\Action.xml">
+      <SubType>Designer</SubType>
+    </Content>
+    <Content Include="SysMain\Supply\IngredientsSrv.aspx" />
+    <Content Include="SysMain\Supply\PurchaseSrv.aspx" />
+    <Content Include="SysMain\Supply\StockSrv.aspx" />
+    <Content Include="SysMain\Supply\SupplyFrm.aspx" />
+    <Content Include="SysMain\Supply\SupplySrv.aspx" />
+    <Content Include="Web.config">
+      <SubType>Designer</SubType>
+    </Content>
+    <Content Include="Web.Debug.config">
+      <DependentUpon>Web.config</DependentUpon>
+    </Content>
+    <Content Include="Web.Release.config">
+      <DependentUpon>Web.config</DependentUpon>
+    </Content>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Control\BasePage.cs">
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="Control\Helper\InitHelper.cs" />
+    <Compile Include="Control\Helper\LogHelper.cs" />
+    <Compile Include="Control\Helper\LoginHelper.cs" />
+    <Compile Include="Control\SrvBase.cs">
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="Default.aspx.cs">
+      <DependentUpon>Default.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="Default.aspx.designer.cs">
+      <DependentUpon>Default.aspx</DependentUpon>
+    </Compile>
+    <Compile Include="Global.asax.cs">
+      <DependentUpon>Global.asax</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Site.Master.cs">
+      <DependentUpon>Site.Master</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="Site.Master.designer.cs">
+      <DependentUpon>Site.Master</DependentUpon>
+    </Compile>
+    <Compile Include="SysMain\FileFlow\ActionSrv.aspx.cs">
+      <DependentUpon>ActionSrv.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="SysMain\FileFlow\ActionSrv.aspx.designer.cs">
+      <DependentUpon>ActionSrv.aspx</DependentUpon>
+    </Compile>
+    <Compile Include="SysMain\FileFlow\FileFrm.aspx.cs">
+      <DependentUpon>FileFrm.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="SysMain\FileFlow\FileFrm.aspx.designer.cs">
+      <DependentUpon>FileFrm.aspx</DependentUpon>
+    </Compile>
+    <Compile Include="SysMain\FileFlow\FlowListSrv.aspx.cs">
+      <DependentUpon>FlowListSrv.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="SysMain\FileFlow\FlowListSrv.aspx.designer.cs">
+      <DependentUpon>FlowListSrv.aspx</DependentUpon>
+    </Compile>
+    <Compile Include="SysMain\FileFlow\FlowSrv.aspx.cs">
+      <DependentUpon>FlowSrv.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="SysMain\FileFlow\FlowSrv.aspx.designer.cs">
+      <DependentUpon>FlowSrv.aspx</DependentUpon>
+    </Compile>
+    <Compile Include="SysMain\FileFlow\download.aspx.cs">
+      <DependentUpon>download.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="SysMain\FileFlow\download.aspx.designer.cs">
+      <DependentUpon>download.aspx</DependentUpon>
+    </Compile>
+    <Compile Include="SysMain\FileFlow\upload.aspx.cs">
+      <DependentUpon>upload.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="SysMain\FileFlow\upload.aspx.designer.cs">
+      <DependentUpon>upload.aspx</DependentUpon>
+    </Compile>
+    <Compile Include="SysMain\FileFlow\uploadSrv.aspx.cs">
+      <DependentUpon>uploadSrv.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="SysMain\FileFlow\uploadSrv.aspx.designer.cs">
+      <DependentUpon>uploadSrv.aspx</DependentUpon>
+    </Compile>
+    <Compile Include="SysMain\GoBackBtn.ascx.cs">
+      <DependentUpon>GoBackBtn.ascx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="SysMain\GoBackBtn.ascx.designer.cs">
+      <DependentUpon>GoBackBtn.ascx</DependentUpon>
+    </Compile>
+    <Compile Include="SysMain\Login\Login.aspx.cs">
+      <DependentUpon>Login.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="SysMain\Login\Login.aspx.designer.cs">
+      <DependentUpon>Login.aspx</DependentUpon>
+    </Compile>
+    <Compile Include="SysMain\Main\Chat.aspx.cs">
+      <DependentUpon>Chat.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="SysMain\Main\Chat.aspx.designer.cs">
+      <DependentUpon>Chat.aspx</DependentUpon>
+    </Compile>
+    <Compile Include="SysMain\Main\MainFrm.aspx.cs">
+      <DependentUpon>MainFrm.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="SysMain\Main\MainFrm.aspx.designer.cs">
+      <DependentUpon>MainFrm.aspx</DependentUpon>
+    </Compile>
+    <Compile Include="SysMain\Main\MainMenu.aspx.cs">
+      <DependentUpon>MainMenu.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="SysMain\Main\MainMenu.aspx.designer.cs">
+      <DependentUpon>MainMenu.aspx</DependentUpon>
+    </Compile>
+    <Compile Include="SysMain\Setting\DepSrv.aspx.cs">
+      <DependentUpon>DepSrv.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="SysMain\Setting\DepSrv.aspx.designer.cs">
+      <DependentUpon>DepSrv.aspx</DependentUpon>
+    </Compile>
+    <Compile Include="SysMain\Setting\LimitSrv.aspx.cs">
+      <DependentUpon>LimitSrv.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="SysMain\Setting\LimitSrv.aspx.designer.cs">
+      <DependentUpon>LimitSrv.aspx</DependentUpon>
+    </Compile>
+    <Compile Include="SysMain\Setting\SetFrm.aspx.cs">
+      <DependentUpon>SetFrm.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="SysMain\Setting\SetFrm.aspx.designer.cs">
+      <DependentUpon>SetFrm.aspx</DependentUpon>
+    </Compile>
+    <Compile Include="SysMain\Setting\UserSrv.aspx.cs">
+      <DependentUpon>UserSrv.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="SysMain\Setting\UserSrv.aspx.designer.cs">
+      <DependentUpon>UserSrv.aspx</DependentUpon>
+    </Compile>
+    <Compile Include="SysMain\Supply\IngredientsSrv.aspx.cs">
+      <DependentUpon>IngredientsSrv.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="SysMain\Supply\IngredientsSrv.aspx.designer.cs">
+      <DependentUpon>IngredientsSrv.aspx</DependentUpon>
+    </Compile>
+    <Compile Include="SysMain\Supply\PurchaseSrv.aspx.cs">
+      <DependentUpon>PurchaseSrv.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="SysMain\Supply\PurchaseSrv.aspx.designer.cs">
+      <DependentUpon>PurchaseSrv.aspx</DependentUpon>
+    </Compile>
+    <Compile Include="SysMain\Supply\StockSrv.aspx.cs">
+      <DependentUpon>StockSrv.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="SysMain\Supply\StockSrv.aspx.designer.cs">
+      <DependentUpon>StockSrv.aspx</DependentUpon>
+    </Compile>
+    <Compile Include="SysMain\Supply\SupplyFrm.aspx.cs">
+      <DependentUpon>SupplyFrm.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="SysMain\Supply\SupplyFrm.aspx.designer.cs">
+      <DependentUpon>SupplyFrm.aspx</DependentUpon>
+    </Compile>
+    <Compile Include="SysMain\Supply\SupplySrv.aspx.cs">
+      <DependentUpon>SupplySrv.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="SysMain\Supply\SupplySrv.aspx.designer.cs">
+      <DependentUpon>SupplySrv.aspx</DependentUpon>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="App_Data\" />
+    <Folder Include="SysMain\AjaxServer\" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Site.Master" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Business\Business.csproj">
+      <Project>{DA3B6607-BC99-4181-96B6-92BB97634A06}</Project>
+      <Name>Business</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\Common\Common.csproj">
+      <Project>{C4F32C3D-4B70-44F5-9A18-7BCEEB9C7CC2}</Project>
+      <Name>Common</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\SocketSrv\SocketSrv.csproj">
+      <Project>{A325110D-D4C4-4207-B5EF-C6D541FAAF4F}</Project>
+      <Name>SocketSrv</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
+  <ProjectExtensions>
+    <VisualStudio>
+      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
+        <WebProjectProperties>
+          <UseIIS>False</UseIIS>
+          <AutoAssignPort>True</AutoAssignPort>
+          <DevelopmentServerPort>65430</DevelopmentServerPort>
+          <DevelopmentServerVPath>/</DevelopmentServerVPath>
+          <IISUrl>
+          </IISUrl>
+          <NTLMAuthentication>False</NTLMAuthentication>
+          <UseCustomServer>False</UseCustomServer>
+          <CustomServerUrl>
+          </CustomServerUrl>
+          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
+        </WebProjectProperties>
+      </FlavorProperties>
+    </VisualStudio>
+  </ProjectExtensions>
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 27 - 0
LogisticsSystem/LogisticsSystem.csproj.user

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ProjectExtensions>
+    <VisualStudio>
+      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
+        <WebProjectProperties>
+          <StartPageUrl>Default.aspx</StartPageUrl>
+          <StartAction>SpecificPage</StartAction>
+          <AspNetDebugging>True</AspNetDebugging>
+          <SilverlightDebugging>False</SilverlightDebugging>
+          <NativeDebugging>False</NativeDebugging>
+          <SQLDebugging>False</SQLDebugging>
+          <ExternalProgram>
+          </ExternalProgram>
+          <StartExternalURL>
+          </StartExternalURL>
+          <StartCmdLineArguments>
+          </StartCmdLineArguments>
+          <StartWorkingDirectory>
+          </StartWorkingDirectory>
+          <EnableENC>False</EnableENC>
+          <AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
+        </WebProjectProperties>
+      </FlavorProperties>
+    </VisualStudio>
+  </ProjectExtensions>
+</Project>

+ 35 - 0
LogisticsSystem/Properties/AssemblyInfo.cs

@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("LogisticsSystem")]
+[assembly: AssemblyDescription("LogisticsSystem")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("VollYoung")]
+[assembly: AssemblyProduct("LogisticsSystem")]
+[assembly: AssemblyCopyright("Copyright © VollYoung.com  2013")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("d66702e4-2a0d-4871-89dd-47c23534ec5d")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 369 - 0
LogisticsSystem/Scripts/Base.js

@@ -0,0 +1,369 @@
+//保存z-index
+var z_index = 1;
+
+//部门服务地址
+var depSrv = "http://" + window.location.host + "/SysMain/Setting/DepSrv.aspx";
+//用户服务地址
+var UserSrv = "http://" + window.location.host + "/SysMain/Setting/UserSrv.aspx";
+
+//主窗口数据地址
+var MainOp = "http://" + window.location.host + "/SysMain/MainOp.xml";
+
+
+//构造 功能窗口式DIV 
+function ActionDiv(action, id, title) {
+    var divStr = "<div class=\"Action_Box\" isClose=\"f\" id=\"" + action + id + "\"><div class=\"Box_info\">" + title + "<div class=\"Box_Close\">关闭</div></div><div class=\"Action_Box_Content\" id=\"" + action + "_Con_" + id + "\"></div></div>";
+    $("body").append(divStr);
+    var divId = "#" + action + id;
+    $(divId).css("z-index", "99999");
+    $(divId).fadeIn("slow", function () {
+        $(this).animate({ left: '200px' }, "slow");
+    });
+    Close_Main_Box();
+    Action_BoxClick();
+    DragDiv();
+}
+
+
+//构造 标准窗口式DIV 
+function StanderDiv(id, title,menuHtml) {
+    var divStr = "<div class=\"Main_Box\" isClose=\"f\" id=\"Div_" + id + "\"><div class=\"Box_info\">" + title + "<div class=\"Box_Close\">关闭</div></div><div class=\"Box_Menu\"><table id=\"menu_" + id + "\"><tr>" + menuHtml + "</tr></table></div><div class=\"Box_Content\" id=\"Con_" + id + "\"></div></div>";
+    $("body").append(divStr);
+    var divId = "#Div_" + id;
+    $(divId).css("z-index", z_index + 1);
+    z_index = z_index + 1;
+    $(divId).fadeIn("slow", function () {
+        $(this).animate({ left: '200px' }, "slow");
+    });
+    Close_Main_Box();
+    Main_BoxClick();
+    DragDiv();
+}
+
+//构造 标准菜单(搜索,增加,删除,修改)
+function StanderMenu(id) {
+    return "<td><input id=\"searchT_" + id + "\" type=\"text\"/><input value=\"搜索\" id=\"searchB_" + id + "\" type=\"button\"></td><td><input value=\"新增\" id=\"Insert_" + id + "\" type=\"button\"></td><td><input value=\"修改\" id=\"Update_" + id + "\" type=\"button\"></td><td><input value=\"删除\" id=\"Del_" + id + "\" type=\"button\"></td>";
+}
+//菜单扩展
+function Vmenu(menuid, text) {
+    var tid = "#menu_" + menuid + " tr";
+    $(tid).append("<td>" + text + "</td>");
+}
+
+//左侧菜单隐藏和显示
+function ShowLeftMenu() {
+    $(".Div_leftMenu_Btn").mouseover(function () {
+        $(this).animate({ left: '-100px' }, "slow");
+        $(".leftNav").animate({ left: '0px' }, "slow");
+    });
+
+    $(".leftNav").mouseleave(function () {
+        $(this).animate({ left: '-100px' }, "slow");
+        $(".Div_leftMenu_Btn").animate({ left: '0px' }, "slow");
+    });
+}
+
+//关闭Main_Box
+function Close_Main_Box() {
+    $(".Box_Close").click(function () {
+        $(this).parent().parent().attr("isClose", "t");
+        $(this).parent().parent().fadeOut("slow");
+    });
+}
+//关闭普通窗口
+function CloseBox(id) {
+    var tid = "#" + id;
+    $(tid).attr("isClose", "t");
+    $(tid).fadeOut("slow");
+}
+
+//改变Main_Box Z-index 或显示Main_Box
+function Show_Main_Box(id) {
+    var divId = "#" + id;
+    $(divId).css("z-index", z_index + 1);
+    z_index = z_index + 1;
+    if ($(divId).attr("isClose") == "t") {
+        $(divId).fadeIn("slow");
+        $(divId).attr("isClose","f");
+    }
+
+}
+
+//显示Action_Box
+function Show_Action_Box(id) {
+    var divId = "#" + id;
+    $(divId).css("z-index", "99999");
+    if ($(divId).attr("isClose") == "t") {
+        $(divId).fadeIn("slow");
+        $(divId).attr("isClose", "f");
+    }
+}
+
+
+//构造Main_Box后,对Main_Box的操作
+function Opera_Main_Box(id) {
+    var divId = "#" + id;
+    $(divId).unbind();
+    $(divId).bind("click", function () {
+        Show_Main_Box("Div_" + id);
+    });
+}
+
+//左边菜单点击基本事件
+function Left_Menu_Click(id, name,hasMenu) {
+    if (hasMenu) {
+        StanderDiv(id, name, StanderMenu(id));
+    } else {
+        StanderDiv(id, name, "");
+    }
+    Opera_Main_Box(id);
+}
+
+//Main_Box 点击 ,提高Main_Box z-index
+function Main_BoxClick() {
+    $(".Main_Box").click(function () {
+        $(this).css("z-index", z_index+1);
+        z_index = z_index + 1;
+    });
+}
+//Action_Box 点击 ,提高Action_Box z-index
+function Action_BoxClick() {
+    $(".Action_Box").click(function () {
+        $(this).css("z-index", z_index + 1);
+        z_index = z_index + 1;
+    });
+}
+
+//窗口式DIV拖动
+function DragDiv() {
+    $(function () {
+        $(".Main_Box").draggable({ handle: ".Box_info", scroll: false });
+    });
+    $(function () {
+        $(".Action_Box").draggable({ handle: ".Box_info", scroll: false });
+    });
+}
+
+//判断输入是否为数字
+function IsNum(str) {
+    var ex = /^\d+.?\d*$/;
+    if (ex.test(str)) {
+        return true;
+    } else {
+        return false;
+    }
+}
+
+$(document).ready(function () {
+    ShowLeftMenu();
+    $("#UPWD").unbind();
+    $("#UPWD").bind("click", function () {
+        UPWD();
+    });
+});
+
+
+
+//按钮加载图片开始
+function loading(id) {
+    var tid = "#" + id;
+    $(tid).fadeOut();
+    $(tid).parent().append("<img class=\"datagrid-mask-msg\" src=\"http://" + window.location.host + "\\Images\\loading.gif\"/>");
+    var f = "stopW(\"" + id + "\")";
+    setTimeout(f, 10000);
+}
+//按钮加载图片结束
+function stopW(id) {
+    var tid = "#" + id;
+    $(tid).fadeIn();
+    $('.datagrid-mask-msg').remove();
+}
+
+//内容加载图片开始
+function Cloading(id) {
+    var tid = "#" + id;
+    $(tid).html("<img class=\"datagrid-mask-msg\" src=\"http://" + window.location.host + "\\Images\\loading.gif\"/>");
+    setTimeout('Cstop()', 10000);
+}
+//内容加载图片结束
+function Cstop() {
+    $('.datagrid-mask-msg').remove();
+}
+
+//清空table 里面 的表单数据
+function clearDataForm(id) {
+    var inputid = "#" + id + " input";
+    var textid = "#" + id + " textarea";
+    $(inputid).val("");
+    $(textid).val("");
+}
+
+//判断标准表的checkbox选中的值 用','分开
+function CheckBoxVal(id) {
+    var ids = "";
+    var tid = "#" + id + " input[type='checkbox']";
+    $(tid).each(function () {
+        if ($(this).is(':checked')) {
+            ids += $(this).val() + ",";
+        }
+    });
+    if (ids != "") {
+        ids=ids.substring(0, ids.length - 1);
+    }
+    return ids;
+}
+
+//判断标准表的checkbox未选中的值 用','分开
+function NoCheckBoxVal(id) {
+    var ids = "";
+    var tid = "#" + id + " input[type='checkbox']";
+    $(tid).each(function () {
+        if (!$(this).is(':checked')) {
+            ids += $(this).val() + ",";
+        }
+    });
+    if (ids != "") {
+        ids = ids.substring(0, ids.length - 1);
+    }
+    return ids;
+}
+
+
+//获取日期
+function GetDateStr(addDayCount) {
+    var dd = new Date();
+    var ddd = dd.DateAdd('d', addDayCount); 
+    var y = ddd.getYear();
+    var m = ddd.getMonth() + 1; //获取当前月 
+    var d = ddd.getDate();
+    return y + "-" + m + "-" + d;
+}
+
+//传入一个日期yyyy/mm/dd,格式化成yyyy-MM-dd
+function DateF(dateStr) {
+    var dateS = dateStr.split('/');
+    for (var i = 0; i < dateS.length; i++) {
+        if (dateS[i].length <= 1) {
+            dateS[i] = "0" + dateS[i];
+        }
+    }
+    return dateS[0] + "-" + dateS[1] + "-" + dateS[2];
+}
+
+//获取部门选择框
+function SelectDep(id, selectVal) {
+    var tid = "#" + id;
+    //执行ajax
+    $.get(depSrv, { type: "SelectDep" }, function (data) {
+        if (data != "") {
+            $(tid).html("");
+            $(tid).append(data);
+            if (selectVal != "") {
+                var selectI = tid + " option[value='" + selectVal + "']";
+                $(selectI).attr("selected", true);
+            }
+        } else {
+            $(tid).html("");
+            alert('没有可选择的部门,请到系统设置添加部门');
+        }
+    });
+}
+//获取用户选择框
+function SelectUser(id, d,selectVal) {
+    var tid = "#" + id;
+    //执行ajax
+    $.get(UserSrv, { type: "SelectUser", depid: d }, function (data) {
+        stopW(id);
+        if (data != "") {
+            $(tid).html("");
+            $(tid).append(data);
+            if (selectVal != "") {
+                var selectI = tid + " option[value='" + selectVal + "']";
+                $(selectI).attr("selected", true);
+            }
+        } else {
+            $(tid).html("");
+            alert('没有可选择的用户,请到系统设置添加用户');
+        }
+    });
+}
+
+//用户修改密码
+function UPWD() {
+    //构造 修改密码DIV
+    ActionDiv("Update", "PWD", "修改密码");
+    //读取XML 获取修改表单
+    $.get(MainOp, function (data) {
+        $("#Update_Con_PWD").html($(data).find("Action[name='UpdatePWD']").html());
+        $("#PWDUpdate").unbind();
+        $("#PWDUpdate").bind("click", function () {
+            UPWDGo();
+        });
+    });
+    //重新定义修改密码点击事件
+    $("#UPWD").unbind();
+    $("#UPWD").bind("click", function () {
+        Show_Action_Box("UpdatePWD");
+    });
+}
+//修改密码ajax
+function UPWDGo() {
+    //获取数据
+    var o = $("#OPWD").val();
+    var n = $("#NPWD").val();
+    var rn = $("#RNPWD").val();
+
+    if (n != rn) {
+        alert('新密码不一样,请重新输入');
+        return;
+    }
+    //加载等待
+    loading("PWDUpdate");
+    
+    //执行ajax
+    $.get(UserSrv, { type: "Upwd", oPwd: o, nPwd: n }, function (data) {
+        //等待结束
+        stopW("PWDUpdate");
+
+        if (data == "true") {
+            alert('修改成功!');
+            CloseBox("UpdatePWD");             //关闭窗口
+        }
+        else {
+            alert("修改失败...失败原因:" + data);
+        }
+    });
+}
+//输出指定位数的随机数的随机整数
+function RandNum(n) {
+
+    var rnd = "";
+
+    for (var i = 0; i < n; i++)
+
+        rnd += Math.floor(Math.random() * 10);
+
+    return rnd;
+
+}
+
+//单位数时间前加0
+function checkTime(i) {
+    if (i < 10) {
+        i = "0" + i;
+    }
+    return i;
+}
+
+//获取当前时间
+function NowTime() {
+    var today = new Date();
+    var h = today.getHours();
+    var m = today.getMinutes();
+    var s = today.getSeconds();
+
+    m = checkTime(m);
+    s = checkTime(s);
+
+    return h + ":" + m + ":" + s;
+}

+ 700 - 0
LogisticsSystem/Scripts/FileFrm.js

@@ -0,0 +1,700 @@
+/************* 公文流转 *********************/
+var ActionXML = "Action.xml";
+var A_Server = "ActionSrv.aspx";
+var F_Server = "FlowSrv.aspx";
+var Apply_Server = "FlowListSrv.aspx";
+var ajaxFile;  //ajax刷上传到服务器的文件
+
+/*****************  document.ready start ********************/
+$(document).ready(function () {
+    /***************** 操作管理开始 ******************/
+    $("#action").bind("click", function () {
+        //构造 操作管理DIV
+        Left_Menu_Click("action", "操作管理", true);
+        getAllAction();
+        //操作管理 新增按钮点击事件
+        $("#Insert_action").bind("click", function () {
+            //构造 新增操作管理DIV
+            ActionDiv("Insert", "action", "新增操作管理");
+            //读取XML 获取新增表单
+            $.get(ActionXML, function (data) {
+                $("#Insert_Con_action").html($(data).find("Action[name='Insertaction']").html());
+                SelectDep("actionDepName", "");
+                $("#actionDepName").change(function () { SelectUser("actionUserName", $("#actionDepName").val(), ""); });
+                loading("actionUserName");
+                var f = " SelectUser(\"actionUserName\", $(\"#actionDepName\").val(),\"\")";
+                setTimeout(f, 3000);
+                $("#actionSave").unbind();
+                $("#actionSave").bind("click", function () {
+                    actionSaveClick();
+                });
+            });
+            //重新定义操作管理 新增按钮点击事件
+            $("#Insert_action").unbind();
+            $("#Insert_action").bind("click", function () {
+                Show_Action_Box("Insertaction");
+            });
+        });
+        //操作管理 修改按钮点击事件
+        $("#Update_action").bind("click", function () {
+            var id = CheckBoxVal("actionSTD");
+            if (id == "" || id.indexOf(",") >= 0) {
+                alert("请选择一个需要修改的操作信息");
+                return;
+            }
+            //构造 修改操作管理DIV
+            ActionDiv("Update", "action", "修改操作管理");
+            //读取XML 获取修改表单
+            $.get(ActionXML, function (data) {
+                $("#Update_Con_action").html($(data).find("Action[name='Updateaction']").html());
+                GetPVal(id);
+                $("#actionUpdate").unbind();
+                $("#actionUpdate").bind("click", function () {
+                    actionUpdateClick();
+                });
+            });
+            //重新定义操作管理 修改按钮点击事件
+            $("#Update_action").unbind();
+            $("#Update_action").bind("click", function () {
+                var id2 = CheckBoxVal("actionSTD");
+                if (id2 == "" || id2.indexOf(",") >= 0) {
+                    alert("请选择一个需要修改的操作信息");
+                    return;
+                }
+                GetPVal(id2);
+                Show_Action_Box("Updateaction");
+            });
+        });
+        //绑定搜索按钮点击事件
+        $("#searchB_action").unbind();
+        $("#searchB_action").bind("click", function () {
+            getAllAction();
+        });
+        //绑定删除按钮点击事件
+        $("#Del_action").unbind();
+        $("#Del_action").bind("click", function () {
+            ActionDelClick();
+        });
+    });
+    /***************** 操作管理结束 ******************/
+
+    /***************** 流程管理开始 ******************/
+    $("#flow").bind("click", function () {
+        //构造 流程管理DIV
+        Left_Menu_Click("flow", "流程管理", true);
+        getAllFlow();
+        //流程管理 新增按钮点击事件
+        $("#Insert_flow").bind("click", function () {
+            //构造 新增流程管理DIV
+            ActionDiv("Insert", "flow", "新增流程管理");
+            //读取XML 获取新增表单
+            $.get(ActionXML, function (data) {
+                $("#Insert_Con_flow").html($(data).find("Action[name='Insertflow']").html());
+                SelectAc("flowActions", "");
+                $("#floaddAcwSave").unbind();
+                $("#flowSave").bind("click", function () {
+                    flowSaveClick();
+                });
+                $("#addAc").unbind();
+                $("#addAc").bind("click", function () {
+                    SelectAc("flowActions", "");
+                });
+                $("#delAc").unbind();
+                $("#delAc").bind("click", function () {
+                    $("#flowActions div:last").remove();
+                });
+            });
+            //重新定义流程管理 新增按钮点击事件
+            $("#Insert_flow").unbind();
+            $("#Insert_flow").bind("click", function () {
+                Show_Action_Box("Insertflow");
+            });
+        });
+        //流程管理 修改按钮点击事件
+        $("#Update_flow").bind("click", function () {
+            var id = CheckBoxVal("flowSTD");
+            if (id == "" || id.indexOf(",") >= 0) {
+                alert("请选择一个需要修改的流程信息");
+                return;
+            }
+            //构造 修改流程管理DIV
+            ActionDiv("Update", "flow", "修改流程管理");
+            //读取XML 获取修改表单
+            $.get(ActionXML, function (data) {
+                $("#Update_Con_flow").html($(data).find("Action[name='Updateflow']").html());
+                GetSVal(id);
+                $("#flowUpdate").unbind();
+                $("#flowUpdate").bind("click", function () {
+                    flowUpdateClick();
+                });
+                $("#addAcU").unbind();
+                $("#addAcU").bind("click", function () {
+                    SelectAc("flowActionsU", "");
+                });
+                $("#delAcU").unbind();
+                $("#delAcU").bind("click", function () {
+                    $("#flowActionsU div:last").remove();
+                });
+            });
+            //重新定义流程管理 修改按钮点击事件
+            $("#Update_flow").unbind();
+            $("#Update_flow").bind("click", function () {
+                var id2 = CheckBoxVal("flowSTD");
+                if (id2 == "" || id2.indexOf(",") >= 0) {
+                    alert("请选择一个需要修改的流程信息");
+                    return;
+                }
+                GetSVal(id2);
+                Show_Action_Box("Updateflow");
+            });
+        });
+        //绑定搜索按钮点击事件
+        $("#searchB_flow").unbind();
+        $("#searchB_flow").bind("click", function () {
+            getAllFlow();
+        });
+        //绑定删除按钮点击事件
+        $("#Del_flow").unbind();
+        $("#Del_flow").bind("click", function () {
+            flowDelClick();
+        });
+    });
+
+    /***************** 流程管理结束 ******************/
+
+    /***************** 我的申请开始 ******************/
+    $("#apply").bind("click", function () {
+        //构造 我的申请DIV
+        Left_Menu_Click("apply", "我的申请", false);
+        Vmenu("apply", "<input id=\"searchT_apply\" type=\"text\"/><input value=\"搜索\" id=\"searchB_apply\" type=\"button\"></td><td><input value=\"新建申请\" id=\"Insert_apply\" type=\"button\"></td><td><input value=\"查看申请详细\" id=\"Update_apply\" type=\"button\">");
+        getAllapply();
+        //我的申请 新增按钮点击事件
+        $("#Insert_apply").bind("click", function () {
+            //构造 新增我的申请DIV
+            ActionDiv("Insert", "apply", "新增我的申请");
+            //读取XML 获取新增表单
+            $.get(ActionXML, function (data) {
+                $("#Insert_Con_apply").html($(data).find("Action[name='Insertapply']").html());
+                SelectFlow("applyFlowName", "");        //构建流程选择框
+                $("#applySave").unbind();
+                $("#applySave").bind("click", function () {
+                    applySaveClick();
+                });
+                $("#applyAddr").unbind();
+                $("#applyAddr").bind("click", function () {
+                    window.open("upload.aspx", "newwindow", "height=500, width=400, top=50%, left=50%, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no");
+                });
+                ajaxFile = window.setInterval("GetUploadFiles()", 1000);
+            });
+            //重新定义我的申请 新增按钮点击事件
+            $("#Insert_apply").unbind();
+            $("#Insert_apply").bind("click", function () {
+                window.clearInterval(ajaxFile);
+                ajaxFile = window.setInterval("GetUploadFiles()", 1000);
+                Show_Action_Box("Insertapply");
+            });
+        });
+        //我的申请 查看点击事件
+        $("#Update_apply").bind("click", function () {
+            var id = CheckBoxVal("flowListSTD");
+            if (id == "" || id.indexOf(",") >= 0) {
+                alert("请选择一个需要查看的申请信息");
+                return;
+            }
+            //构造 修改我的申请DIV
+            ActionDiv("Update", "apply", "查看我的申请详细");
+            //获取公文详细内容
+            FlowCont("Update_Con_apply", id, "apply");
+            //重新定义我的申请 查看按钮点击事件
+            $("#Update_apply").unbind();
+            $("#Update_apply").bind("click", function () {
+                var id2 = CheckBoxVal("flowListSTD");
+                if (id2 == "" || id2.indexOf(",") >= 0) {
+                    alert("请选择一个需要查看的申请信息");
+                    return;
+                }
+                FlowCont("Update_Con_apply", id2, "apply");
+                Show_Action_Box("Updateapply");
+            });
+        });
+        //绑定搜索按钮点击事件
+        $("#searchB_apply").unbind();
+        $("#searchB_apply").bind("click", function () {
+            getAllapply();
+        });
+    });
+
+    /***************** 我的申请结束  ******************/
+
+    /***************** 审批管理开始 ******************/
+    $("#approval").bind("click", function () {
+        //构造 审批管理DIV
+        Left_Menu_Click("approval", "我的审批", false);
+        Vmenu("approval", "<input id=\"searchT_approval\" type=\"text\"/><input value=\"搜索\" id=\"searchB_approval\" type=\"button\"></td><td><input value=\"审批\" id=\"Update_approval\" type=\"button\">");
+        getAllapproval();
+
+        //审批管理 审批按钮点击事件
+        $("#Update_approval").bind("click", function () {
+            var id = CheckBoxVal("approvalSTD");
+            if (id == "" || id.indexOf(",") >= 0) {
+                alert("请选择一个需要审批的公文");
+                return;
+            }
+            //构造 修改审批管理DIV
+            ActionDiv("Update", "approval", "审批公文");
+            $("#Updateapproval").attr("Sid", id);
+            //获取公文详细内容
+            FlowCont("Update_Con_approval", id, "approval");
+            //重新定义我的申请 修改按钮点击事件
+            $("#Update_approval").unbind();
+            $("#Update_approval").bind("click", function () {
+                var id2 = CheckBoxVal("approvalSTD");
+                if (id2 == "" || id2.indexOf(",") >= 0) {
+                    alert("请选择一个需要审批的公文");
+                    return;
+                }
+                $("#Updateapproval").attr("Sid", id2);
+                FlowCont("Update_Con_approval", id2, "approval");
+                Show_Action_Box("Updateapproval");
+            });
+        });
+        //绑定搜索按钮点击事件
+        $("#searchB_approval").unbind();
+        $("#searchB_approval").bind("click", function () {
+            getAllapproval();
+        });
+    });
+    /***************** 审批管理结束 ******************/
+});
+/*****************  document.ready  end ********************/
+
+/*****************  action start  ********************/
+
+//新增操作管理保存点击事件
+function actionSaveClick() {
+    //获取数据
+    var n = $("#actionName").val();
+    var r = $("#actionRemark").val();
+    var u = $("#actionUserName").val();
+    
+    //加载等待
+    loading("actionSave");
+
+    //执行ajax
+    $.get(A_Server, { type: "actionSave", name: n, remark: r,approveid:u, id: "" }, function (data) {
+        //等待结束
+        stopW("actionSave");
+
+        if (data == "true") {
+            CloseBox("Insertaction");             //关闭新增窗口
+            clearDataForm("actionTable");         //清空新增窗口的表单数据
+            getAllAction();                     //重新获取数据
+        }
+        else {
+            alert("新增失败...失败原因:" + data);
+        }
+    });
+}
+//修改操作管理保存点击事件
+function actionUpdateClick() {
+    //获取数据
+    var n = $("#actionNameU").val();
+    var r = $("#actionRemarkU").val();
+    var u = $("#actionUserNameU").val();
+    var i = $("#Updateaction").attr("aid");
+
+    //加载等待
+    loading("actionUpdate");
+
+    //执行ajax
+    $.get(A_Server, { type: "actionUpdate", name: n, remark: r,approveid:u, id: i }, function (data) {
+        //等待结束
+        stopW("actionUpdate");
+
+        if (data == "true") {
+            CloseBox("Updateaction");             //关闭新增窗口
+            getAllAction();                     //重新获取数据
+        }
+        else {
+            alert("修改失败...失败原因:" + data);
+        }
+    });
+}
+
+//删除操作信息
+function ActionDelClick() {
+    var ids = CheckBoxVal("actionSTD");
+    if (ids == "") {
+        alert("请选择需要删除的操作信息");
+        return;
+    }
+    //加载等待
+    Cloading("Con_action");
+    //执行ajax
+    $.get(A_Server, { type: "ActionDel", id: ids }, function (data) {
+        //等待结束
+        Cstop();
+        if (data == "true") {
+            getAllAction();                     //重新获取数据
+        }
+        else {
+            alert("删除失败...失败原因:" + data);
+        }
+    });
+}
+
+//获取操作列表
+function getAllAction() {
+    //获取数据
+    var s = $("#searchT_action").val();
+    //加载等待
+    Cloading("Con_action");
+    //执行ajax
+    $.get(A_Server, { type: "GetAllAction", sT: s }, function (data) {
+        //等待结束
+        Cstop();
+        if (data != "") {
+            $("#Con_action").html(data);
+        }
+    });
+}
+
+//获取修改操作表单值
+function GetPVal(id) {
+    var input = "#actionSTD input[value='" + id + "']";
+    var td = $(input).parent();
+    $("#actionNameU").val($(td).next().text());
+    $("#actionRemarkU").val($(td).next().next().text());
+    $("#Updateaction").attr("aid", id);
+
+    SelectDep("actionDepNameU", $(td).next().next().attr("depid"));
+    $("#actionDepNameU").change(function () { SelectUser("actionUserNameU", $("#actionDepNameU").val(), ""); });
+    loading("actionUserNameU");
+    var f = " SelectUser(\"actionUserNameU\", $(\"#actionDepNameU\").val(),\""+$(td).next().next().next().attr("pid")+"\")";
+    setTimeout(f, 3000);
+    
+}
+
+
+
+//获取操作选择框
+function SelectAc(id, selectVal) {
+    var tid = "#" + id;
+    var sid = RandNum(3);
+    //执行ajax
+    $.get(A_Server, { type: "SelectAc" }, function (data) {
+        if (data != "") {
+            var select = "<div>--><select id=\"" + sid + "\">" + data + "</select></div>";
+            $(tid).append(select);
+            if (selectVal != "") {
+                var selectI = "#" + sid + " option[value='" + selectVal + "']";
+                $(selectI).attr("selected", true);
+            }
+        } else {
+            alert('没有可选择的流程操作,请添加流程操作');
+            $(tid).append("<select></select>");
+        }
+    });
+}
+
+
+/*****************  action end  ********************/
+
+/*****************  flow start  ********************/
+//获取流程列表
+function getAllFlow() {
+    //获取数据
+    var s = $("#searchT_flow").val();
+    //加载等待
+    Cloading("Con_flow");
+    //执行ajax
+    $.get(F_Server, { type: "GetAllFlow", sT: s }, function (data) {
+        //等待结束
+        Cstop();
+        if (data != "") {
+            $("#Con_flow").html(data);
+        }
+    });
+}
+
+//新增流程管理保存点击事件
+function flowSaveClick() {
+    //获取数据
+    var n = $("#flowName").val();
+    var r = $("#flowRemark").val();
+    var select = $("#flowActions").find("select");
+    var ids = "";
+    var i = 0;
+    $(select).each(function () {
+        ids += i + ":" + $(this).val() + ",";
+        i = i + 1;
+    });
+    if (ids == "") {
+        alert("请至少选择1个流程操作");
+        return;
+    } else {
+        ids = ids.substring(0, ids.length - 1);
+    }
+    //加载等待
+    loading("flowSave");
+    
+    //执行ajax
+    $.get(F_Server, { type: "flowSave", name: n, remark: r,aIDs:ids, id: "" }, function (data) {
+        //等待结束
+        stopW("flowSave");
+
+        if (data == "true") {
+            CloseBox("Insertflow");             //关闭新增窗口
+            clearDataForm("flowTable");         //清空新增窗口的表单数据
+            getAllFlow();                     //重新获取数据
+        }
+        else {
+            alert("新增失败...失败原因:" + data);
+        }
+    });
+}
+//获取修改流程表单值
+function GetSVal(id) {
+    var input = "#flowSTD input[value='" + id + "']";
+    var td = $(input).parent();
+    $("#flowNameU").val($(td).next().text());
+    $("#flowRemarkU").val($(td).next().next().next().text());
+    $("#Updateflow").attr("fid", id);
+    $("#flowActionsU").html("");
+    var ids = $(td).next().next().attr("actionids").split(',');
+    var arr = new Array();
+    for (var i = 0; i < ids.length; i++) {
+        arr[i] = ids[i].split(':')[1];
+    }
+    for (var j = 0; j < arr.length; j++) {
+        var f = "SelectAc(\"flowActionsU\", \"" + arr[j] + "\")";
+        setTimeout(f, (j+1)*100);
+    }
+}
+
+//修改流程管理保存点击事件
+function flowUpdateClick() {
+    //获取数据
+    var n = $("#flowNameU").val();
+    var r = $("#flowRemarkU").val();
+    var i = $("#Updateflow").attr("fid");
+    var select = $("#flowActionsU").find("select");
+    var ids = "";
+    var j = 0;
+    $(select).each(function () {
+        ids += j + ":" + $(this).val() + ",";
+        j = j + 1;
+    });
+    if (ids == "") {
+        alert("请至少选择1个流程操作");
+        return;
+    } else {
+        ids = ids.substring(0, ids.length - 1);
+    }
+
+    //加载等待
+    loading("flowUpdate");
+
+    //执行ajax
+    $.get(F_Server, { type: "flowUpdate", name: n, remark: r, aIDs: ids, id: i }, function (data) {
+        //等待结束
+        stopW("flowUpdate");
+
+        if (data == "true") {
+            CloseBox("Updateflow");             //关闭新增窗口
+            getAllFlow();                     //重新获取数据
+        }
+        else {
+            alert("修改失败...失败原因:" + data);
+        }
+    });
+}
+
+//删除流程信息
+function flowDelClick() {
+    var ids = CheckBoxVal("flowSTD");
+    if (ids == "") {
+        alert("请选择需要删除的流程信息");
+        return;
+    }
+    //加载等待
+    Cloading("Con_flow");
+    //执行ajax
+    $.get(F_Server, { type: "FlowDel", id: ids }, function (data) {
+        //等待结束
+        Cstop();
+        if (data == "true") {
+            getAllFlow();                 //重新获取数据
+        }
+        else {
+            alert("删除失败...失败原因:" + data);
+        }
+    });
+}
+
+//获取流程选择框
+function SelectFlow(id, selectVal) {
+    var tid = "#" + id;
+    //执行ajax
+    $.get(F_Server, { type: "SelectFlow" }, function (data) {
+        if (data != "") {
+            $(tid).html("");
+            $(tid).append(data);
+            if (selectVal != "") {
+                var selectI = tid + " option[value='" + selectVal + "']";
+                $(selectI).attr("selected", true);
+            }
+        } else {
+            $(tid).html("");
+            alert('没有可选择的流程,请添加流程');
+        }
+    });
+}
+
+/*****************  flow end  ********************/
+
+/*****************  apply start  ********************/
+
+//新增我的申请保存点击事件
+function applySaveClick() {
+    //获取数据
+    var n = $("#applyName").val();
+    var f = $("#applyFlowName").val();
+    var c = $("#applyCont").val();
+
+    //加载等待
+    loading("applySave");
+
+    //执行ajax
+    $.get(Apply_Server, { type: "flowListSave", name: n,fid:f,cont:c}, function (data) {
+        //等待结束
+        stopW("applySave");
+
+        if (data == "true") {
+            window.clearInterval(ajaxFile);
+            $("#applySname").html("");
+            CloseBox("Insertapply");             //关闭新增窗口
+            clearDataForm("applyTable");         //清空新增窗口的表单数据
+            getAllapply();                     //重新获取数据
+        }
+        else {
+            alert("新增失败...失败原因:" + data);
+        }
+    });
+}
+
+
+//获取申请列表
+function getAllapply() {
+    //获取数据
+    var s = $("#searchT_apply").val();
+    //加载等待
+    Cloading("Con_apply");
+    //执行ajax
+    $.get(Apply_Server, { type: "GetAllFlowList", sT: s }, function (data) {
+        //等待结束
+        Cstop();
+        if (data != "") {
+            $("#Con_apply").html(data);
+            downClick();
+        }
+    });
+
+}
+
+//获取上传的文件列表
+function GetUploadFiles() {
+    //执行ajax
+    $.get("uploadSrv.aspx", { type: "GetUploadFiles" }, function (data) {
+        $("#applySname").html(data);
+        $("#applySname input[type='checkbox']").remove();
+    });
+}
+
+//下载按钮点击
+function downClick() {
+    $(".downfile").unbind();
+    $(".downfile").bind("click", function () {
+        var id = $(this).parent().parent().find("input[type='checkbox']").val();
+        var addr = "download.aspx?fid=" + id;
+        window.open(addr, "newwindow", "height=500, width=400, top=50%, left=50%, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no");
+
+    });
+}
+
+//获取公文详细信息
+function FlowCont(divid,id,s) {
+
+    var tid = "#" + divid;
+
+     //加载等待
+    Cloading(divid);
+
+    //执行ajax
+    $.get(Apply_Server, { type: "FlowCont", fid: id, style: s }, function (data) {
+        //等待结束
+        Cstop();
+        if (data != "") {
+            $(tid).html(data);
+            if (s == "approval") {
+                //绑定通过按钮点击事件
+                $("#pass").unbind();
+                $("#pass").bind("click", function () {
+                    approvalUpdateClick("pass");
+                });
+                //绑定不通过按钮点击事件
+                $("#reject").unbind();
+                $("#reject").bind("click", function () {
+                    approvalUpdateClick("reject");
+                });
+            }
+        }
+    });
+}
+/*****************  apply end  ********************/
+
+
+/*****************  approval start  ********************/
+
+//修改审批管理保存点击事件
+function approvalUpdateClick(pass) {
+    //获取数据
+    var r = $("#approveRe").val();
+    var i = $("#Updateapproval").attr("Sid");
+
+    //加载等待
+    loading("approvalUpdate");
+
+    //执行ajax
+    $.get(Apply_Server, { type: "flowListUpdate", remark: r, id: i, isPass: pass }, function (data) {
+        //等待结束
+        stopW("approvalUpdate");
+
+        if (data == "true") {
+            CloseBox("Updateapproval");             //关闭新增窗口
+            getAllapproval();                      //重新获取数据
+        }
+        else {
+            alert("修改失败...失败原因:" + data);
+        }
+    });
+}
+
+//获取审批列表
+function getAllapproval() {
+    //获取数据
+    var s = $("#searchT_approval").val();
+    //加载等待
+    Cloading("Con_approval");
+    //执行ajax
+    $.get(Apply_Server, { type: "MyFlowList", sT: s }, function (data) {
+        //等待结束
+        Cstop();
+        if (data != "") {
+            $("#Con_approval").html(data);
+            downClick();
+        }
+    });
+
+}
+/*****************  approval end  ********************/

+ 526 - 0
LogisticsSystem/Scripts/SetFrm.js

@@ -0,0 +1,526 @@
+/************* 系统设置 *********************/
+var ActionXML = "Action.xml";
+var Dep_Server = "DepSrv.aspx";
+var User_Server = "UserSrv.aspx";
+var Lmt_Server = "LimitSrv.aspx";
+
+/*****************  document.ready start ********************/
+$(document).ready(function () {
+
+    /***************** 部门管理开始 ******************/
+    $("#dep").bind("click", function () {
+        //构造 部门管理DIV
+        Left_Menu_Click("dep", "部门管理", true);
+        getAlldep();
+        //部门管理 新增按钮点击事件
+        $("#Insert_dep").bind("click", function () {
+            //构造 新增部门管理DIV
+            ActionDiv("Insert", "dep", "新增部门管理");
+            //读取XML 获取新增表单
+            $.get(ActionXML, function (data) {
+                $("#Insert_Con_dep").html($(data).find("Action[name='Insertdep']").html());
+                $("#depSave").unbind();
+                $("#depSave").bind("click", function () {
+                    depSaveClick();
+                });
+            });
+            //重新定义部门管理 新增按钮点击事件
+            $("#Insert_dep").unbind();
+            $("#Insert_dep").bind("click", function () {
+                Show_Action_Box("Insertdep");
+            });
+        });
+        //部门管理 修改按钮点击事件
+        $("#Update_dep").bind("click", function () {
+            var id = CheckBoxVal("depSTD");
+            if (id == "" || id.indexOf(",") >= 0) {
+                alert("请选择一个需要修改的部门信息");
+                return;
+            }
+            //构造 修改部门管理DIV
+            ActionDiv("Update", "dep", "修改部门管理");
+            //读取XML 获取修改表单
+            $.get(ActionXML, function (data) {
+                $("#Update_Con_dep").html($(data).find("Action[name='Updatedep']").html());
+                GetDepVal(id);
+                $("#depUpdate").unbind();
+                $("#depUpdate").bind("click", function () {
+                    depUpdateClick();
+                });
+            });
+            //重新定义部门管理 修改按钮点击事件
+            $("#Update_dep").unbind();
+            $("#Update_dep").bind("click", function () {
+                var id2 = CheckBoxVal("depSTD");
+                if (id2 == "" || id2.indexOf(",") >= 0) {
+                    alert("请选择一个需要修改的部门信息");
+                    return;
+                }
+                GetDepVal(id2);
+                Show_Action_Box("Updatedep");
+            });
+        });
+        //绑定搜索按钮点击事件
+        $("#searchB_dep").unbind();
+        $("#searchB_dep").bind("click", function () {
+            getAlldep();
+        });
+        //绑定删除按钮点击事件
+        $("#Del_dep").unbind();
+        $("#Del_dep").bind("click", function () {
+            depDelClick();
+        });
+    });
+    /***************** 部门管理结束 ******************/
+
+    /***************** 用户管理开始 ******************/
+    $("#user").bind("click", function () {
+        //构造 用户管理DIV
+        Left_Menu_Click("user", "用户管理", true);
+        Vmenu("user", "选择部门:<select id=\"menuDepSelect\"></select>");
+        SelectDep("menuDepSelect", "");
+        $("#menuDepSelect").change(function () { getAlluser(); });
+        //加载等待
+        Cloading("Con_user");
+        setTimeout('getAlluser()', 3000);
+        //用户管理 新增按钮点击事件
+        $("#Insert_user").bind("click", function () {
+            //构造 新增用户管理DIV
+            ActionDiv("Insert", "user", "新增用户管理");
+            //读取XML 获取新增表单
+            $.get(ActionXML, function (data) {
+                $("#Insert_Con_user").html($(data).find("Action[name='Insertuser']").html());
+                SelectDep("userDep", "");
+                $("#userSave").unbind();
+                $("#userSave").bind("click", function () {
+                    userSaveClick();
+                });
+            });
+            //重新定义用户管理 新增按钮点击事件
+            $("#Insert_user").unbind();
+            $("#Insert_user").bind("click", function () {
+                Show_Action_Box("Insertuser");
+            });
+        });
+        //用户管理 修改按钮点击事件
+        $("#Update_user").bind("click", function () {
+            var id = CheckBoxVal("userSTD");
+            if (id == "" || id.indexOf(",") >= 0) {
+                alert("请选择一个需要修改的用户信息");
+                return;
+            }
+            //构造 修改用户管理DIV
+            ActionDiv("Update", "user", "修改用户管理");
+            //读取XML 获取修改表单
+            $.get(ActionXML, function (data) {
+                $("#Update_Con_user").html($(data).find("Action[name='Updateuser']").html());
+                GetuserVal(id);
+                $("#userUpdate").unbind();
+                $("#userUpdate").bind("click", function () {
+                    userUpdateClick();
+                });
+            });
+            //重新定义用户管理 修改按钮点击事件
+            $("#Update_user").unbind();
+            $("#Update_user").bind("click", function () {
+                var id2 = CheckBoxVal("userSTD");
+                if (id2 == "" || id2.indexOf(",") >= 0) {
+                    alert("请选择一个需要修改的用户信息");
+                    return;
+                }
+                GetuserVal(id);
+                Show_Action_Box("Updateuser");
+            });
+        });
+        //绑定搜索按钮点击事件
+        $("#searchB_user").unbind();
+        $("#searchB_user").bind("click", function () {
+            getAlluser();
+        });
+        //绑定删除按钮点击事件
+        $("#Del_user").unbind();
+        $("#Del_user").bind("click", function () {
+            userDelClick();
+        });
+    });
+
+    /***************** 用户管理结束 ******************/
+
+    /***************** 权限管理开始 ******************/
+    $("#limit").bind("click", function () {
+        //构造 权限管理DIV
+        Left_Menu_Click("limit", "权限管理", false);
+        Vmenu("limit", "<input id=\"searchT_limit\" type=\"text\"/><input value=\"搜索\" id=\"searchB_limit\" type=\"button\">");
+        Vmenu("limit", "选择部门:<select id=\"menuLmtSelect\"></select>");
+        Vmenu("limit", "<input value=\"修改用户权限\" id=\"update_limit\" type=\"button\">");
+        SelectDep("menuLmtSelect", "");
+        $("#menuLmtSelect").change(function () { getLmtuser(); });
+        //加载等待
+        Cloading("Con_limit");
+        setTimeout('getLmtuser()', 3000);
+        //绑定搜索按钮点击事件
+        $("#searchB_limit").unbind();
+        $("#searchB_limit").bind("click", function () {
+            getLmtuser();
+        });
+        //权限管理 修改按钮点击事件
+        $("#update_limit").bind("click", function () {
+            var id = CheckBoxVal("lmtUserSTD");
+            if (id == "" || id.indexOf(",") >= 0) {
+                alert("请选择一个需要修改的用户信息");
+                return;
+            }
+            var input = "#lmtUserSTD input[value='" + id + "']";
+            var td = $(input).parent();
+            //构造 修改用户权限管理DIV
+            ActionDiv("Update", "lmt", "修改用户权限--" + $(td).next().text());
+            getLmtList(id);
+            //重新定义权限管理 修改按钮点击事件
+            $("#update_limit").unbind();
+            $("#update_limit").bind("click", function () {
+                var id2 = CheckBoxVal("lmtUserSTD");
+                if (id2 == "" || id2.indexOf(",") >= 0) {
+                    alert("请选择一个需要修改的用户信息");
+                    return;
+                }
+                var input2 = "#lmtUserSTD input[value='" + id2 + "']";
+                var td2 = $(input2).parent();
+                $("#Updatelmt").find(".Box_info").html("修改用户权限--" + $(td2).next().text() + "<div class=\"Box_Close\">关闭</div>");
+                Close_Main_Box();
+                getLmtList(id2);
+                Show_Action_Box("Updatelmt");
+            });
+        });
+    });
+
+    /***************** 权限管理结束  ******************/
+
+    /***************** 系统日志开始 ******************/
+    $("#sysLog").bind("click", function () {
+        //构造 系统日志DIV
+        Left_Menu_Click("sysLog", "系统日志", false);
+        Vmenu("sysLog", "时间:<input id=\"searchT_log\" type=\"date\"/> &nbsp;用户姓名或操作<input id=\"searchN_log\" type=\"text\"/><input value=\"搜索\" id=\"searchB_log\" type=\"button\">");
+        getSysLog();
+        //绑定搜索按钮点击事件
+        $("#searchB_log").unbind();
+        $("#searchB_log").bind("click", function () {
+            getSysLog();
+        });
+    });
+    /***************** 系统日志结束 ******************/
+});
+/*****************  document.ready  end ********************/
+
+/*****************  Dep start  ********************/
+//获取部门列表
+function getAlldep() {
+    //获取数据
+    var s = $("#searchT_dep").val();
+    //加载等待
+    Cloading("Con_dep");
+    //执行ajax
+    $.get(Dep_Server, { type: "GetAllDep", sT: s }, function (data) {
+        //等待结束
+        Cstop();
+        if (data != "") {
+            $("#Con_dep").html(data);
+        }
+    });
+}
+
+//新增部门管理保存点击事件
+function depSaveClick() {
+    //获取数据
+    var n = $("#depName").val();
+    var r = $("#depRemark").val();
+    
+    //加载等待
+    loading("depSave");
+
+    //执行ajax
+    $.get(Dep_Server, { type: "SysDepSave", name: n, remark: r, id: "" }, function (data) {
+        //等待结束
+        stopW("depSave");
+
+        if (data == "true") {
+            CloseBox("Insertdep");             //关闭新增窗口
+            clearDataForm("depTable");         //清空新增窗口的表单数据
+            getAlldep();                     //重新获取数据
+        }
+        else {
+            alert("新增失败...失败原因:" + data);
+        }
+    });
+}
+//获取修改部门表单值
+function GetDepVal(id) {
+    var input = "#depSTD input[value='" + id + "']";
+    var td = $(input).parent();
+    $("#depNameU").val($(td).next().text());
+    $("#depRemarkU").val($(td).next().next().text());
+    $("#Updatedep").attr("did", id);
+}
+
+//修改部门管理保存点击事件
+function depUpdateClick() {
+    //获取数据
+    var n = $("#depNameU").val();
+    var r = $("#depRemarkU").val();
+    var i = $("#Updatedep").attr("did");
+
+    //加载等待
+    loading("depUpdate");
+
+    //执行ajax
+    $.get(Dep_Server, { type: "SysDepUpdate", name: n, remark: r, id: i }, function (data) {
+        //等待结束
+        stopW("depUpdate");
+
+        if (data == "true") {
+            CloseBox("Updatedep");             //关闭新增窗口
+            getAlldep();                      //重新获取数据
+        }
+        else {
+            alert("修改失败...失败原因:" + data);
+        }
+    });
+}
+
+//删除部门信息
+function depDelClick() {
+    var ids = CheckBoxVal("depSTD");
+    if (ids == "") {
+        alert("请选择需要删除的部门信息");
+        return;
+    }
+    //加载等待
+    Cloading("Con_dep");
+    //执行ajax
+    $.get(Dep_Server, { type: "SysDepDel", id: ids }, function (data) {
+        //等待结束
+        Cstop();
+        if (data == "true") {
+            getAlldep();                 //重新获取数据
+        }
+        else {
+            alert("删除失败...失败原因:" + data);
+        }
+    });
+}
+
+/*****************  Dep end  ********************/
+
+/*****************  user start  ********************/
+
+//新增用户管理保存点击事件
+function userSaveClick() {
+    //获取数据
+    var n = $("#userName").val();
+    var m = $("#userMobile").val();
+    var d = $("#userDep").val();
+    var a = $("#userAccount").val();
+
+    //判断数量是否为数字
+    if (!IsNum(m)) {
+        alert("数量请输入数字!");
+        return;
+    }
+    //加载等待
+    loading("userSave");
+
+    //执行ajax
+    $.get(User_Server, { type: "SysUserSave", name: n, mobile: m, depid: d, useracc: a,id: "" }, function (data) {
+        //等待结束
+        stopW("userSave");
+
+        if (data == "true") {
+            CloseBox("Insertuser");             //关闭新增窗口
+            clearDataForm("userTable");         //清空新增窗口的表单数据
+            getAlluser();                     //重新获取数据
+        }
+        else {
+            alert("新增失败...失败原因:" + data);
+        }
+    });
+}
+//修改用户管理保存点击事件
+function userUpdateClick() {
+    //获取数据
+    var n = $("#userNameU").val();
+    var m = $("#userMobileU").val();
+    var d = $("#userDepU").val();
+    var a = $("#userAccountU").val();
+    var i = $("#Updateuser").attr("Uid");
+
+    //判断数量是否为数字
+    if (!IsNum(m)) {
+        alert("手机号码请输入数字!");
+        return;
+    }
+
+    //加载等待
+    loading("userUpdate");
+
+    //执行ajax
+    $.get(User_Server, { type: "SysUserUpdate", name: n, mobile: m, depid: d, useracc: a, id: i }, function (data) {
+        //等待结束
+        stopW("userUpdate");
+
+        if (data == "true") {
+            CloseBox("Updateuser");             //关闭新增窗口
+            getAlluser();                      //重新获取数据
+        }
+        else {
+            alert("修改失败...失败原因:" + data);
+        }
+    });
+}
+
+//删除用户信息
+function userDelClick() {
+    var ids = CheckBoxVal("userSTD");
+    if (ids == "") {
+        alert("请选择需要删除的用户信息");
+        return;
+    }
+    //加载等待
+    Cloading("Con_user");
+    //执行ajax
+    $.get(User_Server, { type: "SysUserDel", id: ids }, function (data) {
+        //等待结束
+        Cstop();
+        if (data == "true") {
+            getAlluser();                //重新获取数据
+        }
+        else {
+            alert("删除失败...失败原因:" + data);
+        }
+    });
+}
+
+//获取用户列表
+function getAlluser() {
+    //获取数据
+    var s = $("#searchT_user").val();
+    var d = $("#menuDepSelect").val();
+
+    //等待结束
+    Cstop();
+    //加载等待
+    Cloading("Con_user");
+    
+    //执行ajax
+    $.get(User_Server, { type: "GetAllUser", sT: s, depid: d,tName:"userSTD" }, function (data) {
+        //等待结束
+        Cstop();
+        if (data != "") {
+            $("#Con_user").html(data);
+        }
+    });
+}
+
+//获取修改用户表单值
+function GetuserVal(id) {
+    var input = "#userSTD input[value='" + id + "']";
+    var td = $(input).parent();
+    $("#userNameU").val($(td).next().text());
+    $("#userMobileU").val($(td).next().next().text());
+    $("#userAccountU").val($(td).next().next().next().text());
+    $("#Updateuser").attr("Uid", id);
+    SelectDep("userDepU", $("#menuDepSelect").val());        //构建部门选择框
+}
+
+/*****************  user end  ********************/
+
+/*****************  limit start  ********************/
+//获取用户列表
+function getLmtuser() {
+    //获取数据
+    var s = $("#searchT_limit").val();
+    var d = $("#menuLmtSelect").val();
+
+    //等待结束
+    Cstop();
+    //加载等待
+    Cloading("Con_limit");
+
+    //执行ajax
+    $.get(User_Server, { type: "GetLmtUser", sT: s, depid: d,tName:"lmtUserSTD" }, function (data) {
+        //等待结束
+        Cstop();
+        if (data != "") {
+            $("#Con_limit").html(data);
+        }
+    });
+}
+
+//获取权限列表
+function getLmtList(i) {
+
+    //加载等待
+    Cloading("Update_Con_lmt");
+
+    //执行ajax
+    $.get(Lmt_Server, { type: "GetOpList", id: i }, function (data) {
+        //等待结束
+        Cstop();
+        if (data != "") {
+            $("#Update_Con_lmt").html(data);
+            //权限列表伸缩
+            $(".lmtListTitle").each(function () {
+                $(this).click(function () {
+                    $(this).next().slideToggle();
+                });
+            });
+            //绑定保存按钮点击事件
+            $("#lmtSave").unbind();
+            $("#lmtSave").bind("click", function () {
+                lmtSaveClick(i);
+            });
+        }
+    });
+}
+
+//保存用户权限
+function lmtSaveClick(i) {
+    //获取数据
+    var o = NoCheckBoxVal("lmtList");
+
+    //加载等待
+    loading("lmtSave");
+
+    //执行ajax
+    $.get(Lmt_Server, { type: "UpdateLmt", id: i ,ops:o}, function (data) {
+        //等待结束
+        stopW("lmtSave");
+
+        if (data == "true") {
+            CloseBox("Updatelmt");             //关闭新增窗口
+        }
+        else {
+            alert("修改失败...失败原因:" + data);
+        }
+    });
+}
+/*****************  limit end  ********************/
+
+/*****************  log start  ********************/
+//获取日志列表
+function getSysLog() {
+    //获取数据
+    var s = $("#searchT_log").val();
+    var n = $("#searchN_log").val();
+    
+    //加载等待
+    Cloading("Con_sysLog");
+
+    //执行ajax
+    $.get(Lmt_Server, { type: "GetSysLog", sT: s,sN:n}, function (data) {
+        //等待结束
+        Cstop();
+        if (data != "") {
+            $("#Con_sysLog").html(data);
+        }
+    });
+}
+/*****************  log end  ********************/

+ 768 - 0
LogisticsSystem/Scripts/SupplyFrm.js

@@ -0,0 +1,768 @@
+/************* 采购管理 *********************/
+var ActionXML = "Action.xml";
+var P_Server = "PurchaseSrv.aspx";
+var S_Server = "StockSrv.aspx";
+var I_Server = "IngredientsSrv.aspx";
+var Supply_Server = "SupplySrv.aspx";
+
+/*****************  document.ready start ********************/
+$(document).ready(function () {
+
+    /***************** 采购管理开始 ******************/
+    $("#purchase").bind("click", function () {
+        //构造 采购管理DIV
+        Left_Menu_Click("purchase", "采购管理", true);
+        getAllPurchase();
+        //采购管理 新增按钮点击事件
+        $("#Insert_purchase").bind("click", function () {
+            //构造 新增采购管理DIV
+            ActionDiv("Insert", "purchase", "新增采购管理");
+            //读取XML 获取新增表单
+            $.get(ActionXML, function (data) {
+                $("#Insert_Con_purchase").html($(data).find("Action[name='Insertpurchase']").html());
+                $("#purchaseSave").unbind();
+                $("#purchaseSave").bind("click", function () {
+                    purchaseSaveClick();
+                });
+            });
+            //重新定义采购管理 新增按钮点击事件
+            $("#Insert_purchase").unbind();
+            $("#Insert_purchase").bind("click", function () {
+                Show_Action_Box("Insertpurchase");
+            });
+        });
+        //采购管理 修改按钮点击事件
+        $("#Update_purchase").bind("click", function () {
+            var id = CheckBoxVal("purchaseSTD");
+            if (id == "" || id.indexOf(",") >= 0) {
+                alert("请选择一个需要修改的采购信息");
+                return;
+            }
+            //构造 修改采购管理DIV
+            ActionDiv("Update", "purchase", "修改采购管理");
+            //读取XML 获取修改表单
+            $.get(ActionXML, function (data) {
+                $("#Update_Con_purchase").html($(data).find("Action[name='Updatepurchase']").html());
+                GetPVal(id);
+                $("#purchaseUpdate").unbind();
+                $("#purchaseUpdate").bind("click", function () {
+                    purchaseUpdateClick();
+                });
+            });
+            //重新定义采购管理 修改按钮点击事件
+            $("#Update_purchase").unbind();
+            $("#Update_purchase").bind("click", function () {
+                var id2 = CheckBoxVal("purchaseSTD");
+                if (id2 == "" || id2.indexOf(",") >= 0) {
+                    alert("请选择一个需要修改的采购信息");
+                    return;
+                }
+                GetPVal(id2);
+                Show_Action_Box("Updatepurchase");
+            });
+        });
+        //绑定搜索按钮点击事件
+        $("#searchB_purchase").unbind();
+        $("#searchB_purchase").bind("click", function () {
+            getAllPurchase();
+        });
+        //绑定删除按钮点击事件
+        $("#Del_purchase").unbind();
+        $("#Del_purchase").bind("click", function () {
+            PurchaseDelClick();
+        });
+    });
+    /***************** 采购管理结束 ******************/
+
+    /***************** 库存管理开始 ******************/
+    $("#stock").bind("click", function () {
+        //构造 库存管理DIV
+        Left_Menu_Click("stock", "库存管理", true);
+        getAllStock();
+        //库存管理 新增按钮点击事件
+        $("#Insert_stock").bind("click", function () {
+            //构造 新增库存管理DIV
+            ActionDiv("Insert", "stock", "新增库存管理");
+            //读取XML 获取新增表单
+            $.get(ActionXML, function (data) {
+                $("#Insert_Con_stock").html($(data).find("Action[name='Insertstock']").html());
+                $("#stockSave").unbind();
+                $("#stockSave").bind("click", function () {
+                    stockSaveClick();
+                });
+            });
+            //重新定义库存管理 新增按钮点击事件
+            $("#Insert_stock").unbind();
+            $("#Insert_stock").bind("click", function () {
+                Show_Action_Box("Insertstock");
+            });
+        });
+        //库存管理 修改按钮点击事件
+        $("#Update_stock").bind("click", function () {
+            var id = CheckBoxVal("stockSTD");
+            if (id == "" || id.indexOf(",") >= 0) {
+                alert("请选择一个需要修改的库存信息");
+                return;
+            }
+            //构造 修改库存管理DIV
+            ActionDiv("Update", "stock", "修改库存管理");
+            //读取XML 获取修改表单
+            $.get(ActionXML, function (data) {
+                $("#Update_Con_stock").html($(data).find("Action[name='Updatestock']").html());
+                GetSVal(id);
+                $("#stockUpdate").unbind();
+                $("#stockUpdate").bind("click", function () {
+                    stockUpdateClick();
+                });
+            });
+            //重新定义库存管理 修改按钮点击事件
+            $("#Update_stock").unbind();
+            $("#Update_stock").bind("click", function () {
+                var id2 = CheckBoxVal("stockSTD");
+                if (id2 == "" || id2.indexOf(",") >= 0) {
+                    alert("请选择一个需要修改的库存信息");
+                    return;
+                }
+                GetSVal(id2);
+                Show_Action_Box("Updatestock");
+            });
+        });
+        //绑定搜索按钮点击事件
+        $("#searchB_stock").unbind();
+        $("#searchB_stock").bind("click", function () {
+            getAllStock();
+        });
+        //绑定删除按钮点击事件
+        $("#Del_stock").unbind();
+        $("#Del_stock").bind("click", function () {
+            stockDelClick();
+        });
+    });
+
+    /***************** 库存管理结束 ******************/
+
+    /***************** 用料管理开始 ******************/
+    $("#ingredients").bind("click", function () {
+        //构造 用料管理DIV
+        Left_Menu_Click("ingredients", "用料管理", true);
+        getAllingredients();
+        //用料管理 新增按钮点击事件
+        $("#Insert_ingredients").bind("click", function () {
+            //构造 新增用料管理DIV
+            ActionDiv("Insert", "ingredients", "新增用料管理");
+            //读取XML 获取新增表单
+            $.get(ActionXML, function (data) {
+                $("#Insert_Con_ingredients").html($(data).find("Action[name='Insertingredients']").html());
+                SelectDep("ingredientsDepName","");        //构建部门选择框
+                $("#ingredientsSave").unbind();
+                $("#ingredientsSave").bind("click", function () {
+                    ingredientsSaveClick();
+                });
+            });
+            //重新定义用料管理 新增按钮点击事件
+            $("#Insert_ingredients").unbind();
+            $("#Insert_ingredients").bind("click", function () {
+                Show_Action_Box("Insertingredients");
+            });
+        });
+        //用料管理 修改按钮点击事件
+        $("#Update_ingredients").bind("click", function () {
+            var id = CheckBoxVal("ingredientsSTD");
+            if (id == "" || id.indexOf(",") >= 0) {
+                alert("请选择一个需要修改的用料信息");
+                return;
+            }
+            //构造 修改用料管理DIV
+            ActionDiv("Update", "ingredients", "修改用料管理");
+            //读取XML 获取修改表单
+            $.get(ActionXML, function (data) {
+                $("#Update_Con_ingredients").html($(data).find("Action[name='Updateingredients']").html());
+                GetingredientsVal(id);
+                $("#ingredientsUpdate").unbind();
+                $("#ingredientsUpdate").bind("click", function () {
+                    ingredientsUpdateClick();
+                });
+            });
+            //重新定义用料管理 修改按钮点击事件
+            $("#Update_ingredients").unbind();
+            $("#Update_ingredients").bind("click", function () {
+                var id2 = CheckBoxVal("ingredientsSTD");
+                if (id2 == "" || id2.indexOf(",") >= 0) {
+                    alert("请选择一个需要修改的用料信息");
+                    return;
+                }
+                GetingredientsVal(id2);
+                Show_Action_Box("Updateingredients");
+            });
+        });
+        //绑定搜索按钮点击事件
+        $("#searchB_ingredients").unbind();
+        $("#searchB_ingredients").bind("click", function () {
+            getAllingredients();
+        });
+        //绑定删除按钮点击事件
+        $("#Del_ingredients").unbind();
+        $("#Del_ingredients").bind("click", function () {
+            ingredientsDelClick();
+        });
+    });
+
+    /***************** 用料管理结束  ******************/
+
+    /***************** 供应管理开始 ******************/
+    $("#supply").bind("click", function () {
+        //构造 供应管理DIV
+        Left_Menu_Click("supply", "供应管理", true);
+        getAllsupply(); 
+        //供应管理新增按钮点击事件
+        $("#Insert_supply").bind("click", function () {
+            //构造 新增供应管理DIV
+            ActionDiv("Insert", "supply", "新增供应管理");
+            //读取XML 获取新增表单
+            $.get(ActionXML, function (data) {
+                $("#Insert_Con_supply").html($(data).find("Action[name='Insertsupply']").html());
+                SelectDep("supplyDepName", "");        //构建部门选择框
+                $("#supplySave").unbind();
+                $("#supplySave").bind("click", function () {
+                    supplySaveClick(); 
+                });
+            });
+            //重新定义供应管理 新增按钮点击事件
+            $("#Insert_supply").unbind();
+            $("#Insert_supply").bind("click", function () {
+                Show_Action_Box("Insertsupply");
+            });
+        });
+        //供应管理 修改按钮点击事件
+        $("#Update_supply").bind("click", function () {
+            var id = CheckBoxVal("supplySTD");
+            if (id == "" || id.indexOf(",") >= 0) {
+                alert("请选择一个需要修改的供应信息");
+                return;
+            }
+            //构造 修改供应管理DIV
+            ActionDiv("Update", "supply", "修改供应管理");
+            //读取XML 获取修改表单
+            $.get(ActionXML, function (data) {
+                $("#Update_Con_supply").html($(data).find("Action[name='Updatesupply']").html());
+                GetsupplyVal(id);
+                $("#supplyUpdate").unbind();
+                $("#supplyUpdate").bind("click", function () {
+                    supplyUpdateClick();
+                });
+            });
+            //重新定义用料管理 修改按钮点击事件
+            $("#Update_supply").unbind();
+            $("#Update_supply").bind("click", function () {
+                var id2 = CheckBoxVal("supplySTD");
+                if (id2 == "" || id2.indexOf(",") >= 0) {
+                    alert("请选择一个需要修改的供应信息");
+                    return;
+                }
+                GetsupplyVal(id2);
+                Show_Action_Box("Updatesupply");
+            });
+        });
+        //绑定搜索按钮点击事件
+        $("#searchB_supply").unbind();
+        $("#searchB_supply").bind("click", function () {
+            getAllsupply();
+        });
+        //绑定删除按钮点击事件
+        $("#Del_supply").unbind();
+        $("#Del_supply").bind("click", function () {
+            supplyDelClick();
+        });
+    });
+    /***************** 供应管理结束 ******************/
+});
+/*****************  document.ready  end ********************/
+
+/*****************  purchase start  ********************/
+
+//新增采购管理保存点击事件
+function purchaseSaveClick() {
+    //获取数据
+    var n = $("#purchaseName").val();
+    var t = $("#purchaseTime").val();
+    var p = $("#purchasePrice").val();
+    var q = $("#purchaseQuantity").val();
+    var r = $("#purchaseRemark").val();
+    //判断价格是否为数字
+    if (!IsNum(p)) {
+        alert("价格请输入数字!");
+        return;
+    }
+    //判断数量是否为数字
+    if (!IsNum(q)) {
+        alert("数量请输入数字!");
+        return;
+    }
+    //加载等待
+    loading("purchaseSave");
+
+    //执行ajax
+    $.get(P_Server, { type: "purchaseSave", name: n, time: t, price: p, remark: r, quantity: q, id: "" }, function (data) {
+        //等待结束
+        stopW("purchaseSave");
+
+        if (data == "true") {
+            CloseBox("Insertpurchase");             //关闭新增窗口
+            clearDataForm("purchaseTable");         //清空新增窗口的表单数据
+            getAllPurchase();                     //重新获取数据
+        }
+        else {
+            alert("新增失败...失败原因:" + data);
+        }
+    });
+}
+//修改采购管理保存点击事件
+function purchaseUpdateClick() {
+    //获取数据
+    var n = $("#purchaseNameU").val();
+    var t = $("#purchaseTimeU").val();
+    var p = $("#purchasePriceU").val();
+    var q = $("#purchaseQuantityU").val();
+    var r = $("#purchaseRemarkU").val();
+    var i = $("#Updatepurchase").attr("pid");
+    //判断价格是否为数字
+    if (!IsNum(p)) {
+        alert("价格请输入数字!");
+        return;
+    }
+    //判断数量是否为数字
+    if (!IsNum(q)) {
+        alert("数量请输入数字!");
+        return;
+    }
+    //加载等待
+    loading("purchaseUpdate");
+
+    //执行ajax
+    $.get(P_Server, { type: "purchaseUpdate", name: n, time: t, price: p, remark: r, quantity: q, id: i }, function (data) {
+        //等待结束
+        stopW("purchaseUpdate");
+
+        if (data == "true") {
+            CloseBox("Updatepurchase");             //关闭新增窗口
+            getAllPurchase();                     //重新获取数据
+        }
+        else {
+            alert("修改失败...失败原因:" + data);
+        }
+    });
+}
+
+//删除采购信息
+function PurchaseDelClick() {
+    var ids = CheckBoxVal("purchaseSTD");
+    if (ids == "") {
+        alert("请选择需要删除的采购信息");
+        return;
+    }
+    //加载等待
+    Cloading("Con_purchase");
+    //执行ajax
+    $.get(P_Server, { type: "PurchaseDel", id: ids }, function (data) {
+        //等待结束
+        Cstop();
+        if (data == "true") {
+            getAllPurchase();                     //重新获取数据
+        }
+        else {
+            alert("删除失败...失败原因:" + data);
+        }
+    });
+}
+
+//获取采购列表
+function getAllPurchase() {
+    //获取数据
+    var s = $("#searchT_purchase").val();
+    //加载等待
+    Cloading("Con_purchase");
+    //执行ajax
+    $.get(P_Server, { type: "GetAllPurchase", sT: s }, function (data) {
+        //等待结束
+        Cstop();
+        if (data != "") {
+            $("#Con_purchase").html(data);
+        }
+    });
+
+}
+
+//获取修改采购表单值
+function GetPVal(id) {
+    var input = "#purchaseSTD input[value='" + id + "']";
+    var td = $(input).parent();
+    var time = $(td).next().next().next().next().next().text();
+    $("#purchaseNameU").val($(td).next().text());
+    $("#purchaseTimeU").val(DateF(time.substring(0, time.indexOf(" "))));
+    $("#purchasePriceU").val($(td).next().next().text());
+    $("#purchaseQuantityU").val($(td).next().next().next().text());
+    $("#purchaseRemarkU").val($(td).next().next().next().next().text());
+    $("#Updatepurchase").attr("pid", id);
+}
+
+/*****************  purchase end  ********************/
+
+/*****************  stock start  ********************/
+//获取库存列表
+function getAllStock() {
+    //获取数据
+    var s = $("#searchT_stock").val();
+    //加载等待
+    Cloading("Con_stock");
+    //执行ajax
+    $.get(S_Server, { type: "GetAllStock", sT: s }, function (data) {
+        //等待结束
+        Cstop();
+        if (data != "") {
+            $("#Con_stock").html(data);
+        }
+    });
+}
+
+//新增库存管理保存点击事件
+function stockSaveClick() {
+    //获取数据
+    var n = $("#stockName").val();
+    var t = $("#stockTime").val();
+    var q = $("#stockQuantity").val();
+    var r = $("#stockRemark").val();
+
+    //判断数量是否为数字
+    if (!IsNum(q)) {
+        alert("数量请输入数字!");
+        return;
+    }
+    //加载等待
+    loading("stockSave");
+
+    //执行ajax
+    $.get(S_Server, { type: "stockSave", name: n, time: t,remark: r, quantity: q, id: "" }, function (data) {
+        //等待结束
+        stopW("stockSave");
+
+        if (data == "true") {
+            CloseBox("Insertstock");             //关闭新增窗口
+            clearDataForm("stockTable");         //清空新增窗口的表单数据
+            getAllStock();                     //重新获取数据
+        }
+        else {
+            alert("新增失败...失败原因:" + data);
+        }
+    });
+}
+//获取修改库存表单值
+function GetSVal(id) {
+    var input = "#stockSTD input[value='" + id + "']";
+    var td = $(input).parent();
+    var time = $(td).next().next().next().next().text();
+    $("#stockNameU").val($(td).next().text());
+    $("#stockTimeU").val(DateF(time.substring(0, time.indexOf(" "))));
+    $("#stockQuantityU").val($(td).next().next().text());
+    $("#stockRemarkU").val($(td).next().next().next().text());
+    $("#Updatestock").attr("sid", id);
+}
+
+//修改库存管理保存点击事件
+function stockUpdateClick() {
+    //获取数据
+    var n = $("#stockNameU").val();
+    var t = $("#stockTimeU").val();
+    var q = $("#stockQuantityU").val();
+    var r = $("#stockRemarkU").val();
+    var i = $("#Updatestock").attr("sid");
+  
+    //判断数量是否为数字
+    if (!IsNum(q)) {
+        alert("数量请输入数字!");
+        return;
+    }
+    //加载等待
+    loading("stockUpdate");
+
+    //执行ajax
+    $.get(S_Server, { type: "stockUpdate", name: n, time: t,remark: r, quantity: q, id: i }, function (data) {
+        //等待结束
+        stopW("stockUpdate");
+
+        if (data == "true") {
+            CloseBox("Updatestock");             //关闭新增窗口
+            getAllStock();                     //重新获取数据
+        }
+        else {
+            alert("修改失败...失败原因:" + data);
+        }
+    });
+}
+
+//删除库存信息
+function stockDelClick() {
+    var ids = CheckBoxVal("stockSTD");
+    if (ids == "") {
+        alert("请选择需要删除的库存信息");
+        return;
+    }
+    //加载等待
+    Cloading("Con_stock");
+    //执行ajax
+    $.get(S_Server, { type: "stockDel", id: ids }, function (data) {
+        //等待结束
+        Cstop();
+        if (data == "true") {
+            getAllStock();                 //重新获取数据
+        }
+        else {
+            alert("删除失败...失败原因:" + data);
+        }
+    });
+}
+
+/*****************  stock end  ********************/
+
+/*****************  ingredients start  ********************/
+
+//新增用料管理保存点击事件
+function ingredientsSaveClick() {
+    //获取数据
+    var n = $("#ingredientsName").val();
+    var t = $("#ingredientsTime").val();
+    var d = $("#ingredientsDepName").val();
+    var q = $("#ingredientsQuantity").val();
+    var r = $("#ingredientsRemark").val();
+
+    //判断数量是否为数字
+    if (!IsNum(q)) {
+        alert("数量请输入数字!");
+        return;
+    }
+    //加载等待
+    loading("ingredientsSave");
+
+    //执行ajax
+    $.get(I_Server, { type: "IngredientsSave", name: n, time: t, depid: d, remark: r, quantity: q, id: "" }, function (data) {
+        //等待结束
+        stopW("ingredientsSave");
+
+        if (data == "true") {
+            CloseBox("Insertingredients");             //关闭新增窗口
+            clearDataForm("ingredientsTable");         //清空新增窗口的表单数据
+            getAllingredients();                     //重新获取数据
+        }
+        else {
+            alert("新增失败...失败原因:" + data);
+        }
+    });
+}
+//修改用料管理保存点击事件
+function ingredientsUpdateClick() {
+    //获取数据
+    var n = $("#ingredientsNameU").val();
+    var t = $("#ingredientsTimeU").val();
+    var d = $("#ingredientsDepNameU").val();
+    var q = $("#ingredientsQuantityU").val();
+    var r = $("#ingredientsRemarkU").val();
+    var i = $("#Updateingredients").attr("Iid");
+
+    //判断数量是否为数字
+    if (!IsNum(q)) {
+        alert("数量请输入数字!");
+        return;
+    }
+    //加载等待
+    loading("ingredientsUpdate");
+
+    //执行ajax
+    $.get(I_Server, { type: "IngredientsUpdate", name: n, time: t, depid: d, remark: r, quantity: q, id: i }, function (data) {
+        //等待结束
+        stopW("ingredientsUpdate");
+
+        if (data == "true") {
+            CloseBox("Updateingredients");             //关闭新增窗口
+            getAllingredients();                     //重新获取数据
+        }
+        else {
+            alert("修改失败...失败原因:" + data);
+        }
+    });
+}
+
+//删除用料信息
+function ingredientsDelClick() {
+    var ids = CheckBoxVal("ingredientsSTD");
+    if (ids == "") {
+        alert("请选择需要删除的用料信息");
+        return;
+    }
+    //加载等待
+    Cloading("Con_ingredients");
+    //执行ajax
+    $.get(I_Server, { type: "IngredientsDel", id: ids }, function (data) {
+        //等待结束
+        Cstop();
+        if (data == "true") {
+            getAllingredients();                     //重新获取数据
+        }
+        else {
+            alert("删除失败...失败原因:" + data);
+        }
+    });
+}
+
+//获取用料列表
+function getAllingredients() {
+    //获取数据
+    var s = $("#searchT_ingredients").val();
+    //加载等待
+    Cloading("Con_ingredients");
+    //执行ajax
+    $.get(I_Server, { type: "GetAllIngredients", sT: s }, function (data) {
+        //等待结束
+        Cstop();
+        if (data != "") {
+            $("#Con_ingredients").html(data);
+        }
+    });
+
+}
+
+//获取修改用料表单值
+function GetingredientsVal(id) {
+    var input = "#ingredientsSTD input[value='" + id + "']";
+    var td = $(input).parent();
+    var time = $(td).next().next().next().next().next().text();
+    $("#ingredientsNameU").val($(td).next().text());
+    $("#ingredientsTimeU").val(DateF(time.substring(0, time.indexOf(" "))));
+    $("#ingredientsQuantityU").val($(td).next().next().next().text());
+    $("#ingredientsRemarkU").val($(td).next().next().next().next().text());
+    $("#Updateingredients").attr("Iid", id);
+    SelectDep("ingredientsDepNameU", $(td).next().next().attr("depid"));        //构建部门选择框
+}
+
+/*****************  ingredients end  ********************/
+
+
+/*****************  supply start  ********************/
+
+//新增供应管理保存点击事件
+function supplySaveClick() {
+    //获取数据
+    var n = $("#supplyName").val();
+    var t = $("#supplyTime").val();
+    var d = $("#supplyDepName").val();
+    var q = $("#supplyQuantity").val();
+    var r = $("#supplyRemark").val();
+
+    //判断数量是否为数字
+    if (!IsNum(q)) {
+        alert("数量请输入数字!");
+        return;
+    }
+    //加载等待
+    loading("supplySave");
+
+    //执行ajax
+    $.get(Supply_Server, { type: "SupplySave", name: n, time: t, depid: d, remark: r, quantity: q, id: "" }, function (data) {
+        //等待结束
+        stopW("supplySave");
+
+        if (data == "true") {
+            CloseBox("Insertsupply");             //关闭新增窗口
+            clearDataForm("supplyTable");         //清空新增窗口的表单数据
+            getAllsupply();                     //重新获取数据
+        }
+        else {
+            alert("新增失败...失败原因:" + data);
+        }
+    });
+}
+//修改供应管理保存点击事件
+function supplyUpdateClick() {
+    //获取数据
+    var n = $("#supplyNameU").val();
+    var t = $("#supplyTimeU").val();
+    var d = $("#supplyDepNameU").val();
+    var q = $("#supplyQuantityU").val();
+    var r = $("#supplyRemarkU").val();
+    var i = $("#Updatesupply").attr("Sid");
+
+    //判断数量是否为数字
+    if (!IsNum(q)) {
+        alert("数量请输入数字!");
+        return;
+    }
+    
+    //加载等待
+    loading("supplyUpdate");
+
+    //执行ajax
+    $.get(Supply_Server, { type: "SupplyUpdate", name: n, time: t, depid: d, remark: r, quantity: q, id: i }, function (data) {
+        //等待结束
+        stopW("supplyUpdate");
+
+        if (data == "true") {
+            CloseBox("Updatesupply");             //关闭新增窗口
+            getAllsupply();                      //重新获取数据
+        }
+        else {
+            alert("修改失败...失败原因:" + data);
+        }
+    });
+}
+
+//删除供应信息
+function supplyDelClick() {
+    var ids = CheckBoxVal("supplySTD");
+    if (ids == "") {
+        alert("请选择需要删除的供应信息");
+        return;
+    }
+    //加载等待
+    Cloading("Con_supply");
+    //执行ajax
+    $.get(Supply_Server, { type: "SupplyDel", id: ids }, function (data) {
+        //等待结束
+        Cstop();
+        if (data == "true") {
+            getAllsupply();                //重新获取数据
+        }
+        else {
+            alert("删除失败...失败原因:" + data);
+        }
+    });
+}
+
+//获取供应列表
+function getAllsupply() {
+    //获取数据
+    var s = $("#searchT_supply").val();
+    //加载等待
+    Cloading("Con_supply");
+    //执行ajax
+    $.get(Supply_Server, { type: "GetAllSupply", sT: s }, function (data) {
+        //等待结束
+        Cstop();
+        if (data != "") {
+            $("#Con_supply").html(data);
+        }
+    });
+
+}
+
+//获取修改供应表单值
+function GetsupplyVal(id) {
+    var input = "#supplySTD input[value='" + id + "']";
+    var td = $(input).parent();
+    var time = $(td).next().next().next().next().next().text();
+    $("#supplyNameU").val($(td).next().text());
+    $("#supplyTimeU").val(DateF(time.substring(0, time.indexOf(" "))));
+    $("#supplyQuantityU").val($(td).next().next().next().text());
+    $("#supplyRemarkU").val($(td).next().next().next().next().text());
+    $("#Updatesupply").attr("Sid", id);
+    SelectDep("supplyDepNameU", $(td).next().next().attr("depid"));        //构建部门选择框
+}
+
+/*****************  supply end  ********************/

+ 231 - 0
LogisticsSystem/Scripts/chat.js

@@ -0,0 +1,231 @@
+var ws;
+var SocketCreated = false;
+var isUserloggedout = false;
+
+//保存对每个用户的聊天内容
+var onlineChat = new Array();
+var onlineId = "";
+
+
+//连接webSocket
+function ToggleConnectionClicked() {
+    if (SocketCreated && (ws.readyState == 0 || ws.readyState == 1)) {
+        SocketCreated = false;
+        isUserloggedout = true;
+        ws.close();
+    } else {
+        try {
+            if ("WebSocket" in window) {
+                ws = new WebSocket("ws://192.168.0.102:4141/chat");
+            }
+            else if ("MozWebSocket" in window) {
+                ws = new MozWebSocket("ws://192.168.0.102:4141/chat");
+            }
+
+            SocketCreated = true;
+            isUserloggedout = false;
+        } catch (ex) {
+            Log(ex);
+            return;
+        }
+        ws.onopen = WSonOpen;               //连接成功回调    
+        ws.onmessage = WSonMessage;         //接收到消息回调
+        ws.onclose = WSonClose;             //连接关闭回调
+        ws.onerror = WSonError;             //连接出错回调
+    }
+};
+
+//连接成功回调    
+function WSonOpen() {
+    ws.send("login:" + $("#hiddenid").val() + "," + $("#hiddenname").val());
+};
+//接收到消息回调
+function WSonMessage(event) {
+    var message = event.data;
+    if (message.indexOf("onLineList:") == 0) {
+        oL(message.split(':')[1]);
+    } else {
+        msgRec(message);
+    }
+};
+//连接关闭回调
+function WSonClose() {
+    if (isUserloggedout)
+        Log("离开聊天室!");
+};
+//连接出错回调
+function WSonError() {
+    Log("远程连接中断...");
+};
+
+//输出错误, 并禁止操作
+function Log(Text) {
+    $("#waiting").html(Text);
+    $("#waiting").show();
+};
+
+
+$(document).ready(function () {
+    
+    //判断是否支持html5 websocket
+    var WebSocketsExist = true;
+    try {
+        var dummy = new WebSocket("ws://localhost:8989/test");
+    } catch (ex) {
+        try {
+            webSocket = new MozWebSocket("ws://localhost:8989/test");
+        }
+        catch (ex) {
+            WebSocketsExist = false;
+        }
+    }
+    //不支持html5 ,这显示不支持
+    if (!WebSocketsExist) {
+        $("#LockOn").show();
+        $("#waiting").hide();
+    } else {
+        //否则 连接websocket
+        ToggleConnectionClicked();
+    }
+    
+    //关闭和发送按钮绑定
+    close();
+    sendMsg();
+
+    //绑定输入框 回车事件
+    $("#msg").keypress(function(evt) {
+        if (evt.keyCode == 13) {
+            $("#send").click();
+            evt.preventDefault();
+        }
+    });
+});
+
+
+//构造在线列表
+function oL(data) {
+    //好友列表格式为 id|name,id|name,id|name,
+    var now = "";
+    var html = "<table class=\"oL\">";
+    var oList = data.split(',');
+    for (var i = 0; i < oList.length; i++) {
+        var temp = oList[i].split('|');
+        if (temp[0] == $("#hiddenid").val()) {
+            //好友ID为自己 则不作操作
+            continue;
+        }
+        
+        //初始化用户聊天内容
+        if (onlineId.indexOf(temp[0]) == -1) {
+            onlineChat[temp[0]] = "";
+            onlineId += temp[0] + ",";
+        }
+        now += temp[0] + ",";
+        //每一个用户
+        html += "<tr><td><table class=\"contactTable\" id=\"" + temp[0] + "\"><tr><td class=\"username\">" + temp[1] + "</td><td class=\"newMsg\">★</td></tr></table></td></tr>";
+    }
+    html += "</table>";
+    $("#contactList").html(html);
+    if ($(".oL").html() == "") {
+        //如果在线列表没有用户, 则现在等待用户
+        $("#waiting").fadeIn("slow");
+        $("#contactList").fadeOut("slow");
+    } else {
+        //显示聊天框绑定
+        showChatBox();
+        $("#waiting").fadeOut("slow");
+        //如果用户正在聊天 ,判断是否断线
+        if ($("#chatBox").attr("isopen") == "f") {
+            $("#contactList").fadeIn("slow");
+        } else {
+            if (now.indexOf($("#chatBox").attr("uid")) == -1) {
+                $("#title").append("(断线...)");
+            }
+        }
+    }
+}
+
+//显示聊天框
+function showChatBox() {
+    $(".contactTable").unbind();
+    $(".contactTable").bind("click", function () {
+        $("#contactList").hide("slow");
+        $("#chatBox").show("slow");
+        $("#chatBox").attr("uid", this.id);
+        $("#chatBox").attr("isopen", "t");
+        $("#title").text($(this).find(".username").text());
+        $("#content").height($("#MsgDiv").offset().top - 20);
+        $("#content").html(onlineChat[this.id]);
+        $("#content").scrollTop($("#content").height());
+        $(this).find(".newMsg").fadeOut("slow");
+    });
+
+}
+//聊天框关闭
+function close() {
+    $(".Box_Close").unbind();
+    $(".Box_Close").bind("click", function () {
+        $("#contactList").show("slow");
+        $("#chatBox").hide("slow");
+        $("#content").html("");
+        $("#chatBox").attr("isopen", "f");
+        $(".Box_info").find(".temp").remove();
+    });
+}
+
+//发送点击事件
+function sendMsg() {
+    $("#send").unbind();
+    $("#send").bind("click", function () {
+
+        var receiver = $("#chatBox").attr("uid");   //接收人
+        var text = $("#msg").val();                //发送的文本
+        var sender = $("#hiddenid").val();          //发送人
+
+        if (text == "") {
+            return;
+        }
+
+        var msg = receiver + "|" + sender + "|" + text;
+        ws.send(msg);       //socket发送
+
+        //将发送的消息保存到聊天内容
+        onlineChat[receiver] = onlineChat[receiver] + showMsg(text, $("#hiddenname").val());
+
+        //聊天框增加信息
+        $("#content").append(showMsg(text, $("#hiddenname").val()));
+        $("#content").scrollTop($("#content").height());        //滚动条到聊天框底部
+        $("#msg").val("");
+    });
+}
+
+//打包发送 和接收的消息 
+function showMsg(text,who) {
+    var html = "<div><table  style=\"width:100%; color:orange;\"><tr><td>" + who + "</td><td>" + NowTime() + "</td></tr></table>";
+    html += "<div class=\"detail\">" + text + "</div></div>";
+    return html;
+}
+
+//接收到新消息
+function msgRec(msg) {
+    //消息格式 id|msg
+    var info = msg.split('|');
+    var tid = "#" + info[0];
+    //保存到聊天内容
+    onlineChat[info[0]] = onlineChat[info[0]] + showMsg(info[1], $(tid).find(".username").text());
+    
+    //判断是否需要显示有新消息
+    if ($("#chatBox").attr("isopen")=="t") {
+        if ($("#chatBox").attr("uid") == info[0]) {
+            //正在当前聊天框,直接显示消息
+            $("#content").append(showMsg(info[1], $(tid).find(".username").text()));
+        } else {
+            //在和其他用户聊天 , 显示有新消息
+            $(".Box_info").append("<span class=\"temp\" style=\"color: red;float: right;\">★</span>");
+            $(tid).find(".newMsg").fadeIn("slow");
+        }
+    } else {
+        //不在聊天框 ,显示有新消息
+        $(tid).find(".newMsg").fadeIn("slow");
+    }
+}

Разлика између датотеке није приказан због своје велике величине
+ 9789 - 0
LogisticsSystem/Scripts/jquery-1.10.2.js


Разлика између датотеке није приказан због своје велике величине
+ 15040 - 0
LogisticsSystem/Scripts/jquery-ui.js


+ 30 - 0
LogisticsSystem/Scripts/upload.js

@@ -0,0 +1,30 @@
+$(document).ready(function () {
+    $("#del").click(function () {
+        DelFile();
+    });
+});
+
+
+//删除选中文件
+function DelFile() {
+    //获取数据
+    var checkbox = $("#files input[type='checkbox']");
+
+    var files = "";
+    $(checkbox).each(function () {
+        if ($(this).is(':checked')) {
+            files += $(this).val() + ",";
+        }
+    });
+    if (files != "") {
+        files = files.substring(0, files.length - 1);
+    } else {
+        alert('请选择要删除的文件');
+        return;
+    }
+
+    //执行ajax
+    $.get("uploadSrv.aspx", { type: "DelFiles", sT: files }, function (data) {
+        $("#files").html(data);
+    });
+}

+ 72 - 0
LogisticsSystem/Setting.Designer.cs

@@ -0,0 +1,72 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.1
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace LogisticsSystem {
+    using System;
+    
+    
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Setting {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Setting() {
+        }
+        
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LogisticsSystem.Setting", typeof(Setting).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Data Source=2012-20130811AP\SQLEXPRESS;Initial Catalog=LogisticsSystem;Integrated Security=True.
+        /// </summary>
+        internal static string ConnectStr {
+            get {
+                return ResourceManager.GetString("ConnectStr", resourceCulture);
+            }
+        }
+    }
+}

+ 5 - 0
LogisticsSystem/Setting.resx

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <ConnectStr>Data Source=2012-20130811AP\SQLEXPRESS;Initial Catalog=LogisticsSystem;Integrated Security=True </ConnectStr>
+<defaultPwd>mentos</defaultPwd>
+</root>

+ 51 - 0
LogisticsSystem/Site.Master

@@ -0,0 +1,51 @@
+<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="LogisticsSystem.SiteMaster" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head runat="server">
+    <title></title>
+    <link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
+    <asp:ContentPlaceHolder ID="HeadContent" runat="server">
+    </asp:ContentPlaceHolder>
+</head>
+<body>
+    <form runat="server">
+    <div class="page">
+        <div class="header">
+            <div class="title">
+                <h1>
+                    My ASP.NET Application
+                </h1>
+            </div>
+            <div class="loginDisplay">
+                <asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false">
+                    <AnonymousTemplate>
+                        [ <a href="~/Account/Login.aspx" ID="HeadLoginStatus" runat="server">Log In</a> ]
+                    </AnonymousTemplate>
+                    <LoggedInTemplate>
+                        Welcome <span class="bold"><asp:LoginName ID="HeadLoginName" runat="server" /></span>!
+                        [ <asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out" LogoutPageUrl="~/"/> ]
+                    </LoggedInTemplate>
+                </asp:LoginView>
+            </div>
+            <div class="clear hideSkiplink">
+                <asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal">
+                    <Items>
+                        <asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"/>
+                        <asp:MenuItem NavigateUrl="~/About.aspx" Text="About"/>
+                    </Items>
+                </asp:Menu>
+            </div>
+        </div>
+        <div class="main">
+            <asp:ContentPlaceHolder ID="MainContent" runat="server"/>
+        </div>
+        <div class="clear">
+        </div>
+    </div>
+    <div class="footer">
+        
+    </div>
+    </form>
+</body>
+</html>

+ 17 - 0
LogisticsSystem/Site.Master.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace LogisticsSystem
+{
+    public partial class SiteMaster : System.Web.UI.MasterPage
+    {
+        protected void Page_Load(object sender, EventArgs e)
+        {
+
+        }
+    }
+}

+ 71 - 0
LogisticsSystem/Site.Master.designer.cs

@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace LogisticsSystem
+{
+
+
+    public partial class SiteMaster
+    {
+
+        /// <summary>
+        /// HeadContent control.
+        /// </summary>
+        /// <remarks>
+        /// Auto-generated field.
+        /// To modify move field declaration from designer file to code-behind file.
+        /// </remarks>
+        protected global::System.Web.UI.WebControls.ContentPlaceHolder HeadContent;
+
+        /// <summary>
+        /// MasterPageScriptManager control.
+        /// </summary>
+        /// <remarks>
+        /// Auto-generated field.
+        /// To modify move field declaration from designer file to code-behind file.
+        /// </remarks>
+        protected global::System.Web.UI.ScriptManager MasterPageScriptManager;
+
+        /// <summary>
+        /// HeadLoginView control.
+        /// </summary>
+        /// <remarks>
+        /// Auto-generated field.
+        /// To modify move field declaration from designer file to code-behind file.
+        /// </remarks>
+        protected global::System.Web.UI.WebControls.LoginView HeadLoginView;
+
+        /// <summary>
+        /// HeadHomeLink control.
+        /// </summary>
+        /// <remarks>
+        /// Auto-generated field.
+        /// To modify move field declaration from designer file to code-behind file.
+        /// </remarks>
+        protected global::System.Web.UI.HtmlControls.HtmlAnchor HeadHomeLink;
+
+        /// <summary>
+        /// HeadAboutLink control.
+        /// </summary>
+        /// <remarks>
+        /// Auto-generated field.
+        /// To modify move field declaration from designer file to code-behind file.
+        /// </remarks>
+        protected global::System.Web.UI.HtmlControls.HtmlAnchor HeadAboutLink;
+
+        /// <summary>
+        /// MainContent control.
+        /// </summary>
+        /// <remarks>
+        /// Auto-generated field.
+        /// To modify move field declaration from designer file to code-behind file.
+        /// </remarks>
+        protected global::System.Web.UI.WebControls.ContentPlaceHolder MainContent;
+    }
+}

+ 107 - 0
LogisticsSystem/Styles/BaseStyle.css

@@ -0,0 +1,107 @@
+
+body 
+{
+    overflow: hidden;
+    width: 100%;
+    padding: 0;
+    margin: 0;
+    background-color: #E6E6E6;
+}
+
+input[type='button'] {
+    border: 1px solid Highlight;
+    background-color: #E6E6E6;
+}
+
+input[type='text'] {
+    border: 1px solid Highlight;
+}
+
+.leftNav {
+    position: absolute;
+    left: -100px;
+    top: 30%;
+    width: 100px;
+}
+
+.leftMenu 
+{
+    border: snow 1px ridge;
+    width: 100%;
+    margin: 10px 0;
+    text-align: center;
+    line-height: 50px;
+    cursor: pointer;
+}
+.Div_leftMenu_Btn 
+{
+    position: fixed ;
+    left: 0;
+    border: snow 1px ridge;
+    width: 30px;
+    text-align: center;
+    line-height: 50px;
+    top: 45%;
+}
+
+.Main_Box 
+{
+    border: solid 2px Highlight;
+    background-color: white;
+    width: 950px;
+    top: 100px;
+    position: absolute;
+}
+.Box_info {
+    border-bottom: solid 2px Highlight;
+    background-color: Highlight;
+    width: 100%;
+    height: 20px;
+    text-align: center;
+}
+.Box_Content {
+    border: none;
+    width: 100%;
+    height: 400px;
+    overflow: auto;
+    background-color: white;
+    text-align: center;
+}
+.Box_Close {
+    border-left: solid 2px white;
+    text-align: center;
+    width: 40px;
+    float: right;
+    cursor: pointer;
+}
+
+.Box_Menu {
+    border-bottom: solid 2px Highlight;
+    width: 100%;
+    height: 30px;
+    overflow: hidden;
+}
+.Action_Box 
+{
+    border: solid 2px Highlight;
+    background-color: white;
+    width: 500px;
+    top: 100px;
+    position: absolute;
+}
+.Action_Box_Content {
+    border: none;
+    width: 100%;
+    overflow: auto;
+    background-color: white;
+    text-align: left;
+}
+.standerTable {
+    width: 100%;
+}
+.standerTable tr:hover {
+    background-color: orange;
+}
+.standerTable td {
+    border: 1px solid Highlight;
+}

+ 25 - 0
LogisticsSystem/Styles/Main.css

@@ -0,0 +1,25 @@
+body 
+{
+    width: 100%;
+    padding: 0;
+    margin: 0;
+    background-color: #E6E6E6;
+}
+
+table 
+{
+    position: absolute;
+    top: 30%;
+    left: 10%;
+    width: 80%;
+    mso-cell-special: 0;
+    mso-cellspacing: 0;
+}
+
+table td {
+    width: 16%;
+    height: 300px;
+    border: 1px snow ridge;
+    text-align: center;
+    cursor: pointer;
+}

+ 11 - 0
LogisticsSystem/Styles/SetStyle.css

@@ -0,0 +1,11 @@
+#Update_Con_lmt {
+    text-align: center;
+}
+.lmtListTitle {
+    margin: 5px;
+    cursor: pointer;
+}
+ul {
+    list-style:none;
+    margin:0;
+}

+ 7 - 0
LogisticsSystem/Styles/SupplyStyle.css

@@ -0,0 +1,7 @@
+body {
+}
+
+#Div_purchase,#Div_ingredients,#Div_stock,#Div_supply {
+    display: none;
+    position: absolute;
+}

+ 92 - 0
LogisticsSystem/Styles/chatStyle.css

@@ -0,0 +1,92 @@
+#LockOn
+{
+    display: none;
+    position: absolute;
+    z-index: 999;
+    top: 0px;
+    left: 0px;
+    width: 100%;
+    height: 100%;
+    background-color: #ccc;
+    text-align: center;
+    padding-top: 20%;
+    filter: alpha(opacity=75);
+    opacity: 0.75;
+}
+
+#ChatMain
+{
+    width: 100%;
+    height: 100%;
+}
+#contactList
+{
+    width: 100%;
+    height: 100%;
+}
+#waiting
+{
+    position: absolute;
+    z-index: 999;
+    top: 0px;
+    left: 0px;
+    width: 100%;
+    height: 100%;
+    background-color: #ccc;
+    text-align: center;
+    padding-top: 20%;
+    filter: alpha(opacity=75);
+    opacity: 0.75;
+}
+
+.oL
+{
+    width: 100%;
+}
+.oL table
+{
+    width: 100%;
+    height: 50px;
+    border-bottom: solid 2px Highlight;
+    text-align: center;
+}
+
+#chatBox
+{
+    width: 100%;
+    display: none;
+}
+#MsgDiv
+{
+    position: absolute;
+    bottom: 0;
+    background-color: Highlight;
+    border: none;
+    width: 100%;
+    padding: 2px;
+}
+
+#msg {
+    width:85%;
+    margin-right: 0;
+    margin-left: 0;
+    border: none;
+    padding: 0;
+    height: 25px;
+}
+#send {
+    width: 14%;
+    margin-right: 0;
+    margin-left: 0;
+     height: 25px;
+}
+
+.detail {
+    width: 100%;
+    padding: 10px;
+}
+.newMsg {
+    color: red;
+    display: none;
+    text-align: right;
+}

+ 49 - 0
LogisticsSystem/SysMain/FileFlow/Action.xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<Actions>
+  <Action name="Insertaction">
+    <table id="actionTable" style="padding:10%; width:100%;">
+      <tr><td>名称:</td><td><input type="text" id="actionName"/></td></tr>
+      <tr><td>审批人:</td><td><select id="actionDepName"></select><select id="actionUserName"></select></td></tr>
+      <tr><td>备注:</td><td><textarea style="width:100%" id="actionRemark" rows="3" cols="20"></textarea></td></tr>
+    </table>
+    <div style="width:100%; text-align: center;"><input type="button" value="保存" id="actionSave"/></div>
+  </Action>
+  <Action name="Updateaction">
+    <table style="padding:10%; width:100%;">
+      <tr><td>名称:</td><td><input type="text" id="actionNameU"/></td></tr>
+      <tr><td>审批人:</td><td><select id="actionDepNameU"></select><select id="actionUserNameU"></select></td></tr>
+      <tr><td>备注:</td><td><textarea style="width:100%" id="actionRemarkU" rows="3" cols="20"></textarea></td></tr>
+    </table>
+    <div style="width:100%; text-align: center;"><input type="button" value="保存" id="actionUpdate"/></div>
+  </Action>
+
+  <Action name="Insertflow">
+    <table id="flowTable" style="padding:10%; width:100%;">
+      <tr><td>名称:</td><td><input type="text" id="flowName"/></td></tr>
+      <tr><td>流程操作:</td><td id="flowActions"></td></tr>
+      <tr><td>备注:</td><td><textarea style="width:100%" id="flowRemark" rows="3" cols="20"></textarea></td></tr>
+    </table>
+    <div style="width:100%; text-align: center;"><input type="button" id="addAc" value="增加操作"/><input type="button" id="delAc" value="删除操作"/></div>
+    <div style="width:100%; text-align: center;"><input type="button" value="保存" id="flowSave"/></div>
+  </Action>
+  <Action name="Updateflow">
+    <table style="padding:10%; width:100%;">
+      <tr><td>名称:</td><td><input type="text" id="flowNameU"/></td></tr>
+      <tr><td>流程操作:</td><td id="flowActionsU"></td></tr>
+      <tr><td>备注:</td><td><textarea style="width:100%" id="flowRemarkU" rows="3" cols="20"></textarea></td></tr>
+    </table>
+    <div style="width:100%; text-align: center;"><input type="button" id="addAcU" value="增加操作"/><input type="button" id="delAcU" value="删除操作"/></div>
+    <div style="width:100%; text-align: center;"><input type="button" value="保存" id="flowUpdate"/></div>
+  </Action>
+
+
+  <Action name="Insertapply">
+    <table id="applyTable" style="padding:10%; width:100%;">
+      <tr><td>标题:</td><td><input type="text" id="applyName"/></td></tr>
+      <tr><td>流程:</td><td><select id="applyFlowName"></select></td></tr>
+      <tr><td>内容:</td><td><textarea style="width:100%" id="applyCont" rows="10" cols="30"></textarea></td></tr>
+      <tr><td>附件:</td><td id="applySname"></td></tr>
+    </table>
+    <div style="width:100%; text-align: center;"><input type="button" id="applyAddr" value="管理上传附件"/></div>
+    <div style="width:100%; text-align: center;"><input type="button" value="保存" id="applySave"/></div>
+  </Action>

+ 1 - 0
LogisticsSystem/SysMain/FileFlow/ActionSrv.aspx

@@ -0,0 +1 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ActionSrv.aspx.cs" Inherits="LogisticsSystem.SysMain.FileFlow.ActionSrv" %>

+ 181 - 0
LogisticsSystem/SysMain/FileFlow/ActionSrv.aspx.cs

@@ -0,0 +1,181 @@
+using System;
+using System.Collections;
+using System.Data;
+using System.Text;
+using Business.FileFlow.Entity;
+using Business.FileFlow.Vo;
+using Common;
+using LogisticsSystem.Control;
+using LogisticsSystem.Control.Helper;
+
+namespace LogisticsSystem.SysMain.FileFlow
+{
+    public partial class ActionSrv : SrvBase
+    {
+        protected void Page_Load(object sender, EventArgs e)
+        {
+            var type = Request.QueryString["type"];
+
+            if (!CheckUserLogin()) return;
+
+            if (!CheckUserDo("用户执行--流程管理", type))
+            {
+                DataRow[] row = InitHelper.Ops.Select("code='" + type + "'");
+                if (row.Length <= 0)
+                {
+                    Response.Write("用户没有权限操作");
+                    return;
+                }
+                Response.Write("用户没有权限操作:" + row[0]["name"]);
+                return;
+            }
+
+            //根据类型 执行相关操作
+            switch (type)
+            {
+                case "actionSave":        //新增流程操作
+                    ActionSave();
+                    break;
+                case "GetAllAction":      //获取全部流程操作
+                    GetAllAction();
+                    break;
+                case "actionUpdate":       //更新流程操作
+                    ActionUpdate();
+                    break;
+                case "ActionDel":         //删除流程操作
+                    ActionDel();
+                    break;
+                case "SelectAc":           //获取流程操作选择框
+                    SelectAc();
+                    break;
+                default:
+                    Response.Write("");
+                    break;
+            }
+        }
+
+
+        /// <summary>
+        /// 获取流程表头
+        /// </summary>
+        /// <returns>流程表头</returns>
+        private StringBuilder ActionHead()
+        {
+            var tableHead = new StringBuilder();
+            tableHead.Append("<table class=\"standerTable\" id=\"actionSTD\"><thead><td></td>");
+            tableHead.Append("<td>名称</td>");
+            tableHead.Append("<td>备注</td>");
+            tableHead.Append("<td>审批人</td>");
+            tableHead.Append("<td>最后修改时间</td>");
+            tableHead.Append("<td>添加人</td>");
+            tableHead.Append("<td>修改人</td></thead>");
+            return tableHead;
+        }
+
+
+        private void GetAllAction()
+        {
+            //获取表头
+            StringBuilder table = ActionHead();
+            //获取流程数据
+            DataTable data = new ActionVo().AllAction(Request.QueryString["sT"]);
+
+            //带属性td的哈希表
+            var hash = new Hashtable();
+            hash["approvename"] = "pid";
+            hash["remark"] = "depid";
+
+            //整合数据表
+            StanderTable(table, data, "id", hash);
+            //返回数据
+            Response.Write(table.ToString());
+        }
+
+        /// <summary>
+        /// 新增流程操作
+        /// </summary>
+        private void ActionSave()
+        {
+            var action = new ActionEty();
+            if (!GetActionEty(action))
+            {
+                Response.Write("请输入正确的时间");
+                return;
+            }
+            var result = new ActionVo().InsertAction(action);
+            Response.Write(result.Equals(string.Empty) ? "true" : result);
+        }
+
+        /// <summary>
+        /// 修改流程操作
+        /// </summary>
+        private void ActionUpdate()
+        {
+            var action = new ActionEty();
+            if (!GetActionEty(action))
+            {
+                Response.Write("请输入正确的时间");
+                return;
+            }
+            var result = new ActionVo().UpdateAction(action);
+            Response.Write(result.Equals(string.Empty) ? "true" : result);
+        }
+
+        /// <summary>
+        /// 删除流程操作
+        /// </summary>
+        private void ActionDel()
+        {
+            string id = "'";
+            string[] ids = Request.QueryString["id"].Split(',');
+            id += string.Join("','", ids) + "'";
+            var result = new ActionVo().DelAction(id);
+            Response.Write(result.Equals(string.Empty) ? "true" : result);
+        }
+
+
+        /// <summary>
+        /// 实体类ActionEty 赋值
+        /// </summary>
+        /// <returns>bool</returns>
+        private bool GetActionEty(ActionEty action)
+        {
+
+            action.Name = Request.QueryString["name"];
+            action.Remark = Request.QueryString["remark"];
+            action.ApproveId = Request.QueryString["approveid"];
+            action.Id = Request.QueryString["id"] == "" ? Com.NewGuid() : Request.QueryString["id"];
+            action.AddUserId = Session["Userid"].ToString();
+            action.AddTime = DateTime.Now;
+            action.UpdateUserId = Session["Userid"].ToString();
+            action.LastTime = DateTime.Now;
+            action.DelFlag = false;
+            return true;
+        }
+
+
+        /// <summary>
+        /// 获取操作选择框
+        /// </summary>
+        private void SelectAc()
+        {
+            var options = new StringBuilder();
+
+            //获取部门数据
+            DataTable data = new ActionVo().AllAction("");
+
+            //打包成option
+            foreach (DataRow row in data.Rows)
+            {
+                options.Append("<option value=\"" + row["id"] + "\">" + row["name"] + "</option>");
+            }
+            if (options.ToString() == "")
+            {
+                Response.Write("");
+                return;
+            }
+
+            Response.Write(options.ToString());
+        }
+    }
+}

+ 15 - 0
LogisticsSystem/SysMain/FileFlow/ActionSrv.aspx.designer.cs

@@ -0,0 +1,15 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated. 
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace LogisticsSystem.SysMain.FileFlow {
+    
+    
+    public partial class ActionSrv {
+    }
+}

+ 27 - 0
LogisticsSystem/SysMain/FileFlow/FileFrm.aspx

@@ -0,0 +1,27 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FileFrm.aspx.cs" Inherits="LogisticsSystem.SysMain.FileFlow.FileFrm" %>
+<%@ Register TagPrefix="uc" TagName="GoBack" Src="~/SysMain/GoBackBtn.ascx" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head runat="server">
+    <title>公文流转</title>
+    <link href="../../Styles/BaseStyle.css" rel="stylesheet" type="text/css" />
+    <script src="../../Scripts/jquery-1.10.2.js" type="text/javascript"></script>
+    <script src="../../Scripts/jquery-ui.js" type="text/javascript"></script>
+    <script src="../../Scripts/Base.js" type="text/javascript"></script>
+    <script src="../../Scripts/FileFrm.js" type="text/javascript"></script>
+</head>
+<body>
+     <uc:GoBack runat="server"  />
+     <%--        左侧导航条开始       --%>
+<div class="Div_leftMenu_Btn">&#62;&#62;</div>
+    <div class="leftNav">
+    <div class="leftMenu" id="action">操作管理</div>
+    <div class="leftMenu" id="flow">流程管理</div>
+    <div class="leftMenu" id="apply">我的申请</div>
+    <div class="leftMenu" id="approval">我的审批</div>
+</div>
+<%--        左侧导航条结束       --%>
+</body>
+</html>

+ 16 - 0
LogisticsSystem/SysMain/FileFlow/FileFrm.aspx.cs

@@ -0,0 +1,16 @@
+using System;
+using LogisticsSystem.Control;
+using LogisticsSystem.Control.Helper;
+
+namespace LogisticsSystem.SysMain.FileFlow
+{
+    public partial class FileFrm : BasePage
+    {
+        protected void Page_Load(object sender, EventArgs e)
+        {
+            CheckLogin();
+            if (IsPostBack) return;
+            LogHelper.Log("用户:" + Session["Username"] + " 进入公文流转");
+        }
+    }
+}

+ 15 - 0
LogisticsSystem/SysMain/FileFlow/FileFrm.aspx.designer.cs

@@ -0,0 +1,15 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated. 
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace LogisticsSystem.SysMain.FileFlow {
+    
+    
+    public partial class FileFrm {
+    }
+}

+ 1 - 0
LogisticsSystem/SysMain/FileFlow/FlowListSrv.aspx

@@ -0,0 +1 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FlowListSrv.aspx.cs" Inherits="LogisticsSystem.SysMain.FileFlow.FlowListSrv" %>

+ 360 - 0
LogisticsSystem/SysMain/FileFlow/FlowListSrv.aspx.cs

@@ -0,0 +1,360 @@
+using System;
+using System.Collections;
+using System.Data;
+using System.Text;
+using Business.FileFlow.Entity;
+using Business.FileFlow.Vo;
+using Business.System.User.Vo;
+using Common;
+using LogisticsSystem.Control;
+using LogisticsSystem.Control.Helper;
+
+namespace LogisticsSystem.SysMain.FileFlow
+{
+    public partial class FlowListSrv : SrvBase
+    {
+        protected void Page_Load(object sender, EventArgs e)
+        {
+            var type = Request.QueryString["type"];
+
+            if (!CheckUserLogin()) return;
+
+            if (!CheckUserDo("用户执行--公文列表管理", type))
+            {
+                DataRow[] row = InitHelper.Ops.Select("code='" + type + "'");
+                if (row.Length <= 0)
+                {
+                    Response.Write("用户没有权限操作");
+                    return;
+                }
+                Response.Write("用户没有权限操作:" + row[0]["name"]);
+                return;
+            }
+
+            //根据类型 执行相关操作
+            switch (type)
+            {
+                case "flowListSave":        //提交公文申请
+                    FlowListSave();
+                    break;
+                case "GetAllFlowList":      //获取我的申请列表
+                    GetAllFlowList();
+                    break;
+                case "flowListUpdate":       //审批公文
+                    FlowListUpdate();
+                    break;
+                case "FlowCont":            //获取公文详细信息
+                    FlowCont();
+                    break;
+                case "MyFlowList":          //获取我的审批列表
+                    MyFlowList();
+                    break;
+                default:
+                    Response.Write("");
+                    break;
+            }
+        }
+
+        /// <summary>
+        /// 获取公文列表表头
+        /// </summary>
+        /// <returns>公文列表表头</returns>
+        private StringBuilder FlowListHead(string tableid)
+        {
+            var tableHead = new StringBuilder();
+            tableHead.Append("<table class=\"standerTable\" id=\"" + tableid + "\"><thead><td></td>");
+            tableHead.Append("<td>名称</td>");
+            tableHead.Append("<td>流程名称</td>");
+            tableHead.Append("<td>当前步骤</td>");
+            tableHead.Append("<td>上次修改时间</td>");
+            tableHead.Append("<td>提交人</td>");
+            tableHead.Append("<td>是否通过</td>");
+            tableHead.Append("<td>是否完成</td>");
+            tableHead.Append("<td>附件</td></thead>");
+            return tableHead;
+        }
+
+
+        private void GetAllFlowList()
+        {
+            //获取表头
+            StringBuilder table = FlowListHead("flowListSTD");
+            //获取公文列表数据
+            DataTable data = new FlowListVo().AllFlowList(Request.QueryString["sT"], Session["Userid"].ToString());
+
+            var hashtable = new Hashtable();
+            hashtable["none"] = "actionIDs";
+
+            //整合数据表
+            VoCusTable(table, data, CusTableHash(data), "id", hashtable);
+            //保存附件地址
+            SAddr(data);
+            //返回数据
+            Response.Write(table.ToString());
+        }
+
+        /// <summary>
+        /// 新增公文列表信息
+        /// </summary>
+        private void FlowListSave()
+        {
+            var flowList = new FlowListEty();
+            InsertFlowListEty(flowList);
+            var result = new FlowListVo().InsertFlowList(flowList);
+            if (result.Equals(string.Empty))
+            {
+                Session["upload"] = new Hashtable();
+                Response.Write("true");
+            }
+            else
+            {
+                Response.Write(result);
+            }
+        }
+
+        /// <summary>
+        /// 修改公文列表信息
+        /// </summary>
+        private void FlowListUpdate()
+        {
+            var flowList = new FlowListEty();
+            UpdateFlowListEty(flowList);
+            var result = new FlowListVo().UpdateFlowList(flowList);
+            Response.Write(result.Equals(string.Empty) ? "true" : result);
+        }
+
+        /// <summary>
+        /// 删除公文列表信息
+        /// </summary>
+        private void FlowListDel()
+        {
+            string id = "'";
+            string[] ids = Request.QueryString["id"].Split(',');
+            id += string.Join("','", ids) + "'";
+            var result = new FlowListVo().DelFlowList(id);
+            Response.Write(result.Equals(string.Empty) ? "true" : result);
+        }
+
+
+        /// <summary>
+        /// 实体类FlowListEty 赋值
+        /// </summary>
+        /// <returns>bool</returns>
+        private void InsertFlowListEty(FlowListEty flowList)
+        {
+
+            flowList.Name = Request.QueryString["name"];
+            flowList.Fcontent = Request.QueryString["cont"];
+            flowList.FlowId = Request.QueryString["fid"];
+            flowList.Remark = "";
+            flowList.Id = Com.NewGuid();
+            flowList.AddTime = DateTime.Now;
+            flowList.UpdateUserId = Session["Userid"].ToString();
+            flowList.AddUserId = Session["Userid"].ToString();
+            flowList.LastTime = DateTime.Now;
+            flowList.DelFlag = false;
+            flowList.IsEnd = false;
+            flowList.IsPass = false;
+            flowList.SAddr = GetUploadFiles();
+            flowList.ActionId = 0;
+        }
+
+        /// <summary>
+        /// 实体类FlowListEty 赋值 (更新)
+        /// </summary>
+        /// <returns>bool</returns>
+        private void UpdateFlowListEty(FlowListEty flowList)
+        {
+            var flow = new FlowVo();
+            flowList.Remark = Request.QueryString["remark"];
+            flowList.Id = Request.QueryString["id"];
+            flowList.UpdateUserId = Session["Userid"].ToString();
+            flowList.LastTime = DateTime.Now;
+
+            FlowListEty temp = new FlowListVo().GetFlowContById(flowList.Id);
+            Hashtable action = flow.FlowAction(flow.GetAction(temp.FlowId));
+
+            flowList.AddTime = temp.AddTime;
+            flowList.Name = temp.Name;
+            flowList.FlowId = temp.FlowId;
+            flowList.ActionId = temp.ActionId;
+            flowList.DelFlag = temp.DelFlag;
+            flowList.AddUserId = temp.AddUserId;
+            flowList.Fcontent = temp.Fcontent;
+            flowList.SAddr = temp.SAddr;
+
+            if (Request.QueryString["isPass"] == "pass")
+            {
+                if (temp.ActionId == action.Count - 1)
+                {
+                    //该公文 执行最后一步操作, 结束
+                    flowList.IsPass = true;
+                    flowList.IsEnd = true;
+                    flowList.ActionId = temp.ActionId;
+                }
+                else
+                {
+                    //该公文 执行下一步操作, 未结束
+                    flowList.IsPass = false;
+                    flowList.IsEnd = false;
+                    flowList.ActionId = temp.ActionId + 1;
+                }
+            }
+            else
+            {
+                //该公文 不通过, 结束
+                flowList.IsPass = false;
+                flowList.IsEnd = true;
+                flowList.ActionId = temp.ActionId;
+            }
+        }
+
+        /// <summary>
+        /// 获取上传的文件路径
+        /// </summary>
+        /// <returns></returns>
+        private string GetUploadFiles()
+        {
+            var hash = (Hashtable)Session["upload"];
+            string result = string.Empty;
+            if (hash.Count <= 0)
+            {
+                return result;
+            }
+            foreach (string addr in hash.Values)
+            {
+                result += addr + ",";
+            }
+            return result.TrimEnd(',');
+        }
+
+        /// <summary>
+        /// 保存流程列表的附件地址
+        /// </summary>
+        /// <param name="data">流程列表</param>
+        /// <returns>流程列表ID关联附件地址的哈希表</returns>
+        private void SAddr(DataTable data)
+        {
+            var hash = (Hashtable)Session["SAddr"];
+            foreach (DataRow row in data.Rows)
+            {
+                if (hash.ContainsKey(row["id"].ToString())) continue;
+                hash[row["id"].ToString()] = row["sAddr"];
+            }
+            Session["SAddr"] = hash;
+        }
+
+        /// <summary>
+        /// 获取定制表的哈希表
+        /// </summary>
+        /// <param name="data">流程列表</param>
+        /// <returns>定制表的哈希表</returns>
+        private Hashtable CusTableHash(DataTable data)
+        {
+            var flowVo = new FlowVo();
+            DataTable actions = new ActionVo().AllAction("");       //读取所有流程操作
+            var hash = new Hashtable();
+            hash["id"] = new Hashtable();
+            hash["actionid"] = new Hashtable();
+            hash["isPass"] = new Hashtable();
+            hash["isEnd"] = new Hashtable();
+            hash["sAddr"] = new Hashtable();
+            foreach (DataRow row in data.Rows)
+            {
+                var tempid = (Hashtable)hash["id"];
+                var tempactionid = (Hashtable)hash["actionid"];
+                var tempisPass = (Hashtable)hash["isPass"];
+                var tempisEnd = (Hashtable)hash["isEnd"];
+                var tempsAddr = (Hashtable)hash["sAddr"];
+
+                ActionEty actionEty = flowVo.NowActionId(row["actionIDs"].ToString(), actions,
+                                                         row["actionid"].ToString());
+
+                tempid[row["id"]] = "<input type=\"checkbox\" value=\"" + row["id"] + "\">";
+                tempactionid[row["id"]] = actionEty.Name;
+                tempisPass[row["id"]] = (bool)row["isPass"] ? "是" : "否";
+                tempisEnd[row["id"]] = (bool)row["isEnd"] ? "是" : "否";
+                tempsAddr[row["id"]] = "<input class=\"downfile\" type=\"button\" value=\"下载\">";
+
+                hash["id"] = tempid;
+                hash["actionid"] = tempactionid;
+                hash["isPass"] = tempisPass;
+                hash["isEnd"] = tempisEnd;
+                hash["sAddr"] = tempsAddr;
+            }
+            return hash;
+        }
+
+
+        private void FlowCont()
+        {
+            var flow = new FlowVo();
+            var userVo = new UserVo();
+
+            DataTable actions = new ActionVo().AllAction("");       //读取所有流程操作
+
+            FlowListEty listEty = new FlowListVo().GetFlowContById(Request.QueryString["fid"]);
+            FlowEty flowEty = flow.GetFlowById(listEty.FlowId);
+
+            var html = new StringBuilder();
+            html.Append("<div style=\"height:550px; overflow:auto; \"><table style=\"width:100%\">");
+            html.Append("<tr><td>标题:</td><td>" + listEty.Name + "</td></tr>");
+            html.Append("<tr><td>流程:</td><td>" + flowEty.Name + "</td></tr>");
+            html.Append("<tr><td>操作:</td><td>" + flow.ActionNString(flowEty.ActionIDs, actions, listEty.ActionId) + "</td></tr>");
+            html.Append("<tr><td>提交人:</td><td>" + userVo.UserName(listEty.AddUserId) + "</td></tr>");
+            html.Append("<tr><td>提交时间:</td><td>" + listEty.AddTime.ToString() + "</td></tr>");
+            html.Append("<tr><td>最近审批时间:</td><td>" + listEty.LastTime.ToString() + "</td></tr>");
+            html.Append("<tr><td>是否通过:</td><td>" + (listEty.IsPass ? "是" : "否") + "</td></tr>");
+            html.Append("<tr><td>是否结束:</td><td>" + (listEty.IsEnd ? "是" : "否") + "</td></tr>");
+            html.Append("<tr><td>内容:</td><td style=\"border:1px solid Highlight; width:80%;\"><div style=\"height:200px; overflow:auto;\">" + listEty.Fcontent + "</div></td></tr>");
+
+            if (Request.QueryString["style"] == "apply")
+            {
+                html.Append("<tr><td>审批回复:</td><td style=\"border:1px solid Highlight\"><div style=\"height:100px; overflow:auto;\">" + listEty.Remark + "</div></td></tr>");
+                html.Append("</table></div>");
+            }
+            else if (Request.QueryString["style"] == "approval")
+            {
+                html.Append("<tr><td>审批回复:</td><td style=\"border:1px solid Highlight\"><textarea style=\"width:98%\" id=\"approveRe\" rows=\"5\">" + listEty.Remark + "</textarea></td></tr></table>");
+                html.Append("<div style=\" text-align: center; width:100%;\"><input style=\" margin:1% 5%;\" type=\"button\" id=\"pass\" value=\"通过\"/><input style=\" margin:1% 5%;\" type=\"button\" id=\"reject\" value=\"不通过\"/></div>");
+                html.Append("</div>");
+            }
+
+
+            Response.Write(html.ToString());
+        }
+
+
+        private void MyFlowList()
+        {
+            var addr = (Hashtable)Session["SAddr"];
+            var flow = new FlowVo();
+            DataTable actions = new ActionVo().AllAction("");       //读取所有流程操作
+            //获取表头
+            StringBuilder table = FlowListHead("approvalSTD");
+            //获取公文列表数据
+            Hashtable mylist = new FlowListVo().MyList(Session["Userid"].ToString(), Request.QueryString["sT"]);
+
+            foreach (FlowListEty flowList in mylist.Values)
+            {
+                table.Append("<tr><td><input type=\"checkbox\" value=\"" + flowList.Id + "\"></td>");
+                table.Append("<td>" + flowList.Name + "</td>");
+                table.Append("<td>" + flow.GetFlowNameById(flowList.FlowId) + "</td>");
+                table.Append("<td>" + flow.NowActionId(flow.GetAction(flowList.FlowId), actions, flowList.ActionId.ToString()).Name + "</td>");
+                table.Append("<td>" + flowList.LastTime + "</td>");
+                table.Append("<td>" + flowList.AddUserId + "</td>");
+                table.Append("<td>" + (flowList.IsPass ? "是" : "否") + "</td>");
+                table.Append("<td>" + (flowList.IsEnd ? "是" : "否") + "</td>");
+                table.Append("<td><input class=\"downfile\" type=\"button\" value=\"下载\"></td></tr>");
+                if (addr.ContainsKey(flowList.Id)) continue;
+                addr[flowList.Id] = flowList.SAddr;
+            }
+            table.Append("</table>");
+
+            Session["SAddr"] = addr;
+
+            //返回数据
+            Response.Write(table.ToString());
+        }
+    }
+}

+ 15 - 0
LogisticsSystem/SysMain/FileFlow/FlowListSrv.aspx.designer.cs

@@ -0,0 +1,15 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated. 
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace LogisticsSystem.SysMain.FileFlow {
+    
+    
+    public partial class FlowListSrv {
+    }
+}

+ 1 - 0
LogisticsSystem/SysMain/FileFlow/FlowSrv.aspx

@@ -0,0 +1 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FlowSrv.aspx.cs" Inherits="LogisticsSystem.SysMain.FileFlow.FlowSrv" %>

+ 195 - 0
LogisticsSystem/SysMain/FileFlow/FlowSrv.aspx.cs

@@ -0,0 +1,195 @@
+using System;
+using System.Collections;
+using System.Data;
+using System.Text;
+using Business.FileFlow.Entity;
+using Business.FileFlow.Vo;
+using Common;
+using LogisticsSystem.Control;
+using LogisticsSystem.Control.Helper;
+
+namespace LogisticsSystem.SysMain.FileFlow
+{
+    public partial class FlowSrv : SrvBase
+    {
+        protected void Page_Load(object sender, EventArgs e)
+        {
+            var type = Request.QueryString["type"];
+
+            if (!CheckUserLogin()) return;
+
+            if (!CheckUserDo("用户执行--流程管理", type))
+            {
+                DataRow[] row = InitHelper.Ops.Select("code='" + type + "'");
+                if (row.Length <= 0)
+                {
+                    Response.Write("用户没有权限操作");
+                    return;
+                }
+                Response.Write("用户没有权限操作:" + row[0]["name"]);
+                return;
+            }
+
+            //根据类型 执行相关操作
+            switch (type)
+            {
+                case "flowSave":        //新增流程信息
+                    FlowSave();
+                    break;
+                case "GetAllFlow":      //获取全部流程信息
+                    GetAllFlow();
+                    break;
+                case "flowUpdate":       //更新流程信息
+                    FlowUpdate();
+                    break;
+                case "FlowDel":         //删除流程信息
+                    FlowDel();
+                    break;
+                case "SelectFlow":      //获取流程选择框
+                    SelectFlow();
+                    break;
+                default:
+                    Response.Write("");
+                    break;
+            }
+        }
+
+        /// <summary>
+        /// 获取流程表头
+        /// </summary>
+        /// <returns>流程表头</returns>
+        private StringBuilder FlowHead()
+        {
+            var tableHead = new StringBuilder();
+            tableHead.Append("<table class=\"standerTable\" id=\"flowSTD\"><thead><td></td>");
+            tableHead.Append("<td>名称</td>");
+            tableHead.Append("<td>操作步骤</td>");
+            tableHead.Append("<td>备注</td>");
+            tableHead.Append("<td>最后修改时间</td>");
+            tableHead.Append("<td>添加人</td>");
+            tableHead.Append("<td>修改人</td></thead>");
+            return tableHead;
+        }
+
+
+        private void GetAllFlow()
+        {
+            //获取表头
+            StringBuilder table = FlowHead();
+            //获取流程数据
+            DataTable data = new FlowVo().AllFlow(Request.QueryString["sT"]);
+            //整合数据表
+            VoStanderTable(table, data, "id", FlowActions(data),"id");
+            //返回数据
+            Response.Write(table.ToString());
+        }
+
+        /// <summary>
+        /// 新增流程信息
+        /// </summary>
+        private void FlowSave()
+        {
+            var flow = new FlowEty();
+            if (!GetFlowEty(flow))
+            {
+                Response.Write("请输入正确的时间");
+                return;
+            }
+            var result = new FlowVo().InsertFlow(flow);
+            Response.Write(result.Equals(string.Empty) ? "true" : result);
+        }
+
+        /// <summary>
+        /// 修改流程信息
+        /// </summary>
+        private void FlowUpdate()
+        {
+            var flow = new FlowEty();
+            if (!GetFlowEty(flow))
+            {
+                Response.Write("请输入正确的时间");
+                return;
+            }
+            var result = new FlowVo().UpdateFlow(flow);
+            Response.Write(result.Equals(string.Empty) ? "true" : result);
+        }
+
+        /// <summary>
+        /// 删除流程信息
+        /// </summary>
+        private void FlowDel()
+        {
+            string id = "'";
+            string[] ids = Request.QueryString["id"].Split(',');
+            id += string.Join("','", ids) + "'";
+            var result = new FlowVo().DelFlow(id);
+            Response.Write(result.Equals(string.Empty) ? "true" : result);
+        }
+
+
+        /// <summary>
+        /// 实体类FlowEty 赋值
+        /// </summary>
+        /// <returns>bool</returns>
+        private bool GetFlowEty(FlowEty flow)
+        {
+
+            flow.Name = Request.QueryString["name"];
+            flow.Remark = Request.QueryString["remark"];
+            flow.ActionIDs = Request.QueryString["aIDs"];
+            flow.Id = Request.QueryString["id"] == "" ? Com.NewGuid() : Request.QueryString["id"];
+            flow.AddUserId = Session["Userid"].ToString();
+            flow.AddTime = DateTime.Now;
+            flow.UpdateUserId = Session["Userid"].ToString();
+            flow.LastTime = DateTime.Now;
+            flow.DelFlag = false;
+            return true;
+        }
+
+
+        /// <summary>
+        /// 根据流程actionIDs, 找出所有流程操作名字
+        /// </summary>
+        /// <param name="data">流程数据表</param>
+        /// <returns>嵌套哈希表</returns>
+        private Hashtable FlowActions(DataTable data)
+        {
+            var hash = new Hashtable();
+            DataTable actions = new ActionVo().AllAction("");       //读取所有流程操作
+            var flowVo = new FlowVo();
+            foreach (DataRow row in data.Rows)
+            {
+                hash[row["id"]] = flowVo.ActionNString(row["actionIDs"].ToString(), actions); //按照流程ID 流程操作名字
+            }
+
+            //返回嵌套哈希表
+            var result=new Hashtable();
+            result["actionIDs"] = hash;
+            return result;
+        }
+
+        /// <summary>
+        /// 获取流程选择框
+        /// </summary>
+        private void SelectFlow()
+        {
+            var options = new StringBuilder();
+
+            //获取部门数据
+            DataTable data = new FlowVo().AllFlow("");
+
+            //打包成option
+            foreach (DataRow row in data.Rows)
+            {
+                options.Append("<option value=\"" + row["id"] + "\">" + row["name"] + "</option>");
+            }
+            if (options.ToString() == "")
+            {
+                Response.Write("");
+                return;
+            }
+
+            Response.Write(options.ToString());
+        }
+    }
+}

+ 15 - 0
LogisticsSystem/SysMain/FileFlow/FlowSrv.aspx.designer.cs

@@ -0,0 +1,15 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated. 
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace LogisticsSystem.SysMain.FileFlow {
+    
+    
+    public partial class FlowSrv {
+    }
+}

BIN
LogisticsSystem/SysMain/FileFlow/backgroundDefault.jpg


+ 17 - 0
LogisticsSystem/SysMain/FileFlow/download.aspx

@@ -0,0 +1,17 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="download.aspx.cs" Inherits="LogisticsSystem.SysMain.FileFlow.Download" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head runat="server">
+    <title>文件下载</title>
+    <link href="../../Styles/BaseStyle.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+    <form id="form1" runat="server">
+        <div style="margin:10% 0; width:100%; text-align: center;">企业物流系统文件下载</div>
+    <div style="margin:10% 0; width:100%;">附件:</div>
+    <div id="files" runat="server" style="margin:10% 5%; width:100%;"></div>
+    </form>
+</body>
+</html>

+ 42 - 0
LogisticsSystem/SysMain/FileFlow/download.aspx.cs

@@ -0,0 +1,42 @@
+using System;
+using System.Collections;
+using LogisticsSystem.Control;
+using LogisticsSystem.Control.Helper;
+
+namespace LogisticsSystem.SysMain.FileFlow
+{
+    public partial class Download : BasePage
+    {
+        protected void Page_Load(object sender, EventArgs e)
+        {
+            CheckLogin();
+            if (IsPostBack) return;
+            LogHelper.Log("用户:" + Session["Username"] + " 进入文件下载");
+
+            string flowid = Request.QueryString["fid"];
+            if (flowid == string.Empty)
+            {
+                files.InnerHtml = "";
+                return;
+            }
+            var file = (Hashtable)Session["SAddr"];
+
+            if (file[flowid].ToString() == string.Empty)
+            {
+                files.InnerHtml = "<h3>该申请没有附件</h3>";
+                return;
+            }
+
+            string[] addrs = file[flowid].ToString().Split(',');
+            string html = string.Empty;
+            int i = 1;
+            foreach (string addr in addrs)
+            {
+                html += "<a href=\"" + addr + "\" onclick=\"return confirm('确定下载吗?');\">附件" + i.ToString() + "</a><br/><br/>";
+                i++;
+            }
+            files.InnerHtml = html;
+
+        }
+    }
+}

+ 0 - 0
LogisticsSystem/SysMain/FileFlow/download.aspx.designer.cs


Неке датотеке нису приказане због велике количине промена