private void BindIndexMinuter() { string orderID = WebUnitily.CheckStr(Request["orderID"]); if (orderID != "") { DataSet Set = orderListInfo.GetOrderDetails(orderID); if (Set.Tables.Count > 0) { if (Set.Tables[0].Rows.Count > 0) { gvMinuterOrderList.DataSource = Set.Tables[0]; gvMinuterOrderList.DataKeyNames = new string[] { "ID" }; gvMinuterOrderList.DataBind(); } else { gvMinuterOrderList.DataBind(); } } else { gvMinuterOrderList.DataBind(); } } }
private void BindLookOrderDetails() { string orderID = WebUnitily.CheckStr(Request["orderID"]); if (orderID != "") { DataSet set = new longyuan_OrderListInfo().GetOrderDetails(orderID); if (set.Tables.Count > 0) { if (set.Tables[0].Rows.Count > 0) { gvMinuterOrderList.DataSource = set.Tables[0]; gvMinuterOrderList.DataKeyNames = new string[] { "ID" }; gvMinuterOrderList.DataBind(); } else { gvMinuterOrderList.DataBind(); } } else { gvMinuterOrderList.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { classID = WebUnitily.CheckInt(Request["classID"]); keyWord = WebUnitily.CheckStr(Request["keyWord"]); orderBy = WebUnitily.CheckStr(Request["orderBy"]); BindIndexHelp(); BindIndexHelpTitle(); } }
private void changeBuyNum() { StringBuilder sb = new StringBuilder(); L_CartInfo cInfo = new L_CartInfo(); cInfo.UserID = userID; cInfo.CartID = WebUnitily.CheckStr(Request["cartID"]); cInfo.ProductID = WebUnitily.CheckInt(Request["PId"]); cInfo.BugNum = WebUnitily.CheckInt(Request["BuyNum"]); DataSet Set = cartinfo.GetUpdateShoppingNumMoney(cInfo); sb.Append("<table style=\" width:100%; margin-top:5px; padding:5px; border:none;\" cellpadding=\"0\" cellspacing=\"0\">"); if (Set.Tables.Count > 0) { string proName; sb.Append("<tr class=\"cartListTitle\"><td>商品名称/图片</td><td class=\"FieldName100\">单价</td><td class=\"FieldName120\">数量</td><td class=\"FieldName120\">本商品合计</td><td class=\"FieldName80\"> 操作</td></tr>"); for (int i = 0; i < Set.Tables[0].Rows.Count; i++) { DataRow drv = Set.Tables[0].Rows[i]; sb.Append("<tr>"); sb.Append("<tr class=\"cartListRow\">"); if (drv["ProSmallPath"].ToString() != "") { sb.Append("<td><img src=\"" + "../photo/" + drv["ProSmallPath"] + "\" alt=\"产品图片\" />"); } else { sb.Append("<td><img src=\"/Images/Erro.png\" alt=\"产品图片\" />"); } proName = drv["ProductName"].ToString(); if (proName.Length > 20) { proName = proName.Substring(0, 20); } sb.Append("<p class=\"wenzi\"><a href=\"../product/ProductInfo.aspx?PId=" + drv["ProductID"] + "\" title=" + drv["ProductName"] + "\" target=\"_blank\">" + proName + "</a></p></td>"); sb.Append("<td class=\"FieldName100\">" + string.Format("{0:C2}", drv["MenberPrince"]) + "</td>"); sb.Append("<td class=\"FieldName120\"><input id=\"txtBuyNum_" + drv["ProductId"] + "\" type=\"text\" class=\"input\" maxlength=\"5\" style=\"width:50px;\" onblur=\"Cart8517.ChangeBuyNum('" + drv["CartID"] + "'," + drv["ProductID"] + ");\" value=\"" + drv["BuyNum"] + "\" /></td>"); sb.Append("<td class=\"FieldName120\"><span class=\"red\">" + string.Format("{0:C2}", drv["MoneyAmount"]) + "</span></td>"); sb.Append("<td class=\"FieldName80\"><a href=\"javascript:void(0);\" onclick=\"Cart8517.DelCartProduct('" + drv["CartID"] + "','" + drv["ProductID"] + "');\" title=\"删除\">删除</a></td>"); sb.Append("</tr>"); } sb.Append("<tr class=\"cartListRow\"><td colspan=\"5\" style=\"text-align:right;\">总价(包含运费):<span class=\"red\">" + string.Format("{0:C2}", Set.Tables[1].Rows[0]["MoneyTotal"]) + "</span>元</td></tr>"); } else { sb.Append("<tr class=\"cartListRow\"><td colspan=\"5\" style=\"text-align:right;\"><div class=\"NoInfo\">您还没有购买产品!!</div></td></tr>"); } sb.Append("</table>"); Response.Write(sb.ToString()); Response.End(); }
protected void btnAdd_Click(object sender, EventArgs e) { L_AcceptAddrInfo acceptinfo = new L_AcceptAddrInfo(); acceptinfo.ProvinceID = WebUnitily.CheckInt(Request.Form["ProvinceId"]); acceptinfo.Province = WebUnitily.CheckStr(txtProvince.Text.Trim()); acceptinfo.CityID = WebUnitily.CheckInt(Request.Form["CityId"]); acceptinfo.City = WebUnitily.CheckStr(txtcity.Text.Trim()); acceptinfo.CountryID = WebUnitily.CheckInt(Request.Form["CountyId"]); acceptinfo.Country = WebUnitily.CheckStr(txtCountry.Text.Trim()); acceptinfo.RowAddr = WebUnitily.CheckStr(txtRowAddr.Text.Trim()); acceptinfo.RealityName = WebUnitily.CheckStr(txtRealityName.Text.Trim()); acceptinfo.HandSet = WebUnitily.CheckStr(txtHandset.Text.Trim()); acceptinfo.Tel = WebUnitily.CheckStr(txtDel.Text.Trim()); acceptinfo.zipCode = WebUnitily.CheckStr(txtZipCode.Text.Trim()); acceptinfo.QQNum = WebUnitily.CheckStr(txtQQMath.Text.Trim()); acceptinfo.UserID = userID; acceptinfo.PostTime = DateTime.Now; int exeResult = accept.InsertAcceptAddr(acceptinfo); switch (exeResult) { case 1: Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("收货地址添加成功!")); break; case 0: Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("收货地址最多只能添加10个,请您检查!")); break; default: Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("收货地址添加失败,请您检查!")); break; } txtcity.Text = ""; txtCountry.Text = ""; txtDel.Text = ""; txtHandset.Text = ""; txtProvince.Text = ""; txtQQMath.Text = ""; txtRealityName.Text = ""; txtRowAddr.Text = ""; txtZipCode.Text = ""; }
protected void linkDelete_Click(object sender, EventArgs e) { L_CartInfo cart = new L_CartInfo(); cart.UserID = userID; cart.CartID = WebUnitily.CheckStr(Request["CardID"]); cart.ProductID = WebUnitily.CheckInt(Request["PId"]); if (cartinfo.GetCartListDelete(cart) == 1) { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("购物车中的商品删除成功!")); } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("商品删除失败!")); } BindIndexShoppingCartInfo(); }
protected void Page_Load(object sender, EventArgs e) { if (subTool.CheckUserLogin("-1")) { userID = WebUnitily.CheckInt(mycookie.getCookiesValue("shop8517User", "userID")); string requestType = WebUnitily.CheckStr(Request.Form["RequestType"]); //获取窗体变量的集合 switch (requestType) { case "add": userAddCart(); break; case "change": break; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (mycookie.cookiesNull("Url")) { txtBackUrl.Text = Server.UrlDecode(mycookie.getCookiesValue("Url", "BackUrl")); mycookie.setCookiesValue("Url", "BackUrl", ""); } else { string backUrl = WebUnitily.CheckStr(Request.QueryString["URL"]); if (backUrl != "") { txtBackUrl.Text = Server.UrlDecode(backUrl); } } } }