Beispiel #1
0
 /// <summary>
 /// 保存表单(新增、修改)
 /// </summary>
 /// <param name="keyValue">主键值</param>
 /// <param name="entity">实体对象</param>
 /// <returns></returns>
 public void SaveForm(string keyValue, WSSJBGEntity entity)
 {
     try
     {
         service.SaveForm(keyValue, entity);
     }
     catch (Exception)
     {
         throw;
     }
 }
 public object AddWssjBg([FromBody] JObject json)
 {
     try
     {
         string  res    = json.Value <string>("json");
         dynamic dy     = JsonConvert.DeserializeObject <ExpandoObject>(res);
         string  userid = dy.userid;
         //获取用户基本信息
         OperatorProvider.AppUserId = userid;  //设置当前用户
         Operator curUser = OperatorProvider.Provider.Current();
         if (null == curUser)
         {
             return(new { code = -1, count = 0, info = "请求失败,请登录!" });
         }
         var entity = new WSSJBGEntity
         {
             WSSJNAME       = dy.WssjName,
             WSSJTYPE       = dy.WssjType,
             WSSJTYPENAME   = dy.WssjTypeName,
             HAPPENTIME     = dy.HappenTime,
             AREAID         = dy.AreaId,
             AREANAME       = dy.AreaName,
             JYJG           = dy.Jyjg,
             HGHYX          = dy.Hghyx,
             YYCBPD         = dy.Yycbpd,
             CQDCS          = dy.Cqdcs,
             WSSJTPSP       = dy.Wssjtpsp,
             WSSJBGUSERID   = dy.WssjbgUserId,
             WSSJBGUSERNAME = dy.WssjbgUserName,
             TBTIME         = dy.Tbtime,
             BGDEPARTID     = dy.BgDepartId,
             BGDEPARTNAME   = dy.BgDepartName,
         };
         wssjbgbll.SaveForm("", entity);
     }
     catch (Exception)
     {
         return(new { code = -0, count = 0, info = "保存失败" });
     }
     return(new { code = 0, count = 0, info = "保存成功" });
 }
Beispiel #3
0
 public ActionResult SaveForm(string keyValue, WSSJBGEntity entity)
 {
     wssjbgbll.SaveForm(keyValue, entity);
     return(Success("操作成功。"));
 }