예제 #1
0
        public ActionResult SaveCard(Sale_UserStepEntity entity)
        {
            string OpenId = CurrentWxUser.OpenId;

            if (!string.IsNullOrEmpty(OpenId))
            {
                var stepentity = userStepbll.GetEntity(OpenId);
                if (stepentity != null)
                {
                    entity.OpenId     = CurrentWxUser.OpenId;
                    entity.NickName   = CurrentWxUser.NickName;
                    entity.HeadimgUrl = CurrentWxUser.HeadimgUrl;
                    userStepbll.SaveForm(OpenId, entity);
                    return(Content("修改成功!"));
                }
                else
                {
                    entity.OpenId     = CurrentWxUser.OpenId;
                    entity.NickName   = CurrentWxUser.NickName;
                    entity.HeadimgUrl = CurrentWxUser.HeadimgUrl;
                    userStepbll.SaveForm(null, entity);
                    return(Content("提交成功!"));
                }
            }
            else
            {
                return(Content("不存在微信id!"));
            }
        }
예제 #2
0
 /// <summary>
 /// 保存表单(新增、修改)
 /// </summary>
 /// <param name="keyValue">主键值</param>
 /// <param name="entity">实体对象</param>
 /// <returns></returns>
 public void SaveForm(string keyValue, Sale_UserStepEntity entity)
 {
     try
     {
         service.SaveForm(keyValue, entity);
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #3
0
 public ActionResult SaveForm(string keyValue, Sale_UserStepEntity entity)
 {
     sale_userstepbll.SaveForm(keyValue, entity);
     return(Success("操作成功。"));
 }