Esempio n. 1
0
 protected void ProductKey(object sender, EventArgs e)
 {
     try
     {
         if (txtProductKey1.Text == "")
         {
             ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('Fill Product Key 1 ')", true);
             ProductKeyDiv.Visible  = false;
             ProductKeyName.Visible = true;
         }
         else if (txtProductKey2.Text == "")
         {
             ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('Fill Product Key 2 ')", true);
             ProductKeyDiv.Visible  = false;
             ProductKeyName.Visible = true;
         }
         else
         {
             objML_Login.ProductKey1 = objCommonClass.GetEncrptPassword(txtProductKey1.Text);
             objML_Login.ProductKey2 = objCommonClass.GetEncrptPassword(txtProductKey2.Text);
             int x = objBL_Login.BL_ProductKeyInsert(objML_Login);
             if (x == 1)
             {
                 ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('Product Key Successfully Done')", true);
                 LoginInfo.Visible      = true;
                 ProductKeyDiv.Visible  = false;
                 ProductKeyName.Visible = false;
                 Captcha();
             }
         }
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('" + ex.Message.ToString() + "');", true);
     }
 }