From 1fbfe94790a03ab58ac8dee37f5095ff611ec3d8 Mon Sep 17 00:00:00 2001
From: yzh <snbbt@21cn.com>
Date: 星期一, 14 三月 2022 14:13:05 +0800
Subject: [PATCH] 产品管理

---
 web/App_Code/obj/Debug/App_Code.csproj.AssemblyReference.cache |    0 
 web/App_Code/obj/Debug/App_Code.csproj.FileListAbsolute.txt    |   10 
 web/web/Bin/Dao.dll                                            |    0 
 web/Dao/obj/Debug/Dao.csproj.CoreCompileInputs.cache           |    2 
 web/Model/obj/Debug/Model.pdb                                  |    0 
 web/Model/Model/GwProduct.cs                                   |   62 +
 web/App_Code/obj/Debug/App_Code.dll                            |    0 
 web/Dao/Dao.csproj                                             |    1 
 web/App_Code/obj/Debug/App_Code.csproj.CoreCompileInputs.cache |    2 
 web/Model/Model/SysXh.cs                                       |   23 
 web/UMCLib/obj/Debug/UMCLib.csproj.FileListAbsolute.txt        |    8 
 web/Dao/obj/Debug/Dao.dll                                      |    0 
 web/Model/obj/Debug/Model.dll                                  |    0 
 web/Dao/obj/Debug/Dao.csproj.AssemblyReference.cache           |    0 
 web/Lib/Model.dll                                              |    0 
 web/web/Bin/App_Code.pdb                                       |    0 
 web/web/GwProduct.aspx                                         |  538 ++++++++++++++
 web/UMCLib/obj/Debug/UMCLib.csproj.CoreCompileInputs.cache     |    2 
 web/UMCLib/obj/Debug/UMCLib.dll                                |    0 
 web/web/Bin/Dao.pdb                                            |    0 
 web/Model/obj/Debug/Model.csproj.CoreCompileInputs.cache       |    2 
 web/web/GwProduct.ashx                                         |  743 ++++++++++++++++++++
 web/UMCLib/bin/Debug/UMCLib.pdb                                |    0 
 web/web/Bin/App_Code.dll                                       |    0 
 web/web/Bin/UMCLib.pdb                                         |    0 
 web/App_Code/bin/Debug/App_Code.pdb                            |    0 
 web/Model/Model.csproj                                         |    2 
 web/App_Code/obj/Debug/App_Code.pdb                            |    0 
 web/UMCLib/obj/Debug/UMCLib.pdb                                |    0 
 web/Lib/Model.pdb                                              |    0 
 web/Dao/obj/Debug/Dao.csproj.FileListAbsolute.txt              |    7 
 web/Dao/obj/Debug/Dao.pdb                                      |    0 
 web/Lib/Dao.dll                                                |    0 
 web/web/Index.aspx                                             |   11 
 web/App_Code/bin/Debug/App_Code.dll                            |    0 
 web/web/Bin/Model.pdb                                          |    0 
 web/.vs/Web/v16/.suo                                           |    0 
 web/UMCLib/bin/Debug/UMCLib.dll                                |    0 
 web/Model/obj/Debug/Model.csproj.FileListAbsolute.txt          |    7 
 web/Dao/GwProductDao.cs                                        |  384 ++++++++++
 web/web/GwProduct.aspx.cs                                      |  112 +++
 web/Dao/SysXhDao.cs                                            |  190 +++++
 web/Model/obj/Debug/Model.csproj.AssemblyReference.cache       |    0 
 web/web/Bin/Model.dll                                          |    0 
 web/Lib/Dao.pdb                                                |    0 
 45 files changed, 2,101 insertions(+), 5 deletions(-)

diff --git a/web/.vs/Web/v16/.suo b/web/.vs/Web/v16/.suo
index 6711e26..587599b 100644
--- a/web/.vs/Web/v16/.suo
+++ b/web/.vs/Web/v16/.suo
Binary files differ
diff --git a/web/App_Code/bin/Debug/App_Code.dll b/web/App_Code/bin/Debug/App_Code.dll
index eda7c89..fdb3dcd 100644
--- a/web/App_Code/bin/Debug/App_Code.dll
+++ b/web/App_Code/bin/Debug/App_Code.dll
Binary files differ
diff --git a/web/App_Code/bin/Debug/App_Code.pdb b/web/App_Code/bin/Debug/App_Code.pdb
index 034ec23..a052cc8 100644
--- a/web/App_Code/bin/Debug/App_Code.pdb
+++ b/web/App_Code/bin/Debug/App_Code.pdb
Binary files differ
diff --git a/web/App_Code/obj/Debug/App_Code.csproj.AssemblyReference.cache b/web/App_Code/obj/Debug/App_Code.csproj.AssemblyReference.cache
index 11c3060..8c2a0bd 100644
--- a/web/App_Code/obj/Debug/App_Code.csproj.AssemblyReference.cache
+++ b/web/App_Code/obj/Debug/App_Code.csproj.AssemblyReference.cache
Binary files differ
diff --git a/web/App_Code/obj/Debug/App_Code.csproj.CoreCompileInputs.cache b/web/App_Code/obj/Debug/App_Code.csproj.CoreCompileInputs.cache
index 933dd95..49fa306 100644
--- a/web/App_Code/obj/Debug/App_Code.csproj.CoreCompileInputs.cache
+++ b/web/App_Code/obj/Debug/App_Code.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-73d59a519d75fba02045f94dbe09df43d113619d
+148a124d533dab517de60d4081ee6b355ffb0769
diff --git a/web/App_Code/obj/Debug/App_Code.csproj.FileListAbsolute.txt b/web/App_Code/obj/Debug/App_Code.csproj.FileListAbsolute.txt
index 5282201..1ef0c4a 100644
--- a/web/App_Code/obj/Debug/App_Code.csproj.FileListAbsolute.txt
+++ b/web/App_Code/obj/Debug/App_Code.csproj.FileListAbsolute.txt
@@ -77,3 +77,13 @@
 D:\Company\SMGW_NewWeb\web\App_Code\obj\Debug\App_Code.dll
 D:\Company\SMGW_NewWeb\web\App_Code\obj\Debug\App_Code.pdb
 D:\Company\SMGW_NewWeb\web\App_Code\obj\Debug\App_Code.csproj.AssemblyReference.cache
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\App_Code\bin\Debug\App_Code.dll
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\App_Code\bin\Debug\App_Code.pdb
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\App_Code\bin\Debug\Aspose.Cells.dll
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\App_Code\bin\Debug\Dao.dll
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\App_Code\bin\Debug\Ionic.Zip.dll
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\App_Code\obj\Debug\App_Code.csproj.AssemblyReference.cache
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\App_Code\obj\Debug\App_Code.csproj.CoreCompileInputs.cache
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\App_Code\obj\Debug\App_Code.csproj.CopyComplete
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\App_Code\obj\Debug\App_Code.dll
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\App_Code\obj\Debug\App_Code.pdb
diff --git a/web/App_Code/obj/Debug/App_Code.dll b/web/App_Code/obj/Debug/App_Code.dll
index eda7c89..fdb3dcd 100644
--- a/web/App_Code/obj/Debug/App_Code.dll
+++ b/web/App_Code/obj/Debug/App_Code.dll
Binary files differ
diff --git a/web/App_Code/obj/Debug/App_Code.pdb b/web/App_Code/obj/Debug/App_Code.pdb
index 034ec23..a052cc8 100644
--- a/web/App_Code/obj/Debug/App_Code.pdb
+++ b/web/App_Code/obj/Debug/App_Code.pdb
Binary files differ
diff --git a/web/Dao/Dao.csproj b/web/Dao/Dao.csproj
index 37bd015..1ee91f7 100644
--- a/web/Dao/Dao.csproj
+++ b/web/Dao/Dao.csproj
@@ -91,6 +91,7 @@
     <Compile Include="GwSpDao.cs" />
     <Compile Include="SpSignatureInfo.cs" />
     <Compile Include="SysOperationLogDao.cs" />
+    <Compile Include="SysXhDao.cs" />
     <Compile Include="UserDao.cs" />
     <Compile Include="GwAlarmDao.cs" />
     <Compile Include="GwAuditCacheDao.cs" />
diff --git a/web/Dao/GwProductDao.cs b/web/Dao/GwProductDao.cs
index 62e7880..ab48b89 100644
--- a/web/Dao/GwProductDao.cs
+++ b/web/Dao/GwProductDao.cs
@@ -12,8 +12,11 @@
     /// <summary>
     /// 浜у搧鎿嶄綔
     /// </summary>
-    public class GwProductDao
+    public class GwProductDao : IDisposable
     {
+        public void Dispose()
+        {
+        }
 
         private static GwProductDao _instance;
         public static GwProductDao Instance
@@ -25,6 +28,163 @@
                 }
                 return _instance;
             }
+        }
+
+
+        public List<GwProduct> LoadInfoList(int classes, string name, int pageSize, int PageIndex, out int recordcount)
+        {
+            
+            List<GwProduct> list = new List<GwProduct>();
+            recordcount = 0;
+            try
+            {
+                StringBuilder builder = new StringBuilder();
+                builder.Append("from GW_PRODUCT where 1=1");
+                if (classes == -1)
+                {
+                    builder.Append(" AND (CLASSES != " + classes + " OR CLASSES IS NULL) " );
+                }
+                else
+                {
+                    builder.Append(" AND CLASSES = " + classes + " ");
+                }
+                if ((name != null) && (name != ""))
+                {
+                    builder.Append(" and name like '%" + name + "%'");
+                }
+                using (OracleDataReader reader = OracleHelper.ExecuteReader("select count(*) as count " + builder.ToString(), OracleHelper.Connection))
+                {
+                    while (reader.Read())
+                    {
+                        recordcount = this.ReadCount(reader);
+                    }
+                }
+                using (OracleDataReader reader2 = OracleHelper.ExecuteReader(PubConstant.doOracleSql(PageIndex, pageSize, recordcount, "select * " + builder.ToString()).ToString() + " order by path, sort ", OracleHelper.Connection ))
+                {
+                    while (reader2.Read())
+                    {
+                        GwProduct o = new GwProduct();
+                        if (this.ReadInfo(reader2, o))
+                        {
+                            list.Add(o);
+                        }
+                    }
+                }
+            }
+            catch (Exception exception)
+            {
+                LogHelper.Error(exception);
+                return list;
+            }
+            return list;
+
+        }
+
+        /// <summary>
+        /// 鑾峰彇浜у搧鍙婁骇鍝佸垎绫诲垪琛�
+        /// </summary>
+        /// <param name="clientID"></param>
+        /// <returns></returns>
+        public List<GwProduct> GwProductList(int classes, string name )
+        {
+            List<GwProduct> list = new List<GwProduct>();
+            //recordcount = 0;    //
+            try
+            {
+                StringBuilder stringBuilder = new StringBuilder();
+                stringBuilder.Append("SELECT * FROM GW_PRODUCT WHERE CLASSES=:CLASSES AND NAME=:NAME ORDER BY ID ");
+                OracleParameter[] oracleParameterArray = new OracleParameter[2]
+                {
+                    new OracleParameter(":CLASSES", (object) classes), new OracleParameter(":NAME", (object) ("%" + name + "%")) 
+                };
+
+
+                //using (OracleDataReader reader = OracleHelper.ExecuteReader("select count(*) as count " + builder.ToString(), OracleHelper.Connection, cmdParms))
+                //{
+                //    while (reader.Read())
+                //    {
+                //        recordcount = this.ReadCount(reader);
+                //    }
+                //}
+
+                using (OracleDataReader reader = OracleHelper.ExecuteReader(stringBuilder.ToString() +" order by path, sort ", OracleHelper.Connection, oracleParameterArray))
+                {
+                    while (((DbDataReader)reader).Read())
+                    {
+                        GwProduct o = new GwProduct();
+                        if (this.ReadInfo(reader, o))
+                            list.Add(o);
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                LogHelper.Error(ex);
+                return list;
+            }
+            return list;
+        }
+
+        //鏍规嵁鏉′欢鑾峰彇浜у搧鎴栦骇鍝佸垎绫荤殑ID鍜屽悕绉�
+        public List<GwProduct> getAllList(GwProduct bean)
+        {
+
+            List<GwProduct> list = new List<GwProduct>();
+            try
+            {
+                StringBuilder builder = new StringBuilder();
+                builder.Append("from GW_PRODUCT where 1=1");
+                if (bean.Classes == -1)
+                {
+                    builder.Append(" AND (CLASSES != " + bean.Classes + " OR CLASSES IS NULL) ");
+                }
+                else
+                {
+                    builder.Append(" AND CLASSES = " + bean.Classes + " ");
+                }
+
+                if (!string.IsNullOrEmpty(bean.ParentId) )
+                {
+                    builder.Append(" AND PARENT_ID = " + bean.ParentId + " ");
+                }
+
+                if (bean.IsDefault == -1)
+                {
+                    builder.Append(" AND (IS_DEFAULT != " + bean.IsDefault + " OR IS_DEFAULT IS NULL) ");
+                }
+                else
+                {
+                    builder.Append(" AND IS_DEFAULT = " + bean.IsDefault + " ");
+                }
+
+                if (bean.IsEnable == -1)
+                {
+                    builder.Append(" AND (IS_ENABLE != " + bean.IsEnable + " OR IS_ENABLE IS NULL) ");
+                }
+                else
+                {
+                    builder.Append(" AND IS_ENABLE = " + bean.IsEnable + " ");
+                }
+
+                using (OracleDataReader reader = OracleHelper.ExecuteReader("select id, name, classes, is_enable, is_default " + builder.ToString() + " order by path, sort ", OracleHelper.Connection))
+                {
+                    while (reader.Read())
+                    {
+                        GwProduct o = new GwProduct();
+                        if (this.ReadInfo(reader, o))
+                        {
+                            list.Add(o);
+                        }
+                    }
+                }
+            }
+            catch (Exception exception)
+            {
+                LogHelper.Error(exception);
+                return list;
+            }
+            return list;
+
         }
 
         /// <summary>
@@ -49,5 +209,227 @@
             }
             return list;
         }
