private void saveAbonementChanges()
        {
            if (currClientId == -1)
            {
                return;
            }
            Abonement abon = new Abonement();

            if (!isAddingState)
            {
                abon.Id = Convert.ToInt32(abonementsIdComboBox.SelectedItem.ToString());
            }
            abon.VisitTypeId   = clientManager.GetVisitTypeIdByName(visitTypeСomboBox.SelectedItem.ToString());
            abon.ServiceTypeId = clientManager.GetServiceTypeIdByName(serviceTypeComboBox.SelectedItem.ToString());
            int?tgid = clientManager.GetTrainingGroupIdByName(trainingGroupsComboBox.SelectedItem.ToString());

            if (tgid != null)
            {
                abon.TrainingGroupId = tgid;
            }
            DateTime dt = dateEndPicker.Value;

            abon.DateEnd = dt;
            //if (DateTime.TryParse(dateEndTextBox.Text, out dt))
            //    abon.DateEnd = dt;
            int vc = 0;

            if (int.TryParse(visitCountTextBox.Text, out vc))
            {
                abon.VisitCount = vc;
            }
            abon.ClientId = currClientId;
            if (isAddingState)
            {
                clientManager.AddAbonement(abon);
            }
            else
            {
                clientManager.EditAbonement(abon);
            }
            MessageBox.Show("Сохранено!");
            isSaved = true;
            if (isAddingState)
            {
                AbonementIdComboBoxDataSourceUpdate(currClientId);
            }
            watchingState();
        }