Beispiel #1
0
    private void ProcessPay()
    {
        string username = Request.QueryString["username"].ToSafeString();
        int    c        = 0;

        using (var a = new WebHelperClient())
        {
            c = a.GetIDByUserName(username).FirstOrDefault();
        }

        if (c == 0)
        {
            Response.ReturnAndRedirect("用户不存在,请确保已经注册角色!", "login");
        }
        else
        {
            Response.Redirect("charge?userid=" + c.ToString() + "&step=1");
        }
    }
Beispiel #2
0
    private void ProcessInvite()
    {
        string username = Request.QueryString["user"].ToSafeString();
        int    c        = 0;

        using (var a = new WebHelperClient())
        {
            c = a.GetIDByUserName(username);
        }

        if (c == 0)
        {
            Response.ReturnAndRedirect("用户不存在,请确保已经注册角色!", "Default.aspx");
        }
        else
        {
            INVelocityEngine FileEngine = NVelocityEngineFactory.CreateNVelocityFileEngine(AppConfig.AppSettings["VMPath"], false);

            IDictionary context = new Hashtable();
            context.Add("content", $"{AppConfig.AppSettings["IndexPage"]}?i=" + c);
            Response.Write(FileEngine.Process(context, "invite.vm"));
        }
    }