/// <summary> /// 审核 /// </summary> /// <returns>返回Json串</returns> public string valid() { long id = Convert.ToInt64(System.Web.HttpContext.Current.Request.Params["id"]); //主表主键 PerformanceMstModel model = PerformanceMstService.Find(id).Data; model.FAuditStatus = "4"; model.PersistentState = PersistentState.Modified; var result = PerformanceMstService.Save <System.Int64>(model, ""); return(DataConverterHelper.SerializeObject(result)); }
/// <summary> /// 根据预算phid判断是否可以引用 /// </summary> /// <returns></returns> public string JudgeIfAllowRefence() { long id = Convert.ToInt64(System.Web.HttpContext.Current.Request.Params["id"]); //预算表主键 var ys = BudgetMstService.Find(id).Data; if (ys.FIfPerformanceAppraisal == EnumYesNo.Yes) { //若需要绩效评价判断是否存在已上报的自评单据 var dicWhere = new Dictionary <string, object>(); new CreateCriteria(dicWhere).Add(ORMRestrictions <Int64> .Eq("YSMstPhId", id)) .Add(ORMRestrictions <string> .Eq("FAuditStatus", "2")); var result = PerformanceMstService.Find(dicWhere).Data; if (result.Count == 0) { return("false"); } } return("true"); }