public ActionResult SaveCard(Hsf_CardEntity entity) { string OpenId = CurrentWxUser.OpenId; if (!string.IsNullOrEmpty(OpenId)) { var cardentity = hsf_CardBLL.GetEntityByOpenId(OpenId); if (cardentity != null) { entity.OpenId = CurrentWxUser.OpenId; entity.NickName = CurrentWxUser.NickName; entity.HeadimgUrl = CurrentWxUser.HeadimgUrl; //插入报名表 string id = hsf_CardBLL.SaveForm(cardentity.Id, entity); return(Content(id)); } else { entity.OpenId = CurrentWxUser.OpenId; entity.NickName = CurrentWxUser.NickName; entity.HeadimgUrl = CurrentWxUser.HeadimgUrl; string id = hsf_CardBLL.SaveForm(null, entity); return(Content(id)); } } else { return(Content("不存在微信id!")); } }
public ActionResult SaveForm(string keyValue, Hsf_CardEntity entity) { //二维码 //entity.QRcodeUrl = TwoDimensionCode.buildCode(entity.Name, entity.Position, entity.Mobile1, entity.Mobile2, entity.Telephone, entity.Fax, entity.Email,entity.CompanyName, entity.Website, entity.Address); hsf_cardbll.SaveForm(keyValue, entity); return(Success("操作成功。")); }
/// <summary> /// 保存表单(新增、修改) /// </summary> /// <param name="keyValue">主键值</param> /// <param name="entity">实体对象</param> /// <returns></returns> public string SaveForm(string keyValue, Hsf_CardEntity entity) { try { string id = service.SaveForm(keyValue, entity); return(id); } catch (Exception) { throw; } }
/// <summary> /// 个人资料补充 /// </summary> /// <param name="entity"></param> /// <returns></returns> public ActionResult MakeCard2(Hsf_CardEntity entity) { return(View()); }