예제 #1
0
        public ActionResult SaveForm(string planid, string smallchaperid, NoSuitableDetailEntity entity)
        {
            NoSuitableDetailEntity resultEntity = nosuitabledetailbll.GetNoSuitByPlanOrChapID(planid, smallchaperid);

            if (resultEntity != null)
            {
                resultEntity.NSuitReason = entity.NSuitReason;//不适宜项原因
                nosuitabledetailbll.SaveForm(resultEntity.Id, resultEntity);
            }
            else
            {
                resultEntity                  = new NoSuitableDetailEntity();
                resultEntity.NSuitReason      = entity.NSuitReason;//不适宜项原因
                resultEntity.AssessmentPlanID = planid;
                resultEntity.ChapterID        = smallchaperid;
                nosuitabledetailbll.SaveForm("", resultEntity);
            }
            //如果是不适宜项.看扣分表中是否存在此要素的数据,如果存在,就删除
            KScoreDetailEntity kentity = kscoredetailbll.GetKScoreByPlanOrChapID(planid, smallchaperid);

            if (kentity != null)
            {
                kscoredetailbll.RemoveForm(resultEntity.Id);
            }
            return(Success("操作成功。"));
        }
예제 #2
0
        public ActionResult RemoveForm(string planid, string smallchaperid)
        {
            NoSuitableDetailEntity resultEntity = nosuitabledetailbll.GetNoSuitByPlanOrChapID(planid, smallchaperid);

            if (resultEntity != null)
            {
                nosuitabledetailbll.RemoveForm(resultEntity.Id);
            }
            return(Success("删除成功。"));
        }
예제 #3
0
 /// <summary>
 /// 保存表单(新增、修改)
 /// </summary>
 /// <param name="keyValue">主键值</param>
 /// <param name="entity">实体对象</param>
 /// <returns></returns>
 public void SaveForm(string keyValue, NoSuitableDetailEntity entity)
 {
     try
     {
         service.SaveForm(keyValue, entity);
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #4
0
        public ActionResult GetFormJson(string planid, string smallchaperid)
        {
            NoSuitableDetailEntity resultEntity = nosuitabledetailbll.GetNoSuitByPlanOrChapID(planid, smallchaperid);

            return(ToJsonResult(resultEntity));
        }