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.Passport.DataAccess
{
	public class GroupInsert : DataAccessBase
	{
		public GroupInsert()
		{
			base.EncryptMethod = Alogrim.SymmProvEnum.DES;
			base.Key = "1234";
			base.IV = "1234";
			ConnectionString = ConfigurationManager.AppSettings["Passport"];
			base.InitCommand("[dbo].[GroupInsert]");
			ConfigParameter();
		}

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

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

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

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

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

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

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

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

		private SqlParameter paramDegree;
		public System.Byte Degree
		{
			get
			{
				return (System.Byte)paramDegree.Value;
			}
			set
			{
				paramDegree.Value = value;
			}
		}

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

		public void ConfigParameter()
		{
			//--------------------------------------------------------
			paramGroupID = new SqlParameter();
			paramGroupID.ParameterName = "@GroupID";
			paramGroupID.SqlDbType = SqlDbType.Int;
			paramGroupID.Precision = 10;
			paramGroupID.Scale = 0;
			paramGroupID.Direction = ParameterDirection.InputOutput;
			paramGroupID.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramGroupID);
			//--------------------------------------------------------
			paramSubSystemID = new SqlParameter();
			paramSubSystemID.ParameterName = "@SubSystemID";
			paramSubSystemID.SqlDbType = SqlDbType.VarChar;
			paramSubSystemID.Size = 6;
			paramSubSystemID.Direction = ParameterDirection.Input;
			paramSubSystemID.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramSubSystemID);
			//--------------------------------------------------------
			paramCompanyID = new SqlParameter();
			paramCompanyID.ParameterName = "@CompanyID";
			paramCompanyID.SqlDbType = SqlDbType.Int;
			paramCompanyID.Precision = 10;
			paramCompanyID.Scale = 0;
			paramCompanyID.Direction = ParameterDirection.Input;
			paramCompanyID.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramCompanyID);
			//--------------------------------------------------------
			paramGroupName = new SqlParameter();
			paramGroupName.ParameterName = "@GroupName";
			paramGroupName.SqlDbType = SqlDbType.VarChar;
			paramGroupName.Size = 50;
			paramGroupName.Direction = ParameterDirection.Input;
			paramGroupName.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramGroupName);
			//--------------------------------------------------------
			paramMemo = new SqlParameter();
			paramMemo.ParameterName = "@Memo";
			paramMemo.SqlDbType = SqlDbType.VarChar;
			paramMemo.Size = 1000;
			paramMemo.Direction = ParameterDirection.Input;
			paramMemo.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramMemo);
			//--------------------------------------------------------
			paramGroupType = new SqlParameter();
			paramGroupType.ParameterName = "@GroupType";
			paramGroupType.SqlDbType = SqlDbType.SmallInt;
			paramGroupType.Precision = 5;
			paramGroupType.Scale = 0;
			paramGroupType.Direction = ParameterDirection.Input;
			paramGroupType.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramGroupType);
			//--------------------------------------------------------
			paramParentGroupID = new SqlParameter();
			paramParentGroupID.ParameterName = "@ParentGroupID";
			paramParentGroupID.SqlDbType = SqlDbType.Int;
			paramParentGroupID.Precision = 10;
			paramParentGroupID.Scale = 0;
			paramParentGroupID.Direction = ParameterDirection.Input;
			paramParentGroupID.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramParentGroupID);
			//--------------------------------------------------------
			paramChildrenCount = new SqlParameter();
			paramChildrenCount.ParameterName = "@ChildrenCount";
			paramChildrenCount.SqlDbType = SqlDbType.Int;
			paramChildrenCount.Precision = 10;
			paramChildrenCount.Scale = 0;
			paramChildrenCount.Direction = ParameterDirection.Input;
			paramChildrenCount.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramChildrenCount);
			//--------------------------------------------------------
			paramDegree = new SqlParameter();
			paramDegree.ParameterName = "@Degree";
			paramDegree.SqlDbType = SqlDbType.TinyInt;
			paramDegree.Size = 1;
			paramDegree.Scale = 0;
			paramDegree.Direction = ParameterDirection.Input;
			paramDegree.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramDegree);
			//--------------------------------------------------------
			paramIsDefault = new SqlParameter();
			paramIsDefault.ParameterName = "@IsDefault";
			paramIsDefault.SqlDbType = SqlDbType.SmallInt;
			paramIsDefault.Precision = 5;
			paramIsDefault.Scale = 0;
			paramIsDefault.Direction = ParameterDirection.Input;
			paramIsDefault.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramIsDefault);
		}
	}
}