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

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

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

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

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

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

		public void ConfigParameter()
		{
			//--------------------------------------------------------
			paramPageSize = new SqlParameter();
			paramPageSize.ParameterName = "@PageSize";
			paramPageSize.SqlDbType = SqlDbType.Int;
			paramPageSize.Precision = 10;
			paramPageSize.Scale = 0;
			paramPageSize.Direction = ParameterDirection.Input;
			paramPageSize.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramPageSize);
			//--------------------------------------------------------
			paramCurrentPage = new SqlParameter();
			paramCurrentPage.ParameterName = "@CurrentPage";
			paramCurrentPage.SqlDbType = SqlDbType.Int;
			paramCurrentPage.Precision = 10;
			paramCurrentPage.Scale = 0;
			paramCurrentPage.Direction = ParameterDirection.Input;
			paramCurrentPage.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramCurrentPage);
			//--------------------------------------------------------
			paramTotalPage = new SqlParameter();
			paramTotalPage.ParameterName = "@TotalPage";
			paramTotalPage.SqlDbType = SqlDbType.Int;
			paramTotalPage.Precision = 10;
			paramTotalPage.Scale = 0;
			paramTotalPage.Direction = ParameterDirection.InputOutput;
			paramTotalPage.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramTotalPage);
			//--------------------------------------------------------
			paramTotalRecord = new SqlParameter();
			paramTotalRecord.ParameterName = "@TotalRecord";
			paramTotalRecord.SqlDbType = SqlDbType.Int;
			paramTotalRecord.Precision = 10;
			paramTotalRecord.Scale = 0;
			paramTotalRecord.Direction = ParameterDirection.InputOutput;
			paramTotalRecord.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramTotalRecord);
			//--------------------------------------------------------
			paramSortBy = new SqlParameter();
			paramSortBy.ParameterName = "@SortBy";
			paramSortBy.SqlDbType = SqlDbType.VarChar;
			paramSortBy.Size = 100;
			paramSortBy.Direction = ParameterDirection.Input;
			paramSortBy.Value = DBNull.Value;
			base.sqlComm.Parameters.Add(this.paramSortBy);
		}
	}
}