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 OptionalValueInsert : DataAccessBase
	{
		public OptionalValueInsert()
		{
			base.EncryptMethod = Alogrim.SymmProvEnum.TripleDES;
			base.Key = "123";
			base.IV = "abc";
			ConnectionString = ConfigurationManager.AppSettings["kygl2"];
			base.InitCommand("[dbo].[OptionalValueInsert]");
			ConfigParameter();
		}

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

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

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

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

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

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

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

		private SqlParameter paramFlag;
		public System.Int16 Flag
		{
			get
			{
				return (System.Int16)paramFlag.Value;
			}
			set
			{
				paramFlag.Value = value;
			}
		}

		private SqlParameter paramFlagDateTime;
		public System.DateTime FlagDateTime
		{
			get
			{
				return (System.DateTime)paramFlagDateTime.Value;
			}
			set
			{
				paramFlagDateTime.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);
			//--------------------------------------------------------
			paramText = new SqlParameter();
			paramText.ParameterName = "@Text";
			paramText.SqlDbType = SqlDbType.VarChar;
			paramText.Size = 50;
			paramText.Direction = ParameterDirection.Input;
			paramText.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramText);
			//--------------------------------------------------------
			paramValue = new SqlParameter();
			paramValue.ParameterName = "@Value";
			paramValue.SqlDbType = SqlDbType.VarChar;
			paramValue.Size = 50;
			paramValue.Direction = ParameterDirection.Input;
			paramValue.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramValue);
			//--------------------------------------------------------
			paramDescription = new SqlParameter();
			paramDescription.ParameterName = "@Description";
			paramDescription.SqlDbType = SqlDbType.VarChar;
			paramDescription.Size = 50;
			paramDescription.Direction = ParameterDirection.Input;
			paramDescription.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramDescription);
			//--------------------------------------------------------
			paramCreateUser = new SqlParameter();
			paramCreateUser.ParameterName = "@CreateUser";
			paramCreateUser.SqlDbType = SqlDbType.VarChar;
			paramCreateUser.Size = 50;
			paramCreateUser.Direction = ParameterDirection.Input;
			paramCreateUser.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramCreateUser);
			//--------------------------------------------------------
			paramUpdateUser = new SqlParameter();
			paramUpdateUser.ParameterName = "@UpdateUser";
			paramUpdateUser.SqlDbType = SqlDbType.VarChar;
			paramUpdateUser.Size = 50;
			paramUpdateUser.Direction = ParameterDirection.Input;
			paramUpdateUser.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramUpdateUser);
			//--------------------------------------------------------
			paramUpdateDateTime = new SqlParameter();
			paramUpdateDateTime.ParameterName = "@UpdateDateTime";
			paramUpdateDateTime.SqlDbType = SqlDbType.DateTime;
			paramUpdateDateTime.Size = 16;
			paramUpdateDateTime.Scale = 3;
			paramUpdateDateTime.Direction = ParameterDirection.Input;
			paramUpdateDateTime.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramUpdateDateTime);
			//--------------------------------------------------------
			paramFlag = new SqlParameter();
			paramFlag.ParameterName = "@Flag";
			paramFlag.SqlDbType = SqlDbType.SmallInt;
			paramFlag.Precision = 5;
			paramFlag.Scale = 0;
			paramFlag.Direction = ParameterDirection.Input;
			paramFlag.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramFlag);
			//--------------------------------------------------------
			paramFlagDateTime = new SqlParameter();
			paramFlagDateTime.ParameterName = "@FlagDateTime";
			paramFlagDateTime.SqlDbType = SqlDbType.DateTime;
			paramFlagDateTime.Size = 16;
			paramFlagDateTime.Scale = 3;
			paramFlagDateTime.Direction = ParameterDirection.Input;
			paramFlagDateTime.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramFlagDateTime);
		}
	}
}