/// <summary>
 /// 保存表单(新增、修改)
 /// </summary>
 /// <param name="keyValue">主键值</param>
 /// <param name="entity">实体对象</param>
 /// <returns></returns>
 public void SaveForm(string keyValue, MoveFireRecordEntity entity)
 {
     try
     {
         service.SaveForm(keyValue, entity);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #2
0
        public object SaveMoveFireRecord()
        {
            try
            {
                string  res    = ctx.Request["json"];
                dynamic dy     = JsonConvert.DeserializeObject <ExpandoObject>(res);
                string  userId = dy.userid;          //当前用户ID
                OperatorProvider.AppUserId = userId; //设置当前用户
                Operator             curUser  = OperatorProvider.Provider.Current();
                string               keyValue = dy.data.Id;
                string               str      = JsonConvert.SerializeObject(dy.data);
                MoveFireRecordEntity entity   = JsonConvert.DeserializeObject <MoveFireRecordEntity>(str);

                //HttpFileCollection files = ctx.Request.Files;//上传的文件

                movefirerecordbll.SaveForm(keyValue, entity);
            }
            catch (Exception)
            {
                return(new { code = -1, count = 0, info = "保存失败" });
            }

            return(new { code = 0, count = 0, info = "保存成功" });
        }
 public ActionResult SaveForm(string keyValue, MoveFireRecordEntity entity)
 {
     movefirerecordbll.SaveForm(keyValue, entity);
     return(Success("操作成功。"));
 }