private void BtnEdit_Click(object sender, RoutedEventArgs e) { PeriodeAkuntansiBLL periodeAkuntansiBLL = new PeriodeAkuntansiBLL(); if (periodeAkuntansiBLL.EditPeriodeAkuntansi(this.GetData()) == true) { this.ClearForm(); MessageBox.Show("The accounting period was successfully changed !"); this.accountingPeriodeForm.LoadPeriodeAkuntansi(); } else { MessageBox.Show("Accounting period failed to change !"); } this.Close(); }
private void BtnSave_Click(object sender, RoutedEventArgs e) { if (DtTahunBukuAwal.Text == "" || DtTahunBukuAkhir.Text == "") { MessageBox.Show("Please Select a Date", ("Form Validation"), MessageBoxButton.OK, MessageBoxImage.Error); return; } PeriodeAkuntansiBLL periodeAkuntansiBLL = new PeriodeAkuntansiBLL(); if (periodeAkuntansiBLL.AddPeriodeAkuntansi(this.GetData()) > 0) { this.ClearForm(); MessageBox.Show("Accounting period successfully added !"); this.accountingPeriodeForm.LoadPeriodeAkuntansi(); } else { MessageBox.Show("Accounting Period failed to add !"); } this.Close(); }