sysfunc.cs

来自「某个公司需要维持良好的客户关系」· CS 代码 · 共 79 行

CS
79 行
字号
using System;
using System.Collections;
using System.Data;
using System.Data.SqlClient;
using CRM.IDAL;
using CRM.Model;

namespace CRM.BLL
{
	/// <summary>
	/// SysFunc 的摘要说明。
	/// </summary>
	public  class SysFunc : Common
	{
		#region ISysFunc 成员

		public static void Insert(SysFuncInfo func)
		{
			if(!Common.CheckStrIsNull(func.FuncName,func.Path))
			{
				ISysFunc dal=CRM.DALFactory.SysFunc.Create();
				dal.Insert(func);
			}
		}

		public static DataTable GetAllSysFunc()
		{
			ISysFunc dal=CRM.DALFactory.SysFunc.Create();
			return dal.GetAllSysFunc();
		}

		public static SysFuncInfo GetSysFuncById(string funcId)
		{
			if(Common.CheckStrIsNull(funcId))
				return null;
			ISysFunc dal=CRM.DALFactory.SysFunc.Create();
			return dal.GetSysFuncById(funcId);
		}

		public static DataTable GetFuncByRoleId(string roleId)
		{
			if(Common.CheckStrIsNull(roleId))
				return null;
			ISysFunc dal=CRM.DALFactory.SysFunc.Create();
			return dal.GetFuncByRoleId(roleId);
		}

		public static void Delete(string funcid)
		{
			if(!Common.CheckStrIsNull(funcid))
			{
				ISysFunc dal=CRM.DALFactory.SysFunc.Create();
				dal.Delete(funcid);
			}
		}

		public static void Update(SysFuncInfo func)
		{
			if(!Common.CheckStrIsNull(func.FuncId,func.FuncName,func.Path))
			{
				ISysFunc dal=CRM.DALFactory.SysFunc.Create();
				dal.Update(func);
			}
		}

		public static string GetActionUserControlPath(string father,string action)
		{
			if(!Common.CheckStrIsNull(father,action))
			{
				ISysFunc dal=CRM.DALFactory.SysFunc.Create();
				return dal.GetActionUserControlPath(father,action);
			}
			return null;
		}

		#endregion
	}
}

⌨️ 快捷键说明

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