Пример #1
0
        /// <summary>
        /// 获取带分页和编号的干系人列表集合
        /// Updated:20170601(ChengMengjia)  干系人类别需要LeftJoin查询
        /// </summary>
        /// <param name="PageIndex"></param>
        /// <param name="PageSize"></param>
        /// <param name="qlist"></param>
        /// <returns></returns>
        public GridData GetGridData(int PageSize, int PageIndex, List <QueryField> qlist)
        {
            StringBuilder QueryHead = new StringBuilder();
            StringBuilder QueryBody = new StringBuilder();

            QueryHead.Append(" select s.*, s.companyname || '-' || s.name as truename, d1.Name as SendTypeName,d2.Name as TypeName");
            QueryBody.Append(" from Stakeholders s left join DictItem d1 on s.SendType = d1.No and d1.DictNo=" + (int)DictCategory.SendType);
            QueryBody.Append(" left join DictItem d2 on s.Type = d2.No and d2.DictNo=" + (int)DictCategory.StakehoderType);
            QueryBody.Append(" where s.PID=@PID  and s.status=@Status order by s.updated desc,s.created desc");

            return(NHHelper.GetGridData(PageIndex, PageSize, QueryHead.ToString(), QueryBody.ToString(), qlist));
        }
Пример #2
0
        /// <summary>
        /// 监理评价列表
        /// Created:20170328(ChengMengjia)
        /// </summary>
        /// <param name="PageIndex"></param>
        /// <param name="PageSize"></param>
        /// <param name="PID"></param>
        /// <returns></returns>
        public GridData GetJLPJList(int PageIndex, int PageSize, string PID)
        {
            List <QueryField> qf      = new List <QueryField>();
            string            sqlHead = " select r.id,r.Name,r.Content,strftime('%Y-%m-%d',r.JudgeDate)JudgeDate ";
            StringBuilder     sqlBody = new StringBuilder();

            sqlBody.Append(" from SupervisorJudge r ");
            sqlBody.Append(" where r.PID=@PID  and r.status=1 order by r.updated desc,r.created asc");
            qf.Add(new QueryField()
            {
                Name = "PID", Type = QueryFieldType.String, Value = PID
            });
            return(NHHelper.GetGridData(PageIndex, PageSize, sqlHead, sqlBody.ToString(), qf));
        }
Пример #3
0
        /// <summary>
        /// 获取带分页和编号的数据集合
        /// </summary>
        /// <param name="PageIndex"></param>
        /// <param name="PageSize"></param>
        /// <param name="qlist"></param>
        /// <returns></returns>
        public GridData GetGridData(int PageIndex, int PageSize, List <QueryField> qlist)
        {
            StringBuilder QueryHead = new StringBuilder();
            StringBuilder QueryBody = new StringBuilder();

            QueryHead.Append(" select r.*,d1.Name as LevelName,d2.Name as ProbabilityName,d3.Name as HandleTypeName,p1.Name as SourceName,p2.Name as DependencyName");
            QueryBody.Append(" from Risk r left join DictItem d1 on r.Level = d1.No and d1.DictNo=" + (int)DictCategory.Level);
            QueryBody.Append(" left join DictItem d2 on r.Probability = d2.No and d2.DictNo=" + (int)DictCategory.Probability);
            QueryBody.Append(" left join DictItem d3 on r.HandleType = d3.No and d3.DictNo=" + (int)DictCategory.HandType);
            QueryBody.Append(" left join PNode p1 on r.Source = p1.ID");
            //QueryBody.Append(" left join PNode p2 on r.Dependency = p2.ID");
            QueryBody.Append(" left join PNode p2 on r.Dependency = p2.ID");
            QueryBody.Append(" where r.PID=@PID  and r.status=@Status order by r.created");

            return(NHHelper.GetGridData(PageIndex, PageSize, QueryHead.ToString(), QueryBody.ToString(), qlist));
        }