Danya_Ls Danya_Ls 2 年之前
父節點
當前提交
6786faacc3
共有 6 個文件被更改,包括 24 次插入2 次删除
  1. 2 2
      .gitignore
  2. 9 0
      Test/FormMain.cs
  3. 二進制
      Test/bin/Debug/Photo/1.png
  4. 二進制
      Test/bin/Debug/Photo/Z.png
  5. 二進制
      Test/bin/Debug/Test.exe
  6. 13 0
      Test/bin/Debug/Test.exe.config

+ 2 - 2
.gitignore

@@ -17,7 +17,7 @@
 mono_crash.*
 
 # Build results
-[Dd]ebug/
+# [Dd]ebug/
 [Dd]ebugPublic/
 [Rr]elease/
 [Rr]eleases/
@@ -27,7 +27,7 @@ x86/
 [Aa][Rr][Mm]/
 [Aa][Rr][Mm]64/
 bld/
-[Bb]in/
+# [Bb]in/
 [Oo]bj/
 [Oo]ut/
 [Ll]og/

+ 9 - 0
Test/FormMain.cs

@@ -20,6 +20,11 @@ namespace Test
 
         string TxtCon = "Data Source=213.155.192.79,3002;Initial Catalog=TestLVS;Persist Security Info=True;User ID=u21levinsas;Password=ngh4";
         string DiscNull = "";
+
+        /// <summary>
+        ///  Вывод записей из БД в DatGridView
+        /// </summary>
+
         void FillDgv()
         {
 
@@ -65,6 +70,10 @@ namespace Test
 
             Con.Close();
             LblCountNote.Text =$"{DgvProducts.Rows.Count} из {BsProducts.Count} записей";
+            if (DgvProducts.RowCount == 0)
+            {
+                MessageBox.Show("Ошибка в обновлении данных", "Внимание!", MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
         }
 
 

二進制
Test/bin/Debug/Photo/1.png


二進制
Test/bin/Debug/Photo/Z.png


二進制
Test/bin/Debug/Test.exe


+ 13 - 0
Test/bin/Debug/Test.exe.config

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <configSections>
+    </configSections>
+    <connectionStrings>
+        <add name="Test.Properties.Settings.TestLVSConnectionString"
+            connectionString="Data Source=213.155.192.79,3002;Initial Catalog=TestLVS;Persist Security Info=True;User ID=u21levinsas;Password=ngh4"
+            providerName="System.Data.SqlClient" />
+    </connectionStrings>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
+    </startup>
+</configuration>