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

namespace AVC.Business
{
	public class SubSystemBiz
	{
		public static void AddSubSystem(SubSystem objSubSystem)
		{
			SubSystemInsert objSubSystemDAL = new SubSystemInsert();
			objSubSystemDAL.ReceiveParameter(objSubSystem);
			objSubSystemDAL.ExecuteNonQuery();
		}

		public static DataTable GetAllSubSystem()
		{
			SubSystemSelectAll objSubSystemDAL = new SubSystemSelectAll();
			return objSubSystemDAL.ExecuteDataTable();
		}

		public static void UpdateSubSystem(SubSystem objSubSystem)
		{
			SubSystemUpdate objSubSystemDAL = new SubSystemUpdate();
			objSubSystemDAL.ReceiveParameter(objSubSystem);
			objSubSystemDAL.ExecuteNonQuery();
		}

		public static void DeleteSubSystem(System.String SubSystemID)
		{
			SubSystemDelete objSubSystemDAL = new SubSystemDelete();
			objSubSystemDAL.SubSystemID = SubSystemID;
			objSubSystemDAL.ExecuteNonQuery();
		}

		public static SubSystem GetSubSystem(System.String SubSystemID)
		{
			SubSystemSelectByPk objSubSystemDAL = new SubSystemSelectByPk();
			SubSystem objSubSystem = new SubSystem();
			objSubSystemDAL.SubSystemID = SubSystemID;
			objSubSystem.SetMetaDataTable(objSubSystemDAL.ExecuteDataTable());
			return objSubSystem;
		}
	}
}