private bool validateAll() { bool namaPasien = Kenko.fieldRequired(txtNamaPasien.Text, lblNamaPasien); bool alamat = Kenko.fieldRequired(txtAlamat.Text, lblAlamat); bool noTelp = Kenko.fieldMin(txtNoTelp.Text, lblNoTelp, 11); bool tglLahir = Kenko.dateRequired(txtTglLahir, lblTgl); bool jenkel = Kenko.toggleRequired(lblJenkel, (bool)rdLaki.IsChecked, (bool)rdPerempuan.IsChecked); if (namaPasien && alamat && noTelp && tglLahir && jenkel) { return(true); } else { return(false); } }
private void txtTglLahir_LostFocus(object sender, RoutedEventArgs e) { Kenko.dateRequired(txtTglLahir, lblTgl); }