/// <summary> /// Guarda los datos emocionales dados por el usario /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">E.</param> private void GuardarSintomaEmocionalButton_TouchUpInside(object sender, EventArgs e) { if (!(intensidad == 0 || intensidad > 6) && !fechaSintomaEmocionalButton.TitleLabel.Text.Equals("Seleccione la fecha")) { iOSConnection iOSConnection = new iOSConnection(); var connection = iOSConnection.DBiOSConnection(); DBConnection dbConnection = new DBConnection(connection); FullProperties property = new FullProperties(); SintomasEmocionales sintomaEmocional = new SintomasEmocionales() { Tipo = Emocional, Fecha = fechaSintomaEmocionalButton.TitleLabel.Text, ídSintoma = property.IdSintoma }; dbConnection.CreateSintomaEmocional(sintomaEmocional); SintomasEmocionalesTableViewController detailUnidad = this.Storyboard.InstantiateViewController("sintomasEmocionalesTable") as SintomasEmocionalesTableViewController; if (detailUnidad != null) { this.NavigationController.ShowViewController(detailUnidad, this); } } else { string mensaje = ""; if (intensidad == 0 || intensidad > 6) { mensaje = mensaje + "\nSeleccione la emoción que esta experimentando"; } if (fechaSintomaEmocionalButton.TitleLabel.Text.Equals("Seleccione la fecha")) { mensaje = mensaje + "\nSeleccione la fecha"; } Messages(mensaje); } }
public void CreateSintomaEmocional(SintomasEmocionales sintomaEmocional) { _connection.Insert(sintomaEmocional); _connection.Commit(); }