modify.aspx.cs.svn-base
来自「走吧旅游网站前后台源代码」· SVN-BASE 代码 · 共 262 行
SVN-BASE
262 行
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.AirlineOrderH
{
public partial class Modify : System.Web.UI.Page
{
protected void Page_LoadComplete(object sender, EventArgs e)
{
(Master.FindControl("lblTitle") as Label).Text = "信息修改";
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
if (Request.Params["id"] != null || Request.Params["id"].Trim() != "")
{
string id = Request.Params["id"];
ShowInfo(int.Parse(id));
}
}
}
private void ShowInfo(string OrderNo)
{
Maticsoft.BLL.AirlineOrderH bll=new Maticsoft.BLL.AirlineOrderH();
Maticsoft.Model.AirlineOrderH model=bll.GetModel(OrderNo);
this.lblOrderNo.Text=model.OrderNo;
this.txtAirlines.Text=model.Airlines;
this.txtFlights.Text=model.Flights;
this.txtVenderID.Text=model.VenderID;
this.txtTrip.Text=model.Trip;
this.txtStartTime.Text=model.StartTime;
this.txtEndTime.Text=model.EndTime;
this.txtPassengersType.Text=model.PassengersType;
this.txtPassengersAmount.Text=model.PassengersAmount.ToString();
this.txtRating.Text=model.Rating;
this.txtDiscount.Text=model.Discount.ToString();
this.txtBaseBuildMoney.Text=model.BaseBuildMoney.ToString();
this.txtFuelMoney.Text=model.FuelMoney.ToString();
this.txtFullPrice.Text=model.FullPrice.ToString();
this.txtAgioPrice.Text=model.AgioPrice.ToString();
this.txtTotalPrice.Text=model.TotalPrice.ToString();
this.txtManAmount.Text=model.ManAmount.ToString();
this.txtLinkMan.Text=model.LinkMan;
this.txtPhone1.Text=model.Phone1;
this.txtPhone2.Text=model.Phone2;
this.txtFax.Text=model.Fax;
this.txtEmail.Text=model.Email;
this.txtConfirmMethods.Text=model.ConfirmMethods;
this.txtOutVotesType.Text=model.OutVotesType;
this.txtSendType.Text=model.SendType;
this.txtPayMethods.Text=model.PayMethods;
this.txtRemark.Text=model.Remark;
this.txtSendAddress.Text=model.SendAddress;
this.txtSendDate.Text=model.SendDate;
this.txtCustomerID.Text=model.CustomerID;
}
protected void btnAdd_Click(object sender, EventArgs e)
{
string strErr="";
if(this.txtAirlines.Text =="")
{
strErr+="Airlines不能为空!\\n";
}
if(this.txtFlights.Text =="")
{
strErr+="Flights不能为空!\\n";
}
if(this.txtVenderID.Text =="")
{
strErr+="VenderID不能为空!\\n";
}
if(this.txtTrip.Text =="")
{
strErr+="Trip不能为空!\\n";
}
if(this.txtStartTime.Text =="")
{
strErr+="StartTime不能为空!\\n";
}
if(this.txtEndTime.Text =="")
{
strErr+="EndTime不能为空!\\n";
}
if(this.txtPassengersType.Text =="")
{
strErr+="PassengersType不能为空!\\n";
}
if(!PageValidate.IsNumber(txtPassengersAmount.Text))
{
strErr+="PassengersAmount不是数字!\\n";
}
if(this.txtRating.Text =="")
{
strErr+="Rating不能为空!\\n";
}
if(!PageValidate.IsDecimal(txtDiscount.Text))
{
strErr+="Discount不是数字!\\n";
}
if(!PageValidate.IsDecimal(txtBaseBuildMoney.Text))
{
strErr+="BaseBuildMoney不是数字!\\n";
}
if(!PageValidate.IsDecimal(txtFuelMoney.Text))
{
strErr+="FuelMoney不是数字!\\n";
}
if(!PageValidate.IsDecimal(txtFullPrice.Text))
{
strErr+="FullPrice不是数字!\\n";
}
if(!PageValidate.IsDecimal(txtAgioPrice.Text))
{
strErr+="AgioPrice不是数字!\\n";
}
if(!PageValidate.IsDecimal(txtTotalPrice.Text))
{
strErr+="TotalPrice不是数字!\\n";
}
if(!PageValidate.IsNumber(txtManAmount.Text))
{
strErr+="ManAmount不是数字!\\n";
}
if(this.txtLinkMan.Text =="")
{
strErr+="LinkMan不能为空!\\n";
}
if(this.txtPhone1.Text =="")
{
strErr+="Phone1不能为空!\\n";
}
if(this.txtPhone2.Text =="")
{
strErr+="Phone2不能为空!\\n";
}
if(this.txtFax.Text =="")
{
strErr+="Fax不能为空!\\n";
}
if(this.txtEmail.Text =="")
{
strErr+="Email不能为空!\\n";
}
if(this.txtConfirmMethods.Text =="")
{
strErr+="ConfirmMethods不能为空!\\n";
}
if(this.txtOutVotesType.Text =="")
{
strErr+="OutVotesType不能为空!\\n";
}
if(this.txtSendType.Text =="")
{
strErr+="SendType不能为空!\\n";
}
if(this.txtPayMethods.Text =="")
{
strErr+="PayMethods不能为空!\\n";
}
if(this.txtRemark.Text =="")
{
strErr+="Remark不能为空!\\n";
}
if(this.txtSendAddress.Text =="")
{
strErr+="SendAddress不能为空!\\n";
}
if(this.txtSendDate.Text =="")
{
strErr+="SendDate不能为空!\\n";
}
if(this.txtCustomerID.Text =="")
{
strErr+="CustomerID不能为空!\\n";
}
if(strErr!="")
{
MessageBox.Show(this,strErr);
return;
}
string Airlines=this.txtAirlines.Text;
string Flights=this.txtFlights.Text;
string VenderID=this.txtVenderID.Text;
string Trip=this.txtTrip.Text;
string StartTime=this.txtStartTime.Text;
string EndTime=this.txtEndTime.Text;
string PassengersType=this.txtPassengersType.Text;
int PassengersAmount=int.Parse(this.txtPassengersAmount.Text);
string Rating=this.txtRating.Text;
decimal Discount=decimal.Parse(this.txtDiscount.Text);
decimal BaseBuildMoney=decimal.Parse(this.txtBaseBuildMoney.Text);
decimal FuelMoney=decimal.Parse(this.txtFuelMoney.Text);
decimal FullPrice=decimal.Parse(this.txtFullPrice.Text);
decimal AgioPrice=decimal.Parse(this.txtAgioPrice.Text);
decimal TotalPrice=decimal.Parse(this.txtTotalPrice.Text);
int ManAmount=int.Parse(this.txtManAmount.Text);
string LinkMan=this.txtLinkMan.Text;
string Phone1=this.txtPhone1.Text;
string Phone2=this.txtPhone2.Text;
string Fax=this.txtFax.Text;
string Email=this.txtEmail.Text;
string ConfirmMethods=this.txtConfirmMethods.Text;
string OutVotesType=this.txtOutVotesType.Text;
string SendType=this.txtSendType.Text;
string PayMethods=this.txtPayMethods.Text;
string Remark=this.txtRemark.Text;
string SendAddress=this.txtSendAddress.Text;
string SendDate=this.txtSendDate.Text;
string CustomerID=this.txtCustomerID.Text;
Maticsoft.Model.AirlineOrderH model=new Maticsoft.Model.AirlineOrderH();
model.Airlines=Airlines;
model.Flights=Flights;
model.VenderID=VenderID;
model.Trip=Trip;
model.StartTime=StartTime;
model.EndTime=EndTime;
model.PassengersType=PassengersType;
model.PassengersAmount=PassengersAmount;
model.Rating=Rating;
model.Discount=Discount;
model.BaseBuildMoney=BaseBuildMoney;
model.FuelMoney=FuelMoney;
model.FullPrice=FullPrice;
model.AgioPrice=AgioPrice;
model.TotalPrice=TotalPrice;
model.ManAmount=ManAmount;
model.LinkMan=LinkMan;
model.Phone1=Phone1;
model.Phone2=Phone2;
model.Fax=Fax;
model.Email=Email;
model.ConfirmMethods=ConfirmMethods;
model.OutVotesType=OutVotesType;
model.SendType=SendType;
model.PayMethods=PayMethods;
model.Remark=Remark;
model.SendAddress=SendAddress;
model.SendDate=SendDate;
model.CustomerID=CustomerID;
Maticsoft.BLL.AirlineOrderH bll=new Maticsoft.BLL.AirlineOrderH();
bll.Update(model);
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?