diff --git a/.vs/Diplom B/v16/.suo b/.vs/Diplom B/v16/.suo index b3488f0..c3f774a 100644 Binary files a/.vs/Diplom B/v16/.suo and b/.vs/Diplom B/v16/.suo differ diff --git a/DogForm.cs b/DogForm.cs index 0a9a532..c735346 100644 --- a/DogForm.cs +++ b/DogForm.cs @@ -363,10 +363,10 @@ namespace Diplom_B { if (!int.TryParse(idLabel.Text, out int dogId)) { ShowError("Договор не выбран."); return; } if (docGridView.SelectedRows.Count != 1) { ShowError("Договор не выбран."); return; } - var doc = WorkDB.GetDocument((int)docGridView.SelectedRows[0].Cells[0].Value); - if (doc == null) { ShowError("Документ не существует."); return; } - var dogDoc = WorkDB.GetDogDoc(dogId, doc.Id); + var dogDoc = WorkDB.GetDogDoc((int)docGridView.SelectedRows[0].Cells[0].Value); if (dogDoc == null) { ShowError("Документ не связана с договором."); return; } + var doc = WorkDB.GetDocument(dogDoc.DocumentId); + if (doc == null) { ShowError("Документ не существует."); return; } WorkDB.DeleteDogDoc(dogDoc); UpdateDocTable(); } diff --git a/PostForm.cs b/PostForm.cs index 0b38b51..1ef5b23 100644 --- a/PostForm.cs +++ b/PostForm.cs @@ -279,7 +279,7 @@ namespace Diplom_B form.ShowDialog(); dogovorId = form.returnId; if (dogovorId.HasValue) - dogNumLabel.Text = "НАДО ПОПРАВИТЬ КОД"; + dogNumLabel.Text = WorkDB.GetDogovor(dogovorId.Value).DogNum; else dogNumLabel.Text = ""; } diff --git a/obj/Debug/Diplom B.application b/obj/Debug/Diplom B.application index cd5aace..4abf49e 100644 --- a/obj/Debug/Diplom B.application +++ b/obj/Debug/Diplom B.application @@ -14,7 +14,7 @@ - 8OmHQrkhJ3LagfGhNhL1N7p+E+Odmf5WOelpJgOi3Hc= + X0hvKwTTHcE7anb0WonPeVSVBpfYZcFUxNBKIpU62qQ= diff --git a/obj/Debug/Diplom B.exe b/obj/Debug/Diplom B.exe index 7601767..e2cf9ac 100644 Binary files a/obj/Debug/Diplom B.exe and b/obj/Debug/Diplom B.exe differ diff --git a/obj/Debug/Diplom B.exe.manifest b/obj/Debug/Diplom B.exe.manifest index 8f29c31..7c23736 100644 --- a/obj/Debug/Diplom B.exe.manifest +++ b/obj/Debug/Diplom B.exe.manifest @@ -49,7 +49,7 @@ - KeeFZQ1211FIC7ocLT1a7xNsu1jH0hdFXnHXyNPrWFI= + PcItQ+GLTtgDVnU0grCE/UCpxJx55939ybCOeLAFj8s= diff --git a/obj/Debug/Diplom B.pdb b/obj/Debug/Diplom B.pdb index 343f9a7..289bb28 100644 Binary files a/obj/Debug/Diplom B.pdb and b/obj/Debug/Diplom B.pdb differ diff --git a/obj/Release/Diplom B.application b/obj/Release/Diplom B.application index f6a8a76..b110d6b 100644 --- a/obj/Release/Diplom B.application +++ b/obj/Release/Diplom B.application @@ -14,7 +14,7 @@ - lNU/e4F1KOZi75XLPiA6bAR8eRIA2/r0/qbf9o1QwPg= + fPKE9Ykhf57d+LLvJiCpB4OlTVuwhSJg0Bs+5QRYRBM= diff --git a/obj/Release/Diplom B.csproj.AssemblyReference.cache b/obj/Release/Diplom B.csproj.AssemblyReference.cache index 9b6ba07..cbe8918 100644 Binary files a/obj/Release/Diplom B.csproj.AssemblyReference.cache and b/obj/Release/Diplom B.csproj.AssemblyReference.cache differ diff --git a/obj/Release/Diplom B.exe b/obj/Release/Diplom B.exe index ab522cb..11a714f 100644 Binary files a/obj/Release/Diplom B.exe and b/obj/Release/Diplom B.exe differ diff --git a/obj/Release/Diplom B.exe.manifest b/obj/Release/Diplom B.exe.manifest index d8ef485..301a0b1 100644 --- a/obj/Release/Diplom B.exe.manifest +++ b/obj/Release/Diplom B.exe.manifest @@ -49,7 +49,7 @@ - YgZmAivaborZ3psAJ7zkLCQ76uyPI5oHDIbn3EkCVpc= + wN4CjE2QB5CLoWcBFD3Ij2JAKDKNrasXYx1pqFfgHFQ= diff --git a/obj/Release/Diplom B.pdb b/obj/Release/Diplom B.pdb index ecd475c..ece1193 100644 Binary files a/obj/Release/Diplom B.pdb and b/obj/Release/Diplom B.pdb differ