Esempio n. 1
0
    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/plain";
        try
        {
            string email   = context.Request.Params["email"];
            string name    = context.Request.Params["name"];
            string check   = context.Request.Params["check"];
            string lang    = context.Request.Params["lang"];
            string product = context.Request.Params["product"];

            if (check != "vertex5L34")
            {
                throw new Exception("Bad code");
            }
            string text = Resources.EmailTexts.trial_en;
            if (lang == "cs" || lang == "cz")
            {
                text = Resources.EmailTexts.trial_cz;
            }
            SendTool.SendLicense(name, email, email, text, product + "-eval");
            context.Response.Write("OK");
        }
        catch (Exception err)
        {
            context.Response.Write(err.Message);
        }
    }
Esempio n. 2
0
 protected void btnGenerate_Click(object sender, EventArgs e)
 {
     if (tbxCheck.Text != "vertex5L34")
     {
         throw new Exception("Unauthorized");
     }
     SendTool.SendLicense(tbxName.Text, tbxEmail.Text, String.IsNullOrEmpty(tbxSendEmail.Text) ? tbxEmail.Text : tbxSendEmail.Text, tbxEmailBody.Text, cbxLicense.SelectedValue);
     labAction.Text = String.Format("License {0} sent to {1}", cbxLicense.SelectedItem.Text, tbxEmail.Text);
 }