日期:2014-05-17 浏览次数:20795 次
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.IO;
using visa.Models;
using visa.BLL;
using visa.DAL;
public partial class systemadmin_tab_visaAdd : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
int id = Convert.ToInt32(Request.QueryString["lei"].ToString());
Td_Region region = Td_RegionManager.GetTd_RegionByRegionId(id);
Label1.Text = region.FK_Country.CouName + "-" + region.RegionName;
ViewState["regionid"] = id.ToString();
}
}
protected void BtnAdd_Click(object sender, EventArgs e)
{
Td_Visa visa = new Td_Visa();
visa.VisaName = TxtTitle.Text;
visa.VisaPrice = TxtPrice.Text;
visa.VisaCb = TxtCb.Text;
visa.VisaTh = TxtTh.Text;
visa.VisaStop = TxtStop.Text;
visa.VisaFanwei = Txtfw.Text;
visa.VisaRegionId = Convert.ToInt32(ViewState["regionid"].ToString());
visa.VisaIntro = TxtContent.Text;
visa.VisaMark = TxtMark.Text;
if (CheckBox1.Checked == true)
{
visa.VisaType = "2";
}
if (CheckBox1.Checked == false)
{
visa.VisaType = "1";
}
visa.VisaSqys = Txtsqys.Text;
visa.VisaTime = TxtTime.Text;
if (yqh1.Checked == true)