HELP : Where is the error in the below code? ERROR : An - TopicsExpress



          

HELP : Where is the error in the below code? ERROR : An expression of non-boolean type specified in a context where a condition is expected , column EvaluationStat public PEResourceDT.outputList SearchEvaluationList(PEResourceDT.input input) { //Form a Dynamic SQL based on search selection. try { PEResourceDT.outputList outputlist = new PEResourceDT.outputList(); string sSql = ; sSql = Select * from dbo.PEEvaluationResourcesList where; sSql = sSql + RequestId like + %; if (input.DevAreaId.Length > 0 && input.DevAreaId != -1 && input.DevAreaId != null && input.DevAreaId != 0) { sSql = sSql + and DevAreaRegNo like + + input.DevAreaId.Trim() + ; } if (input.DevDeptId.Length > 0 && input.DevDeptId != -1 && input.DevDeptId != null && input.DevDeptId != 0) { sSql = sSql + and DevDeptRegNo like + + input.DevDeptId.Trim() + ; } if (input.DevSMAreaId.Length > 0 && input.DevSMAreaId != -1 && input.DevSMAreaId != null && input.DevSMAreaId != 0) { sSql = sSql + and SMArea like + + input.DevSMAreaId.Trim() + ; } if (input.ProjectShortName.Length > 0) { sSql = sSql + and PLTDCode like + + input.ProjectShortName.Trim() + % + ; } if (input.DevManagerId.Trim().Length > 1 && input.DevManagerId != -1 && input.DevManagerId != null && input.DevManagerId != SEL) { sSql = sSql + and DevelopmentManager like + + input.DevManagerId.Trim() + % + ; } if (input.SystemManagerId.Trim().Length > 1 && input.SystemManagerId != -1 && input.SystemManagerId != null && input.SystemManagerId != SEL) { sSql = sSql + and SystemManager like + + input.SystemManagerId.Trim() + % + ; } if (input.SMAreaManagerId.Trim().Length > 1 && input.SMAreaManagerId != -1 && input.SMAreaManagerId != null && input.SMAreaManagerId != SEL) { sSql = sSql + and SMManager like + + input.SMAreaManagerId.Trim() + % + ; } if (input.ResourceFullName.Length > 0) { sSql = sSql + and ResourceFullName like + + input.ResourceFullName.Trim() + % + ; } if (input.ResourceShortId.Length > 0) { sSql = sSql + and ResourceShortName like + + input.ResourceShortId.Trim() + % + ; } if (input.EvaluationYear.Length > 0 && input.EvaluationYear != -1 && input.EvaluationYear != null && input.EvaluationYear != 0) { sSql = sSql + and EvaluationYear like + + input.EvaluationYear.Trim() + % + ; } if (input.EvaluationStatusDesc.Length > 0 && input.EvaluationStatusDesc != -1 && input.EvaluationStatusDesc != null && input.EvaluationStatusDesc != 0) { sSql = sSql + and EvaluationStatusId like + + input.EvaluationStatusDesc.Trim() + % + ; } if (input.KRAProfileDesc.Length > 0 && input.KRAProfileDesc != -1 && input.KRAProfileDesc != null && input.KRAProfileDesc != 0) { sSql = sSql + and KRAProfileId like + + input.KRAProfileDesc.Trim() + % + ; } if (input.SearchText.Length > 0) { sSql = sSql + and (PLTDCode like + + input.SearchText.Trim() + % + OR DevelopmentManager like + + input.SearchText.Trim() + % + OR SystemManager like + + input.SearchText.Trim() + % + OR SMManager like + + input.SearchText.Trim() + % + OR ResourceFullName like + + input.SearchText.Trim() + % + OR ResourceShortName like + + input.SearchText.Trim() + % + OR EvaluationYear like + + input.SearchText.Trim() + % + OR EvaluationStatusDesc like + + input.SearchText.Trim() + % + OR KRAProfileDesc like + + input.SearchText.Trim() + % + ); } sSql = sSql + Order by ResourceFullName desc; outputlist = evaluationListDO.QueryPerformanceList(sSql); string inputSearchVal = ; inputSearchVal = input.DevAreaId.Trim() + , + input.DevDeptId.Trim() + , + input.DevSMAreaId + , + input.ProjectShortName.Trim() + , + input.DevManagerId.Trim() + , + input.SystemManagerId.Trim() + , + input.SMAreaManagerId.Trim() + , + input.ResourceFullName.Trim() + , + input.ResourceShortId.Trim() + , + input.EvaluationYear.Trim() + , + input.EvaluationStatusDesc.Trim() + , + input.KRAProfileDesc.Trim() + , + input.SearchText; evaluationListDO.InsertCache(sSql, input.userid, PRE); evaluationListDO.InsertCache(inputSearchVal, input.userid, PIN); return outputlist; } catch (Exception ex) { Logger.LogError(Exception in EvaluationListBO->SearchEvaluationList, ex); throw ex; } }
Posted on: Fri, 21 Mar 2014 12:42:23 +0000

Trending Topics



Recently Viewed Topics




© 2015