Beispiel #1
0
		public async void ActualizarButton_Clicked(object sender, EventArgs e)
		{
			if (string.IsNullOrEmpty (nombresEntry.Text)) 
			{
				await DisplayAlert ("Error", "Debe add numbers", "Aceptar");
				nombresEntry.Focus ();
				return;
			}

			if (string.IsNullOrEmpty (apellidosEntry.Text)) 
			{
				await DisplayAlert ("Error", "Debe add apellidos", "Aceptar");
				apellidosEntry.Focus ();
				return;
			}

			if (string.IsNullOrEmpty (salarioEntry.Text)) 
			{
				await DisplayAlert ("Error", "Debe add salario", "Aceptar");
				salarioEntry.Focus ();
				return;
			}

			Employ = Employ = new Employ 
			{
				IDEmploy = this.employ.IDEmploy(),
				Activo = activoSwitch.IsToggled,
				Apellidos =  apellidosEntry.Text,
				FechaContrato = fechaContratoDatePicker.Date,
				Nombres = nombresEntry.Text,
				Salario = decimal.Parse(salaryioEntry.Text)

			};

			using (var datos = new DataAccess ()) 
			{
				datos.UpdateEmploy (employ);
				//datosListView.ItemsSource = datos.GetEmploy ();
			}

		}