add.aspx.cs.svn-base
来自「走吧旅游网站前后台源代码」· SVN-BASE 代码 · 共 62 行
SVN-BASE
62 行
using 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 LTP.Common;
namespace Maticsoft.Web.AirlineOrderMan
{
public partial class Add : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Page_LoadComplete(object sender, EventArgs e)
{
(Master.FindControl("lblTitle") as Label).Text = "信息添加";
}
protected void btnAdd_Click(object sender, EventArgs e)
{
string strErr="";
if(this.txtDocumentsType.Text =="")
{
strErr+="DocumentsType不能为空!\\n";
}
if(this.txtDocumentsCode.Text =="")
{
strErr+="DocumentsCode不能为空!\\n";
}
if(!PageValidate.IsNumber(txtBuyInsurance.Text))
{
strErr+="BuyInsurance不是数字!\\n";
}
if(strErr!="")
{
MessageBox.Show(this,strErr);
return;
}
string DocumentsType=this.txtDocumentsType.Text;
string DocumentsCode=this.txtDocumentsCode.Text;
int BuyInsurance=int.Parse(this.txtBuyInsurance.Text);
Maticsoft.Model.AirlineOrderMan model=new Maticsoft.Model.AirlineOrderMan();
model.DocumentsType=DocumentsType;
model.DocumentsCode=DocumentsCode;
model.BuyInsurance=BuyInsurance;
Maticsoft.BLL.AirlineOrderMan bll=new Maticsoft.BLL.AirlineOrderMan();
bll.Add(model);
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?