public bool InsertSubscribeMsg(SubscribeMsgModel model)
        {
            try
            {
                //todo
                var modifyby = "";
                var arrIds   = "";

                List <string> sqlList = new List <string>();

                var sql = string.Format(@" UPDATE Fct_RegionManager SET Disabled=1,ModifyTime=GETDATE(),ModifyBy='{0}' WHERE Id IN ({1}) and Disabled=0 ", modifyby, arrIds);

                sqlList.Add(sql);

                var cusSql = string.Format(@" UPDATE Fct_CustomerDirector SET Disabled=1,ModifyTime=GETDATE(),ModifyBy='{0}' WHERE RegionManagerId IN ({1}) and Disabled=0 ", modifyby, arrIds);

                sqlList.Add(cusSql);

                return(dapper.ExecuteTrans(sqlList));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 2
0
        private void GoUrlUnsubscribe(WxUserInfo usermodel)
        {
            //ConfigModel config = LogicConfig.GetConfigByCode("0155", "3");
            //string linkurl = ConfigurationManager.AppSettings["WXWebAddressNew"] + "Lottery/ActAirportIndex.aspx?atvid=" + ActID + "&param=" + ParamUcode;

            SubscribeMsgModel model = new SubscribeMsgModel();

            model.WxOpenId = usermodel.openid;
            // model.UserId = usermodel. > 0 ? WebSession.UCode : -1;
            //model.SendMsg = config.Value3;
            //model.LinkUrl = linkurl;
            //model.LinkName = config.Value2;
            model.CreateBy = "活动关注";

            //写关注数据
            //string result = LotteryBase.InsertSubscribeMsg(model);

            //string GoUrl = string.Empty;
            //if (string.IsNullOrEmpty(result))
            //{
            //    GoUrl = "http://mp.weixin.qq.com/s?biz=MzA5MzcwMDYwNQ==&mid=203814070&idx=1&sn=1b2a8da4d5831129415e753c68598a8f#rd";
            //    Response.Redirect(GoUrl);

            //}
            //else
            //{
            //    //插入数据失败 记录日志

            //}
        }
 public int InsertSubscribeMsg(SubscribeMsgModel model)
 {
     throw new NotImplementedException();
 }