+
+        //娣诲姞浜у搧鎴栦骇鍝佸垎绫讳俊鎭�
+        public bool Add(GwProduct o)
+        {
+            StringBuilder stringBuilder = new StringBuilder();
+            stringBuilder.Append("INSERT INTO GW_PRODUCT ( ");
+            stringBuilder.Append(" ID, NAME, ICON, INSTRUCTIONS, CLASSES, PARENT_ID, PATH, IS_DEFAULT, IS_ENABLE, SORT, ROUTER_TYPE, CM_OP_ID, CU_OP_ID, CT_OP_ID ");
+            stringBuilder.Append(" , CM_GROUPID, CU_GROUPID, CT_GROUPID, CM_EXT_PARAMS, CU_EXT_PARAMS, CT_EXT_PARAMS, PRICE, GIVING_NUM, REMARK, CREATE_TIME, CREATOR " );
+            //stringBuilder.Append(" , UPDATE_TIME, UPDATEOR ");
+            stringBuilder.Append(" ) ");
+            stringBuilder.Append(" VALUES (:ID, :NAME, :ICON, :INSTRUCTIONS, :CLASSES, :PARENT_ID, :PATH, :IS_DEFAULT, :IS_ENABLE, :SORT, :ROUTER_TYPE, :CM_OP_ID, :CU_OP_ID, :CT_OP_ID " );
+            stringBuilder.Append(" , :CM_GROUPID, :CU_GROUPID, :CT_GROUPID, :CM_EXT_PARAMS, :CU_EXT_PARAMS, :CT_EXT_PARAMS, :PRICE, :GIVING_NUM, :REMARK, :CREATE_TIME, :CREATOR " );
+            //stringBuilder.Append(" , :UPDATE_TIME, :UPDATEOR ");
+            stringBuilder.Append("  ) ");
+
+            string sql = stringBuilder.ToString();
+
+            return OracleHelper.ExecuteSql(sql, 
+                OracleHelper.Connection,
+                new OracleParameter(":ID", (object)o.Id),
+                new OracleParameter(":NAME", (object)o.Name),
+                new OracleParameter(":ICON", (object)o.Icon),
+                new OracleParameter(":INSTRUCTIONS", (object)o.Instructions),
+                new OracleParameter(":CLASSES", (object)o.Classes),
+                new OracleParameter(":PARENT_ID", (object)o.ParentId),
+                new OracleParameter(":PATH", (object)o.Path),
+                new OracleParameter(":IS_DEFAULT", (object)o.IsDefault),
+                new OracleParameter(":IS_ENABLE", (object)o.IsEnable),
+                new OracleParameter(":SORT", (object)o.Sort),
+                new OracleParameter(":ROUTER_TYPE", (object)o.RouterType),
+                new OracleParameter(":CM_OP_ID", (object)o.CmOpId),
+                new OracleParameter(":CU_OP_ID", (object)o.CuOpId),
+                new OracleParameter(":CT_OP_ID", (object)o.CtOpId),
+                new OracleParameter(":CM_GROUPID", (object)o.CmGroupid),
+                new OracleParameter(":CU_GROUPID", (object)o.CuGroupid),
+                new OracleParameter(":CT_GROUPID", (object)o.CtGroupid),
+                new OracleParameter(":CM_EXT_PARAMS", (object)o.CmExtParams),
+                new OracleParameter(":CU_EXT_PARAMS", (object)o.CuExtParams),
+                new OracleParameter(":CT_EXT_PARAMS", (object)o.CtExtParams),
+                new OracleParameter(":PRICE", (object)o.Price),
+                new OracleParameter(":GIVING_NUM", (object)o.GivingNum),
+                new OracleParameter(":REMARK", (object)o.Remark),
+                new OracleParameter(":CREATE_TIME", (object)o.CreateTime),
+                new OracleParameter(":CREATOR", (object)o.Creator)
+                //, new OracleParameter(":UPDATE_TIME", (object)o.UpdateTime)
+                //, new OracleParameter(":UPDATEOR", (object)o.Updateor)
+                ) > 0;
+        }
+
+        //鍒犻櫎
+        public bool Delete(string id)
+        {
+            if (string.IsNullOrEmpty(id) )
+                return false;
+            return OracleHelper.ExecuteSql("delete from GW_PRODUCT where ID=:ID", OracleHelper.Connection, new OracleParameter(":ID", (object)id)) > 0;
+        }
+
+        //鏇存柊浜у搧鎴栦骇鍝佸垎绫讳俊鎭�
+        public bool Update(GwProduct o)
+        {
+            OracleParameter[] cmdParms = new OracleParameter[] {
+                new OracleParameter(":ID", (object)o.Id),
+                new OracleParameter(":NAME", (object)o.Name),
+                new OracleParameter(":ICON", (object)o.Icon),
+                new OracleParameter(":INSTRUCTIONS", (object)o.Instructions),
+                new OracleParameter(":CLASSES", (object)o.Classes),
+                new OracleParameter(":PARENT_ID", (object)o.ParentId),
+                new OracleParameter(":PATH", (object)o.Path),
+                new OracleParameter(":IS_DEFAULT", (object)o.IsDefault),
+                new OracleParameter(":IS_ENABLE", (object)o.IsEnable),
+                new OracleParameter(":SORT", (object)o.Sort),
+                new OracleParameter(":ROUTER_TYPE", (object)o.RouterType),
+                new OracleParameter(":CM_OP_ID", (object)o.CmOpId),
+                new OracleParameter(":CU_OP_ID", (object)o.CuOpId),
+                new OracleParameter(":CT_OP_ID", (object)o.CtOpId),
+                new OracleParameter(":CM_GROUPID", (object)o.CmGroupid),
+                new OracleParameter(":CU_GROUPID", (object)o.CuGroupid),
+                new OracleParameter(":CT_GROUPID", (object)o.CtGroupid),
+                new OracleParameter(":CM_EXT_PARAMS", (object)o.CmExtParams),
+                new OracleParameter(":CU_EXT_PARAMS", (object)o.CuExtParams),
+                new OracleParameter(":CT_EXT_PARAMS", (object)o.CtExtParams),
+                new OracleParameter(":PRICE", (object)o.Price),
+                new OracleParameter(":GIVING_NUM", (object)o.GivingNum),
+                new OracleParameter(":REMARK", (object)o.Remark),
+                //new OracleParameter(":CREATE_TIME", (object)o.CreateTime),
+                //new OracleParameter(":CREATOR", (object)o.Creator),
+                new OracleParameter(":UPDATE_TIME", (object)o.UpdateTime),
+                new OracleParameter(":UPDATEOR", (object)o.Updateor)
+            };
+
+            StringBuilder stringBuilder = new StringBuilder();
+            stringBuilder.Append("UPDATE GW_PRODUCT SET ");
+            stringBuilder.Append(" NAME=:NAME ");
+            stringBuilder.Append(" , ICON =:ICON ");
+            stringBuilder.Append(" , INSTRUCTIONS =:INSTRUCTIONS ");
+            stringBuilder.Append(" , CLASSES =:CLASSES ");
+            stringBuilder.Append(" , PARENT_ID =:PARENT_ID ");
+            stringBuilder.Append(" , PATH=:PATH, IS_DEFAULT=:IS_DEFAULT, IS_ENABLE=:IS_ENABLE, SORT=:SORT, ROUTER_TYPE=:ROUTER_TYPE ");
+            stringBuilder.Append(" , CM_OP_ID =:CM_OP_ID, CU_OP_ID=:CU_OP_ID, CT_OP_ID=:CT_OP_ID ");
+            stringBuilder.Append(" , CM_GROUPID=:CM_GROUPID, CU_GROUPID=:CU_GROUPID, CT_GROUPID=:CT_GROUPID, CM_EXT_PARAMS=:CM_EXT_PARAMS ");
+            stringBuilder.Append(" , CU_EXT_PARAMS =:CU_EXT_PARAMS, CT_EXT_PARAMS=:CT_EXT_PARAMS, PRICE=:PRICE, GIVING_NUM=:GIVING_NUM, REMARK=:REMARK ");
+            //stringBuilder.Append(" , CREATE_TIME =:CREATE_TIME, CREATOR=:CREATOR ");
+            stringBuilder.Append(" , UPDATE_TIME=:UPDATE_TIME, UPDATEOR=:UPDATEOR ");
+            stringBuilder.Append(" WHERE ID=:ID ");
+
+            string sql = stringBuilder.ToString();
+            return (OracleHelper.ExecuteSql(sql, OracleHelper.Connection, cmdParms) > 0);
+        }
+
+        //鑾峰彇淇℃伅
+        public GwProduct Get(string productId)
+        {
+            GwProduct o = new GwProduct();
+            if (string.IsNullOrEmpty(productId))
+                return o;
+            using (OracleDataReader reader = OracleHelper.ExecuteReader(string.Format("select * from GW_PRODUCT where ID=:ID"), OracleHelper.Connection, new OracleParameter(":ID", (object)productId)))
+            {
+                if (((DbDataReader)reader).Read())
+                {
+                    this.ReadInfo(reader, o);
+                    return o;
+                }
+            }
+            return o;
+        }
+
+        //鏇存柊鍚敤鎴栧仠鐢�
+        public bool UpdateStatus(string id, string isEnable)
+        {
+            if (string.IsNullOrEmpty(id))
+                return false;
+            return OracleHelper.ExecuteSql("UPDATE GW_PRODUCT SET IS_ENABLE=:IS_ENABLE where ID=:ID", OracleHelper.Connection, new OracleParameter(":IS_ENABLE", (object)isEnable), new OracleParameter(":ID", (object)id)) > 0;
+        }
+
+        //鏇存柊鍏宠仈鐨勪骇鍝佽矾寰凱ATH
+        public bool UpdatePath(string id, string path)
+        {
+            if (string.IsNullOrEmpty(id))
+                return false;
+            if (string.IsNullOrEmpty(path))
+                return false;
+
+            StringBuilder stringBuilder = new StringBuilder();
+            stringBuilder.Append("UPDATE GW_PRODUCT SET PATH = :PATH||','||PARENT_ID ");
+            stringBuilder.Append(" WHERE ID IN ( ");
+            stringBuilder.Append(" SELECT ID FROM GW_PRODUCT START WITH ID = :ID  CONNECT BY PRIOR ID = PARENT_ID ");
+            stringBuilder.Append(" ) ");
+            stringBuilder.Append(" AND ID NOT IN (:ID) ");
+
+            return OracleHelper.ExecuteSql(stringBuilder.ToString(), OracleHelper.Connection, new OracleParameter(":PATH", (object)path), new OracleParameter(":ID", (object)id), new OracleParameter(":ID", (object)id)) > 0;
+        }
+
+        //鍒ゆ柇鏄惁鍦ㄤ骇鍝佷腑浣跨敤
+        public int GwProductUseCount(string productId)
+        {
+            string str = string.Format("SELECT count(*) as Count  from GW_PRODUCT where PARENT_ID=:PARENT_ID ");
+            List<OracleParameter> list = new List<OracleParameter>();
+            int num = 0;
+            using (OracleDataReader reader = OracleHelper.ExecuteReader(str.ToString(), OracleHelper.Connection, new OracleParameter(":PARENT_ID", (object)productId)) )
+            {
+                while (((DbDataReader)reader).Read())
+                    num = this.ReadCount(reader);
+            }
+            return num;
+        }
+
+        //鍒ゆ柇鏄惁鍦ㄥ鎴疯处鍙蜂腑浣跨敤
+        public int GwSpUseCount(string productId)
+        {
+            string str = string.Format("SELECT count(*) as Count  from GW_SP where PRODUCT_ID=:PRODUCT_ID ");
+            List<OracleParameter> list = new List<OracleParameter>();
+            int num = 0;
+            using (OracleDataReader reader = OracleHelper.ExecuteReader(str.ToString(), OracleHelper.Connection, new OracleParameter(":PRODUCT_ID", (object)productId)))
+            {
+                while (((DbDataReader)reader).Read())
+                    num = this.ReadCount(reader);
+            }
+            return num;
+        }
+
+        //缁熻璁板綍鏁�
+        private int ReadCount(OracleDataReader reader)
+        {
+            OracleReaderWrapper wrapper = new OracleReaderWrapper(reader);
+            return wrapper.GetInt("count", 0);
+        }
+
+        //鏁版嵁灏佽
+        private bool ReadInfo(OracleDataReader reader, GwProduct o)
+        {
+            OracleReaderWrapper oracleReaderWrapper = new OracleReaderWrapper(reader);
+            o.Id = oracleReaderWrapper.GetString("ID", "");
+            o.Name = oracleReaderWrapper.GetString("NAME", "");
+            o.Icon = oracleReaderWrapper.GetString("ICON", "");
+            o.Instructions = oracleReaderWrapper.GetString("INSTRUCTIONS", "");
+            o.Classes = oracleReaderWrapper.GetInt("CLASSES", 0);
+            o.ParentId = oracleReaderWrapper.GetString("PARENT_ID", "");
+            o.Path = oracleReaderWrapper.GetString("PATH", "");
+            o.IsDefault = oracleReaderWrapper.GetInt("IS_DEFAULT", 0);
+            o.IsEnable = oracleReaderWrapper.GetInt("IS_ENABLE", 0);
+            o.Sort = oracleReaderWrapper.GetInt("SORT", 0);
+            o.RouterType = oracleReaderWrapper.GetInt("ROUTER_TYPE", 0);
+            o.CmOpId = oracleReaderWrapper.GetInt("CM_OP_ID", 0);
+            o.CuOpId = oracleReaderWrapper.GetInt("CU_OP_ID", 0);
+            o.CtOpId = oracleReaderWrapper.GetInt("CT_OP_ID", 0);
+            o.CmGroupid = oracleReaderWrapper.GetInt("CM_GROUPID", 0);
+            o.CuGroupid = oracleReaderWrapper.GetInt("CU_GROUPID", 0);
+            o.CtGroupid = oracleReaderWrapper.GetInt("CT_GROUPID", 0);
+            o.CmExtParams = oracleReaderWrapper.GetString("CM_EXT_PARAMS", "");
+            o.CuExtParams = oracleReaderWrapper.GetString("CU_EXT_PARAMS", "");
+            o.CtExtParams = oracleReaderWrapper.GetString("CT_EXT_PARAMS", "");
+            o.Price = oracleReaderWrapper.GetInt("PRICE", 0);
+            o.GivingNum = oracleReaderWrapper.GetInt("GIVING_NUM", 0);
+            o.Remark = oracleReaderWrapper.GetString("REMARK", "");
+            o.CreateTime = oracleReaderWrapper.GetDateTime("CREATE_TIME");
+            o.Creator = oracleReaderWrapper.GetString("CREATOR", "");
+            o.UpdateTime = oracleReaderWrapper.GetDateTime("UPDATE_TIME");
+            o.Updateor = oracleReaderWrapper.GetString("UPDATEOR", "");
+            return true;
+        }
+
     }
