protected void lbtnUp_Click(object sender, EventArgs e) { if (fuProductPhoto.HasFile) { if (fuProductPhoto.PostedFile.ContentLength > 100 * 1024) { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("照片大小不能超过100K,请重新选择")); } else { if (fuProductPhoto.PostedFile.ContentType == "image/gif" || fuProductPhoto.PostedFile.ContentType == "image/x-png" || fuProductPhoto.PostedFile.ContentType == "image/pjpeg" || fuProductPhoto.PostedFile.ContentType == "image/bmp") { string strNewName = WebUnitily.GetName() + System.IO.Path.GetExtension(fuProductPhoto.FileName); string strPath = Server.MapPath("~/photo/" + strNewName); fuProductPhoto.PostedFile.SaveAs(strPath); imgPhoto.ImageUrl = "~/photo/" + strNewName; ViewState["photo"] = strNewName; } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("请上传常用格式的图片")); } } } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("请您选择照片后再上传?")); } }
protected void Page_Load(object sender, EventArgs e) { if (subTool.CheckUserLogin("-1")) { userID = WebUnitily.CheckInt(mycookie.getCookiesValue("shop8517User", "userID")); if (!IsPostBack) { if (Request.QueryString["InfoID"] != null && Request.QueryString["InfoID"] != "") { InfoID = Int32.Parse(Request.QueryString["InfoID"]); txtInfoId.Text = InfoID.ToString(); btnAdd.Visible = false; btnUpdate.Visible = true; lblAddAcceptAddr.Text = "修改收货人地址"; BindUpdateAcceptAddr(InfoID); } else { btnAdd.Visible = true; btnUpdate.Visible = false; lblAddAcceptAddr.Text = "添加收货人地址"; } } } }
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(); } } }
protected void btnAdd_Click(object sender, EventArgs e) { L_ProductInfo pInfo = new L_ProductInfo(); pInfo.Pronumber = txtProNumber.Text.Trim(); pInfo.ProductName = txtProductName.Text.Trim(); pInfo.Keyword = ""; string categoryDetail = this.ddlLeavl.SelectedItem.Value; string categoryDetail1 = this.ddlLeavl.SelectedItem.Value; string categoryID = categoryDetail.Split(',')[1]; pInfo.ProductCategoryID = Convert.ToInt32(categoryID); pInfo.ParentNameRoute = categoryDetail1.ToString(); pInfo.CategoryName = this.ddlLeavl.Items[ddlLeavl.SelectedIndex].Text; pInfo.ProductImage = ViewState["photo"].ToString(); pInfo.Price = Convert.ToDecimal(txtPrice.Text.Trim()); pInfo.CurrentPrice = Convert.ToDecimal(txtCurrentPrince.Text.Trim()); pInfo.MenberPrince = Convert.ToDecimal(txtMenberPrince.Text.Trim()); pInfo.ProducStore = Convert.ToInt32(txtPoductStore.Text.Trim()); pInfo.Danwei = ddlDanWei.SelectedValue; pInfo.FreightType = ddlFreightType.SelectedValue; pInfo.Freight = Convert.ToDecimal(txtFreight.Text.Trim()); pInfo.LinkQQID = ddlQQList.SelectedIndex.ToString(); pInfo.LinkQQName = ddlQQList.Items[ddlQQList.SelectedIndex].Text; pInfo.Ispost = 1; if (rbDesc.Checked) { isReviewEnable = 1; } else { isReviewEnable = 0; } pInfo.Isreviewenable = isReviewEnable; //出错误处 pInfo.RemainDay = Int32.Parse(ddlRemainDay.SelectedValue); pInfo.ProductDesc = this.txtContent.Text; pInfo.Addtime = DateTime.Now; if (productinfo.InsertProduct(pInfo) == 1) { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("产品发布成功!")); } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("产品发布失败,请您检查一下!!")); } txtContent.Text = ""; txtCurrentPrince.Text = ""; txtFreight.Text = ""; txtMenberPrince.Text = ""; txtPoductStore.Text = ""; txtPrice.Text = ""; txtProductName.Text = ""; txtProNumber.Text = ""; }
private void BindfahuoInfo(string orderID)//管理员给用户购买的东西发货 { if (orderID != "") { L_OrderLogInfo orderloginfo = new L_OrderLogInfo(); orderloginfo.OrderID = orderID; orderloginfo.OperateUserID = adminID; orderloginfo.ClientIP = Stringhelp.GetClientUp(); orderloginfo.UserType = 20; orderloginfo.OperateType = 30; orderloginfo.OperateTime = DateTime.Now; string UpdateField = " orderState=30,shippedTime='" + DateTime.Now + "'"; if (new longyuan_TableUpDateFieldsInfo().UpdateShoping("orderList", UpdateField, " and orderID='" + orderID + "'") == 2) { orderloginfo.OperateDepict = "管理员发货成功"; new longyuan_orderloginfo().InsertOrderLog(orderloginfo); Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("管理员发货成功")); return; } else { orderloginfo.OperateDepict = "管理员发货失败"; new longyuan_orderloginfo().InsertOrderLog(orderloginfo); Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("管理员发货失败,请您检查")); return; } } BindAdminManagerOrderList(); }
protected void btnDelete_Click(object sender, EventArgs e) { string strID = ""; //验证的ID if (Request["cbName"] != null) { strID = Request["cbName"]; } if (strID.Trim().Length < 1) { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("请你选择你要删除数据")); return; } string conditions = " and userID=" + userID + " and orderID in(" + strID + ")"; if (table.Deleteproject("OrderList", conditions) > 0) { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("您删除订单信息成功")); BindIndexOrderListInfo(); return; } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("您删除订单信息失败,请您检查")); BindIndexOrderListInfo(); return; } }
private void AdminUpdateOrderList(string orderID) { if (orderID != "") { L_OrderLogInfo logeinfo = new L_OrderLogInfo(); logeinfo.OrderID = orderID; logeinfo.OperateUserID = adminID; logeinfo.ClientIP = Stringhelp.GetClientUp(); logeinfo.UserType = 20; logeinfo.OperateType = 0; logeinfo.OperateTime = DateTime.Now; string updateField = " orderState=0"; if (new TableUpDateFieldsInfo().UpdateShoping("orderList", updateField, " and OrderID='" + orderID + "'") == 1) { logeinfo.OperateDepict = "管理员取消订单成功"; new orderloginfo().InsertOrderLog(logeinfo); BindAdminManagerOrderList(); Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("取消订单成功!")); return; } else { logeinfo.OperateDepict = "管理员取消订单失败"; new orderloginfo().InsertOrderLog(logeinfo); BindAdminManagerOrderList(); Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("取消订单失败,请您检查!")); return; } } }
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) { ReSetPage(); } if (Request.QueryString["id"] != null) { int CategoryId; if (Int32.TryParse(Request.QueryString["id"], out CategoryId)) { if (category.GetSubCategoryByID(CategoryId).Count == 0 && !category.GetExistProduct(CategoryId)) { if (category.DeleteCategoryByID(CategoryId)) { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("分类删除成功!")); } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("分类删除失败!")); } } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("该分类下面存在子分类或者商品,你无法删除!")); } } ReSetPage(); } }
protected void gvmanagerAdmin_RowUpdating(object sender, GridViewUpdateEventArgs e) { string AdminID = gvmanagerAdmin.DataKeys[e.RowIndex].Value.ToString(); if (((Label)(gvmanagerAdmin.Rows[e.RowIndex].FindControl("lblEnabled"))).Text == "起用") { if (new longyuan_TableUpDateFieldsInfo().UpdateShoping("Admin", "isEnabled=0", "and adminID in(" + AdminID + ")") > 0) { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("您禁用管理员成功!")); } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("您设置管理员权限失败,请检查!")); } } if (((Label)(gvmanagerAdmin.Rows[e.RowIndex].FindControl("lblEnabled"))).Text == "禁用") { if (new longyuan_TableUpDateFieldsInfo().UpdateShoping("Admin", "isEnabled=1", "and adminID in(" + AdminID + ")") > 0) { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("您起用管理员成功!")); } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("您设置管理员权限失败,请检查!")); } } BindAdmin(); }
private void BindDataListShoppingRar() { DataSet set = new CartInfo().GetShoppingCartList(userID); if (set.Tables.Count > 0) { if (set.Tables[0].Rows.Count > 0) { ddlBindIndexShoppingCartInfo.DataSource = set.Tables[0]; ddlBindIndexShoppingCartInfo.DataBind(); } else { Response.Write(WebUnitily.AlertUrl("您的购物车中还没有产品,不能进行结算", "UserCard.aspx")); Response.End(); } decimal proMoneyTotal, freightTotal; proMoneyTotal = WebUnitily.CheckMoney(set.Tables[1].Rows[0]["MoneyTotle"].ToString()); freightTotal = WebUnitily.CheckMoney(set.Tables[1].Rows[0]["FreightTotal"].ToString()); moneyTotal = string.Format("{0:C2}", proMoneyTotal + freightTotal); txtMoneyTotal.Text = moneyTotal.ToString(); } }
protected void btnDel_Click(object sender, EventArgs e) { string strID = ""; if (Request["cbName"] != null) { strID = Request["cbName"]; } if (strID.Trim().Length < 1) { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("请您选择你所要操作的数据")); return; } string conditionStr = " and userID=" + userID + " and id in(" + strID + ")"; if (table.Deleteproject("AcceptAddr", conditionStr) > 0) { BindAcceptAddr(); Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("删除收货地址成功")); return; } else { BindAcceptAddr(); Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("删除收货地址失败")); return; } }
protected void btnAdd_Click(object sender, ImageClickEventArgs e) { int addrID = WebUnitily.CheckInt(rbListAddr.SelectedValue); if (addrID == 0) { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("请您选择收货地址!")); return; } L_AcceptAddrInfo addrinfo = new AcceptAddrInfo().GetBindUpdateAcceptAddr(addrID, userID); if (addrinfo == null) { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("您所选择的收货地址不存在!")); return; } L_OrderListInfo olistinfo = new L_OrderListInfo(); olistinfo.UserID = userID; olistinfo.AcceptName = addrinfo.RealityName; olistinfo.AcceptAddr = addrinfo.Province + addrinfo.City + addrinfo.Country + addrinfo.RowAddr; olistinfo.HandSet = addrinfo.HandSet; olistinfo.Tel = addrinfo.Tel; olistinfo.ZipCode = addrinfo.zipCode; olistinfo.OrderTime = DateTime.Now; olistinfo.ShippedTime = DateTime.Now; olistinfo.OrderState = 10; //0代表取消订单 10代表等待付款 20代表已付款 30代表已发货 olistinfo.IsNew = 0; //0 新订单 1一查看 olistinfo.AdminID = 0; olistinfo.OrderID = userID.ToString() + DateTime.Now.ToString("yyyyMMddmm"); int exeResult = order.AddUserOrderItem(olistinfo); switch (exeResult) { case 10: Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("您的订单提交成功,你需要付款")); break; case 0: Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("您的订单提交成功,你需要付款")); break; case -2: Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("您的购物车中没有产品,请您选择产品", "UserCard.aspx")); break; case -3: Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("您还没有购物车呢,请您先选择产品", "UserCard.aspx")); break; default: Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("您的订单提交失败")); break; } BindDataListShoppingRar(); }
private void BindHelpInfo(int InfoID) { hInfo = helpinfo.GetBindHelp(InfoID); if (hInfo == null) { Response.Write(WebUnitily.AlertUrl("您所所选择的帮助信息暂无,请您先看别的吧", "HelpList.aspx")); } }
protected void Page_Load(object sender, EventArgs e) { if (subTool.CheckAdminLogin("20")) { adminID = WebUnitily.CheckInt(mycookie.getCookiesValue("shop8517Admin", "adminID")); } if (!IsPostBack) { BindAdminManagerOrderList(); } }
protected void Page_Load(object sender, EventArgs e) { if (subTool.CheckUserLogin("-1")) { userID = WebUnitily.CheckInt(mycookie.getCookiesValue("shop8517User", "userID")); if (!IsPostBack) { BindIndexOrderListInfo(); } } }
protected void btnOK_Click(object sender, EventArgs e) { if (user.ChangePwd(lblUserName.Text.Trim(), Stringhelp.MD5String(txtNewPwd.Text.Trim()), Stringhelp.MD5String(txtOldPwd.Text.Trim())) > 0) { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("用户修改密码成功,请您重新登录", "../../user/UserLogin.aspx")); } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("用户修改密码失败")); } }
private void BindIndexHelp() { StringBuilder sb = new StringBuilder(); int currPage = WebUnitily.CheckInt(Request["p"]); if (currPage == 0) { currPage = 1; } L_PageList pl = new L_PageList(); pl.Currpage = currPage; pl.PageSize = 10; new8517PageList.CurPage = currPage; //select helpID,helptitle,postTime from ShopHelp where isPost=1 pl.TableName = " ShopHelp"; pl.PKey = " helpID"; pl.FieldList = " helpID,helptitle,postTime"; if (classID != 0) { pl.Conditon = " and classID=" + classID + " or ParentIDRoute like '%/,'+CAST(" + classID + " as varchar(10))+'/,%' ESCAPE '/'"; } if (keyWord != "") { pl.Conditon = " and HelpTitle like '%" + keyWord + "%'"; } pl.Conditon = " and isPost=1"; if (orderBy == "") { pl.OrderBy = " postTime desc"; } longyuan_TableUpDateFieldsInfo tb = new longyuan_TableUpDateFieldsInfo(); DataSet dSet = tb.GetPageList(pl); if (dSet.Tables.Count > 0) { if (dSet.Tables[0].Rows.Count > 0) { ddlBindIndexHelpInfo.DataSource = dSet.Tables[0]; ddlBindIndexHelpInfo.DataBind(); new8517PageList.TotalPage = int.Parse(tb.PageCount.ToString()); } else { new8517PageList.Visible = false; ddlBindIndexHelpInfo.Visible = false; lbInfo.Visible = true; lbInfo.Text = "此类别还没有帮助主题呢!!"; } } }
private void BindUpdateHelp() { L_ShowHelpInfo helpinfo = help.GetBindHelp(helpID); if (helpinfo == null) { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("帮助主题不存在,请您重新选择!")); } txtHelpTitle.Text = helpinfo.HelpTitle; txtContent.Text = helpinfo.HelpCntent; }
protected void Page_Load(object sender, EventArgs e) { if (subTool.CheckAdminLogin("20")) { adminID = WebUnitily.CheckInt(mycookie.getCookiesValue("shop8517Admin", "adminType")); if (!IsPostBack) { BindIndexyifahuo(); } } }
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 bindDataInfo(Int32 Id) { bInfo = new BulletionInfo().GetBulletinInfo(Id, 0); if (bInfo != null) { } else { Response.Write(WebUnitily.AlertUrl("请选择产品", "/")); Response.End(); } }
protected void Page_Load(object sender, EventArgs e) { classID = WebUnitily.CheckInt(Request["ClassId"]); bindClassList(); if (Request.QueryString["Order"] == null) { } else { order = Request.QueryString["Order"].ToString(); } }
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(); }
private void BindUpdateBulletin() { L_BulletionInfo bulletion = new BulletionInfo().GetBulletinInfo(bulletinID, 0); if (bulletion == null) { Response.Write(WebUnitily.AlertUrl("信息不存在,请您重新选择")); Response.End(); } txtTitle.Text = bulletion.BulletinTitle; txtContent.Text = bulletion.BulletinContent; }
protected void ibtnlogin_Click(object sender, ImageClickEventArgs e) { string LoginName, userPwd, userIP, loginResult; Int32 LoginType; string codeValue = txtCodeNum.Text.Trim().ToLower(); if (Session["validateNum"].ToString().ToLower() != codeValue) { Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('您的验证码有误,请重新输入!');</script>"); } else { userPwd = Stringhelp.MD5String(txtPassword.Text.Trim()); LoginType = Int32.Parse(ddlLoginType.SelectedValue); userIP = Stringhelp.GetClientUp(); switch (LoginType) { case 1: LoginName = txtUserName.Text.Trim(); break; case 2: LoginName = txtUserName.Text.Trim(); break; default: LoginName = txtUserName.Text.Trim(); break; } loginResult = Loginhelp.GetUserLogin(LoginName, userPwd, LoginType, userIP); if (string.IsNullOrEmpty(loginResult)) { string gotoUrl = txtbackUrl.Text.Trim(); if (gotoUrl == "") { Response.Redirect("~/proscenium/Index.aspx", true); } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("登录成功!", gotoUrl)); } } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("登录失败,原因是:" + loginResult + "!")); } } this.txtCodeNum.Text = ""; this.txtUserName.Text = ""; }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { Int32 Id = WebUnitily.CheckInt(Request["Id"]); if (Id == 0) { Response.Write(WebUnitily.AlertUrl("请选择产品", "/")); Response.End(); } bindDataInfo(Id); } }
protected void Page_Load(object sender, EventArgs e) { if (subTool.CheckUserLogin("-1")) { userID = WebUnitily.CheckInt(mycookie.getCookiesValue("shop8517User", "userID")); if (!IsPostBack) { BindIndexHotShopping(); BindDataListShoppingRar(); BindAcceptAddrList(); } } }
protected void btnAddCategory_Click(object sender, EventArgs e) { L_CategoryInfo info = new L_CategoryInfo(); info.ProductCategoryName = txtCategoryName.Text; info.CategoryDepth = Convert.ToInt32(ddlLevel.SelectedValue.Split(',')[0]) + 1; info.ParentID = Convert.ToInt32(ddlLevel.SelectedValue.Split(',')[1]); if (category.InsertCategory(info)) { Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("添加类别成功")); ReSetPage(); } txtCategoryName.Text = ""; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { int infoID = WebUnitily.CheckInt(Request["helpID"]); if (infoID == 0) { Response.Write(WebUnitily.AlertUrl("请您选择帮助主题", "HelpList.aspx")); Response.End(); } BindIndexHelpTitle(); BindHelpInfo(infoID); } }