Example #1
0
        private void btnSet_Click(object sender, EventArgs e)
        {
            getDataGridViewAdmin();

            Errors resultSaving = m_admin.SaveChanges();

            if (resultSaving == Errors.NoError)
            {
                string log = m_admin.GetLogStringChanged();
                Logging.Logg().Action("PanelAdminKomDisp:Set - Сохранение данных" + log, Logging.INDEX_MESSAGE.NOT_SET);
                ClearTables();

                m_admin.GetRDGValues(/*(int)m_admin.m_typeFields,*/ m_listTECComponentIndex[comboBoxTecComponent.SelectedIndex], mcldrDate.SelectionStart);
            }
            else
            {
                if (resultSaving == Errors.InvalidValue)
                {
                    MessageBox.Show(this, "Изменение ретроспективы недопустимо!", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                }
                else
                {
                    MessageBox.Show(this, "Не удалось сохранить изменения, возможно отсутствует связь с базой данных.", "Ошибка сохранения", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }