Exemplo n.º 1
0
 /// <summary>
 /// 保存表单(新增、修改)
 /// </summary>
 /// <param name="keyValue">主键值</param>
 /// <param name="entity">实体对象</param>
 /// <returns></returns>
 public void SaveForm(int?keyValue, Poll_RecordEntity entity)
 {
     try
     {
         service.SaveForm(keyValue, entity);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 2
0
        public ActionResult PollSave(int?id, string name)
        {
            string openid    = CurrentWxUser.OpenId;// "oA-EC1Ucth5a3bkvcJSdiTCizz_g";//
            string queryJson = @"{OpenId:'" + openid + "'}";
            var    list      = recordBLL.GetList(queryJson);

            if (list.Count() > 0)
            {
                return(RedirectToAction("Error", new { msg = "对不起,每人每天只能投票一次!" }));
            }
            Poll_RecordEntity poll_RecordEntity = new Poll_RecordEntity()
            {
                OpenId     = CurrentWxUser.OpenId,     //"oA-EC1Ucth5a3bkvcJSdiTCizz_g",//
                NickName   = CurrentWxUser.NickName,   //"北龙克川",//
                HeadimgUrl = CurrentWxUser.HeadimgUrl, //"http://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eqIaBiaKiavicQkAILGjtGVDibsmuia9hP1ziaSk0WUHibaRBRib8CITBwsbKib51D2ltNNpGeINFugdUjpeUQ/132",//
                PlayerId   = id,
                PlayerName = name
            };

            ////插入表
            recordBLL.SaveForm(null, poll_RecordEntity);

            return(View("Polled"));
        }
Exemplo n.º 3
0
 public ActionResult SaveForm(int?keyValue, Poll_RecordEntity entity)
 {
     poll_recordbll.SaveForm(keyValue, entity);
     return(Success("操作成功。"));
 }