Exemplo n.º 1
0
        public int NewMethod()
        {
            //Com.GainWinSoft.ERP.Entity.Dao.TestDao td = new Com.GainWinSoft.ERP.Entity.Dao.TestDao();
            //通过Windsor的组件容器,获取Dao的实例
            ICCatalogHasManyFunctionDao td = ComponentLocator.Instance().Resolve <ICCatalogHasManyFunctionDao>();
            ////调用Dao的方法
            //IList<MFunctioncatalog> re = td.GetFunctionCatalogList("");

            //Test td = new Test();
            IList <CCatalogHasManyFunction> re = td.GetFunctionAllList(Thread.CurrentThread.CurrentUICulture.Name);

            log.Debug("result=" + re);
            return(re.Count);
        }
Exemplo n.º 2
0
        public IList <FunctionAllVo> GetFunctionDataList()
        {
            IList <FunctionAllVo> functionallvolist = new List <FunctionAllVo>();
            ////Com.GainWinSoft.ERP.Entity.Dao.TestDao td = new Com.GainWinSoft.ERP.Entity.Dao.TestDao();
            ////通过Windsor的组件容器,获取Dao的实例
            ICCatalogHasManyFunctionDao td = ComponentLocator.Instance().Resolve <ICCatalogHasManyFunctionDao>();
            //////调用Dao的方法
            ////IList<MFunctioncatalog> re = td.GetFunctionCatalogList("");

            ////Test td = new Test();
            IList <CCatalogHasManyFunction> mfuncatalist = td.GetFunctionAllList(LangUtils.GetCurrentLanguage());

            foreach (CCatalogHasManyFunction mfvo in mfuncatalist)
            {
                FunctionAllVo functionallvo = new FunctionAllVo();
                functionallvo.Langid       = mfvo.Id.Langid;
                functionallvo.Catalogid    = mfvo.Id.Catalogid;
                functionallvo.Catalogname  = mfvo.Catalogname;
                functionallvo.Catalogimage = mfvo.Catalogimage;
                IList <FunctionVo> funcvolist = new List <FunctionVo>();
                foreach (MFunction f in mfvo.Functionlist)
                {
                    FunctionVo functionvo = new FunctionVo();
                    functionvo.Langid        = f.Id.Langid;
                    functionvo.Functionid    = f.Id.Functionid;
                    functionvo.Catalogid     = f.Catalogid;
                    functionvo.Functionimage = f.Functionimage;
                    functionvo.Functionindex = f.Functionindex;
                    functionvo.Functionname  = f.Functionname;
                    functionvo.Functionpath  = f.Functionpath;
                    funcvolist.Add(functionvo);
                }
                functionallvo.Functionlist = funcvolist;
                functionallvolist.Add(functionallvo);
            }

            //log.Debug("result=" + re);
            return(functionallvolist);
        }