Browse Source

为空值时不进行缓存

章政 8 years ago
parent
commit
e555b8b250
1 changed files with 4 additions and 0 deletions
  1. 4 0
      UAS-出货标签管理/UAS_出货标签管理.cs

+ 4 - 0
UAS-出货标签管理/UAS_出货标签管理.cs

@@ -1337,6 +1337,10 @@ namespace UAS_LabelMachine
                 MidBoxCacheData.Columns.Add(IDColumn);
             if (!MidBoxCacheData.Columns.Contains("pib_outboxcode1"))
                 MidBoxCacheData.Columns.Add(OutBoxColumn);
+            if (MidLabelCombox.SelectedValue == null)
+            {
+                return;
+            }
             string la_id = MidLabelCombox.SelectedValue.ToString().Split('#')[0];
             DataTable dt = (DataTable)dh.ExecuteSql("select lp_name,lp_sql from label left join LABELPARAMETER on la_id= lp_laid where la_id=" + la_id, "select");
             for (int j = 0; j < MidDoc.Variables.FreeVariables.Count; j++)