andechuang лет назад: 8
Родитель
Сommit
b5e748bb7c

+ 3 - 1
ShopMobile.Bll/PT_Pic_ImgUrl.cs

@@ -7,7 +7,7 @@ namespace ShopMobile.Bll
7 7
     public partial class PT_Pic_ImgUrl
8 8
     {
9 9
 
10
-        private readonly PT_Pic_ImgUrl dal = new PT_Pic_ImgUrl();
10
+        private readonly ShopMobile.Dal.PT_Pic_ImgUrl dal = new ShopMobile.Dal.PT_Pic_ImgUrl();
11 11
         public PT_Pic_ImgUrl()
12 12
         { }
13 13
 
@@ -127,6 +127,8 @@ namespace ShopMobile.Bll
127 127
                     }
128 128
                     model.PicUrl = dt.Rows[n]["PicUrl"].ToString();
129 129
                     model.ImgUrl = dt.Rows[n]["ImgUrl"].ToString();
130
+                    model.PicSort =int.Parse(dt.Rows[n]["PicSort"].ToString());
131
+                    model.Type = int.Parse(dt.Rows[n]["Type"].ToString());
130 132
                     if (dt.Rows[n]["Status"].ToString() != "")
131 133
                     {
132 134
                         model.Status = int.Parse(dt.Rows[n]["Status"].ToString());

+ 24 - 13
ShopMobile.Dal/PT_Pic_ImgUrl.cs

@@ -34,14 +34,16 @@ namespace ShopMobile.Dal
34 34
         {
35 35
             StringBuilder strSql = new StringBuilder();
36 36
             strSql.Append("insert into PT_Pic_ImgUrl(");
37
-            strSql.Append("PicUrl,ImgUrl,Status,CreateUser,CreateTime");
37
+            strSql.Append("PicUrl,ImgUrl,PicSort,Type,Status,CreateUser,CreateTime");
38 38
             strSql.Append(") values (");
39
-            strSql.Append("@PicUrl,@ImgUrl,@Status,@CreateUser,@CreateTime");
39
+            strSql.Append("@PicUrl,@ImgUrl,@PicSort,@Type,@Status,@CreateUser,@CreateTime");
40 40
             strSql.Append(") ");
41 41
             strSql.Append(";select @@IDENTITY");
42 42
             SqlParameter[] parameters = {
43 43
                         new SqlParameter("@PicUrl", SqlDbType.NVarChar,200) ,
44 44
                         new SqlParameter("@ImgUrl", SqlDbType.NVarChar,200) ,
45
+                        new SqlParameter("@PicSort",SqlDbType.Int,4),
46
+                        new SqlParameter("@Type",SqlDbType.Int,4),
45 47
                         new SqlParameter("@Status", SqlDbType.Int,4) ,
46 48
                         new SqlParameter("@CreateUser", SqlDbType.VarChar,50) ,
47 49
                         new SqlParameter("@CreateTime", SqlDbType.DateTime)
@@ -50,9 +52,11 @@ namespace ShopMobile.Dal
50 52
 
51 53
             parameters[0].Value = model.PicUrl;
52 54
             parameters[1].Value = model.ImgUrl;
53
-            parameters[2].Value = model.Status;
54
-            parameters[3].Value = model.CreateUser;
55
-            parameters[4].Value = model.CreateTime;
55
+            parameters[2].Value = model.PicSort;
56
+            parameters[3].Value = model.Status;
57
+            parameters[4].Value = model.Type;
58
+            parameters[5].Value = model.CreateUser;
59
+            parameters[6].Value = model.CreateTime;
56 60
 
57 61
             object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
58 62
             if (obj == null)
@@ -79,6 +83,8 @@ namespace ShopMobile.Dal
79 83
 
80 84
             strSql.Append(" PicUrl = @PicUrl , ");
81 85
             strSql.Append(" ImgUrl = @ImgUrl , ");
86
+            strSql.Append(" PicSort= @PicSort ,");
87
+            strSql.Append(" Type= @Type ,");
82 88
             strSql.Append(" Status = @Status , ");
83 89
             strSql.Append(" CreateUser = @CreateUser , ");
84 90
             strSql.Append(" CreateTime = @CreateTime  ");
@@ -88,18 +94,21 @@ namespace ShopMobile.Dal
88 94
                         new SqlParameter("@ID", SqlDbType.Int,4) ,
89 95
                         new SqlParameter("@PicUrl", SqlDbType.NVarChar,200) ,
90 96
                         new SqlParameter("@ImgUrl", SqlDbType.NVarChar,200) ,
91
-                        new SqlParameter("@Status", SqlDbType.Int,4) ,
92
-                        new SqlParameter("@CreateUser", SqlDbType.VarChar,50) ,
97
+                        new SqlParameter("@PicSort",SqlDbType.Int,4),
98
+                        new SqlParameter("@Type",SqlDbType.Int,4),
99
+                        new SqlParameter("@Status", SqlDbType.Int, 4) ,
100
+                        new SqlParameter("@CreateUser", SqlDbType.VarChar, 50) ,
93 101
                         new SqlParameter("@CreateTime", SqlDbType.DateTime)
94 102
 
95 103
             };
96
-
97 104
             parameters[0].Value = model.ID;
98 105
             parameters[1].Value = model.PicUrl;
99 106
             parameters[2].Value = model.ImgUrl;
100
-            parameters[3].Value = model.Status;
101
-            parameters[4].Value = model.CreateUser;
102
-            parameters[5].Value = model.CreateTime;
107
+            parameters[3].Value = model.PicSort;
108
+            parameters[4].Value = model.Status;
109
+            parameters[5].Value = model.Type;
110
+            parameters[6].Value = model.CreateUser;
111
+            parameters[7].Value = model.CreateTime;
103 112
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
104 113
             if (rows > 0)
105 114
             {
@@ -165,7 +174,7 @@ namespace ShopMobile.Dal
165 174
         {
166 175
 
167 176
             StringBuilder strSql = new StringBuilder();
168
-            strSql.Append("select ID, PicUrl, ImgUrl, Status, CreateUser, CreateTime  ");
177
+            strSql.Append("select ID, PicUrl, ImgUrl,PicSort,Type, Status, CreateUser, CreateTime  ");
169 178
             strSql.Append("  from PT_Pic_ImgUrl ");
170 179
             strSql.Append(" where ID=@ID");
171 180
             SqlParameter[] parameters = {
@@ -185,6 +194,8 @@ namespace ShopMobile.Dal
185 194
                 }
186 195
                 model.PicUrl = ds.Tables[0].Rows[0]["PicUrl"].ToString();
187 196
                 model.ImgUrl = ds.Tables[0].Rows[0]["ImgUrl"].ToString();
197
+                model.PicSort = int.Parse(ds.Tables[0].Rows[0]["PicSort"].ToString());
198
+                model.Type = int.Parse(ds.Tables[0].Rows[0]["Type"].ToString());
188 199
                 if (ds.Tables[0].Rows[0]["Status"].ToString() != "")
189 200
                 {
190 201
                     model.Status = int.Parse(ds.Tables[0].Rows[0]["Status"].ToString());
@@ -243,7 +254,7 @@ namespace ShopMobile.Dal
243 254
         /// <summary>
244 255
         /// 获取记录总数
245 256
         /// </summary>
246
-       
257
+
247 258
         public int GetRecordCount(string strWhere, Dictionary<String, String> paras)
248 259
         {
249 260
             StringBuilder strSql = new StringBuilder();

+ 19 - 1
ShopMobile.Model/PT_Pic_ImgUrl.cs

@@ -18,9 +18,18 @@ namespace ShopMobile.Model
18 18
             set { _id = value; }
19 19
         }
20 20
         /// <summary>
21
+        /// PicSort
22
+        /// </summary>		
23
+        private int _PicSort;
24
+        public int PicSort
25
+        {
26
+            get { return _PicSort; }
27
+            set { _PicSort = value; }
28
+        }
29
+        /// <summary>
21 30
         /// PicUrl
22 31
         /// </summary>		
23
-        private string _picurl;
32
+        private string  _picurl;
24 33
         public string PicUrl
25 34
         {
26 35
             get { return _picurl; }
@@ -36,6 +45,15 @@ namespace ShopMobile.Model
36 45
             set { _imgurl = value; }
37 46
         }
38 47
         /// <summary>
48
+        /// Type
49
+        /// </summary>		
50
+        private int _Type;
51
+        public int Type
52
+        {
53
+            get { return _Type; }
54
+            set { _Type = value; }
55
+        }
56
+        /// <summary>
39 57
         /// Status
40 58
         /// </summary>		
41 59
         private int _status;

+ 16 - 0
ShopMobile/ShopMobile.csproj

@@ -644,6 +644,8 @@
644 644
     <Content Include="Admin\OrderDetails.aspx" />
645 645
     <Content Include="Admin\OrderList.aspx" />
646 646
     <Content Include="Admin\OrderTickets.aspx" />
647
+    <Content Include="Admin\PictureEdit.aspx" />
648
+    <Content Include="Admin\PictureList.aspx" />
647 649
     <Content Include="Admin\ProductCategoryList.aspx" />
648 650
     <Content Include="Admin\ProductChange.aspx" />
649 651
     <Content Include="Admin\ProductEdit.aspx" />
@@ -859,6 +861,20 @@
859 861
     <Compile Include="Admin\OrderTickets.aspx.designer.cs">
860 862
       <DependentUpon>OrderTickets.aspx</DependentUpon>
861 863
     </Compile>
864
+    <Compile Include="Admin\PictureEdit.aspx.cs">
865
+      <DependentUpon>PictureEdit.aspx</DependentUpon>
866
+      <SubType>ASPXCodeBehind</SubType>
867
+    </Compile>
868
+    <Compile Include="Admin\PictureEdit.aspx.designer.cs">
869
+      <DependentUpon>PictureEdit.aspx</DependentUpon>
870
+    </Compile>
871
+    <Compile Include="Admin\PictureList.aspx.cs">
872
+      <DependentUpon>PictureList.aspx</DependentUpon>
873
+      <SubType>ASPXCodeBehind</SubType>
874
+    </Compile>
875
+    <Compile Include="Admin\PictureList.aspx.designer.cs">
876
+      <DependentUpon>PictureList.aspx</DependentUpon>
877
+    </Compile>
862 878
     <Compile Include="Admin\ProductCategoryList.aspx.cs">
863 879
       <DependentUpon>ProductCategoryList.aspx</DependentUpon>
864 880
       <SubType>ASPXCodeBehind</SubType>