?? depsystem.cs
字號:
using System;
using System.Data;
using qminoa.Common.Data;
using qminoa.DA;
namespace qminoa.BLL
{
public class DepSystem
{
/// <summary>
///
/// </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 + -