private async void SetButt_Click(object sender, RoutedEventArgs e) { if (STipeNilai.SelectedIndex == 0) { if (SNama.SelectedValue != null && SSemester.SelectedValue != null) { NilaiDanAbsen NdaForm = new NilaiDanAbsen(); NdaForm.SetData(SNama.SelectedValue.ToString(), SNama.Text, SSemester.Text, GetNamaPanggilan(SNama.SelectedValue.ToString())); NdaForm.ShowDialog(); this.Close(); } else { await this.ShowMessageAsync("Pilih Data", "Data belum lengkap!"); } } else if (STipeNilai.SelectedIndex == 1) { if (SNama.SelectedValue != null && SSemester.SelectedValue != null && SMapel.SelectedValue != null) { PengetahuanDanKeterampilan PenForm = new PengetahuanDanKeterampilan(); PenForm.SetData(SNama.SelectedValue.ToString(), SNama.Text, Convert.ToInt32(SMapel.SelectedValue), SMapel.Text, SSemester.Text, GetKelas(), GetNamaPanggilan(SNama.SelectedValue.ToString()), KKM); PenForm.ShowDialog(); this.Close(); } else { await this.ShowMessageAsync("Pilih Data", "Data belum lengkap!"); } } }
private void EditPengket_Click(object sender, RoutedEventArgs e) { DataRowView rd = (DataRowView)((Button)e.Source).DataContext; PengetahuanDanKeterampilan pdk = new PengetahuanDanKeterampilan(); pdk.SetEdit(rd.Row[0].ToString(), rd.Row[1].ToString(), rd.Row[2].ToString(), Convert.ToInt32(rd.Row[4]), rd.Row[5].ToString(), rd.Row[3].ToString(), rd.Row[6].ToString(), rd.Row[9].ToString(), GetKelas(), 60); pdk.Show(); this.Close(); }