Ejemplo n.º 1
0
 private void activeButton_Click(object sender, EventArgs e)
 {
     if (codeTextBox.Text.Trim() != "")
     {
         RegisterModel register = new RegisterModel();
         register.ActivationCode = codeTextBox.Text.Trim();
         register.ActivationDate = DateTime.Today;
         if (userGateway.isAlreadySent())
         {
             int rowAffect = userGateway.Active(register);
             if (rowAffect > 0)
             {
                 cMessageBox.Success("Updated Successfully, Please Restart The Program");
                 Application.Exit();
             }
             else
             {
                 cMessageBox.Failed("Invaild Code, or Its out of Dated");
             }
         }
         else
         {
             cMessageBox.Warning("Faild to active");
         }
     }
 }