/// <summary> /// 保存表单(新增、修改) /// </summary> /// <param name="keyValue">主键值</param> /// <param name="entity">实体对象</param> /// <returns></returns> public void SaveForm(int?keyValue, Poll_ToEntity entity) { try { service.SaveForm(keyValue, entity); } catch (Exception) { throw; } }
public JsonResult AddShare(string shareUrl, string shareTitle, string shareContent, string shareTo) { try { Poll_ToEntity entity = new Poll_ToEntity() { CreateDate = DateTime.Now, //ShareContent = shareContent, ShareTitle = shareTitle, ShareTo = shareTo, ShareUrl = shareUrl, OpenId = CurrentWxUser.OpenId, NickName = CurrentWxUser.NickName, HeadimgUrl = CurrentWxUser.HeadimgUrl }; toBLL.SaveForm(null, entity); return(Json(new { iserror = false, message = "分享成功" })); //string nonceStr;//随机字符串 //string paySign;//签名 //var sendNormalRedPackResult = RedPackApi.SendNormalRedPack( // "TenPayV3Info.AppId", "TenPayV3Info.MchId", "TenPayV3Info.Key", // @"F:\apiclient_cert.p12", //证书物理地址 // "接受收红包的用户的openId", //接受收红包的用户的openId // "红包发送者名称", //红包发送者名称 // Request.UserHostAddress, //IP // 100, //付款金额,单位分 // "红包祝福语", //红包祝福语 // "活动名称", //活动名称 // "备注信息", //备注信息 // out nonceStr, // out paySign, // null, //场景id(非必填) // null, //活动信息(非必填) // null //资金授权商户号,服务商替特约商户发放时使用(非必填) // ); //return Content(SerializerHelper.GetJsonString(sendNormalRedPackResult)); } catch (Exception ex) { return(Json(new { iserror = true, message = ex.Message })); } }
public ActionResult SaveForm(int?keyValue, Poll_ToEntity entity) { poll_sharebll.SaveForm(keyValue, entity); return(Success("操作成功。")); }