Web/Manage/kc_tab/Add_kc_tab.aspx.cs
(完整代码) 1KBusing System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using DS.BLL;
using DS.Model;
using DS.Common;
public partial class Add_kc_tab : System.Web.UI.Page
{
private DS.BLL.kc_tab bll=new DS.BLL.kc_tab();
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
((Label)Master.FindControl("titleMsg")).Text = "添加";
}
}
/// <summary>
/// 添加按钮事件
/// </summary>
protected void btnAdd_Click(object sender, EventArgs e)
{
//验证代码
try
{
DS.Model.kc_tab model=new DS.Model.kc_tab();
model.ypbh=txt_ypbh.Text;
model.sl=int.Parse(txt_sl.Text);
if(bll.Insert(model))
{
Msg.ShowAndRedirect("添加信息成功!","Manage_kc_tab.aspx");
}
else
{
Msg.Show("添加信息失败!");
}
}
catch(Exception exp)
{
Msg.Show("添加信息失败!原因:"+exp.Message);
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
