using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using System.Xml;
using System.Reflection;
using System.Configuration;
using ESpace.DALibrary.SqlServer;
using ESpace.DALibrary;

namespace AVC.DataAccess
{
	public class TrainRecordInsert : DataAccessBase
	{
		public TrainRecordInsert()
		{
			base.EncryptMethod = Alogrim.SymmProvEnum.TripleDES;
			base.Key = "123";
			base.IV = "abc";
			ConnectionString = ConfigurationManager.AppSettings["kygl2"];
			base.InitCommand("[dbo].[TrainRecordInsert]");
			ConfigParameter();
		}

		private SqlParameter paramID;
		public System.Int32 ID
		{
			get
			{
				return (System.Int32)paramID.Value;
			}
			set
			{
				paramID.Value = value;
			}
		}

		private SqlParameter paramTrainName;
		public System.String TrainName
		{
			get
			{
				return (System.String)paramTrainName.Value;
			}
			set
			{
				paramTrainName.Value = value;
			}
		}

		private SqlParameter paramTrainDate;
		public System.DateTime TrainDate
		{
			get
			{
				return (System.DateTime)paramTrainDate.Value;
			}
			set
			{
				paramTrainDate.Value = value;
			}
		}

		private SqlParameter paramTrainResult;
		public System.Double TrainResult
		{
			get
			{
				return (System.Double)paramTrainResult.Value;
			}
			set
			{
				paramTrainResult.Value = value;
			}
		}

		private SqlParameter paramEmployeeID;
		public System.Int32 EmployeeID
		{
			get
			{
				return (System.Int32)paramEmployeeID.Value;
			}
			set
			{
				paramEmployeeID.Value = value;
			}
		}

		private SqlParameter paramEmployeeName;
		public System.String EmployeeName
		{
			get
			{
				return (System.String)paramEmployeeName.Value;
			}
			set
			{
				paramEmployeeName.Value = value;
			}
		}

		public void ConfigParameter()
		{
			//--------------------------------------------------------
			paramID = new SqlParameter();
			paramID.ParameterName = "@ID";
			paramID.SqlDbType = SqlDbType.Int;
			paramID.Precision = 10;
			paramID.Scale = 0;
			paramID.Direction = ParameterDirection.InputOutput;
			paramID.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramID);
			//--------------------------------------------------------
			paramTrainName = new SqlParameter();
			paramTrainName.ParameterName = "@TrainName";
			paramTrainName.SqlDbType = SqlDbType.VarChar;
			paramTrainName.Size = 50;
			paramTrainName.Direction = ParameterDirection.Input;
			paramTrainName.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramTrainName);
			//--------------------------------------------------------
			paramTrainDate = new SqlParameter();
			paramTrainDate.ParameterName = "@TrainDate";
			paramTrainDate.SqlDbType = SqlDbType.DateTime;
			paramTrainDate.Size = 16;
			paramTrainDate.Scale = 3;
			paramTrainDate.Direction = ParameterDirection.Input;
			paramTrainDate.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramTrainDate);
			//--------------------------------------------------------
			paramTrainResult = new SqlParameter();
			paramTrainResult.ParameterName = "@TrainResult";
			paramTrainResult.SqlDbType = SqlDbType.Float;
			paramTrainResult.Precision = 15;
			paramTrainResult.Direction = ParameterDirection.Input;
			paramTrainResult.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramTrainResult);
			//--------------------------------------------------------
			paramEmployeeID = new SqlParameter();
			paramEmployeeID.ParameterName = "@EmployeeID";
			paramEmployeeID.SqlDbType = SqlDbType.Int;
			paramEmployeeID.Precision = 10;
			paramEmployeeID.Scale = 0;
			paramEmployeeID.Direction = ParameterDirection.Input;
			paramEmployeeID.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramEmployeeID);
			//--------------------------------------------------------
			paramEmployeeName = new SqlParameter();
			paramEmployeeName.ParameterName = "@EmployeeName";
			paramEmployeeName.SqlDbType = SqlDbType.VarChar;
			paramEmployeeName.Size = 50;
			paramEmployeeName.Direction = ParameterDirection.Input;
			paramEmployeeName.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramEmployeeName);
		}
	}
}