protected void btnFinish_Click(object sender, EventArgs e) { if (_currentTask != null) { _currentTask.Dispose(); _currentTask = null; } ScheduleHelper.DeleteTask(ScheduleHelper.GetReportsFolder(_taskService), _generalReport.Id, "GR"); //Закончили работу с задачами if (_taskService != null) { _taskService.Dispose(); _taskService = null; } //Удаляем отчет using (new TransactionScope()) { _generalReport.Delete(); } Response.Redirect("base.aspx"); }