/// <summary> /// Deprecated Method for adding a new object to the Telefone EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToTelefone(Telefone telefone) { base.AddObject("Telefone", telefone); }
protected void AdicionarTelefone(object sender, DirectEventArgs e) { int controle = QuantidadeTelefone(false);//nao salvos if (controle == 1) { X.Msg.Alert("Erro", "Para adicionar um outro telefone, será necessário salvar esse telefone.").Show(); return; } Telefone data = new Telefone(); data.Numero = " "; data.Tipo = "Fixo"; DataSourceTelefone.Add(data); SyncTelefoneDataSource(); StoreTelefone.LoadPage(DataSourceTelefone.Count); }
/// <summary> /// Create a new Telefone object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="numero">Initial value of the Numero property.</param> /// <param name="tipo">Initial value of the Tipo property.</param> /// <param name="usuarioTelefone_Id">Initial value of the UsuarioTelefone_Id property.</param> public static Telefone CreateTelefone(global::System.Int32 id, global::System.String numero, global::System.String tipo, global::System.Int32 usuarioTelefone_Id) { Telefone telefone = new Telefone(); telefone.Id = id; telefone.Numero = numero; telefone.Tipo = tipo; telefone.UsuarioTelefone_Id = usuarioTelefone_Id; return telefone; }