diff --git a/CitySunlight/Admin.aspx.cs b/CitySunlight/Admin.aspx.cs
index 6cd2308..e9b943f 100644
--- a/CitySunlight/Admin.aspx.cs
+++ b/CitySunlight/Admin.aspx.cs
@@ -51,7 +51,7 @@ namespace CitySunlight
String classname = ProductClassManager.getClassName(int.Parse(ProductManager.GetProductInfo(item, ProductManager.Info.Class)));
String delete = "删除";
html += "
";
- html += HttpUtils.addTd("");
+ html += HttpUtils.addTd();
html += HttpUtils.addTd(ProductManager.NameToUrl(id, name));
html += HttpUtils.addTd(picurl);
html += HttpUtils.addTd(price);
diff --git a/CitySunlight/HttpUtils.cs b/CitySunlight/HttpUtils.cs
index 7c6a327..69ee69b 100644
--- a/CitySunlight/HttpUtils.cs
+++ b/CitySunlight/HttpUtils.cs
@@ -10,7 +10,7 @@ namespace CitySunlight
public static String getElementsbyName(String tagName)
{
if (HttpContext.Current.Request.Form[tagName] != null)
- return HttpContext.Current.Request.Form[tagName].ToString().Trim();
+ return HttpContext.Current.Request.Form[tagName].ToString().Trim().Replace("'", "");
else
return null;
}
@@ -21,7 +21,6 @@ namespace CitySunlight
else
return null;
}
-
public static HttpPostedFile getFilebyName(String tagName)
{
HttpPostedFile file = HttpContext.Current.Request.Files[tagName];
diff --git a/CitySunlight/Main.aspx.cs b/CitySunlight/Main.aspx.cs
index 584b571..9e0cce2 100644
--- a/CitySunlight/Main.aspx.cs
+++ b/CitySunlight/Main.aspx.cs
@@ -28,14 +28,14 @@ namespace CitySunlight
return "
数据库中未找到产品 |
";
else
html += String.Format("{0}
",
- HttpUtils.addTd("") +
+ HttpUtils.addTd() +
HttpUtils.addTd("商品名称") +
HttpUtils.addTd("商品图片") +
HttpUtils.addTd("商品价格") +
HttpUtils.addTd("商品数量") +
HttpUtils.addTd("商品分类") +
HttpUtils.addTd("所属卖家") +
- HttpUtils.addTd(""));
+ HttpUtils.addTd());
foreach (DataRow item in items.Rows)
{
diff --git a/CitySunlight/Product/ProductEdit.aspx.cs b/CitySunlight/Product/ProductEdit.aspx.cs
index 019aada..cbd77a6 100644
--- a/CitySunlight/Product/ProductEdit.aspx.cs
+++ b/CitySunlight/Product/ProductEdit.aspx.cs
@@ -84,7 +84,11 @@ namespace CitySunlight.Product
amount = ProductManager.GetProductInfo(id, ProductManager.Info.Amount);
classid = ProductManager.GetProductInfo(id, ProductManager.Info.Class);
if (username != ProductManager.GetProductInfo(id, ProductManager.Info.UserName))
- return "你没有修改此商品的权限!
";
+ {
+ this.submit.Visible = false;
+ return "你没有修改此商品的权限!
";
+ }
+
}
String html = "";