SenBiTeSolution.UI/ManageWeb/UpdateProductType.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SenBiTeSolution.Common;
using SenBiTeSolution.DAL;
namespace SenBiTeSolution.UI.ManageWeb
{
public partial class UpdateProductType : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (!string.IsNullOrEmpty(Request.QueryString["updateId"]))
{
int updateId = Convert.ToInt32(Request.QueryString["updateId"]);
tbl_ProductType productType = new tbl_ProductType();
SenBiTeSolution.Model.tbl_ProductType productTypeModel = productType.GetProductTypeModel(updateId);
txt_TypeName.Text = productTypeModel.TypeName;
txt_OrderNum.Text = productTypeModel.SordNO.ToString();
}
}
}
//修改
protected void btn_Update_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(txt_TypeName.Text.Trim()) || string.IsNullOrEmpty(txt_OrderNum.Text.Trim()))
{
MessageBox.Show(this.Page, "产品分类和排序号不允许为空!");
return;
}
if (!string.IsNullOrEmpty(Request.QueryString["updateId"]))
{
tbl_ProductType productType = new tbl_ProductType();
SenBiTeSolution.Model.tbl_ProductType productTypeModel = new Model.tbl_ProductType();
productTypeModel.ID = Convert.ToInt32(Request.QueryString["updateId"]);
productTypeModel.TypeName = txt_TypeName.Text.Trim();
productTypeModel.SordNO = Convert.ToInt32(txt_OrderNum.Text.Trim());
productTypeModel.CreateDate = System.DateTime.Now.ToString();
int rows = productType.UpdateProductType(productTypeModel);
if (rows>0)
{
Response.Redirect("ProductType.aspx");
}
else
{
MessageBox.Show(this.Page, "修改失败!");
}
}
else
{
MessageBox.Show(this.Page, "修改出现错误!");
后面还有 4 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。