Kaynağa Gözat

修改显示信息,修改字段值

andechuang 8 yıl önce
ebeveyn
işleme
ec04d07f73

+ 25 - 0
ShopMobile/Admin/PictureEdit.aspx.cs

@@ -16,6 +16,31 @@ namespace ShopMobile.Admin
16 16
             if (!IsPostBack)
17 17
             {
18 18
                 ViewState["back"] = Request.UrlReferrer.ToString();
19
+                string strid = Request.QueryString["ID"] ?? "";
20
+                if (strid != "")
21
+                {
22
+                    int id = 0;
23
+                    if (!Int32.TryParse(strid, out id))
24
+                    {
25
+                        Common.MessageBox.ShowAndRedirect(this, "修改失败", Request.UrlReferrer.ToString());
26
+                        return;
27
+                    }
28
+                    else
29
+                    {
30
+                        Model.PT_Pic_ImgUrl pro = new Bll.PT_Pic_ImgUrl().GetModel(id);
31
+                        if (pro != null)
32
+                        {
33
+                            txtPicSort.Value = pro.PicSort.ToString();
34
+
35
+                            spzt.Value = pro.PicUrl;
36
+                            ImgUrl.Value = pro.ImgUrl;
37
+                        }
38
+                        else
39
+                        {
40
+                            Common.MessageBox.Show(this, "修改失败");
41
+                        }
42
+                    }
43
+                }
19 44
             }
20 45
         }
21 46
         protected void submitButton_Click(object sender, EventArgs e)

+ 0 - 10
ShopMobile/Admin/PictureList.aspx

@@ -38,10 +38,6 @@
38 38
                                 </th>
39 39
                                 <th>图片链接地址
40 40
                                 </th>
41
-                                <th>状态
42
-                                </th>
43
-                                <th>类型
44
-                                </th>
45 41
                                 <th>操作
46 42
                                 </th>
47 43
                             </tr>
@@ -60,12 +56,6 @@
60 56
                                             <%#Eval("ImgUrl") %>
61 57
                                         </td>
62 58
                                         <td>
63
-                                            <%#Eval("Status") %>
64
-                                        </td>
65
-                                        <td>
66
-                                            <%#Eval("Type") %>
67
-                                        </td>
68
-                                        <td>
69 59
                                             <a href="PictureEdit.aspx?Id=<%#Eval("ID") %>" title="修改">
70 60
                                                 <%#Eval("Type").ToString()=="0"?"修改":"" %>
71 61
                                             </a>