コード例 #1
0
ファイル: GiocatoriManager.cs プロジェクト: LoZeno/Holonet3
 public bool SaveNewPlayer(string cognome, string nome, DateTime dataNascita, string indirizzo, string citta, string provincia, string cap, string telefono, DateTime dataIscrizione, string sesso, string tipoGiocatore, string email, string password)
 {
     try
     {
         Giocatore giocatore = new Giocatore();
         giocatore.CAP = cap;
         giocatore.Citta = citta;
         giocatore.Cognome = cognome;
         giocatore.DataIscrizione = dataIscrizione;
         giocatore.DataNascita = dataNascita;
         giocatore.Email = email;
         giocatore.Indirizzo = indirizzo;
         giocatore.Nome = nome;
         giocatore.Password = password;
         giocatore.Provincia = provincia;
         giocatore.Sesso = sesso;
         giocatore.Telefono = telefono;
         giocatore.TipoGiocatore = tipoGiocatore;
         context.AddToGiocatores(giocatore);
         return true;
     }
     catch
     {
         return false;
     }
 }
コード例 #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Giocatores EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToGiocatores(Giocatore giocatore)
 {
     base.AddObject("Giocatores", giocatore);
 }
コード例 #3
0
 /// <summary>
 /// Create a new Giocatore object.
 /// </summary>
 /// <param name="numeroSW">Initial value of the NumeroSW property.</param>
 /// <param name="cognome">Initial value of the Cognome property.</param>
 /// <param name="nome">Initial value of the Nome property.</param>
 /// <param name="dataNascita">Initial value of the DataNascita property.</param>
 /// <param name="dataIscrizione">Initial value of the DataIscrizione property.</param>
 /// <param name="sesso">Initial value of the Sesso property.</param>
 /// <param name="tipoGiocatore">Initial value of the TipoGiocatore property.</param>
 public static Giocatore CreateGiocatore(global::System.Int64 numeroSW, global::System.String cognome, global::System.String nome, global::System.DateTime dataNascita, global::System.DateTime dataIscrizione, global::System.String sesso, global::System.String tipoGiocatore)
 {
     Giocatore giocatore = new Giocatore();
     giocatore.NumeroSW = numeroSW;
     giocatore.Cognome = cognome;
     giocatore.Nome = nome;
     giocatore.DataNascita = dataNascita;
     giocatore.DataIscrizione = dataIscrizione;
     giocatore.Sesso = sesso;
     giocatore.TipoGiocatore = tipoGiocatore;
     return giocatore;
 }