Ejemplo n.º 1
0
        public IQueryable XetQuyen(long id)
        {
            FunctionDAL function = new FunctionDAL();
            IQueryable  list     = function.GetById(id);

            return(list);
        }
Ejemplo n.º 2
0
        //public List<Function> GetFunctionInfolist(int ParentID)
        //{
        //    FunctionDAL dal = new FunctionDAL();
        //    List<Function> list = new List<Function>();
        //    try
        //    {
        //        list = dal.GetFunctionInfolist(ParentID);
        //    }
        //    catch (Exception ex)
        //    {
        //        ExceptionLogBLL.WriteExceptionLogToDB(ex.ToString());
        //    }

        //    return list;
        //}


        //public Function GetFunctionInfoOne(int FunctionId)
        //{
        //    FunctionDAL dal = new FunctionDAL();
        //    Function list = new Function();
        //    try
        //    {
        //        list = dal.GetFunctionInfoOne(FunctionId);
        //    }
        //    catch (Exception ex)
        //    {
        //        ExceptionLogBLL.WriteExceptionLogToDB(ex.ToString());
        //    }

        //    return list;
        //}

        //public string GetFunctionName(int FunctionID, int RecordIsDelete) {
        //    FunctionDAL dal = new FunctionDAL();
        //    string str = "";
        //    try
        //    {
        //        str = dal.GetFunctionName(FunctionID, RecordIsDelete);
        //    }
        //    catch (Exception)
        //    {

        //        throw;
        //    }


        //    return str;
        //}


        public bool soleFunctionCode(string RandomCode, int RecordIsDelete)
        {
            FunctionDAL dal = new FunctionDAL();
            bool        b   = false;

            b = dal.soleFunctionCode(RandomCode, RecordIsDelete);
            return(b);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="dal"></param>
        /// <param name="logger"></param>
        /// <param name="host"></param>
        public FunctionService(FunctionDAL dal, ILogger <FunctionService> logger, IHostingEnvironment host) : base(dal)
        {
            OptionsMonitor = TianCheng.Model.ServiceLoader.GetService <IOptionsMonitor <FunctionModuleConfig> >();
            OptionsMonitor.OnChange(_ => ModuleConfig = _);
            ModuleConfig = OptionsMonitor.CurrentValue;

            _host   = host;
            _Logger = logger;
        }
Ejemplo n.º 4
0
        public List <Function> GetFuctionDepartmentExtentList2(string where)
        {
            FunctionDAL     dal  = new FunctionDAL();
            List <Function> list = new List <Function>();

            try
            {
                list = dal.GetFuctionDepartmentExtentList2(where);
            }
            catch (Exception ex)
            {
                ExceptionLogBLL.WriteExceptionLogToDB(ex.ToString());
            }

            return(list);
        }
Ejemplo n.º 5
0
        public int VerificationIsFunName(string FunctionName, int FunctionId)
        {
            FunctionDAL dal         = new FunctionDAL();
            int         FunctionId2 = 0;

            try
            {
                FunctionId2 = dal.VerificationIsFunName(FunctionName, FunctionId);
            }
            catch (Exception ex)
            {
                ExceptionLogBLL.WriteExceptionLogToDB(ex.ToString());
            }

            return(FunctionId2);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 获取所有的功能点列表
        /// </summary>
        /// <returns></returns>
        static public List <FunctionView> FunctionList()
        {
            List <FunctionView> list = new List <FunctionView>();
            FunctionDAL         _Dal = new FunctionDAL();
            var query = _Dal.Queryable().ToList();

            foreach (var module in query)
            {
                foreach (var group in module.FunctionGroups)
                {
                    foreach (var fun in group.FunctionList)
                    {
                        list.Add(AutoMapper.Mapper.Map <FunctionView>(fun));
                    }
                }
            }
            return(list);
        }