保健品销售网站 三层架构/WebUI/admin/EditGoods.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Entity;
using Business;
public partial class EditGoods : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string id = Request["id"];
GoodsBusiness goodsBusiness = new GoodsBusiness();
GoodsEntity goodsEntity = goodsBusiness.getGoodsById(id);
this.txtName.Text = goodsEntity.Name;
this.txtCateid.Text = goodsEntity.Cateid;
this.txtNationid.Text = goodsEntity.Nationid;
this.txtAreaid.Text = goodsEntity.Areaid;
this.txtWeights.Text = goodsEntity.Weights;
this.txtSizes.Text = goodsEntity.Sizes;
this.txtMarketprice.Text = goodsEntity.Marketprice;
this.txtNowprice.Text = goodsEntity.Nowprice;
this.txtRecommend.Text = goodsEntity.Recommend;
this.txtSpecial.Text = goodsEntity.Special;
this.txtImage.Text = goodsEntity.Image;
this.txtIntro.Text = goodsEntity.Intro;
}
}
protected void submit_Click(object sender, EventArgs e)
{
string id = Request["id"];
GoodsBusiness goodsBusiness = new GoodsBusiness();
GoodsEntity goodsEntity = new GoodsEntity();
goodsEntity.Id = id;
goodsEntity.Name = this.txtName.Text;
goodsEntity.Cateid = this.txtCateid.Text;
goodsEntity.Nationid = this.txtNationid.Text;
goodsEntity.Areaid = this.txtAreaid.Text;
goodsEntity.Weights = this.txtWeights.Text;
goodsEntity.Sizes = this.txtSizes.Text;
goodsEntity.Marketprice = this.txtMarketprice.Text;
goodsEntity.Nowprice = this.txtNowprice.Text;
goodsEntity.Recommend = this.txtRecommend.Text;
goodsEntity.Special = this.txtSpecial.Text;
goodsEntity.Image = this.txtImage.Text;
goodsEntity.Intro = this.txtIntro.Text;
goodsBusiness.UpdateGoods(goodsEntity);
Response.Redirect("ListGoods.aspx");
后面还有 3 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
