コード例 #1
0
        private void DoSelect()
        {
            ExamineStageResult esrEnt = ExamineStageResult.Find(ExamineStageResultId);

            string where = "";
            if (SearchCriterion.Orders.Count == 0)
            {
                SearchCriterion.SetOrder("ToUserName", true);
                where = " ExamineStageId='{0}' and State='3' and BeUserId='{1}'";
            }
            else
            {
                where = " ExamineStageId='{0}' and State='3' and BeUserId='{1}'";
            }
            where = string.Format(where, esrEnt.ExamineStageId, esrEnt.UserId);
            IList <ExamineTask> etEnts = ExamineTask.FindAll(SearchCriterion, Expression.Sql(where));

            PageState.Add("DataList", etEnts);
            if (!string.IsNullOrEmpty(esrEnt.ExamineStageId))//有些考核结果是手动填报的 因此需要加判断  有无考核阶段和明细
            {
                ExamineStage esEnt = ExamineStage.Find(esrEnt.ExamineStageId);
                PageState.Add("ExamineStage", esEnt);
            }
            PageState.Add("BeUserName", esrEnt.UserName);
        }