Esempio n. 1
0
 void btnSalvaMittente_Click(object sender, EventArgs e)
 {
     if (numeroMittente != null)
     {
         RubricaManager nomiManager = new RubricaManager(DatabaseContext);
         nomiManager.AddNewContact(LoggedCharacter.NumeroPG, (long)numeroMittente, lblMittente.Text);
         DatabaseContext.SaveChanges();
         statusMessage.Text       = "Mittente Salvato in Rubrica";
         btnSalvaMittente.Visible = false;
     }
 }
Esempio n. 2
0
 protected void btnSalva_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrWhiteSpace(txtNumero.Text) && !string.IsNullOrWhiteSpace(txtNome.Text))
     {
         Personaggio    currentCharacter = this.LoggedCharacter;
         RubricaManager namesManager     = new RubricaManager(DatabaseContext);
         long           contactNumber    = long.Parse(txtNumero.Text.Trim());
         namesManager.AddNewContact(currentCharacter.NumeroPG, contactNumber, txtNome.Text.Trim());
         DatabaseContext.SaveChanges();
     }
     carica();
 }