コード例 #1
0
        protected void btnAccept_Click(object sender, System.EventArgs e)
        {
            int userId = 0;

            int.TryParse(this.hidUserId.Value, out userId);
            if (MemberHelper.AccepteRerralRequest(userId))
            {
                this.BindReferralRequest();
                this.ShowMsg("推广员的申请已经审核通过", true);
                return;
            }
            this.ShowMsg("审核通过失败", true);
        }
コード例 #2
0
        private void AcceptRequest(HttpContext context)
        {
            int    userId = 0;
            string empty  = string.Empty;

            empty = context.Request["userId"];
            if (!string.IsNullOrWhiteSpace(empty))
            {
                try
                {
                    userId = int.Parse(empty);
                }
                catch
                {
                    throw new HidistroAshxException("异常的参数:用户ID");
                }
            }
            if (MemberHelper.AccepteRerralRequest(userId))
            {
                MemberInfo user = Users.GetUser(userId);
                if (user != null)
                {
                    Users.ClearUserCache(userId, user.SessionId);
                }
                string text = HiContext.Current.SiteSettings.SiteUrl.ToLower();
                text  = (text.StartsWith("http://") ? text : ("http://" + text));
                text += "/vshop/SplittinRule";
                string first    = "您的分销员申请已通过审核";
                string remark   = "点击查看详情,跳转到分销员的分销海报页面";
                string keyword  = "审核通过";
                string keyword2 = DateTime.Now.ToString("yyyy年MM月dd日 HH:mm");
                Messenger.ExtensionAudit(user, text, keyword, keyword2, first, remark);
                base.ReturnResult(context, true, "分销员的申请已经审核通过", 0, true);
                return;
            }
            throw new HidistroAshxException("审核通过失败");
        }