Ejemplo n.º 1
0
        /// <summary>
        /// 作用:查询
        /// 作者:汪建龙
        /// 编写时间:2017年3月18日17:14:57
        /// </summary>
        /// <param name="parameter"></param>
        /// <returns></returns>
        public List <FlowNodeConduct> Search(FlowNodeConductParameter parameter)
        {
            var query = Db.FlowNodeConducts.AsQueryable();

            if (parameter.UserID.HasValue)
            {
                query = query.Where(e => e.UserID == parameter.UserID.Value);
            }
            if (parameter.FlowNodeState.HasValue)
            {
                query = query.Where(e => e.FlowNodeState == parameter.FlowNodeState.Value);
            }
            query = query.OrderByDescending(e => e.CreateTime).SetPage(parameter.Page);
            return(query.ToList());
        }
        public ActionResult Work()
        {
            var parameter = new FlowNodeConductParameter
            {
                FlowNodeState = DoingState.None
            };

            if (Identity.Role == UserRole.Manager)
            {
                parameter.UserID = Identity.UserID;
            }
            var list = Core.FlowNodeConductManager.Search(parameter);

            ViewBag.List = list;
            return(View());
        }