示例#1
0
 public DeptBLL()
     : base()
 {
     base.Init(this.GetType().FullName, System.Reflection.Assembly.GetExecutingAssembly().GetName().Name);
     baseDal.OnOperationLog += new OperationLogEventHandler(Next.Admin.BLL.OperationLogBLL.OnOperationLog);//如果需要记录操作日志,则实现这个事件
     this.deptDAL            = (IDeptDAL)base.baseDal;
 }
        /// <summary>
        /// 根据配置文件中的值创建DeptDAL
        /// </summary>
        /// <returns></returns>
        public static IDeptDAL CreateDeptDAL()
        {
            IDeptDAL deptDAL = null;

            switch (dataBaseType)
            {
            case "SqlServer":
                deptDAL = new DeptSqlServerDAL(); break;

            case "Oracle":
                deptDAL = new DeptOracleDAL(); break;
            }
            return(deptDAL);
        }