public ActionResult SaveForm(string keyValue, InvestigateEntity entity)
        {
            //审查信息
            investigatebll.SaveForm(keyValue, entity);

            //审查内容
            string investigatecontent = Request.Form["INVESTIGATECONTENT"].ToString();

            JArray arrData = JArray.Parse(investigatecontent);

            //先删除
            if (!string.IsNullOrEmpty(keyValue))
            {
                investigatecontentbll.RemoveFormByRecId(keyValue);
            }

            foreach (string str in arrData)
            {
                if (!string.IsNullOrEmpty(str))
                {
                    InvestigateContentEntity centity = new InvestigateContentEntity();
                    centity.INVESTIGATEID      = entity.ID;
                    centity.INVESTIGATECONTENT = str.Split(',')[0];
                    centity.SORTID             = int.Parse(str.Split(',')[1].ToString());
                    investigatecontentbll.SaveForm("", centity);
                }
            }
            return(Success("操作成功。"));
        }
Example #2
0
 /// <summary>
 /// 保存表单(新增、修改)
 /// </summary>
 /// <param name="keyValue">主键值</param>
 /// <param name="entity">实体对象</param>
 /// <returns></returns>
 public void SaveForm(string keyValue, InvestigateContentEntity entity)
 {
     try
     {
         service.SaveForm(keyValue, entity);
     }
     catch (Exception)
     {
         throw;
     }
 }