⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 depsystem.cs

📁 专业的办公oa代码下载 c#语言编写 三层结构
💻 CS
字号:
using System;
using System.Data;

using qminoa.Common.Data;
using qminoa.DA;

namespace qminoa.BLL
{
	public class DepSystem
	{
		/// <summary>
		///该源码下载自www.51aspx.com(51aspx.com)
		/// </summary>
		/// <param name="braID"></param>
		/// <param name="branchName"></param>
		/// <param name="simpleCode"></param>
		/// <returns></returns>
		public bool InsertMrBranch(string branchName,string simpleCode)
		{
			bool result;
			using(MrDep DepAccess = new MrDep())
			{
				result = DepAccess.InsertMrBranch(branchName,simpleCode);
			}
			return result;
		}
		/// <summary>
		/// 
		/// </summary>
		/// <param name="braID"></param>
		/// <param name="branchName"></param>
		/// <param name="simpleCode"></param>
		/// <returns></returns>
		public bool UpdateMrBranch(int braID,string branchName,string simpleCode)
		{
			bool result;
			using(MrDep DepAccess = new MrDep())
			{
				result = DepAccess.UpdateMrBranch(braID,branchName,simpleCode);
			}
			return result;
		}
		/// <summary>
		/// 
		/// </summary>
		/// <param name="braID"></param>
		/// <returns></returns>
		public bool DeleteMrBranch(int braID)
		{
			bool result;
			using(MrDep DepAccess = new MrDep())
			{
				result = DepAccess.DeleteMrBranch(braID);
			}
			return result;
		}
		/// <summary>
		/// 建立一个新的部门
		/// </summary>
		/// <param name="depData"></param>
		/// <returns></returns>
		public bool CreateDep(DepData depData)
		{
			bool result ;
			using(MrDep depAccess = new MrDep())
			{
				result = depAccess.InsertMrDep(depData);
			}

			return result;
		}
		/// <summary>
		/// 更新指定部门信息
		/// </summary>
		/// <param name="depData"></param>
		/// <returns></returns>
		public bool UpdateDep(DepData depData)
		{
			bool result ;
			using(MrDep DepAccess = new MrDep())
			{
				result = DepAccess.UpdateMrDep(depData);
			}
			return result; 
		}

		/// <summary>
		/// 获得所有机构信息
		/// </summary>
		/// <returns></returns>
		public DataTable GetBraTB()
		{
			DataTable table ;
			using(MrDep BraAccess = new MrDep())
			{
				table = BraAccess.GetBraData().Tables[0];
			}
			return table;
		}
		
		/// <summary>
		/// 获得所有部门信息
		/// </summary>
		/// <returns></returns>
		public DataTable GetDepTB()
		{
			DataTable table;
			using(MrDep DepAccess = new MrDep())
			{
				table = DepAccess.GetDepData().Tables[0];
			}
			return table;
		}
		/// <summary>
		/// 获得指定的部门的信息 
		/// </summary>
		/// <param name="depID"></param>
		public DataTable GetDepTB_By_DepID(int depID)
		{
			DataTable table ;
 
			using (MrDep DepAccess = new MrDep())
			{
				table = DepAccess.GetDepData_By_DepID(depID).Tables[0];
			}

			return table;

		}
		/// <summary>
		/// 获取属于指定机构的部门的信息
		/// </summary>
		/// <param name="branchID"></param>
		/// <returns></returns>
		public DataTable GetDepTB_By_BranchID(int branchID)
		{
			DataTable table ;

			using(MrDep DepAccess = new MrDep())
			{
				table = DepAccess.GetDepData_By_BranchID(branchID).Tables[0];
			}

			return table;
		}

		/// <summary>
		/// 删除指定的部门
		/// </summary>
		/// <param name="depID"></param>
		public bool DeleteDep(int depID)
		{
			bool result; 
			using(MrDep DepAccess = new MrDep())
			{
				result = DepAccess.DeleteMrDep(depID);
			}
			return result;
		}

		public DepSystem()
		{

		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -