Browse Source

缓存本地SQL

章政 8 years ago
parent
commit
4cd3462e4c
1 changed files with 4 additions and 1 deletions
  1. 4 1
      UAS-MES/FunctionCode/Make/Make_CustomLabelPrint.cs

+ 4 - 1
UAS-MES/FunctionCode/Make/Make_CustomLabelPrint.cs

@@ -92,7 +92,10 @@ namespace UAS_MES.Make
                     return;
                 }
                 //查询产品是否有自定义的标签模板
-                listA = (DataTable)dh.ExecuteSql("select la_code,la_id,substr(la_url,instr(la_url,'\\',-1)+1)la_name,la_url,la_isdefault from label where la_prodcode='" + pr_code.Text + "' and la_templatetype='自定义' and la_statuscode='AUDITED' order by la_isdefault", "select");
+                sql.Clear();
+                sql.Append("select la_code,la_id,substr(la_url,instr(la_url,'\\',-1)+1)la_name,la_url,la_isdefault ");
+                sql.Append("from label where la_prodcode='" + pr_code.Text + "' and la_templatetype='自定义' and la_statuscode='AUDITED' order by la_isdefault");
+                listA = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 if (listA.Rows.Count == 0)
                 {
                     OperateResult.AppendText("<<产品:" + pr_code.Text + ",没有维护自定义模板\n", Color.Red, pr_code);