using System;
using System.Data;
using AVC.DataEntity;
using AVC.DataAccess;

namespace AVC.Business
{
	public class BusIllegalBiz
	{
		public static void AddBusIllegal(BusIllegal objBusIllegal)
		{
			BusIllegalInsert objBusIllegalDAL = new BusIllegalInsert();
			objBusIllegalDAL.ReceiveParameter(objBusIllegal);
			objBusIllegalDAL.ExecuteNonQuery();
		}

		public static DataTable GetAllBusIllegal()
		{
			BusIllegalSelectAll objBusIllegalDAL = new BusIllegalSelectAll();
			return objBusIllegalDAL.ExecuteDataTable();
	    }
		
	    public static DataTable GetBusIllegalSelectAllPaged(int CurrentPage, out int TotalPage, out int TotalRecord, int PageSize, string SortBy)
	    {
	        BusIllegalSelectAllPaged objBusIllegalDAL = new BusIllegalSelectAllPaged();
	        objBusIllegalDAL.CurrentPage = CurrentPage;
	        objBusIllegalDAL.PageSize = PageSize;
	        objBusIllegalDAL.SortBy = SortBy;
	        DataTable BusIllegalTable =  objBusIllegalDAL.ExecuteDataTable();
	        TotalPage = objBusIllegalDAL.TotalPage;
	        TotalRecord = objBusIllegalDAL.TotalRecord;
	        return BusIllegalTable;
	     }

		public static void UpdateBusIllegal(BusIllegal objBusIllegal)
		{
			BusIllegalUpdate objBusIllegalDAL = new BusIllegalUpdate();
			objBusIllegalDAL.ReceiveParameter(objBusIllegal);
			objBusIllegalDAL.ExecuteNonQuery();
		}

		public static void DeleteBusIllegal(System.Int32 ID)
		{
			BusIllegalDelete objBusIllegalDAL = new BusIllegalDelete();
			objBusIllegalDAL.ID = ID;
			objBusIllegalDAL.ExecuteNonQuery();
		}

		public static BusIllegal GetBusIllegal(System.Int32 ID)
		{
			BusIllegalSelectByPk objBusIllegalDAL = new BusIllegalSelectByPk();
			BusIllegal objBusIllegal = new BusIllegal();
			objBusIllegalDAL.ID = ID;
			objBusIllegal.SetMetaDataTable(objBusIllegalDAL.ExecuteDataTable());
			return objBusIllegal;
		}
	}
}