|
|
@@ -137,7 +137,7 @@ namespace UAS_LabelMachine
|
|
|
System.DateTime time;
|
|
|
try
|
|
|
{
|
|
|
- time = Convert.ToDateTime(LabelDataGridView.Rows[e.RowIndex].Cells["cl_date"].Value.ToString());
|
|
|
+ time = Convert.ToDateTime(LabelDataGridView.Rows[e.RowIndex].Cells["cl_date"].Value.ToString());
|
|
|
}
|
|
|
catch (Exception)
|
|
|
{
|
|
|
@@ -295,7 +295,7 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
if (LabelCode != "")
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -303,7 +303,7 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
catch (Exception)
|
|
|
{
|
|
|
@@ -343,6 +343,12 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ DataTable dt = (DataTable)dh.ExecuteSql("select cl_custcode,cl_labeltype from customerlabel where cl_labelname='" + la_name.Text + "' and cl_custcode='" + 客户编号.Text + "' and cl_labeltype<>'" + la_type1.Text + "'", "select");
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ MessageBox.Show("已有名称为" + la_name.Text + "的标签用作" + dt.Rows[0]["cl_custcode"].ToString() + dt.Rows[0]["cl_labeltype"].ToString());
|
|
|
+ return;
|
|
|
+ }
|
|
|
sql.Clear();
|
|
|
sql.Append("insert into customerlabel (cl_id,cl_labelcode,cl_custcode,cl_labeltype,cl_labelurl,cl_labelname,cl_labelsoft,cl_date) values( customerlabel_seq.nextval, ");
|
|
|
sql.Append("'" + la_code.Text + "','" + (客户编号.Text == "" ? "" : 客户编号.Text) + "','" + la_type1.Text + "','" + ftpOperater.FTPAddress + "','" + la_name.Text + "','" + SoftWare + "',sysdate)");
|