⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 add.aspx.cs.svn-base

📁 走吧旅游网站前后台源代码
💻 SVN-BASE
字号:
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.HotelOrder
{
    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.txtHotelID.Text =="")
	{
		strErr+="HotelID不能为空!\\n";	
	}
	if(this.txtIndate.Text =="")
	{
		strErr+="Indate不能为空!\\n";	
	}
	if(this.txtOutdate.Text =="")
	{
		strErr+="Outdate不能为空!\\n";	
	}
	if(this.txtPayMethods.Text =="")
	{
		strErr+="PayMethods不能为空!\\n";	
	}
	if(this.txtRoomTrait.Text =="")
	{
		strErr+="RoomTrait不能为空!\\n";	
	}
	if(this.txtLocalFloor.Text =="")
	{
		strErr+="LocalFloor不能为空!\\n";	
	}
	if(!PageValidate.IsDecimal(txtBreakfastPrice1.Text))
	{
		strErr+="BreakfastPrice1不是数字!\\n";	
	}
	if(!PageValidate.IsDecimal(txtBreakfastPrice2.Text))
	{
		strErr+="BreakfastPrice2不是数字!\\n";	
	}
	if(!PageValidate.IsDecimal(txtAddBedPrice.Text))
	{
		strErr+="AddBedPrice不是数字!\\n";	
	}
	if(!PageValidate.IsNumber(txtAdvance.Text))
	{
		strErr+="Advance不是数字!\\n";	
	}
	if(!PageValidate.IsNumber(txtInManAmount.Text))
	{
		strErr+="InManAmount不是数字!\\n";	
	}
	if(this.txtInPaper.Text =="")
	{
		strErr+="InPaper不能为空!\\n";	
	}
	if(this.txtInManName.Text =="")
	{
		strErr+="InManName不能为空!\\n";	
	}
	if(this.txtArriveEarlyDate.Text =="")
	{
		strErr+="ArriveEarlyDate不能为空!\\n";	
	}
	if(this.txtArriveLateDate.Text =="")
	{
		strErr+="ArriveLateDate不能为空!\\n";	
	}
	if(this.txtArriveMethods.Text =="")
	{
		strErr+="ArriveMethods不能为空!\\n";	
	}
	if(this.txtLinkMan.Text =="")
	{
		strErr+="LinkMan不能为空!\\n";	
	}
	if(this.txtConfirmedMethods.Text =="")
	{
		strErr+="ConfirmedMethods不能为空!\\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.txtRemark.Text =="")
	{
		strErr+="Remark不能为空!\\n";	
	}
	if(this.txtRoomType.Text =="")
	{
		strErr+="RoomType不能为空!\\n";	
	}
	if(!PageValidate.IsDecimal(txtAveragePrice.Text))
	{
		strErr+="AveragePrice不是数字!\\n";	
	}
	if(!PageValidate.IsNumber(txtOrderState.Text))
	{
		strErr+="OrderState不是数字!\\n";	
	}
	if(this.txtConfirmID.Text =="")
	{
		strErr+="ConfirmID不能为空!\\n";	
	}
	if(!PageValidate.IsDateTime(txtConfimDate.Text))
	{
		strErr+="ConfimDate不是时间格式!\\n";	
	}
	if(this.txtAccountConfirmID.Text =="")
	{
		strErr+="AccountConfirmID不能为空!\\n";	
	}
	if(!PageValidate.IsDateTime(txtAccountConfirmDate.Text))
	{
		strErr+="AccountConfirmDate不是时间格式!\\n";	
	}
	if(this.txtPlanConfirmID.Text =="")
	{
		strErr+="PlanConfirmID不能为空!\\n";	
	}
	if(!PageValidate.IsDateTime(txtPlanConfirmDate.Text))
	{
		strErr+="PlanConfirmDate不是时间格式!\\n";	
	}
	if(this.txtVenderID.Text =="")
	{
		strErr+="VenderID不能为空!\\n";	
	}

	if(strErr!="")
	{
		MessageBox.Show(this,strErr);
		return;
	}
	string HotelID=this.txtHotelID.Text;
	string Indate=this.txtIndate.Text;
	string Outdate=this.txtOutdate.Text;
	string PayMethods=this.txtPayMethods.Text;
	string RoomTrait=this.txtRoomTrait.Text;
	string LocalFloor=this.txtLocalFloor.Text;
	decimal BreakfastPrice1=decimal.Parse(this.txtBreakfastPrice1.Text);
	decimal BreakfastPrice2=decimal.Parse(this.txtBreakfastPrice2.Text);
	decimal AddBedPrice=decimal.Parse(this.txtAddBedPrice.Text);
	int Advance=int.Parse(this.txtAdvance.Text);
	int InManAmount=int.Parse(this.txtInManAmount.Text);
	string InPaper=this.txtInPaper.Text;
	string InManName=this.txtInManName.Text;
	string ArriveEarlyDate=this.txtArriveEarlyDate.Text;
	string ArriveLateDate=this.txtArriveLateDate.Text;
	string ArriveMethods=this.txtArriveMethods.Text;
	string LinkMan=this.txtLinkMan.Text;
	string ConfirmedMethods=this.txtConfirmedMethods.Text;
	string Phone1=this.txtPhone1.Text;
	string Phone2=this.txtPhone2.Text;
	string Fax=this.txtFax.Text;
	string Email=this.txtEmail.Text;
	string Remark=this.txtRemark.Text;
	string RoomType=this.txtRoomType.Text;
	decimal AveragePrice=decimal.Parse(this.txtAveragePrice.Text);
	int OrderState=int.Parse(this.txtOrderState.Text);
	string ConfirmID=this.txtConfirmID.Text;
	DateTime ConfimDate=DateTime.Parse(this.txtConfimDate.Text);
	string AccountConfirmID=this.txtAccountConfirmID.Text;
	DateTime AccountConfirmDate=DateTime.Parse(this.txtAccountConfirmDate.Text);
	string PlanConfirmID=this.txtPlanConfirmID.Text;
	DateTime PlanConfirmDate=DateTime.Parse(this.txtPlanConfirmDate.Text);
	string VenderID=this.txtVenderID.Text;


	Maticsoft.Model.HotelOrder model=new Maticsoft.Model.HotelOrder();
	model.HotelID=HotelID;
	model.Indate=Indate;
	model.Outdate=Outdate;
	model.PayMethods=PayMethods;
	model.RoomTrait=RoomTrait;
	model.LocalFloor=LocalFloor;
	model.BreakfastPrice1=BreakfastPrice1;
	model.BreakfastPrice2=BreakfastPrice2;
	model.AddBedPrice=AddBedPrice;
	model.Advance=Advance;
	model.InManAmount=InManAmount;
	model.InPaper=InPaper;
	model.InManName=InManName;
	model.ArriveEarlyDate=ArriveEarlyDate;
	model.ArriveLateDate=ArriveLateDate;
	model.ArriveMethods=ArriveMethods;
	model.LinkMan=LinkMan;
	model.ConfirmedMethods=ConfirmedMethods;
	model.Phone1=Phone1;
	model.Phone2=Phone2;
	model.Fax=Fax;
	model.Email=Email;
	model.Remark=Remark;
	model.RoomType=RoomType;
	model.AveragePrice=AveragePrice;
	model.OrderState=OrderState;
	model.ConfirmID=ConfirmID;
	model.ConfimDate=ConfimDate;
	model.AccountConfirmID=AccountConfirmID;
	model.AccountConfirmDate=AccountConfirmDate;
	model.PlanConfirmID=PlanConfirmID;
	model.PlanConfirmDate=PlanConfirmDate;
	model.VenderID=VenderID;
	Maticsoft.BLL.HotelOrder bll=new Maticsoft.BLL.HotelOrder();
	bll.Add(model);
		}

    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -