private void upsertAbsence() { Absence absence = getAbsenceFromControls(); Boolean success; if (idAbsenceEditing != 0) { absence.idAbsence = idAbsenceEditing; success = absenceControl.updateAbsence(absence); saveModeControls(); } else { success = absenceControl.saveAbsence(absence); } cleanControls(); if (success) { DialogHost.Show(new SampleMessageDialog("Afastamento salvo com sucesso."), "DHMain"); absenceViewControl.fillGridAbsence(); } else { DialogHost.Show(new SampleMessageDialog("Erro ao salvar Afastamento."), "DHMain"); } }
private void insertAbsence() { Absence absence = getAbsenceFromControls(); absenceControl.saveAbsence(absence); }