Exemplo n.º 1
0
        public override void OnActionExecuting(ActionExecutingContext context)
        {
            FTISFactory  m_FTISFactory = new FTISFactory();
            IFTISService m_FTISService = m_FTISFactory.GetFTISService();
            IDictionary <string, string> conditions = new Dictionary <string, string>();

            if (OnlyOpen)
            {
                conditions.Add("Status", "1");
            }

            IList <SelectListItem> industryList = new List <SelectListItem>();
            IList <Industry>       list         = m_FTISService.GetIndustryList(conditions);

            if (list != null && list.Count > 0)
            {
                foreach (Industry entity in list)
                {
                    industryList.Add(new SelectListItem()
                    {
                        Text = entity.Name, Value = entity.IndustryId.ToString()
                    });
                }
            }

            context.Controller.ViewData["IndustrySelectList"] = industryList;
        }
Exemplo n.º 2
0
        public override void OnActionExecuting(ActionExecutingContext context)
        {
            FTISFactory  m_FTISFactory = new FTISFactory();
            IFTISService m_FTISService = m_FTISFactory.GetFTISService();
            IDictionary <string, string> conditions = new Dictionary <string, string>();

            if (OnlyOpen)
            {
                conditions.Add("Status", "1");
            }
            if ((int)ParentNodeId > 0)
            {
                conditions.Add("ParentNodeId", ((int)ParentNodeId).ToString());

                Node parentNode = m_FTISService.GetNodeById((int)ParentNodeId);
                context.Controller.ViewData["FuncName"] = parentNode.Name + "管理";
                IList <Node> nodeList = m_FTISService.GetNodeList(conditions);
                context.Controller.ViewData["NodeList"] = nodeList;
            }
            else if ((int)NodeId > 0)
            {
                Node node = m_FTISService.GetNodeById((int)NodeId);
                context.Controller.ViewData["FuncName"] = node.Name + "管理";
                context.Controller.ViewData["Node"]     = node;
            }
        }
Exemplo n.º 3
0
        public override void OnActionExecuting(ActionExecutingContext context)
        {
            FTISFactory  m_FTISFactory = new FTISFactory();
            IFTISService m_FTISService = m_FTISFactory.GetFTISService();
            IDictionary <string, string> conditions = new Dictionary <string, string>();

            if (OnlyOpen)
            {
                conditions.Add("Status", "1");
            }

            IList <GreenFactoryClass> GreenFactoryClassList = m_FTISService.GetGreenFactoryClassList(conditions);

            context.Controller.ViewData["GreenFactoryClassList"] = GreenFactoryClassList;
        }
Exemplo n.º 4
0
        private static void LoadAllUser()
        {
            FTISFactory  ftisFactory = new FTISFactory();
            IFTISService ftisService = ftisFactory.GetFTISService();

            IDictionary <string, string> conditions = new Dictionary <string, string>();
            IList <MasterMember>         userList   = ftisService.GetMasterMemberListNoLazy(conditions);

            if (userList != null && userList.Count > 0)
            {
                foreach (MasterMember user in userList)
                {
                    m_LoginUserContainer.m_UserDic.Add(user.Account, user);
                }
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// 載入user的資料
        /// </summary>
        /// <param name="userId"></param>
        private void LoadUser(string userId)
        {
            FTISFactory  ftisFactory = new FTISFactory();
            IFTISService ftisService = ftisFactory.GetFTISService();

            IDictionary <string, string> conditions = new Dictionary <string, string>();

            conditions.Add("Account", userId);
            IList <MasterMember> userList = ftisService.GetMasterMemberListNoLazy(conditions);

            m_Log.Debug("lock LoginUserContainer loadUser");
            lock (typeof(LoginUserContainer))
            {
                m_LoginUserContainer.m_UserDic.Remove(userId);
                m_LoginUserContainer.m_UserDic.Add(userId, userList[0]);
            }
        }
Exemplo n.º 6
0
        public override void OnActionExecuting(ActionExecutingContext context)
        {
            FTISFactory  m_FTISFactory = new FTISFactory();
            IFTISService m_FTISService = m_FTISFactory.GetFTISService();
            IDictionary <string, string> conditions = new Dictionary <string, string>();

            if (OnlyOpen)
            {
                conditions.Add("Status", "1");
            }
            if ((int)NodeId > 0)
            {
                conditions.Add("NodeId", ((int)NodeId).ToString());
                IList <Post> postList = m_FTISService.GetPostList(conditions);
                context.Controller.ViewData["PostList"] = postList;
            }
        }
Exemplo n.º 7
0
        public override void OnActionExecuting(ActionExecutingContext context)
        {
            FTISFactory  m_FTISFactory = new FTISFactory();
            IFTISService m_FTISService = m_FTISFactory.GetFTISService();
            IDictionary <string, string> conditions = new Dictionary <string, string>();

            if (OnlyOpen)
            {
                conditions.Add("Status", "1");
            }
            if (ParentId > 0)
            {
                conditions.Add("ParentNormClassId", ParentId.ToString());

                IList <NormClass> subNormClassList = m_FTISService.GetNormClassList(conditions);
                context.Controller.ViewData["SubNormClassList"] = subNormClassList;
            }
            else
            {
                IList <NormClass> parentNormClassList = m_FTISService.GetNormClassList(conditions);
                context.Controller.ViewData["ParentNormClassList"] = parentNormClassList;
            }
        }
Exemplo n.º 8
0
 public AbstractShowModel()
 {
     m_FTISService = m_FTISFactory.GetFTISService();
 }
Exemplo n.º 9
0
 public AbstractShowModel()
 {
     m_FTISService = m_FTISFactory.GetFTISService();
 }
Exemplo n.º 10
0
 public LogOnModel()
 {
     m_FTISService = m_FTISFactory.GetFTISService();
 }
Exemplo n.º 11
0
 public void TestCaseInit()
 {
     m_FTISFactory = new FTISFactory();
     m_FTISService = m_FTISFactory.GetFTISService();
 }
Exemplo n.º 12
0
 public LogOnModel()
 {
     m_FTISService = m_FTISFactory.GetFTISService();
 }
Exemplo n.º 13
0
 public void TestCaseInit()
 {
     m_FTISFactory = new FTISFactory();
     m_FTISService = m_FTISFactory.GetFTISService();
 }