private void DeleteSelected() { if (AccountForAcc == null) { return; } AccountForChangeList.Remove(AccountForAcc); }
private void SelectAccount() { if (SelectedSearchAccount != null) { AccountForChangeList.Add(SelectedSearchAccount); SearchAccountText = string.Empty; ChangeStatusCommand.RaiseCanExecuteChanged(); } }
private void ChangeStatus() { if (string.IsNullOrWhiteSpace(AccountPayNumber)) { _accountStatusService.UpdateStatus(AccountForChangeList, SelectedStatus, AccountForChangeDate); } else { int payNumber; if (int.TryParse(AccountPayNumber, out payNumber)) { _accountStatusService.UpdateStatus(AccountForChangeList, SelectedStatus, AccountForChangeDate, payNumber); } } ExportConfirmationRequest.Raise(new Confirmation { Title = "Экспорт", Content = "Выгрузить в Excel?" }, c => { if (c.Confirmed) { var report = _excelReportService.CreateNewStatusesReport(AccountForChangeList); if (report != null) { _accountsController.SaveDialogWindow(); if (!string.IsNullOrWhiteSpace(_filename)) { _excelReportService.SaveReport(_filename, report); } } } }); AccountForChangeList.Clear(); SearchAccountText = string.Empty; AccountPayNumber = string.Empty; AccountForChangeDate = DateTime.Now; }