Ge mingyu преди 1 година
родител
ревизия
4d93898391
променени са 3 файла, в които са добавени 20 реда и са изтрити 1 реда
  1. 1 1
      SIMDP.Project/App.config
  2. 1 0
      SIMDP.View/FormDataTraceability.Designer.cs
  3. 18 0
      SIMDP.View/FormDataTraceability.cs

+ 1 - 1
SIMDP.Project/App.config

@@ -10,7 +10,7 @@
 		<add key="ComponentDbType" value="sqlserver" />
 		<!--默认登陆的用户ID-->
 		<add key="DefaultUser" value="123" />
-		<add key="Version" value="1.7.5" />
+		<add key="Version" value="1.7.6" />
 		<add key="ClientSettingsProvider.ServiceUri" value="" />
 	</appSettings>
 	<connectionStrings>

+ 1 - 0
SIMDP.View/FormDataTraceability.Designer.cs

@@ -316,6 +316,7 @@
             this.gridView1.OptionsView.ShowGroupPanel = false;
             this.gridView1.OptionsView.ShowIndicator = false;
             this.gridView1.CustomDrawRowIndicator += new DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventHandler(this.gridView1_CustomDrawRowIndicator);
+            this.gridView1.RowStyle += new DevExpress.XtraGrid.Views.Grid.RowStyleEventHandler(this.gridView1_RowStyle);
             this.gridView1.CustomColumnDisplayText += new DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventHandler(this.gridView_PLC_CustomColumnDisplayText);
             this.gridView1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.gridView1_MouseDown);
             // 

+ 18 - 0
SIMDP.View/FormDataTraceability.cs

@@ -379,5 +379,23 @@ namespace SIMDP.View
             if (txt_batchid.Text == "")
                 SbtnSelect_Click(sender, e);
         }
+
+        private void gridView1_RowStyle(object sender, RowStyleEventArgs e)
+        {
+            GridView view = sender as GridView;
+            if (e.RowHandle >= 0)
+            {
+                DataRow postIs = view.GetDataRow(e.RowHandle);
+
+                foreach (object ob in postIs.ItemArray)
+                {
+                    if (string.Equals(ob.ToString(), "NG"))
+                    {
+                        e.Appearance.BackColor = Color.Tomato;
+                        //e.Appearance.BackColor2 = Color.SeaShell;
+                    }
+                }
+            }
+        }
     }
 }