private void btnTransfer_Click(object sender, EventArgs e) { if (cmListDep.Text != "Выберите, кому вы хотите передать отобранные детали") { if (_tempPresent.CheckDataOnException(_ctrlDetail.GridSelected)) { try { int idList = _tempPresent._dbDetails.CreateListAdd(_newUser); _tempPresent._dbDetails.SaveListDetailsTransfer(idList, _newDep, _ctrlDetail.GridSelected); _tempPresent.TakeAwayDetails(); _tempPresent.ClearFilterAndRefreshDgv(); Close(); } catch (Exception exception) { MessageBox.Show(exception.ToString()); } } } else { MessageBox.Show("Вы ничего не выбрали"); } }
//Button refreshs All Tables private void _mainMenu_BtnRefreshTable(object sender, EventArgs e) { //RefreshTable(); _presenterCtrlAllDetails.RefreshData(); _presenterCrtlAddDetails.Load_form(); _presenterDetailsInUserDepartment.ClearFilterAndRefreshDgv(); _presenterCtrlCreateReport.Load_Form(); }