+
 }
diff --git a/web/Dao/SysXhDao.cs b/web/Dao/SysXhDao.cs
new file mode 100644
index 0000000..64caa3a
--- /dev/null
+++ b/web/Dao/SysXhDao.cs
@@ -0,0 +1,190 @@
+锘�// Decompiled with JetBrains decompiler
+// Type: Dao.SysXhDao
+// Assembly: Dao, Version=3.2.1.428, Culture=neutral, PublicKeyToken=c1a16487c920c3dc
+// MVID: 22E6EB3F-6D25-4B57-BE09-AD2F5391CFA5
+// Assembly location: C:\Users\Administrator\Desktop\wwww\bin\Dao.dll
+
+using Common;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using Oracle.DataAccess.Client;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.Common;
+using Model;
+
+namespace Dao
+{
+  public class SysXhDao : IDisposable
+  {
+
+        /**
+         * 鏍规嵁浜у搧ID鑾峰彇浜у搧淇℃伅
+         * API_SP_NOTICE:閫氱煡鐭俊API璐﹀彿鐢熸垚瑙勫垯
+         * API_SP_SECURITY_CODE:楠岃瘉鐮佺煭淇PI璐﹀彿鐢熸垚瑙勫垯
+         * API_SP_MARKETING:浼氬憳钀ラ攢鐭俊API璐﹀彿鐢熸垚瑙勫垯
+         * */
+        public string getXh(string xhId)
+        {
+            SysXh o = new SysXh();
+            if (string.IsNullOrEmpty(xhId) || string.Equals("0", xhId))
+                return null;
+
+            using (OracleDataReader reader = OracleHelper.ExecuteReader(string.Format("select * from SYS_XH where XH_ID=:XH_ID"), OracleHelper.Connection, new OracleParameter(":XH_ID", (object)xhId)))
+            {
+                if (reader.RowSize <= 0)
+                {
+                    return "鏃犻厤缃�" + xhId + "搴忓彿瑙勫垯";
+                }
+
+                //搴忓彿缁勫悎涓�
+                string xhStr = "";
+                if (((DbDataReader)reader).Read())
+                {
+                    this.ReadInfo(reader, o);
+
+                    //妫�鏌ュ簭鍙烽暱搴�
+                    if (o.xhLength == 0 )
+                    {
+                        return null;
+                    }
+
+                    //妫�鏌ュ簭鍙峰墠缂�
+                    if (!string.IsNullOrEmpty(o.xhPrefix))
+                    {
+                        xhStr += o.xhPrefix;
+                    }
+
+                    //妫�鏌ュ簭鍙峰洖褰掕鍒�
+                    if (!string.IsNullOrEmpty(o.returnRules))
+                    {
+                        //鎸夊勾
+                        if (string.Equals("Y", o.returnRules) )
+                        {
+                            //褰撳墠骞翠笉鍖归厤鏃�
+                            if (!string.Equals(DateTime.Now.ToString("yyyy"), o.currentReturnStr))
+                            {
+                                o.currentNum = 1;
+                            }
+                            else
+                            {
+                                o.currentNum += 1;
+                            }
+                            //鏇存柊褰撳墠骞�
+                            o.currentReturnStr = DateTime.Now.ToString("yyyy");
+                        }
+                        //鎸夋湀
+                        else if (string.Equals("M", o.returnRules))
+                        {
+                            //褰撳墠骞存湀涓嶅尮閰嶆椂
+                            if (!string.Equals(DateTime.Now.ToString("yyyyMM"), o.currentReturnStr))
+                            {
+                                o.currentNum = 1;
+                            }
+                            else
+                            {
+                                o.currentNum += 1;
+                            }
+
+                            //鏇存柊褰撳墠骞存湀
+                            o.currentReturnStr = DateTime.Now.ToString("yyyyMM");
+                        }
+                        //鎸夋棩
+                        else if (string.Equals("D", o.returnRules))
+                        {
+                            //褰撳墠骞存湀鏃ヤ笉鍖归厤鏃�
+                            if (!string.Equals(DateTime.Now.ToString("yyyyMMdd"), o.currentReturnStr))
+                            {
+                                o.currentNum = 1;
+                            }
+                            else
+                            {
+                                o.currentNum += 1;
+                            }
+
+                            //鏇存柊褰撳墠骞存湀鏃�
+                            o.currentReturnStr = DateTime.Now.ToString("yyyyMMdd");
+                        }
+
+                        xhStr += o.currentReturnStr;
+                    }
+                    else
+                    {
+                        o.currentNum += 1;
+                    }
+
+                    string tmpXhStr = "";
+                    //鍒ゆ柇搴忓彿闀垮害
+                    if (o.xhLength > (xhStr.Length + o.currentNum.ToString().Length))
+                    {
+                        for (int i = 0; i < (o.xhLength - xhStr.Length - o.currentNum.ToString().Length); i++)
+                        {
+                            //搴忔暟鍓嶈ˉ鈥�0鈥�
+                            tmpXhStr += "0";
+                        }
+                        tmpXhStr += o.currentNum ;
+                    }
+                    else if (o.xhLength == (xhStr.Length + o.currentNum.ToString().Length))
+                    {
+                        tmpXhStr = o.currentNum.ToString();
+                    }
+                    else
+                    {
+                        //搴忓彿婧㈠嚭
+                        return "搴忓彿婧㈠嚭";
+                    }
+
+                    //鏇存柊搴忓彿
+                    update(o);
+
+                    xhStr += tmpXhStr;
+
+                    return xhStr;
+                }
+            }
+
+            return null;
+        }
+
+        public bool update(SysXh o)
+        {
+            string sql = "";
+            sql += " update SYS_XH set XH_ID=:XH_ID, XH_PREFIX=:XH_PREFIX, RETURN_RULES=:RETURN_RULES, CURRENT_RETURN_STR=:CURRENT_RETURN_STR, CURRENT_NUM=:CURRENT_NUM ";
+            sql += " ,XH_LENGTH=:XH_LENGTH, REMARK=:REMARK ";
+            sql += " where XH_ID=:XH_ID ";
+
+            return OracleHelper.ExecuteSql(sql, OracleHelper.Connection,
+                new OracleParameter(":XH_ID", (object)o.xhId),
+                new OracleParameter(":XH_PREFIX", (object)o.xhPrefix),
+                new OracleParameter(":RETURN_RULES", (object)o.returnRules),
+                new OracleParameter(":CURRENT_RETURN_STR", (object)o.currentReturnStr),
+                new OracleParameter(":CURRENT_NUM", (object)o.currentNum),
+                new OracleParameter(":XH_LENGTH", (object)o.xhLength),
+                new OracleParameter(":REMARK", (object)o.remark)
+                ) > 0;
+        }
+
+        public void Dispose()
+        {
+
+        }
+
+        /**
+         * 鏁版嵁杞崲灏佽
+         * */
+        private bool ReadInfo(OracleDataReader reader, SysXh sysXh)
+        {
+            OracleReaderWrapper oracleReaderWrapper = new OracleReaderWrapper(reader);
+            sysXh.xhId = oracleReaderWrapper.GetString("XH_ID", "");
+            sysXh.xhPrefix = oracleReaderWrapper.GetString("XH_PREFIX", "");
+            sysXh.returnRules = oracleReaderWrapper.GetString("RETURN_RULES", "");
+            sysXh.currentReturnStr = oracleReaderWrapper.GetString("CURRENT_RETURN_STR", "");
+            sysXh.xhLength = oracleReaderWrapper.GetInt("XH_LENGTH", 0);
+            sysXh.currentNum = oracleReaderWrapper.GetInt("CURRENT_NUM", 0);
+            sysXh.remark = oracleReaderWrapper.GetString("remark", "");
+
+            return true;
+        }
+  }
+}
diff --git a/web/Dao/obj/Debug/Dao.csproj.AssemblyReference.cache b/web/Dao/obj/Debug/Dao.csproj.AssemblyReference.cache
index 6700036..a1ab47f 100644
--- a/web/Dao/obj/Debug/Dao.csproj.AssemblyReference.cache
+++ b/web/Dao/obj/Debug/Dao.csproj.AssemblyReference.cache
Binary files differ
diff --git a/web/Dao/obj/Debug/Dao.csproj.CoreCompileInputs.cache b/web/Dao/obj/Debug/Dao.csproj.CoreCompileInputs.cache
index c0e4614..3d7058c 100644
--- a/web/Dao/obj/Debug/Dao.csproj.CoreCompileInputs.cache
+++ b/web/Dao/obj/Debug/Dao.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-f49ea4d5ec2d8ff937394d4683aa2e9a9d5935d0
+2f4ee5a304a64e1617ed59777b36c0169fa3e828
diff --git a/web/Dao/obj/Debug/Dao.csproj.FileListAbsolute.txt b/web/Dao/obj/Debug/Dao.csproj.FileListAbsolute.txt
index f171bea..2976f19 100644
--- a/web/Dao/obj/Debug/Dao.csproj.FileListAbsolute.txt
+++ b/web/Dao/obj/Debug/Dao.csproj.FileListAbsolute.txt
@@ -73,3 +73,10 @@
 D:\Company\SMGW_NewWeb\web\Dao\obj\Debug\Dao.csproj.CopyComplete
 D:\Company\SMGW_NewWeb\web\Dao\obj\Debug\Dao.dll
 D:\Company\SMGW_NewWeb\web\Dao\obj\Debug\Dao.pdb
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Lib\Dao.dll
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Lib\Dao.pdb
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Dao\obj\Debug\Dao.csproj.AssemblyReference.cache
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Dao\obj\Debug\Dao.csproj.CoreCompileInputs.cache
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Dao\obj\Debug\Dao.csproj.CopyComplete
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Dao\obj\Debug\Dao.dll
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Dao\obj\Debug\Dao.pdb
diff --git a/web/Dao/obj/Debug/Dao.dll b/web/Dao/obj/Debug/Dao.dll
index a42a558..910baf0 100644
--- a/web/Dao/obj/Debug/Dao.dll
+++ b/web/Dao/obj/Debug/Dao.dll
Binary files differ
diff --git a/web/Dao/obj/Debug/Dao.pdb b/web/Dao/obj/Debug/Dao.pdb
index 13e5cf3..d93f58c 100644
--- a/web/Dao/obj/Debug/Dao.pdb
+++ b/web/Dao/obj/Debug/Dao.pdb
Binary files differ
diff --git a/web/Lib/Dao.dll b/web/Lib/Dao.dll
index a42a558..910baf0 100644
--- a/web/Lib/Dao.dll
+++ b/web/Lib/Dao.dll
Binary files differ
diff --git a/web/Lib/Dao.pdb b/web/Lib/Dao.pdb
index 13e5cf3..d93f58c 100644
--- a/web/Lib/Dao.pdb
+++ b/web/Lib/Dao.pdb
Binary files differ
diff --git a/web/Lib/Model.dll b/web/Lib/Model.dll
index b9889a8..88ff236 100644
--- a/web/Lib/Model.dll
+++ b/web/Lib/Model.dll
Binary files differ
diff --git a/web/Lib/Model.pdb b/web/Lib/Model.pdb
index 9086dd7..a9b5d2f 100644
--- a/web/Lib/Model.pdb
+++ b/web/Lib/Model.pdb
Binary files differ
diff --git a/web/Model/Model.csproj b/web/Model/Model.csproj
index 3136973..33dbb38 100644
--- a/web/Model/Model.csproj
+++ b/web/Model/Model.csproj
@@ -68,6 +68,7 @@
     <Compile Include="Model\GwMobileArea.cs" />
     <Compile Include="Model\GwMoRoute.cs" />
     <Compile Include="Model\GwOpGroupItem.cs" />
+    <Compile Include="Model\GwProduct.cs" />
     <Compile Include="Model\GwRmResend.cs" />
     <Compile Include="Model\GwSmsTask.cs" />
     <Compile Include="Model\GwStatisV3.cs" />
@@ -77,6 +78,7 @@
     <Compile Include="Model\LgSmsTask.cs" />
     <Compile Include="Model\MessageCenter.cs" />
     <Compile Include="Model\SysOperationLog.cs" />
+    <Compile Include="Model\SysXh.cs" />
     <Compile Include="PageHandler.cs" />
     <Compile Include="PageContext.cs" />
     <Compile Include="MasterPageBase.cs">
