/// <summary> /// 判断template表是否是一个完美的模板(包括item的数量必须满足一定条件) /// </summary> private bool CheckTemplatePapaer() { try { _ItsAssessTemplatePaper = _IAssessTemplatePaper.GetTempletPaperAndItemById(_AssessTempletPaperId); } catch { BllUtility.ThrowException(BllExceptionConst._DbError); } if (_ItsAssessTemplatePaper == null) { BllUtility.ThrowException(BllExceptionConst._InvalidTemplateId); } if (_ItsAssessTemplatePaper.ItsAssessTemplateItems == null) { BllUtility.ThrowException(BllExceptionConst._AssessTemplateItem_Not_Exist); } if (_ItsAssessTemplatePaper.ItsAssessTemplateItems.Count == AAUtility._ItemsNotNull) { return(false); } return(true); }
/// <summary> /// /// </summary> public AssessTemplatePaper GetTempletPaperAndItemById(int paperId) { AssessTemplatePaper paper = _IAssessTemplatePaper.GetTempletPaperAndItemById(paperId); paper.PositionList = _IAssessTemplatePaperBindPosition.GetBindPostionByPaperID(paperId); for (int i = 0; i < paper.PositionList.Count; i++) { Position p = _IPostionBll.GetPositionById(paper.PositionList[i].Id, null); if (p == null) { paper.PositionList.RemoveAt(i); i--; continue; } paper.PositionList[i] = p; } return(paper); }