Skip to content

Commit

Permalink
Исправил ошибки решения мерж конфликта
Browse files Browse the repository at this point in the history
  • Loading branch information
FvckNeighbors authored May 26, 2019
1 parent 5102cf4 commit 436d9a7
Showing 1 changed file with 27 additions and 28 deletions.
55 changes: 27 additions & 28 deletions TimetableOfClasses/AddAcademicDegree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,17 @@ private void Button1_Click(object sender, EventArgs e) // Создать и о
{
if (FullName.Text.Length != 0)
{
MAcademicDegree AcademicDegree = new MAcademicDegree(FullName.Text, Reduction.Text);
RefData.CAcademicDegree.Insert(AcademicDegree);
FullName.Text = "";
Reduction.Text = "";
}
catch (Exception)
{
MessageBox.Show("Некорректно заполнены поля", "Ошибка");
try
{
MAcademicDegree AcademicDegree = new MAcademicDegree(FullName.Text, Reduction.Text);
RefData.CAcademicDegree.Insert(AcademicDegree);
FullName.Text = "";
Reduction.Text = "";
}
catch (Exception)
{
MessageBox.Show("Некорректно заполнены поля", "Ошибка");
}
}
else MessageBox.Show("Заполните полe 'Полная запись учёной степени'", "Попробуйте снова", MessageBoxButtons.OK);
}
Expand All @@ -66,15 +69,19 @@ private void Button2_Click(object sender, EventArgs e) //Создать и за
{
if (FullName.Text.Length != 0)
{
MAcademicDegree AcademicDegree = new MAcademicDegree(FullName.Text, Reduction.Text);
RefData.CAcademicDegree.Update(AcademicDegree);
FullName.Text = "";
Reduction.Text = "";
Close();
}
catch (Exception)
{
MessageBox.Show("Некорректно заполнены поля", "Ошибка");
try
{
MAcademicDegree AcademicDegree = new MAcademicDegree(FullName.Text, Reduction.Text);
RefData.CAcademicDegree.Update(AcademicDegree);
FullName.Text = "";
Reduction.Text = "";
Close();
}
catch (Exception)
{
MessageBox.Show("Некорректно заполнены поля", "Ошибка");
}

}
else MessageBox.Show("Заполните полe 'Полная запись учёной степени'", "Попробуйте снова", MessageBoxButtons.OK);
}
Expand All @@ -83,26 +90,18 @@ private void Button2_Click(object sender, EventArgs e) //Создать и за
else MessageBox.Show("Заполните поля", "Попробуйте снова", MessageBoxButtons.OK);
}
else
{
{

if ((Reduction.Text.Length != 0) || (FullName.Text.Length != 0))
{
if (Reduction.Text.Length != 0)
{
try
{
MAcademicDegree AcademicDegree = new MAcademicDegree(FullName.Text, Reduction.Text);
RefData.CAcademicDegree.Insert(AcademicDegree);
FullName.Text = "";
Reduction.Text = "";
Close();
}
catch (Exception)
if (FullName.Text.Length != 0)
{
try
{
MAcademicDegree AcademicDegree = new MAcademicDegree(FullName.Text, Reduction.Text);
Controllers.CAcademicDegree.Insert(AcademicDegree);
RefData.CAcademicDegree.Insert(AcademicDegree);
FullName.Text = "";
Reduction.Text = "";
Close();
Expand Down

0 comments on commit 436d9a7

Please sign in to comment.