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

📄 tourismproh.cs.svn-base

📁 走吧旅游网站前后台源代码
💻 SVN-BASE
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
using Maticsoft.DBUtility;//请先添加引用
namespace Maticsoft.DAL
{
	/// <summary>
	/// 数据访问类TourismProH。
	/// </summary>
	public class TourismProH
	{
		public TourismProH()
		{}
		#region  成员方法

		/// <summary>
		/// 是否存在该记录
		/// </summary>
		public bool Exists(string LinesProID)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select count(1) from TourismProH");
			strSql.Append(" where LinesProID=@LinesProID ");
			SqlParameter[] parameters = {
					new SqlParameter("@LinesProID", SqlDbType.NVarChar,50)};
			parameters[0].Value = LinesProID;

			return DbHelperSQL.Exists(strSql.ToString(),parameters);
		}


		/// <summary>
		/// 增加一条数据
		/// </summary>
		public void Add(Maticsoft.Model.TourismProH model)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("insert into TourismProH(");
			strSql.Append("LinesProID,LinesID,ReceiveCityID,LinesProName,LinesProType,LinesProGroup,TeamCode,DayAmount,OutTeamDate,OutTeamTime,ReBackTeamDate,ReBackTeamTime,OverDate,SendTeamPlan,ReturnRules,Insurance,AmountMan,LeastAmountMan,OutTraffic,ReBackTraffic,EmergancyPhone,SalesAuthority,RecUserID,RecDate,State,OutCityID,InCityID,Traffic,ShopManPrice,PeerManPrice,InterManPrice,ShopChildrenPrice,PeerChildrenPrice,InterChildrenPrice,SetAddres)");
			strSql.Append(" values (");
			strSql.Append("@LinesProID,@LinesID,@ReceiveCityID,@LinesProName,@LinesProType,@LinesProGroup,@TeamCode,@DayAmount,@OutTeamDate,@OutTeamTime,@ReBackTeamDate,@ReBackTeamTime,@OverDate,@SendTeamPlan,@ReturnRules,@Insurance,@AmountMan,@LeastAmountMan,@OutTraffic,@ReBackTraffic,@EmergancyPhone,@SalesAuthority,@RecUserID,@RecDate,@State,@OutCityID,@InCityID,@Traffic,@ShopManPrice,@PeerManPrice,@InterManPrice,@ShopChildrenPrice,@PeerChildrenPrice,@InterChildrenPrice,@SetAddres)");
			SqlParameter[] parameters = {
					new SqlParameter("@LinesProID", SqlDbType.NVarChar,12),
					new SqlParameter("@LinesID", SqlDbType.NVarChar,12),
					new SqlParameter("@ReceiveCityID", SqlDbType.NVarChar,12),
					new SqlParameter("@LinesProName", SqlDbType.NVarChar,100),
					new SqlParameter("@LinesProType", SqlDbType.NVarChar,10),
					new SqlParameter("@LinesProGroup", SqlDbType.NVarChar,20),
					new SqlParameter("@TeamCode", SqlDbType.NVarChar,20),
					new SqlParameter("@DayAmount", SqlDbType.Int,4),
					new SqlParameter("@OutTeamDate", SqlDbType.NVarChar,10),
					new SqlParameter("@OutTeamTime", SqlDbType.NVarChar,5),
					new SqlParameter("@ReBackTeamDate", SqlDbType.NVarChar,10),
					new SqlParameter("@ReBackTeamTime", SqlDbType.NVarChar,5),
					new SqlParameter("@OverDate", SqlDbType.NVarChar,10),
					new SqlParameter("@SendTeamPlan", SqlDbType.NVarChar,100),
					new SqlParameter("@ReturnRules", SqlDbType.NVarChar,100),
					new SqlParameter("@Insurance", SqlDbType.NVarChar,100),
					new SqlParameter("@AmountMan", SqlDbType.Int,4),
					new SqlParameter("@LeastAmountMan", SqlDbType.Int,4),
					new SqlParameter("@OutTraffic", SqlDbType.NVarChar,20),
					new SqlParameter("@ReBackTraffic", SqlDbType.NVarChar,20),
					new SqlParameter("@EmergancyPhone", SqlDbType.NVarChar,30),
					new SqlParameter("@SalesAuthority", SqlDbType.NVarChar,30),
					new SqlParameter("@RecUserID", SqlDbType.NVarChar,12),
					new SqlParameter("@RecDate", SqlDbType.DateTime),
					new SqlParameter("@State", SqlDbType.Int,4),
					new SqlParameter("@OutCityID", SqlDbType.NVarChar,12),
					new SqlParameter("@InCityID", SqlDbType.NVarChar,12),
					new SqlParameter("@Traffic", SqlDbType.NVarChar,200),
					new SqlParameter("@ShopManPrice", SqlDbType.Decimal,9),
					new SqlParameter("@PeerManPrice", SqlDbType.Decimal,9),
					new SqlParameter("@InterManPrice", SqlDbType.Decimal,9),
					new SqlParameter("@ShopChildrenPrice", SqlDbType.Decimal,9),
					new SqlParameter("@PeerChildrenPrice", SqlDbType.Decimal,9),
					new SqlParameter("@InterChildrenPrice", SqlDbType.Decimal,9),
					new SqlParameter("@SetAddres", SqlDbType.NVarChar,200)};
			parameters[0].Value = model.LinesProID;
			parameters[1].Value = model.LinesID;
			parameters[2].Value = model.ReceiveCityID;
			parameters[3].Value = model.LinesProName;
			parameters[4].Value = model.LinesProType;
			parameters[5].Value = model.LinesProGroup;
			parameters[6].Value = model.TeamCode;
			parameters[7].Value = model.DayAmount;
			parameters[8].Value = model.OutTeamDate;
			parameters[9].Value = model.OutTeamTime;
			parameters[10].Value = model.ReBackTeamDate;
			parameters[11].Value = model.ReBackTeamTime;
			parameters[12].Value = model.OverDate;
			parameters[13].Value = model.SendTeamPlan;
			parameters[14].Value = model.ReturnRules;
			parameters[15].Value = model.Insurance;
			parameters[16].Value = model.AmountMan;
			parameters[17].Value = model.LeastAmountMan;
			parameters[18].Value = model.OutTraffic;
			parameters[19].Value = model.ReBackTraffic;
			parameters[20].Value = model.EmergancyPhone;
			parameters[21].Value = model.SalesAuthority;
			parameters[22].Value = model.RecUserID;
			parameters[23].Value = model.RecDate;
			parameters[24].Value = model.State;
			parameters[25].Value = model.OutCityID;
			parameters[26].Value = model.InCityID;
			parameters[27].Value = model.Traffic;
			parameters[28].Value = model.ShopManPrice;
			parameters[29].Value = model.PeerManPrice;
			parameters[30].Value = model.InterManPrice;
			parameters[31].Value = model.ShopChildrenPrice;
			parameters[32].Value = model.PeerChildrenPrice;
			parameters[33].Value = model.InterChildrenPrice;
			parameters[34].Value = model.SetAddres;

			DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
		}
		/// <summary>
		/// 更新一条数据
		/// </summary>
		public void Update(Maticsoft.Model.TourismProH model)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("update TourismProH set ");
			strSql.Append("LinesID=@LinesID,");
			strSql.Append("ReceiveCityID=@ReceiveCityID,");
			strSql.Append("LinesProName=@LinesProName,");
			strSql.Append("LinesProType=@LinesProType,");
			strSql.Append("LinesProGroup=@LinesProGroup,");
			strSql.Append("TeamCode=@TeamCode,");
			strSql.Append("DayAmount=@DayAmount,");
			strSql.Append("OutTeamDate=@OutTeamDate,");
			strSql.Append("OutTeamTime=@OutTeamTime,");
			strSql.Append("ReBackTeamDate=@ReBackTeamDate,");
			strSql.Append("ReBackTeamTime=@ReBackTeamTime,");
			strSql.Append("OverDate=@OverDate,");
			strSql.Append("SendTeamPlan=@SendTeamPlan,");
			strSql.Append("ReturnRules=@ReturnRules,");
			strSql.Append("Insurance=@Insurance,");
			strSql.Append("AmountMan=@AmountMan,");
			strSql.Append("LeastAmountMan=@LeastAmountMan,");
			strSql.Append("OutTraffic=@OutTraffic,");
			strSql.Append("ReBackTraffic=@ReBackTraffic,");
			strSql.Append("EmergancyPhone=@EmergancyPhone,");
			strSql.Append("SalesAuthority=@SalesAuthority,");
			strSql.Append("RecUserID=@RecUserID,");
			strSql.Append("RecDate=@RecDate,");
			strSql.Append("State=@State,");
			strSql.Append("OutCityID=@OutCityID,");
			strSql.Append("InCityID=@InCityID,");
			strSql.Append("Traffic=@Traffic,");
			strSql.Append("ShopManPrice=@ShopManPrice,");
			strSql.Append("PeerManPrice=@PeerManPrice,");
			strSql.Append("InterManPrice=@InterManPrice,");
			strSql.Append("ShopChildrenPrice=@ShopChildrenPrice,");
			strSql.Append("PeerChildrenPrice=@PeerChildrenPrice,");
			strSql.Append("InterChildrenPrice=@InterChildrenPrice,");
			strSql.Append("SetAddres=@SetAddres");
			strSql.Append(" where LinesProID=@LinesProID ");
			SqlParameter[] parameters = {
					new SqlParameter("@LinesProID", SqlDbType.NVarChar,12),
					new SqlParameter("@LinesID", SqlDbType.NVarChar,12),
					new SqlParameter("@ReceiveCityID", SqlDbType.NVarChar,12),
					new SqlParameter("@LinesProName", SqlDbType.NVarChar,100),
					new SqlParameter("@LinesProType", SqlDbType.NVarChar,10),
					new SqlParameter("@LinesProGroup", SqlDbType.NVarChar,20),
					new SqlParameter("@TeamCode", SqlDbType.NVarChar,20),
					new SqlParameter("@DayAmount", SqlDbType.Int,4),
					new SqlParameter("@OutTeamDate", SqlDbType.NVarChar,10),
					new SqlParameter("@OutTeamTime", SqlDbType.NVarChar,5),
					new SqlParameter("@ReBackTeamDate", SqlDbType.NVarChar,10),
					new SqlParameter("@ReBackTeamTime", SqlDbType.NVarChar,5),
					new SqlParameter("@OverDate", SqlDbType.NVarChar,10),
					new SqlParameter("@SendTeamPlan", SqlDbType.NVarChar,100),
					new SqlParameter("@ReturnRules", SqlDbType.NVarChar,100),
					new SqlParameter("@Insurance", SqlDbType.NVarChar,100),
					new SqlParameter("@AmountMan", SqlDbType.Int,4),
					new SqlParameter("@LeastAmountMan", SqlDbType.Int,4),
					new SqlParameter("@OutTraffic", SqlDbType.NVarChar,20),
					new SqlParameter("@ReBackTraffic", SqlDbType.NVarChar,20),
					new SqlParameter("@EmergancyPhone", SqlDbType.NVarChar,30),
					new SqlParameter("@SalesAuthority", SqlDbType.NVarChar,30),
					new SqlParameter("@RecUserID", SqlDbType.NVarChar,12),
					new SqlParameter("@RecDate", SqlDbType.DateTime),
					new SqlParameter("@State", SqlDbType.Int,4),
					new SqlParameter("@OutCityID", SqlDbType.NVarChar,12),
					new SqlParameter("@InCityID", SqlDbType.NVarChar,12),
					new SqlParameter("@Traffic", SqlDbType.NVarChar,200),
					new SqlParameter("@ShopManPrice", SqlDbType.Decimal,9),
					new SqlParameter("@PeerManPrice", SqlDbType.Decimal,9),
					new SqlParameter("@InterManPrice", SqlDbType.Decimal,9),
					new SqlParameter("@ShopChildrenPrice", SqlDbType.Decimal,9),
					new SqlParameter("@PeerChildrenPrice", SqlDbType.Decimal,9),
					new SqlParameter("@InterChildrenPrice", SqlDbType.Decimal,9),

⌨️ 快捷键说明

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