private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { previousYear = new PreviousYear(); PreviousYearDataHelper previousYearDataHelper = new PreviousYearDataHelper(selectedIndex); previousYear = previousYearDataHelper.GetPreviousYearData(selectedYear); }
private void AddAccount() { PreviousYearDataHelper previousYearDataHelper = new PreviousYearDataHelper(selectedIndex); addStatus = previousYearDataHelper.UpdateYearsData(previousYear); if (addStatus > 0) { MessageBox.Show("Data updated successfully! ", "Data updated successfully!", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Failed to update data!", "Failed to update data!", MessageBoxButtons.OK, MessageBoxIcon.Error); } }