diff --git a/web/Model/Model/GwProduct.cs b/web/Model/Model/GwProduct.cs
new file mode 100644
index 0000000..e7258b9
--- /dev/null
+++ b/web/Model/Model/GwProduct.cs
@@ -0,0 +1,62 @@
+锘� 
+using System;
+
+namespace Model
+{
+  public class GwProduct
+  {
+        public string Id { get; set; }
+
+        public string Name { get; set; }
+
+        public string Icon { get; set; }
+
+        public string Instructions { get; set; }
+
+        public int Classes { get; set; }
+
+        public string ParentId { get; set; }
+
+        public string Path { get; set; }
+
+        public int IsDefault { get; set; }
+
+        public int IsEnable { get; set; }
+
+        public int Sort { get; set; }
+
+        public int RouterType { get; set; }
+
+        public int CmOpId { get; set; }
+
+        public int CuOpId { get; set; }
+
+        public int CtOpId { get; set; }
+
+        public string CmExtParams { get; set; }
+
+        public string CuExtParams { get; set; }
+
+        public string CtExtParams { get; set; }
+
+        public int CmGroupid { get; set; }
+
+        public int CuGroupid { get; set; }
+
+        public int CtGroupid { get; set; }
+
+        public int Price { get; set; }
+
+        public int GivingNum { get; set; }
+
+        public string Remark { get; set; }
+
+        public DateTime CreateTime { get; set; }
+
+        public string Creator { get; set; }
+
+        public DateTime UpdateTime { get; set; }
+
+        public string Updateor { get; set; }
+  }
+}
diff --git a/web/Model/Model/SysXh.cs b/web/Model/Model/SysXh.cs
new file mode 100644
index 0000000..3a393a4
--- /dev/null
+++ b/web/Model/Model/SysXh.cs
@@ -0,0 +1,23 @@
+锘� 
+using System.Text.RegularExpressions;
+
+namespace Model
+{
+  public class SysXh
+    {
+        public string xhId { get; set; }
+
+        public string xhPrefix { get; set; }    //搴忓彿鍓嶇紑
+
+        public string returnRules { get; set; } //鍥炲綊瑙勫垯锛歒-鎸夊勾銆丮-鎸夋湀銆丏-鎸夋棩
+
+        public string currentReturnStr { get; set; }    //褰撳墠鍥炲綊涓�
+
+        public int currentNum { get; set; } //褰撳墠搴忔暟
+
+        public int xhLength { get; set; }    //搴忓彿闀垮害
+
+        public string remark { get; set; }  //澶囨敞
+    }
+
+}
diff --git a/web/Model/obj/Debug/Model.csproj.AssemblyReference.cache b/web/Model/obj/Debug/Model.csproj.AssemblyReference.cache
index c7e8167..4eb1e67 100644
--- a/web/Model/obj/Debug/Model.csproj.AssemblyReference.cache
+++ b/web/Model/obj/Debug/Model.csproj.AssemblyReference.cache
Binary files differ
diff --git a/web/Model/obj/Debug/Model.csproj.CoreCompileInputs.cache b/web/Model/obj/Debug/Model.csproj.CoreCompileInputs.cache
index 93b5477..43635fb 100644
--- a/web/Model/obj/Debug/Model.csproj.CoreCompileInputs.cache
+++ b/web/Model/obj/Debug/Model.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-39dc77968f868863dd739e41a7700ce06bba8c93
+00bfb7d603acc6cb6309f95b0c5c17d4ff8f2b67
diff --git a/web/Model/obj/Debug/Model.csproj.FileListAbsolute.txt b/web/Model/obj/Debug/Model.csproj.FileListAbsolute.txt
index f701d54..4d1d592 100644
--- a/web/Model/obj/Debug/Model.csproj.FileListAbsolute.txt
+++ b/web/Model/obj/Debug/Model.csproj.FileListAbsolute.txt
@@ -54,3 +54,10 @@
 D:\Company\SMGW_NewWeb\web\Model\obj\Debug\Model.pdb
 C:\Users\mac\Desktop\Work-Archives\SMGW\SMGW_NewWeb\web\Model\obj\Debug\Model.csproj.AssemblyReference.cache
 D:\Company\SMGW_NewWeb\web\Model\obj\Debug\Model.csproj.AssemblyReference.cache
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Lib\Model.dll
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Lib\Model.pdb
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Model\obj\Debug\Model.csproj.AssemblyReference.cache
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Model\obj\Debug\Model.csproj.CoreCompileInputs.cache
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Model\obj\Debug\Model.csproj.CopyComplete
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Model\obj\Debug\Model.dll
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Model\obj\Debug\Model.pdb
diff --git a/web/Model/obj/Debug/Model.dll b/web/Model/obj/Debug/Model.dll
index b9889a8..88ff236 100644
--- a/web/Model/obj/Debug/Model.dll
+++ b/web/Model/obj/Debug/Model.dll
Binary files differ
diff --git a/web/Model/obj/Debug/Model.pdb b/web/Model/obj/Debug/Model.pdb
index 9086dd7..a9b5d2f 100644
--- a/web/Model/obj/Debug/Model.pdb
+++ b/web/Model/obj/Debug/Model.pdb
Binary files differ
diff --git a/web/UMCLib/bin/Debug/UMCLib.dll b/web/UMCLib/bin/Debug/UMCLib.dll
index f554b1b..d95a94b 100644
--- a/web/UMCLib/bin/Debug/UMCLib.dll
+++ b/web/UMCLib/bin/Debug/UMCLib.dll
Binary files differ
diff --git a/web/UMCLib/bin/Debug/UMCLib.pdb b/web/UMCLib/bin/Debug/UMCLib.pdb
index 23c8e1d..c0c05fc 100644
--- a/web/UMCLib/bin/Debug/UMCLib.pdb
+++ b/web/UMCLib/bin/Debug/UMCLib.pdb
Binary files differ
diff --git a/web/UMCLib/obj/Debug/UMCLib.csproj.CoreCompileInputs.cache b/web/UMCLib/obj/Debug/UMCLib.csproj.CoreCompileInputs.cache
index 40c0a9e..3bf9622 100644
--- a/web/UMCLib/obj/Debug/UMCLib.csproj.CoreCompileInputs.cache
+++ b/web/UMCLib/obj/Debug/UMCLib.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-c546f08e5171d2ea11491af4c442ff223c9bb58c
+27f9b4fb5d36be9c155fb6557fe17e62c41ec4da
diff --git a/web/UMCLib/obj/Debug/UMCLib.csproj.FileListAbsolute.txt b/web/UMCLib/obj/Debug/UMCLib.csproj.FileListAbsolute.txt
index 855723c..9c5c17e 100644
--- a/web/UMCLib/obj/Debug/UMCLib.csproj.FileListAbsolute.txt
+++ b/web/UMCLib/obj/Debug/UMCLib.csproj.FileListAbsolute.txt
@@ -63,3 +63,11 @@
 D:\Company\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.dll
 D:\Company\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.pdb
 D:\Company\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.csproj.AssemblyReference.cache
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\UMCLib\bin\Debug\UMCLib.dll
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\UMCLib\bin\Debug\UMCLib.pdb
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\UMCLib\bin\Debug\Newtonsoft.Json.dll
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.csproj.AssemblyReference.cache
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.csproj.CoreCompileInputs.cache
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.csproj.CopyComplete
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.dll
+C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.pdb
diff --git a/web/UMCLib/obj/Debug/UMCLib.dll b/web/UMCLib/obj/Debug/UMCLib.dll
index f554b1b..d95a94b 100644
--- a/web/UMCLib/obj/Debug/UMCLib.dll
+++ b/web/UMCLib/obj/Debug/UMCLib.dll
Binary files differ
diff --git a/web/UMCLib/obj/Debug/UMCLib.pdb b/web/UMCLib/obj/Debug/UMCLib.pdb
index 23c8e1d..c0c05fc 100644
--- a/web/UMCLib/obj/Debug/UMCLib.pdb
+++ b/web/UMCLib/obj/Debug/UMCLib.pdb
Binary files differ
diff --git a/web/web/Bin/App_Code.dll b/web/web/Bin/App_Code.dll
index eda7c89..fdb3dcd 100644
--- a/web/web/Bin/App_Code.dll
+++ b/web/web/Bin/App_Code.dll
Binary files differ
diff --git a/web/web/Bin/App_Code.pdb b/web/web/Bin/App_Code.pdb
index 034ec23..a052cc8 100644
--- a/web/web/Bin/App_Code.pdb
+++ b/web/web/Bin/App_Code.pdb
Binary files differ
diff --git a/web/web/Bin/Dao.dll b/web/web/Bin/Dao.dll
index a42a558..910baf0 100644
--- a/web/web/Bin/Dao.dll
+++ b/web/web/Bin/Dao.dll
Binary files differ
diff --git a/web/web/Bin/Dao.pdb b/web/web/Bin/Dao.pdb
index 13e5cf3..d93f58c 100644
--- a/web/web/Bin/Dao.pdb
+++ b/web/web/Bin/Dao.pdb
Binary files differ
diff --git a/web/web/Bin/Model.dll b/web/web/Bin/Model.dll
index b9889a8..88ff236 100644
--- a/web/web/Bin/Model.dll
+++ b/web/web/Bin/Model.dll
Binary files differ
diff --git a/web/web/Bin/Model.pdb b/web/web/Bin/Model.pdb
index 9086dd7..a9b5d2f 100644
--- a/web/web/Bin/Model.pdb
+++ b/web/web/Bin/Model.pdb
Binary files differ
diff --git a/web/web/Bin/UMCLib.pdb b/web/web/Bin/UMCLib.pdb
index 23c8e1d..c0c05fc 100644
--- a/web/web/Bin/UMCLib.pdb
+++ b/web/web/Bin/UMCLib.pdb
Binary files differ
diff --git a/web/web/GwProduct.ashx b/web/web/GwProduct.ashx
new file mode 100644
index 0000000..4a9c112
--- /dev/null
+++ b/web/web/GwProduct.ashx
@@ -0,0 +1,743 @@
+锘�<%@ WebHandler Language="C#" Class="GwProductHandler" %>
+using Dao;
+using Model;
+// using Newtonsoft.Json;
+//using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Web;
+using System.IO;
+using System.Diagnostics;
+
+public class GwProductHandler : PageHandler<SysUser>
+{
+    private GwProductDao _Dao = new GwProductDao();
+    private GwSpDao _GwSpDao = new GwSpDao();
+    private GwOpGroupDao _GwOpGroupDao = new GwOpGroupDao();
+    private SysXhDao _SysXhDao = new SysXhDao();
+
+    private List<GwOp> _OpList;
+    private List<GwOpGroup> _GroupList;
+    private List<GwProduct> _ProductList;   //浜у搧鍙婁骇鍝佸垎绫�
+    //private List<GwProduct> _ProductClassList;  //浜у搧鍒嗙被
+
+    public override JsonPageResult ProcessRequestInternal(PageContext<SysUser> context)
+    {
+        string @string = context.GetString("action");
+        switch (@string)
+        {
+            case "delete":
+                return this.Delete(context);    //鍒犻櫎
+            case "update":
+                return this.Update(context);    //淇敼
+            case "add":
+                return this.Add(context);       //娣诲姞
+            case "list":
+                return this.List(context);      //鏌ヨ
+            case "get":
+                return this.Get(context);      //鑾峰彇璁板綍淇℃伅                    
+            case "updateStatus":
+                return this.UpdateStatus(context);  //鍚敤鎴栧仠鐢�
+            case "upLoad":
+                return this.UpLoad(context);    //鍥炬爣鏂囦欢涓婁紶
+
+            default:
+                throw new Exception("Invalid Action=" + @string);
+        }
+    }
+
+    //鍔犺浇浜у搧鍙婁骇鍝佸垎绫讳俊鎭�
+    private JsonPageResult List(PageContext<SysUser> context)
+    {
+        //Console.WriteLine("List.............[" + context.GetInt("name") + "][" + context.GetInt("classes") + "]");
+        int classes = context.GetInt("classes");
+        string name = context.GetString("name");
+
+        int recordCount = 0;
+        int pageSize = context.GetInt("pageSize", 50);
+        int pageIndex = context.GetInt("pageIndex", 1);
+
+        List<GwProduct> list = _Dao.LoadInfoList(classes, name, pageSize, pageIndex, out recordCount);
+
+        string str1 = "";
+        if (list != null && list.Count > 0)
+        {
+
+            int num = 0;
+            foreach (GwProduct bean in list)
+            {
+                ++num;
+                str1 = str1 + (object) "<tr><td>" +  (object) bean.Icon;
+                str1 = str1 + "</td><td>" + bean.Name + "</td>";
+                str1 = string.Concat(new object[4]
+                {
+                         str1,
+                          "<td>",
+                         bean.Instructions,
+                         "</td>"
+                });
+                str1 = str1 + "<td>" + (object)this.ClassesToName(bean.Classes) + "</td>";
+                if (bean.RouterType == 1)
+                {
+                    str1 += "<td rowspan=\"1\"><div class=\"btn  btn-primary btn-xs\">鐐硅矾鐢�</div>";
+                    str1 += string.Format("<div>绉诲姩锛歿0}</div><div>鐢典俊锛歿1}</div><div>鑱旈�氾細{2}</div>", (object)this.GetOpName(bean.CmOpId), (object)this.GetOpName(bean.CtOpId), (object)this.GetOpName(bean.CuOpId));
+                }
+                else if (bean.RouterType == 3)
+                {
+                    str1 += "<td rowspan=\"1\"><div class=\"btn  btn-success  btn-xs\">缁勮矾鐢�</div>";
+                    str1 += string.Format("<div>绉诲姩锛歿0}</div><div>鐢典俊锛歿1}</div><div>鑱旈�氾細{2}</div>", (object)this.GetGroupName(bean.CmGroupid), (object)this.GetGroupName(bean.CtGroupid), (object)this.GetGroupName(bean.CuGroupid));
+                }
+                else
+                {
+                    str1 += "<td rowspan=\"1\"></td>";
+                }
+                str1 = str1 + "<td>" + ProductToName(bean.ParentId) + "</td>";
+                str1 = str1 + "<td>" + IsDefaultToName(bean.IsDefault) + "</td>";
+                str1 = str1 + "<td>" + IsEnableToName(bean.IsEnable) + "</td>";
+                str1 = string.Concat(new object[4]
+                {
+                         str1,
+                         "<td>",
+                         bean.Sort,
+                         "</td>"
+                });
+                str1 = string.Concat(new object[4]
+                {
+                        str1,
+                        "<td>",
+                         bean.GivingNum,   //榛樿璧犻�佹潯鏁�
+                          "</td>"
+                });
+
+                str1 += string.Format("<td>{0}鍏�/鏉�</td>", (object)(Convert.ToDecimal(bean.Price) / new Decimal(1000)));
+                str1 = str1 + "<td>" + bean.CreateTime + "</td>";
+                str1 += "<td  class=\"text-right\">";
+                str1 = bean.IsEnable != 0 ? str1 + string.Format("<a href=\"javascript:;\" data-id=\"{0}\" data-is_enable=\"0\" class=\"action-update-status btn btn-primary btn-xs\"><i class=\"fa fa-toggle-off\"></i>&nbsp;鍋滅敤</a> ", (object) bean.Id ) : str1 + string.Format("<a href=\"javascript:;\" data-id=\"{0}\" data-is_enable=\"1\" class=\"action-update-status btn  btn-default btn-xs\"><i class=\"fa fa-toggle-on\"/></i>&nbsp;鍚敤</a> ", (object) bean.Id );
+                str1 += string.Format("<a href=\"javascript:;\" data-id=\"{0}\" class=\"action-modal-edit btn  btn-success btn-xs\"><i class=\"fa fa-edit\"></i>&nbsp;缂栬緫</a> ", (object) bean.Id);
+                str1 += string.Format("<a href=\"javascript:;\" data-id=\"{0}\" class=\"action-delete btn  btn-default btn-xs\"><i class=\"fa fa-trash\"></i>&nbsp;鍒犻櫎</a> ", (object) bean.Id);
+                str1 += "</td>";
+                str1 += "</tr>";
+            }
+        }
+        else
+            str1 += "<tr><td colspan=\"13\" style=\"padding-left:5px; text-align: center;\">鏆傛棤淇℃伅</td></tr>";
+
+        return new JsonPageResult(true,  new
+        {
+            Table = str1.ToString(),
+            TotalCount = recordCount
+        });
+    }
+
+    //閫氶亾杩愯鐘舵�佹垨閿欒淇℃伅
+    private string FormatOpError(int opStatus, int opError, string remark)
+    {
+        StringBuilder stringBuilder = new StringBuilder();
+        if (opStatus == 0)
+        {
+            stringBuilder.Append("<span class=\"label label-default\">宸插仠鐢�</span>");
+        }
+        else
+        {
+            stringBuilder.Append("<a data-html=\"true\"  data-content=\"<pre style='width:200px;height:160px;'>" + HttpUtility.HtmlEncode(remark) + "</pre>\" type=\"button\" class=\"btn-xs\" data-trigger=\"click\" data-toggle=\"popover\" data-placement=\"left\">");
+            if (opError == 0)
+                stringBuilder.Append("<span class=\"label label-primary\">姝e父</span>");
+            else if (opError == 5)
+                stringBuilder.Append("<span class=\"label label-danger\">寮傚父</span>");
+            else
+                stringBuilder.Append("NA");
+            stringBuilder.Append("</a>");
+        }
+        return stringBuilder.ToString();
+    }
+
+    public bool IsInt(string input)
+    {
+        for (int index = 0; index < input.Length; ++index)
+        {
+            if (!char.IsNumber(input, index))
+                return false;
+        }
+        return true;
+    }
+
+
+    //鍒犻櫎浜у搧鎴栦骇鍝佸垎绫�
+    private JsonPageResult Delete(PageContext<SysUser> context)
+    {
+        string ID = context.GetString("id");
+
+        if (this._Dao.GwProductUseCount(ID) > 0)
+            throw new ArgumentException("褰撳墠浜у搧鍒嗙被宸插湪浜у搧淇℃伅浣跨敤涓�,鏃犳硶鍒犻櫎锛�");
+        if (this._Dao.GwSpUseCount(ID) > 0)
+            throw new ArgumentException("褰撳墠浜у搧鍦ㄥ鎴疯处鍙蜂俊鎭腑浣跨敤,鏃犳硶鍒犻櫎锛�");
+        this._Dao.Delete(ID);
+        return new JsonPageResult(true, "鍒犻櫎淇℃伅鎴愬姛锛�");
+
+    }
+
+    //娣诲姞浜у搧鎴栦骇鍝佸垎绫�
+    private JsonPageResult Add(PageContext<SysUser> context)
+    {
+
+        string id = _SysXhDao.getXh("GW_PRODUCT");  //鑾峰彇鐢熸垚浜у搧ID
+        string name = context.GetString("name");
+        int classes = context.GetInt("classes", -1);
+        string icon = "";
+        string instructions = "";
+        int isDefault = 0;
+        int sort = 0;
+
+        int routerType = 0;
+        int cmOpId = 0;
+        int cuOpId = 0;
+        int ctOpId = 0;
+        string cmExtParams = "";
+        string cuExtParams = "";
+        string ctExtParams = "";
+        int cmGroupid = 0;
+        int cuGroupid = 0;
+        int ctGroupid = 0;
+        int price = 0;
+        int givingNum = 0;
+
+        string info = "" ;
+        if (classes == -1) {
+            throw new ArgumentException("璇烽�夋嫨绫诲埆锛�");
+        }
+        else
+        {
+            if(classes == 1)
+            {
+                info = "浜у搧";
+                if (string.IsNullOrEmpty(name))
+                {
+                    throw new ArgumentException(info + "鍚嶇О涓嶈兘涓虹┖锛�");
+                }
+
+            }
+            else if (classes == 0)
+            {
+                info = "浜у搧鍒嗙被";
+                if (string.IsNullOrEmpty(name))
+                {
+                    throw new ArgumentException(info + "鍚嶇О涓嶈兘涓虹┖锛�");
+                }
+
+            }
+
+        }
+
+        //1-浜у搧锛�0-鍒嗙被
+        if (classes==1)
+        {
+            icon = context.GetString("icon");
+            instructions = context.GetString("instructions");
+            isDefault = context.GetInt("isDefault", 0);
+
+            int num = Math.Max((int) (context.GetDecimal("price", new Decimal(4, 0, 0, false, (byte) 2)) * new Decimal(1000)), 1);
+            price = num;
+            givingNum = context.GetInt("givingNum", 0);
+            sort = context.GetInt("sort", 0);
+
+            routerType = context.GetInt("routerType", 1);
+            //璺敱绫诲瀷锛�1-閫氶亾璺敱锛�3-閫氶亾缁勮矾鐢便��
+            if (routerType==1)
+            {
+                cmOpId = context.GetInt("cmOpId", 0);
+                cuOpId = context.GetInt("cuOpId", 0);
+                ctOpId = context.GetInt("ctOpId", 0);
+                cmExtParams = context.GetString("cmExtParams");
+                cuExtParams = context.GetString("cuExtParams");
+                ctExtParams = context.GetString("ctExtParams");
+
+            }
+            else if (routerType==3)
+            {
+                cmGroupid = context.GetInt("cmGroupid", 0);
+                cuGroupid = context.GetInt("cuGroupid", 0);
+                ctGroupid = context.GetInt("ctGroupid", 0);
+
+            }
+
+        }
+        string parentId = context.GetString("parentId", "0");
+        string path = "";
+        if (parentId.Equals("0"))
+        {
+            path = "0";
+        }
+        else
+        {
+            GwProduct newProduct = _Dao.Get(parentId);
+            if(newProduct!=null)
+            {
+                path = newProduct.Path=="" ? "0" : newProduct.Path + "," + newProduct.Id ;
+            }
+            else
+            {
+                path = "0";
+            }
+
+        }
+        int isEnable = context.GetInt("isEnable", 0);
+
+        //int price = context.GetInt("price", 0);
+        //int givingNum = context.GetInt("givingNum", 0);
+        string remark = context.GetString("remark", "");
+        DateTime createTime = DateTime.Now;
+        string creator = context.OperatorID;
+        //DateTime update_time = context.GetDateTime("update_time");
+        //string updateor = context.GetString("updateor", "");
+
+        //鏍¢獙
+        if (classes == -1) {
+            throw new ArgumentException("璇烽�夋嫨绫诲埆锛�");
+        }
+        else
+        {
+            if(string.IsNullOrEmpty(name))
+            {
+                throw new ArgumentException("璇疯緭鍏ュ悕绉帮紒");
+            }
+            //浜у搧鐩稿叧椤规牎楠�
+            if (classes == 1)
+            {
+                if (routerType==0 )
+                    throw new ArgumentException("璇烽�夋嫨璺敱绫诲瀷锛�");
+                if (cmGroupid == 0 && cuGroupid == 0 && ctGroupid == 0 && routerType == 3 && classes==1)
+                    throw new ArgumentException("鑷冲皯鎸囧畾涓�涓�氶亾缁勶紒");
+                if (cmOpId == 0 && cuOpId == 0 && ctOpId == 0 && routerType == 1 && classes==1)
+                    throw new ArgumentException("鑷冲皯鎸囧畾涓�涓�氶亾锛�");
+                if (!string.IsNullOrEmpty(context.GetString("sort")) && !Regex.IsMatch(context.GetString("sort"), "^[0-9]*$"))
+                    throw new Exception("搴忓彿蹇呴』涓烘暟瀛�");
+                if (!string.IsNullOrEmpty(context.GetString("price")) && !Regex.IsMatch(context.GetString("price"), "^[0-9]*$") && price<=0 )
+                    throw new Exception("鍙傝�冨崟浠蜂笉鑳藉皬浜庣瓑浜�0");
+                if (!string.IsNullOrEmpty(context.GetString("givingNum")) && !Regex.IsMatch(context.GetString("givingNum"), "^[0-9]*$"))
+                    throw new Exception("榛樿璧犻�佹潯鏁板繀椤讳负鏁存暟");
+            }
+            //浜у搧鐩稿叧椤规牎楠�
+            else if (classes == 0)
+            {
+
+            }
+
+        }
+
+        this._Dao.Add(new GwProduct()
+        {
+            Id = id,
+            Name = name,
+            Icon = icon,
+            Instructions = instructions,
+            Classes = classes,
+            ParentId = parentId,
+            Path = path,
+            IsDefault = isDefault,
+            IsEnable = isEnable,
+            Sort = sort,
+            RouterType = routerType,
+            CmOpId = cmOpId,
+            CuOpId = cuOpId,
+            CtOpId = ctOpId,
+            CmGroupid = cmGroupid,
+            CuGroupid = cuGroupid,
+            CtGroupid = ctGroupid,
+            CmExtParams = cmExtParams,
+            CuExtParams = cuExtParams,
+            CtExtParams = ctExtParams,
+            Price = price,    //鍗曚环鎹㈢畻
+            GivingNum = givingNum,
+            Remark = remark,
+            CreateTime = createTime,
+            Creator = creator
+            //UpdateTime = update_time,
+            //Updateor = updateor
+
+        });
+        return new JsonPageResult(true, info + "淇℃伅娣诲姞鎴愬姛锛�");
+    }
+
+    //鏇存柊浜у搧鎴栦骇鍝佸垎绫�
+    private JsonPageResult Update(PageContext<SysUser> context)
+    {
+        string id = context.GetString("id");
+        string name = context.GetString("name");
+        int classes = context.GetInt("classes", -1);
+        string icon = "";
+        string instructions = "";
+        int isDefault = 0;
+        int sort = 0;
+
+        int routerType = 0;
+        int cmOpId = 0;
+        int cuOpId = 0;
+        int ctOpId = 0;
+        string cmExtParams = "";
+        string cuExtParams = "";
+        string ctExtParams = "";
+        int cmGroupid = 0;
+        int cuGroupid = 0;
+        int ctGroupid = 0;
+        int price = 0;
+        int givingNum = 0;
+
+        string info = "" ;
+        if (classes == -1) {
+            throw new ArgumentException("璇烽�夋嫨绫诲埆锛�");
+        }
+        else
+        {
+            if(classes == 1)
+            {
+                info = "浜у搧";
+                if (string.IsNullOrEmpty(name))
+                {
+                    throw new ArgumentException(info + "鍚嶇О涓嶈兘涓虹┖锛�");
+                }
+
+            }
+            else if (classes == 0)
+            {
+                info = "浜у搧鍒嗙被";
+                if (string.IsNullOrEmpty(name))
+                {
+                    throw new ArgumentException(info + "鍚嶇О涓嶈兘涓虹┖锛�");
+                }
+
+            }
+
+        }
+
+
+        //1-浜у搧锛�0-鍒嗙被
+        if (classes==1)
+        {
+            icon = context.GetString("icon");
+            instructions = context.GetString("instructions");
+            isDefault = context.GetInt("isDefault", 0);
+
+            int num = Math.Max((int) (context.GetDecimal("price", new Decimal(4, 0, 0, false, (byte) 2)) * new Decimal(1000)), 1);
+            price = num;
+            givingNum = context.GetInt("givingNum", 0);
+            sort = context.GetInt("sort", 0);
+
+            routerType = context.GetInt("routerType", 1);
+            //璺敱绫诲瀷锛�1-閫氶亾璺敱锛�3-閫氶亾缁勮矾鐢便��
+            if (routerType==1)
+            {
+                cmOpId = context.GetInt("cmOpId", 0);
+                cuOpId = context.GetInt("cuOpId", 0);
+                ctOpId = context.GetInt("ctOpId", 0);
+                cmExtParams = context.GetString("cmExtParams");
+                cuExtParams = context.GetString("cuExtParams");
+                ctExtParams = context.GetString("ctExtParams");
+
+            }
+            else if (routerType==3)
+            {
+                cmGroupid = context.GetInt("cmGroupid", 0);
+                cuGroupid = context.GetInt("cuGroupid", 0);
+                ctGroupid = context.GetInt("ctGroupid", 0);
+
+            }
+
+        }
+        string parentId = context.GetString("parentId", "0");
+        string path = "";
+        if (parentId.Equals("0"))
+        {
+            path = "0";
+        }
+        else
+        {
+            GwProduct newProduct = _Dao.Get(parentId);
+            if(newProduct!=null)
+            {
+                path = newProduct.Path=="" ? "0" : newProduct.Path + "," + newProduct.Id ;
+            }
+            else
+            {
+                path = "0";
+            }
+
+        }
+        int isEnable = context.GetInt("isEnable", 0);
+
+        string remark = context.GetString("remark", "");
+        //DateTime createTime = context.GetDateTime("createTime");
+        //int creator = context.GetInt("creator", 0);
+        //DateTime updateTime = context.GetDateTime("updateTime");
+        DateTime updateTime = DateTime.Now;
+        string updateor = context.OperatorID;
+
+        //鏍¢獙
+        if (classes == -1) {
+            throw new ArgumentException("璇烽�夋嫨绫诲埆锛�");
+        }
+        else
+        {
+            if(string.IsNullOrEmpty(name))
+            {
+                throw new ArgumentException("璇疯緭鍏ュ悕绉帮紒");
+            }
+            //浜у搧鐩稿叧椤规牎楠�
+            if (classes == 1)
+            {
+                if (routerType==0 )
+                    throw new ArgumentException("璇烽�夋嫨璺敱绫诲瀷锛�");
+                if (cmGroupid == 0 && cuGroupid == 0 && ctGroupid == 0 && routerType == 3 && classes==1)
+                    throw new ArgumentException("鑷冲皯鎸囧畾涓�涓�氶亾缁勶紒");
+                if (cmOpId == 0 && cuOpId == 0 && ctOpId == 0 && routerType == 1 && classes==1)
+                    throw new ArgumentException("鑷冲皯鎸囧畾涓�涓�氶亾锛�");
+                if (!string.IsNullOrEmpty(context.GetString("sort")) && !Regex.IsMatch(context.GetString("sort"), "^[0-9]*$"))
+                    throw new Exception("搴忓彿蹇呴』涓烘暟瀛�");
+                if (!string.IsNullOrEmpty(context.GetString("price")) && !Regex.IsMatch(context.GetString("price"), "^[0-9]*$") && price<=0 )
+                    throw new Exception("鍙傝�冨崟浠蜂笉鑳藉皬浜庣瓑浜�0");
+                if (!string.IsNullOrEmpty(context.GetString("givingNum")) && !Regex.IsMatch(context.GetString("givingNum"), "^[0-9]*$"))
+                    throw new Exception("榛樿璧犻�佹潯鏁板繀椤讳负鏁存暟");
+            }
+            //浜у搧鐩稿叧椤规牎楠�
+            else if (classes == 0)
+            {
+
+            }
+
+        }
+
+        this._Dao.Update(new GwProduct()
+        {
+            Id = id,
+            Name = name,
+            Icon = icon,
+            Instructions = instructions,
+            Classes = classes,
+            ParentId = parentId,
+            Path = path,
+            IsDefault = isDefault,
+            IsEnable = isEnable,
+            Sort = sort,
+            RouterType = routerType,
+            CmOpId = cmOpId,
+            CuOpId = cuOpId,
+            CtOpId = ctOpId,
+            CmGroupid = cmGroupid,
+            CuGroupid = cuGroupid,
+            CtGroupid = ctGroupid,
+            CmExtParams = cmExtParams,
+            CuExtParams = cuExtParams,
+            CtExtParams = ctExtParams,
+            Price = price,    //鍗曚环鎹㈢畻
+            GivingNum = givingNum,
+            Remark = remark,
+            //CreateTime = createTime,
+            //Creator = creator,
+            UpdateTime = updateTime,
+            Updateor = updateor
+
+        });
+
+        //鏇存柊鍏宠仈鐨勪骇鍝佽矾寰凱ATH
+        _Dao.UpdatePath(id, path);
+
+
+        return new JsonPageResult(true, info + "淇℃伅鏇存柊鎴愬姛锛�");
+    }
+
+    //鏍规嵁涓婚敭鑾峰彇浜у搧鎴栦骇鍝佸垎绫讳俊鎭�
+    private JsonPageResult Get(PageContext<SysUser> context)
+    {
+        return new JsonPageResult(true, this._Dao.Get(context.GetString("id")));
+    }
+
+    //鍥炬爣鏂囦欢涓婁紶
+    private JsonPageResult UpLoad(PageContext<SysUser> context)
+    {
+        Stopwatch stopwatch = new Stopwatch();
+        stopwatch.Start();
+        HttpPostedFile httpPostedFile = context.Files["certPath"];
+        if (httpPostedFile == null || httpPostedFile.FileName == "")
+            throw new Exception("璇烽�夋嫨瑕佷笂浼犵殑BMP锛堜綅鍥撅級銆丣PG銆丣PEG銆丳NG銆丟IF鏂囦欢,骞舵鏌ユ枃浠跺ぇ灏忥紒");
+        string extension = Path.GetExtension(httpPostedFile.FileName);
+        if (!extension.Equals(".jpg", StringComparison.OrdinalIgnoreCase)
+                    && !extension.Equals(".jpeg", StringComparison.OrdinalIgnoreCase)
+                    && !extension.Equals(".png", StringComparison.OrdinalIgnoreCase)
+                    && !extension.Equals(".gif", StringComparison.OrdinalIgnoreCase)
+                    && !extension.Equals(".bmp", StringComparison.OrdinalIgnoreCase))
+            throw new Exception("涓婁紶鏂囦欢鏍煎紡涓嶆纭紝鍙厑璁镐笂浼燘MP锛堜綅鍥撅級銆丣PG銆丣PEG銆丳NG銆丟IF鏂囦欢!");
+        if (httpPostedFile.ContentLength > 5242880 )
+            throw new Exception("鏂囦欢涓婁紶涓嶈兘瓒呰繃5M锛岃妫�鏌ユ枃浠跺ぇ灏忥紝鏄惁鏈夊啓鏉冮檺锛�");
+
+        //string @string = context.GetString("ablackpool");
+        //if (string.IsNullOrEmpty(@string))
+        //  throw new Exception("璇烽�夋嫨榛戝悕鍗曟睜锛�");
+
+        List<Stream> outputStreamList = new List<Stream>();
+        if (extension.Equals(".jpg", StringComparison.OrdinalIgnoreCase)
+                    && extension.Equals(".jpeg", StringComparison.OrdinalIgnoreCase)
+                    && extension.Equals(".png", StringComparison.OrdinalIgnoreCase)
+                    && extension.Equals(".gif", StringComparison.OrdinalIgnoreCase)
+                    && extension.Equals(".bmp", StringComparison.OrdinalIgnoreCase))
+            outputStreamList.Add(httpPostedFile.InputStream);
+        //else if (extension.Equals(".zip", StringComparison.OrdinalIgnoreCase))
+        //   ZipUtils.Decompression(httpPostedFile.InputStream, ref outputStreamList, true);
+
+        //string fieldName = "c:/AYZH";
+        //HttpContext httpContext = new HttpContext();
+        //WebTool.SaveUploadFile(httpContext, fieldName);
+
+        stopwatch.Stop();
+        string str = "涓婁紶鑰楁椂锛�" + (object) stopwatch.ElapsedMilliseconds + "ms";
+        return new JsonPageResult(true, (object) new
+        {
+            Message = "鏂囦欢涓婁紶鎴愬姛锛�",
+            Msg = str
+        });
+    }
+
+    //鑾峰彇閫氶亾鍒楄〃
+    private List<GwOp> OpList
+    {
+        get
+        {
+            if (this._OpList == null)
+            {
+                using (GwOpDao gwOpDao = new GwOpDao())
+                    this._OpList = gwOpDao.LoadInfoList();
+            }
+            return this._OpList;
+        }
+    }
+
+    //鍔犺浇浜у搧鍙婁骇鍝佸垎绫讳俊鎭�
+    private List<GwProduct> ProductAllList()
+    {
+        GwProduct bean = new GwProduct();
+        bean.Classes = -1;
+        bean.IsDefault = -1;
+        bean.IsEnable = -1;
+
+        List<GwProduct> list = _Dao.getAllList(bean);
+
+        return list;
+    }
+
+    //鑾峰彇浜у搧鎴栦骇鍝佸垎绫诲垪琛�
+    private List<GwProduct> ProductList
+    {
+        get
+        {
+            if (this._ProductList == null)
+            {
+                this._ProductList = this.ProductAllList();
+            }
+            return this._ProductList;
+        }
+    }
+
+    //浜у搧鎴栦骇鍝佸垎绫籌D杞崲鍚嶇О
+    private string ProductToName(string productId)
+    {
+        if (this.ProductList == null)
+            return string.Empty;
+        GwProduct bean = this.ProductList.Find((Predicate<GwProduct>)(product => product.Id == productId));
+        if (bean != null)
+            //return string.Format("{0}-{1}", (object)bean.Id, (object)bean.Name);
+            return string.Format("{0}", (object)bean.Name);
+        return string.Empty;
+    }
+
+    //鏇存柊淇℃伅鍚敤鎴栧仠鐢�
+    private JsonPageResult UpdateStatus(PageContext<SysUser> context)
+    {
+        string id = context.GetString("id");
+        string isEnable = context.GetString("isEnable");
+
+        if(isEnable=="0") {
+            if (this._Dao.GwProductUseCount(id) > 0)
+                throw new ArgumentException("褰撳墠浜у搧鍒嗙被宸插湪浜у搧淇℃伅浣跨敤涓�,鏃犳硶鍋滅敤锛�");
+            if (this._Dao.GwSpUseCount(id) > 0)
+                throw new ArgumentException("褰撳墠浜у搧鍦ㄥ鎴疯处鍙蜂俊鎭腑浣跨敤,鏃犳硶鍋滅敤锛�");
+        }
+        this._Dao.UpdateStatus(id, isEnable);
+        return new JsonPageResult(true, "鏇存柊淇℃伅鐘舵�佹垚鍔燂紒");
+
+    }
+
+    //鑾峰彇閫氶亾缁勫垪琛�
+    private List<GwOpGroup> GroupList
+    {
+        get
+        {
+            if (this._GroupList == null)
+            {
+                using (GwOpGroupDao gwOpGroupDao = new GwOpGroupDao())
+                    this._GroupList = gwOpGroupDao.GetGroupList();
+            }
+            return this._GroupList;
+        }
+    }
+
+    //閫氶亾ID杞崲鍚嶇О
+    private string GetOpName(int opID)
+    {
+        if (this.OpList == null)
+            return string.Empty;
+        GwOp gwOp = this.OpList.Find((Predicate<GwOp>)(op => op.OpID == opID));
+        if (gwOp != null)
+            return string.Format("{0}-{1}", (object)gwOp.OpID, (object)gwOp.OpName);
+        return string.Empty;
+    }
+
+    //浜у搧绫诲埆杞崲鍚嶇О
+    private string ClassesToName(int classes)
+    {
+        if (classes == -1)
+            return string.Empty;
+        else if(classes == 0)
+            return "0-浜у搧鍒嗙被";
+        else if(classes == 1)
+            return "1-浜у搧";
+
+        return string.Empty;
+    }
+
+    //浜у搧鏄惁榛樿杞崲鍚嶇О
+    private string IsDefaultToName(int isDefault)
+    {
+        if (isDefault == -1)
+            return string.Empty;
+        else if(isDefault == 0)
+            return "0-涓�у寲";
+        else if(isDefault == 1)
+            return "1-绯荤粺榛樿";
+
+        return string.Empty;
+    }
+
+    //鍚敤鍋滅敤杞崲鍚嶇О
+    private string IsEnableToName(int isEnable)
+    {
+        if (isEnable == -1)
+            return string.Empty;
+        else if(isEnable == 0)
+            return "0-鍋滅敤";
+        else if(isEnable == 1)
+            return "1-鍚敤";
+
+        return string.Empty;
+    }
+
+    //閫氶亾缁処D杞崲鍚嶇О
+    private string GetGroupName(int groupID)
+    {
+        if (this.GroupList == null)
+            return string.Empty;
+        GwOpGroup gwOpGroup = this.GroupList.Find((Predicate<GwOpGroup>)(group => group.GroupID == groupID));
+        if (gwOpGroup != null)
+            return string.Format("{0}-{1}", (object)gwOpGroup.GroupID, (object)gwOpGroup.GroupName);
+        return string.Empty;
+    }
+}
\ No newline at end of file
diff --git a/web/web/GwProduct.aspx b/web/web/GwProduct.aspx
new file mode 100644
index 0000000..b6ecd5b
--- /dev/null
+++ b/web/web/GwProduct.aspx
@@ -0,0 +1,538 @@
+锘�<%@ Page Language="C#"  masterpagefile="~/Main.master"  AutoEventWireup="true" CodeFile="GwProduct.aspx.cs" Inherits="_GwProduct" %>
+<asp:Content runat="server" ID="Content1" ContentPlaceHolderID="head">
+    <script type="text/javascript" language="javascript">
+    $(document).ready(function() {
+
+        //$(document).on("click", "[data-toggle='popover']", function () {
+        //    $("[data-toggle='popover']").popover();
+        //})
+        var pagination = new Pagination();
+        pagination.setPageIndex(1);
+        pagination.setPageSize(50);
+
+        function loadPageList() {
+            var name = $("#Name").val();
+            var classes = $("#Classes").val();
+            $.ajax({
+                url: "GwProduct.ashx",
+                type: "POST",
+                data: { action: "list", name: name, classes: classes, pageIndex: pagination.getPageIndex(), pageSize: pagination.getPageSize() },
+                success: function(result) {
+                    if (result.OK) {
+                        $("#productTable tbody").html(result.Message.Table);
+                        pagination.setRecordCount(result.Message.TotalCount);
+                        $("#pagination").html(pagination.getHtml());
+                        $("[data-toggle='popover']").popover();
+                    } else {
+                        mytek.alert(result.Message, result.OK);
+                    }
+                }
+            });
+        }
+
+        $(document).on("click", ".action-modal-add", function() {
+            $("#productDialog .modal-title").text("娣诲姞浜у搧鎴栦骇鍝佸垎绫�");
+            $("#productDialog #action").val("add");
+            $("#productDialog #id").val("").attr("readonly", false);
+            $("#productDialog #name").val("");
+            $("#productDialog #icon").val("");
+            $("#productDialog #instructions").val("");
+            $("#productDialog #classes").val("");
+            $("#productDialog #parentId").val("");
+            //$("#productDialog #path").val("");
+            $("#productDialog #isDefault").val("");
+            $("#productDialog #isDnable").val(1);
+            $("#productDialog #sort").val(1);
+            $("#productDialog #routerType").val(1);
+            $("#productDialog #cmOpId").val("");
+            $("#productDialog #cuOpId").val("");
+            $("#productDialog #ctOpId").val("");
+            $("#productDialog #cmGroupid").val("");
+            $("#productDialog #cuGroupid").val("");
+            $("#productDialog #ctGroupid").val("");
+            $("#productDialog #cmExtParams").val("");
+            $("#productDialog #cuExtParams").val("");
+            $("#productDialog #ctExtParams").val("");
+            $("#productDialog #price").val(0.00);
+            $("#productDialog #givingNum").val(0);
+            $("#productDialog #remark").val("");
+
+            $("#productDialog").modal("show");
+        });
+
+        $("#productForm").ajaxForm({
+            success: function(r) {
+                if (r.OK) {
+                    mytek.alert(r.Message, r.OK, function() {
+                        $("#productDialog").modal("hide");
+                        loadPageList();
+                    });
+                } else {
+                    mytek.alert(r.Message, r.OK);
+                }
+            }
+        });
+
+        //閫夋嫨绫诲埆涓嬫媺妗嗭紝鎺у埗鐩稿叧杈撳叆椤规樉绀�
+        $("#classes").on("change", function () {
+            $(".classes-span").hide();
+            $(".classes-span-" + $(this).val()).show();
+        });
+
+        $("#classes").trigger("change");
+
+        //閫夋嫨璺敱绫诲瀷涓嬫媺妗嗭紝鎺у埗鐩稿叧杈撳叆椤规樉绀�
+        $("#RouterType").on("change", function () {
+            $(".router-type-span").hide();
+            $(".router-type-span-" + $(this).val()).show();
+        });
+
+        $("#RouterType").trigger("change");
+
+        $(document).on("click", ".action-modal-edit", function() {
+            var id = $(this).data("id");
+            $("#productDialog .modal-title").text("缂栬緫浜у搧鎴栦骇鍝佸垎绫�");
+            $("#productDialog #id").val(id).attr("readonly", true);
+
+            $.get("gwProduct.ashx", { "action": "get", id: id }, function(r) {
+                if (r.OK) {
+                    $("#productDialog #action").val("update");
+                    $("#productDialog #id").val(r.Message.Id).attr("readonly", false);
+                    $("#productDialog #name").val(r.Message.Name);
+                    $("#productDialog #classes").val(r.Message.Classes);
+                    $("#productDialog #parentId").val(r.Message.ParentId);
+                    //$("#productDialog #path").val(r.Message.Path);
+                    $("#productDialog #isDnable").val(r.Message.IsDnable);
+                    $("#productDialog #remark").val(r.Message.Remark);
+                    //浜у搧
+                    if (r.Message.Classes == 1) {
+                        $("#productDialog #icon").val(r.Message.Icon);
+                        $("#productDialog #instructions").val(r.Message.Instructions);
+                        $("#productDialog #isDefault").val(r.Message.IsDefault);
+                        $("#productDialog #sort").val(r.Message.Sort);
+                        $("#productDialog #routerType").val(r.Message.RouterType);
+                        $("#productDialog #price").val(r.Message.Price/1000);   //鍏冩潯鎹㈢畻鍗曚綅涓哄帢鏉�
+                        $("#productDialog #givingNum").val(r.Message.GivingNum);
+                        if (r.Message.RouterType == 1) {
+                            $("#productDialog #cmOpId").val(r.Message.CmOpId);
+                            $("#productDialog #cuOpId").val(r.Message.CuOpId);
+                            $("#productDialog #ctOpId").val(r.Message.CtOpId);
+                            $("#productDialog #cmExtParams").val(r.Message.CmExtParams);
+                            $("#productDialog #cuExtParams").val(r.Message.CuExtParams);
+                            $("#productDialog #ctExtParams").val(r.Message.CtExtParams);
+                        }
+                        else {
+                            $("#productDialog #cmGroupid").val(r.Message.CmGroupid);
+                            $("#productDialog #cuGroupid").val(r.Message.CuGroupid);
+                            $("#productDialog #ctGroupid").val(r.Message.CtGroupid);
+
+                        }
+                    }
+                    //浜у搧鍒嗙被
+                    else {
+
+                    }
+
+                    $("#classes").trigger("change");
+
+                    $("#productDialog").modal("show");
+                }
+                else {
+                    mytek.alert(r.Message, r.OK);
+                }
+            }, "json");
+        });
+
+        $(document).on("click", ".action-update-status", function () {
+            //data鐨勫睘鎬у弬鏁颁笉鑳藉惈鏈夊ぇ鍐欏瓧姣嶃��
+            var id = $(this).data("id");
+            var isEnable = $(this).data("is_enable");
+            $.post("gwProduct.ashx", { "action": "updateStatus", id: id, isEnable: isEnable }, function (r) {
+                mytek.alert(r.Message, r.OK, function () {
+                    loadPageList();
+                });
+            });
+        });
+
+        $(document).on("click", ".action-delete", function() {
+            var id = $(this).data("id");
+            mytek.confirm("鏄惁闇�瑕佸垹闄よ淇℃伅锛�", "鏁版嵁鍒犻櫎鍚庡皢鏃犳硶鎭㈠锛岃璋ㄦ厧鎿嶄綔锛�", function(b) {
+                if (b) {
+                    $.post("gwProduct.ashx", { "action": "delete", id: id }, function(result) {
+                        mytek.alert(result.Message, result.OK, function() {
+                            loadPageList();
+                        });
+                    },
+                    "json");
+                }
+            });
+        });
+
+        //涓婁紶鍥炬爣鏂囦欢
+        $(document).on("click", ".action-upLoad", function () {
+            //var id = $(this).data("id");
+            var name = "涓婁紶鍥炬爣鏂囦欢" ;
+            //$("#ablackpool").val(id);
+            $("#upLoad_form .modal-title").text(name);
+            $("#stopwatchTime").text('');
+            $("#upLoad").modal("show");
+        });
+
+        $("#upLoad_form").ajaxForm({
+            beforeSend: function () {
+                $('#upLoad_form .action-save').attr('disabled', "true");
+                $('#upLoad_form .action-save').text('姝e湪涓婁紶...');
+            },
+            success: function (result) {
+                if (result.OK) {
+                    mytek.alert(result.Message.Message);
+                    $("#stopwatchTime").text(result.Message.Msg);
+                    $('#upLoad_form .action-save').removeAttr("disabled");
+                    $("#certPath").val('');
+                    $('#upLoad_form .action-save').text('涓婁紶');
+                } else {
+                    mytek.alert(result.Message, result.False);
+                    $('#upLoad_form .action-save').removeAttr("disabled");
+                    $('#upLoad_form .action-save').text('涓婁紶');
+                }
+            }
+        });
+
+        $(document).on("click", ".action-btn-GwProductQuery", function() {
+            pagination.setPageIndex(1);
+            loadPageList();
+        });
+
+        $(document).on("click", "a[data-index]", function() {
+            pagination.setPageIndex($(this).attr("data-index"));
+            loadPageList();
+        });
+
+        //杩涘叆椤甸潰鏃舵墽琛屾煡璇�
+        loadPageList();
+
+    });
+    </script>
+ </asp:Content> 
+<asp:Content runat="server" ID="Content2" ContentPlaceHolderID="title">浜у搧鎴栦骇鍝佸垎绫荤鐞�</asp:Content> 
+<asp:Content ID="Content3" ContentPlaceHolderID="content" runat="Server">
+   
+    <form name="queryForm" method="get" action="GwProduct.aspx" id="queryForm" class="form-inline"
+        id="gwProductTable">
+        <div class="m-b">
+            <div class="form-group">
+                <div class="input-group">
+                    <span class="input-group-addon">浜у搧鍚嶇О</span>
+                    <input type="text" name="Name" id="Name" class="form-control" />
+                </div>
+            </div>
+            <div class="form-group">
+                <div class="input-group">
+                    <select name="Classes" id="Classes" class="form-control">
+                        <option value="-1">--璇烽�夋嫨绫诲埆--</option>
+                        <option value="0">浜у搧鍒嗙被</option>
+                        <option value="1">浜у搧</option>
+                    </select>
+                </div>
+            </div>
+            <div class="form-group">
+                <div class="input-group">
+                    <input type="button" value="鏌ヨ" class="btn btn-primary action-btn-GwProductQuery" />&nbsp;&nbsp;&nbsp;
+                     <input class=" btn btn-warning action-modal-add" value="娣诲姞浜у搧" type="button" />
+                </div>
+            </div>
+        </div>
+        <table class="table table-striped table-bordered table-hover" id="productTable">
+            <thead>
+                <tr class="header">
+                    <th>鍥炬爣
+                    </th>
+                    <th>鍚嶇О
+                    </th>
+                    <th>浣跨敤璇存槑
+                    </th>
+                    <th>绫诲埆
+                    </th>
+                    <th>閫氶亾
+                    </th>
+                    <th>鐖剁骇浜у搧鍒嗙被ID
+                    </th>
+                    <th>鏄惁榛樿
+                    </th>
+                    <th>鏄惁鍚敤
+                    </th>
+                    <th>鎺掑簭
+                    </th>
+                    <th>璧犻�佹潯鏁�
+                    </th>
+                    <th>鍙傝�冨崟浠�
+                    </th>
+                    <th>鍒涘缓鏃堕棿
+                    </th>
+                    <th class="text-right">鎿嶄綔
+                    </th>
+                </tr>
+            </thead>
+            <tbody>
+            </tbody>
+        </table>
+    </form>
+    <div id="pagination">
+    </div>
+    <div class="footBar">
+      
+    </div>
+
+    <div class="modal inmodal fade" id="productDialog" tabindex="-1" role="dialog" aria-hidden="true">
+        <div class="modal-dialog modal-lg">
+            <form class="form-horizontal" id="productForm" name="productForm" method="post" action="gwProduct.ashx">
+                <div class="modal-content ">
+                    <div class="modal-header">
+                        <input type="hidden" class="form-control" name="action" id="action" value="update" />
+                        <input type="hidden" class="form-control" name="id" id="id" value="" />
+                        <button type="button" class="close" data-dismiss="modal">
+                            <span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
+                        <h4 class="modal-title">缂栬緫浜у搧璧勬枡</h4>
+                    </div>
+                    <div class="modal-body">
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">
+                                绫诲埆</label>
+                            <div class="col-sm-4 ">
+                                <select id="classes" name="classes" class="form-control">
+                                    <option value="-1">--璇烽�夋嫨绫诲埆--</option>
+                                    <option value="0" >浜у搧鍒嗙被</option>
+                                    <option value="1" selected>浜у搧</option>
+                                </select>
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">
+                                鐖剁骇鍒嗙被ID</label>
+                            <div class="col-sm-4 ">
+                                <select name="parentId" id="parentId">
+                                    <%=GetProductClassOptions("0")%>
+                                </select>
+                            </div>
+                        </div>
+                        <div class="form-group classes-span classes-span-1 ">
+                            <label class="col-sm-2 control-label">
+                                鍥炬爣</label>
+                            <div class="col-sm-4 ">
+                                <a class="action-upLoad btn btn-info btn-xs " href="javascript:; ">閫夋嫨涓婁紶鏂囦欢</a>
+                                <!--
+                                <input type="file" id="certPath" name="certPath" />
+                                &nbsp;&nbsp;<span id="stopwatchTime" style="- word-wrap: break-word; word-break: break-all;"></span>
+
+                                <input type="text" class="form-control" name="icon" id="icon" value="" />
+                                -->
+                            </div>
+                            <span class="help-block m-b-none">绫诲埆涓轰骇鍝佹椂锛屼骇鍝佺殑鍥炬爣鏍囪瘑锛涗笂浼犳枃浠舵牸寮忎负BMP锛堜綅鍥撅級銆丣PG銆丣PEG銆丳NG銆丟IF鏂囦欢锛堟枃浠跺ぇ灏忎笉鑳借秴杩�5M锛夈��
+                            </span>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">
+                                鍚嶇О</label>
+                            <div class="col-sm-4 ">
+                                <input type="text" class="form-control" name="name" id="name" value="" />
+                            </div>
+                        </div>
+                        <div class="form-group classes-span classes-span-1">
+                            <label class="col-sm-2 control-label">
+                                浣跨敤璇存槑</label>
+                            <div class="col-sm-10">
+                                <input type="text" class="form-control" name="instructions" id="instructions" value=""/>
+                            </div>
+                        </div>
+                        <!--
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">
+                                浜у搧璺緞</label>
+                            <div class="col-sm-4  ">
+                                <input type="text" class="form-control" name="path" id="path" value="" />
+                            </div>
+                        </div>
+                        -->
+                        <div class="form-group classes-span classes-span-1">
+                            <label class="col-sm-2 control-label">
+                                鎺ㄥ箍鏂瑰紡</label>
+                            <div class="col-sm-4 ">
+                                <select id="isDefault" name="isDefault" class="form-control">
+                                    <option value="0" >涓�у鎴�</option>
+                                    <option value="1" >绯荤粺榛樿</option>
+                                </select>
+                            </div>
+                            <span class="help-block m-b-none">涓�у寲瀹㈡埛鏄寚鐗规畩鎺ㄩ�佺粰瀹㈡埛锛涚郴缁熼粯璁ゆ槸鎸囩郴缁熼粯璁ゅ彲鎺ㄩ�佹墍鏈夊鎴枫��</span>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">
+                                鏄惁鍚敤</label>
+                            <div class="col-sm-4 ">
+                                <select id="isEnable" name="isEnable" class="form-control">
+                                    <option value="0" >鍋滅敤</option>
+                                    <option value="1" selected>鍚敤</option>
+                                </select>
+                            </div>
+                        </div>
+                        <div class="form-group classes-span classes-span-1">
+                            <label class="col-sm-2 control-label">
+                                鎺掑簭</label>
+                            <div class="col-sm-4">
+                                <div class="input-group">
+                                    <input type="text" class="form-control" name="sort" id="sort" value=""
+                                        maxlength="5" onkeyup="value=value.replace(/[^\d]/g,'')" onpaste="value=value.replace(/[^\d]/g,'')"
+                                        oncontextmenu="return false" />
+                                </div>
+                            </div>
+                        </div>
+                        <div class="form-group classes-span classes-span-1">
+                            <label class="col-sm-2 control-label">
+                                閫氶亾璺敱</label>
+                            <div class="col-sm-10">
+                                 <select name="RouterType" id="RouterType">
+                                    <option value="1" >鎸囧畾閫氶亾璺敱</option>
+                                    <option value="3" >閫氶亾缁勮矾鐢辨ā寮�</option>
+                                </select>
+
+                                
+                            <div class="router-type-span router-type-span-1">
+                                <div style="padding: 5px">
+                                    绉诲姩锛�<select name="cmOpId" id="cmOpId">
+                                         <%=GetOpOptions(0)%>
+                                    </select>&nbsp;&nbsp; 鎵╁睍鍙傛暟锛�<input type="text" name="cmExtParams" id="cmExtParams" maxlength="600"
+                                        value="" style="width: 50%;" placeholder="绉诲姩鎵╁睍鍙傛暟" />
+                                </div>
+                                <div style="padding: 5px">
+                                    鑱旈�氾細<select name="cuOpId" id="cuOpId">
+                                         <%=GetOpOptions(0)%>
+                                     </select>&nbsp;&nbsp; 鎵╁睍鍙傛暟锛�<input type="text" name="cuExtParams" id="cuExtParams" maxlength="600"
+                                        value="" style="width: 50%;" placeholder="鑱旈�氭墿灞曞弬鏁�" />
+                                </div>
+                                <div style="padding: 5px">
+                                    鐢典俊锛�<select name="ctOpId" id="ctOpId"> 
+                                           <%=GetOpOptions(0)%>
+                                    </select>&nbsp;&nbsp; 鎵╁睍鍙傛暟锛�<input type="text" name="ctExtParams" id="ctExtParams" maxlength="600"
+                                        value="" style="width: 50%;" placeholder="鐢典俊鎵╁睍鍙傛暟" />
+                                </div>
+                                <span class="help-block m-b-none">CMPP2.0,CMPP3.0鍗忚鏀寔鎵╁睍鍙傛暟鏈夛細SERVICEID(鏈嶅姟浠g爜/涓氬姟浠g爜(鏈�闀�10浣�)),FEECODE(璐圭敤浠g爜(鏈�闀�6浣�)),FEETYPE(璐圭敤绫诲瀷),FEEUSERTYPE,FEETERMINALID(璁¤垂鍙风爜)
+                                    SGIP鏀寔鎵╁睍鍙傛暟鏈夛細SERVICETYPE(涓氬姟浠g爜(鏈�闀�10浣�)),CHARGENUMBER(璁¤垂鍙风爜(鏈�闀�21浣�)),FEEVALUE(鏀惰垂鍊�(鏈�闀�6浣�)),GIVENVALUE,NODEID(鑺傜偣(鏈�闀�6浣�)),CONNTIMEOUT(杩炴帴瓒呮椂)
+                                    SMGP鏀寔鎵╁睍鍙傛暟鏈夛細SERVICEID(鏈嶅姟浠g爜/涓氬姟浠g爜(鏈�闀�10浣�)),FIXEDFEE(鍖呮湀璐�/灏侀《璐�(鏈�闀�6浣�)),FEECODE(璐圭敤浠g爜/璧勮垂浠g爜(鏈�澶�6浣�));</span>
+                            </div>
+                            <div class="router-type-span router-type-span-3">
+                                <div style="padding: 5px">
+                                    <label class="control-label ">
+                                        绉诲姩閫氶亾缁�</label>
+                                    <select name="cmGroupid" id="cmGroupid">
+ 
+                                     <%=GetOpGroupOptions(0) %>
+                                     </select></div>
+                                <div style="padding: 5px">
+                                    <label class="control-label ">
+                                        鑱旈�氶�氶亾缁�</label>
+                                    <select name="cuGroupid" id="cuGroupid">
+                            
+                                     <%=GetOpGroupOptions(0)%>
+                                        </select></div>
+                                <div style="padding: 5px">
+                                    <label class="control-label">
+                                        鐢典俊閫氶亾缁�</label>
+                                    <select name="ctGroupid" id="ctGroupid">
+                                    <%=GetOpGroupOptions(0)%>
+                                     </select></div>
+                            </div>
+                            </div>
+                        </div>
+
+                        <div class="form-group classes-span classes-span-1">
+                            <label class="col-sm-2 control-label">
+                                鍙傝�冨崟浠�</label>
+                            <div class="col-sm-4">
+                                <div class="input-group">
+                                    <input type="text" class="form-control" name="price" id="price" value="" maxlength="5"
+                                        onkeyup="value=value.replace(/[^\d\.]/g,'')" onpaste="value=value.replace(/[^\d\.]/g,'')"
+                                        oncontextmenu="return false" /><span class="input-group-addon">鍏�/鏉� </span>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="form-group classes-span classes-span-1">
+                            <label class="col-sm-2 control-label">
+                                榛樿璧犻�佹潯鏁�</label>
+                            <div class="col-sm-4">
+                                <div class="input-group">
+                                    <input type="text" class="form-control" name="givingNum" id="givingNum" value="" maxlength="5"
+                                        onkeyup="value=value.replace(/[^\d\.]/g,'')" onpaste="value=value.replace(/[^\d\.]/g,'')"
+                                        oncontextmenu="return false" /><span class="input-group-addon">鏉� </span>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">
+                                澶囨敞</label>
+                            <div class="col-sm-10 input-group m-b">
+                                <input type="text" class="form-control" name="remark" id="remark" value="" />
+                            </div>
+                        </div>
+                    </div>
+                    <div class="modal-footer">
+                        <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">
+                            鍙栨秷</button>&nbsp;&nbsp;
+                    <button class="btn btn-primary">
+                        淇濆瓨</button>
+                    </div>
+                </div>
+            </form>
+        </div>
+    </div>
+
+    
+    <div class="modal inmodal fade" id="upLoad" tabindex="-1" role="dialog"
+        aria-hidden="true">
+        <form name="upLoad_form" method="post" action="GwProduct.ashx?action=upLoad"
+        id="upLoad_form" class="form-horizontal">
+        <div class="modal-dialog form-horizontal">
+            <div class="modal-content ">
+                <input type="hidden" id="ablackpool" value="" name="ablackpool" />
+                <div class="modal-header">
+                    <button type="button" class="close" data-dismiss="modal">
+                        <span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
+                    <h4 class="modal-title">
+                        涓婁紶鏂囦欢
+                    </h4>
+                </div>
+                <div class="modal-body">
+                    <div class="form-group">
+                        <label class="control-label col-sm-3">
+                            璇烽�夋嫨瑕佷笂浼犵殑鍥炬爣鏂囦欢</label>
+                        <input type="file" id="certPath" name="certPath" />
+                        
+                        &nbsp;&nbsp;<span id="stopwatchTime" style="word-wrap: break-word; word-break: break-all;"></span>
+                    </div>
+                    <div>
+                        <h3>
+                            璇存槑</h3>
+                        <ul>
+                            <li class="text-info">涓婁紶鏂囦欢鏍煎紡涓築MP锛堜綅鍥撅級銆丣PG銆丣PEG銆丳NG銆丟IF鏂囦欢锛堟枃浠跺ぇ灏忎笉鑳借秴杩�5M锛夛紱</li>
+                  
+                        </ul>
+                    </div>
+                </div>
+                <div class="modal-footer">
+                    <button class="btn btn-default " data-dismiss="modal" aria-hidden="true">
+                        鍙栨秷</button>&nbsp;&nbsp;
+                    <button class="btn btn-primary action-save">
+                        涓婁紶</button>
+                </div>
+            </div>
+        </div>
+        </form>
+    </div>
+
+    <!-- footBar -->
+    <div id="mask" class="mask">
+        <span></span>
+        <img src="img/spinning-circles.svg" alt="杞藉叆涓�..." />
+    </div>
+  </asp:Content> 
+
+         
+ 
diff --git a/web/web/GwProduct.aspx.cs b/web/web/GwProduct.aspx.cs
new file mode 100644
index 0000000..b0c391a
--- /dev/null
+++ b/web/web/GwProduct.aspx.cs
@@ -0,0 +1,112 @@
+锘� 
+using Common;
+using Dao;
+using Model;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Web;
+using System.Web.Profile;
+using System.Web.SessionState;
+
+public partial class _GwProduct : PageBase<SysUser>, IRequiresSessionState
+{
+    protected List<GwProduct> GwProductList;
+    protected List<GwProduct> GwProductClassList;
+    protected List<GwOp> OpList;    //閫氶亾淇℃伅鍒楄〃
+    protected List<GwOpGroup> OpGroupList;    //閫氶亾缁勪俊鎭垪琛�
+    //public GwProduct GwProduct { get; protected set; }  //鐢ㄤ簬瀛樻斁浜у搧缂栬緫
+
+    protected void Page_Load(object sender, EventArgs e)
+  {
+        //鏉冮檺鎺у埗
+        this.CheckRight("601", FailedOperation.ErrorMsgOnly);
+        using (GwOpDao gwOpDao = new GwOpDao())
+            this.OpList = gwOpDao.LoadInfoList();
+        using (GwOpGroupDao gwOpGroupDao = new GwOpGroupDao())
+            this.OpGroupList = gwOpGroupDao.GetGroupList();
+
+        //鑾峰彇鍚敤鐨勪骇鍝佸垎绫�
+        using (GwProductDao gwProductDao = new GwProductDao()) { 
+            GwProduct bean = new GwProduct();
+            bean.Classes = 0;
+            bean.IsEnable = -1;
+            this.GwProductClassList = gwProductDao.getAllList(bean);
+        }
+
+
+
+    }
+
+
+    //鑾峰彇閫氶亾淇℃伅
+    public string GetOpOptions(int opId)
+    {
+        StringBuilder stringBuilder = new StringBuilder();
+        if (this.OpList.Count == 0)
+            return "<option value=''>鏃犻�氶亾淇℃伅</option>";
+        stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)0, (object)"NA");
+        foreach (GwOp gwOp in this.OpList)
+        {
+            //鍋滅敤鐨勯�氶亾涓嶅啀鏄剧ず
+            if (gwOp.OpStatus == 0)
+            {
+                continue;
+            }
+
+            if (opId == gwOp.OpID)
+                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)gwOp.OpID, (object)gwOp.OpName);
+            else
+                stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)gwOp.OpID, (object)gwOp.OpName);
+        }
+        return stringBuilder.ToString();
+    }
+
+    /// <summary>
+    /// 鑾峰彇閫氶亾缁�
+    /// </summary>
+    /// <param name="groupID"></param>
+    /// <returns></returns>
+    public string GetOpGroupOptions(int groupID)
+    {
+        StringBuilder stringBuilder = new StringBuilder();
+        using (GwOpGroupDao gwOpGroupDao = new GwOpGroupDao())
+        {
+            List<GwOpGroup> groupList = gwOpGroupDao.GetGroupList();
+            stringBuilder.AppendFormat("<option value=\"0\">涓嶈缃�</option>");
+            foreach (GwOpGroup gwOpGroup in groupList)
+                stringBuilder.AppendFormat("<option value='{0}' {2}>{1}</option>", (object)gwOpGroup.GroupID, (object)gwOpGroup.GroupName, gwOpGroup.GroupID == groupID ? (object)"selected" : (object)"");
+        }
+        return stringBuilder.ToString();
+    }
+
+    //鑾峰彇浜у搧鍒嗙被淇℃伅
+    public string GetProductClassOptions(string productId)
+    {
+        StringBuilder stringBuilder = new StringBuilder();
+        if (this.GwProductClassList.Count == 0)
+            return "<option value='0'>鏃�</option>";
+        stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", (object)0, (object)"鏃�");
+        foreach (GwProduct bean in this.GwProductClassList)
+        {
+            //鍋滅敤鐨勪骇鍝佸垎绫讳笉鍐嶆樉绀�
+            if (bean.IsEnable == 0)
+            {
+                continue;
+            }
+            //绫诲埆涓轰骇鍝佷笉鍐嶆樉绀�
+            if (bean.Classes == 1)
+            {
+                continue;
+            }
+
+            if (productId.Equals(bean.Id) )
+                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)bean.Id, (object)bean.Name);
+            else
+                stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)bean.Id, (object)bean.Name);
+        }
+        return stringBuilder.ToString();
+    }
+
+}
+ 
\ No newline at end of file
diff --git a/web/web/Index.aspx b/web/web/Index.aspx
index b8c0339..6e648a4 100644
--- a/web/web/Index.aspx
+++ b/web/web/Index.aspx
@@ -163,6 +163,17 @@
                             <li><a href="GwOpStop.aspx" class="J_menuItem">鍋滅敤閫氶亾</a> </li>
                         </ul>
                     </li>
+                    <li>
+                        <a href="#">
+                            <i class="fa fa-rocket"></i>
+                            <span class="nav-label">浜у搧绠$悊</span>
+                            <span class="fa arrow"></span>
+                        </a>
+                        <ul class="nav nav-second-level">
+                            <!--<li><a href="pages/gwProduct/GwProduct.aspx" class="J_menuItem">浜у搧鍒楄〃</a> </li>-->
+                            <li><a href="GwProduct.aspx" class="J_menuItem">浜у搧鍒楄〃</a> </li>
+                        </ul>
+                    </li>
 
                     <li>
                         <a href="#"><i class="fa fa-user-secret"></i><span class="nav-label">瀹㈡埛绠$悊 </span><span class="fa arrow"></span></a>

--
Gitblit v1.9.1