|
|
@@ -289,10 +289,19 @@ namespace UAS_MES_NEW.Packing
|
|
|
|
|
|
private void pr_code_TextChanged(object sender, EventArgs e)
|
|
|
{
|
|
|
- dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault from label where la_prodcode='" + pr_code.Text + "' and la_templatetype='卡通箱标' and la_statuscode='AUDITED' order by la_isdefault", "select");
|
|
|
- PrintLabel.DataSource = dt;
|
|
|
- PrintLabel.DisplayMember = "la_url";
|
|
|
- PrintLabel.ValueMember = "la_id";
|
|
|
+ DataTable _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault,replace(LA_SOFTTYPE,';',',')LA_SOFTTYPE from label where la_prodcode='" + pr_code.Text + "' and la_templatetype='卡通箱标' and la_statuscode='AUDITED' order by la_isdefault", "select");
|
|
|
+ if (_dt.Rows.Count == 0)
|
|
|
+ {
|
|
|
+ _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault,replace(LA_SOFTTYPE,';',',')LA_SOFTTYPE from label where la_prodcode is null and la_templatetype='卡通箱标' and la_statuscode='AUDITED' order by la_isdefault", "select");
|
|
|
+ }
|
|
|
+ if (_dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ string la_id = _dt.Rows[0]["la_id"].ToString();
|
|
|
+ _dt = (DataTable)dh.ExecuteSql("select fp_name la_url,'" + la_id + "' la_id from FILEPATH where fp_id in (select * from table(select parsestring(LA_SOFTTYPE,';') from label where la_id='" + la_id + "') where COLUMN_VALUE is not null)", "select");
|
|
|
+ PrintLabel.DataSource = _dt;
|
|
|
+ PrintLabel.DisplayMember = "la_url";
|
|
|
+ PrintLabel.ValueMember = "la_id";
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private void PrintLabel_SelectedValueChanged(object sender, EventArgs e)
|