|
|
@@ -38,7 +38,7 @@ namespace UAS_MES_NEW.Make
|
|
|
Boolean startcheck = false;
|
|
|
int getcheck = 0;
|
|
|
|
|
|
- Dictionary <string,DateTime> dateTimeDictionary = new Dictionary<string, DateTime>();
|
|
|
+ Dictionary<string, DateTime> dateTimeDictionary = new Dictionary<string, DateTime>();
|
|
|
/// <summary>
|
|
|
/// 已选的不良
|
|
|
/// </summary>
|
|
|
@@ -53,7 +53,7 @@ namespace UAS_MES_NEW.Make
|
|
|
bool LockSn = false;
|
|
|
|
|
|
DataTable Dbfind;
|
|
|
-
|
|
|
+
|
|
|
|
|
|
public Make_TestCollection()
|
|
|
{
|
|
|
@@ -89,7 +89,7 @@ namespace UAS_MES_NEW.Make
|
|
|
StepCount.Start();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
private void text_getfocus(object sender, EventArgs e)
|
|
|
{
|
|
|
@@ -223,6 +223,23 @@ namespace UAS_MES_NEW.Make
|
|
|
LockMakeCode.Checked = true;
|
|
|
}
|
|
|
}
|
|
|
+ string wo = string.IsNullOrEmpty(oMakeCode) ? ma_code.Text.Trim() : oMakeCode;
|
|
|
+ dt = (DataTable)dh.ExecuteSql($"select ma_softversion from make where ma_code = '{wo}'", "select");
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ string softversion = dt.Rows[0]["ma_softversion"].ToString();
|
|
|
+ if (string.IsNullOrEmpty(softversion) && User.CurrentStepName == "程序烧写")
|
|
|
+ {
|
|
|
+ new_softversion.Enabled = true;
|
|
|
+ new_softversion.Focus();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ new_softversion.Enabled = false;
|
|
|
+ new_softversion.Text = softversion;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
dt = (DataTable)dh.ExecuteSql("select ms_nextstepcode,ms_sncode,ms_reworkstatus,nvl(ms_ifrework,0)ms_ifrework,ms_stepcode,ms_status,nvl(st_ifrepair,0) st_ifrepair from makeserial left join step on ms_stepcode=st_code where ms_id='" + oMSID + "'", "select");
|
|
|
string status = dt.Rows[0]["ms_status"].ToString();
|
|
|
reworkstatus = dt.Rows[0]["ms_reworkstatus"].ToString();
|
|
|
@@ -990,7 +1007,7 @@ namespace UAS_MES_NEW.Make
|
|
|
{
|
|
|
if (e.KeyCode == Keys.Enter)
|
|
|
{
|
|
|
- if (SMTBind.Checked&& GoodProduct.Checked)
|
|
|
+ if (SMTBind.Checked && GoodProduct.Checked)
|
|
|
{
|
|
|
DataTable dt = (DataTable)dh.ExecuteSql("select A.SB_BARCODE from smtbind A LEFT JOIN SMTBIND B ON A.SB_MAINCODE = B.SB_MAINCODE WHERE B.SB_BARCODE = '" + ms_sncode.Text + "'", "select");
|
|
|
if (dt.Rows.Count > 0)
|
|
|
@@ -1117,19 +1134,19 @@ namespace UAS_MES_NEW.Make
|
|
|
if (e.ChangeType == WatcherChangeTypes.Changed || e.ChangeType == WatcherChangeTypes.Created)
|
|
|
{
|
|
|
Stream stream = null;
|
|
|
-
|
|
|
+
|
|
|
while (true)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
using (stream = File.Open(e.FullPath, FileMode.Open, FileAccess.Read, FileShare.Read))
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
if (stream != null)
|
|
|
stream.Close();
|
|
|
break;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
@@ -1175,12 +1192,33 @@ namespace UAS_MES_NEW.Make
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
_Sr.Close();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ private void new_softversion_KeyDown(object sender, KeyEventArgs e)
|
|
|
+ {
|
|
|
+ if (e.KeyCode == Keys.Enter)
|
|
|
+ {
|
|
|
+ string sv = new_softversion.Text.Trim();
|
|
|
+ if (!string.IsNullOrEmpty(sv))
|
|
|
+ {
|
|
|
+ dh.UpdateByCondition("make", $"ma_softversion='{sv}'", "ma_code='" + ma_code.Text.Trim() + "'");
|
|
|
+ dh.UpdateByCondition("makeserial", $"MS_SOFTVERSION='{sv}'", "ms_id='" + oMSID + "'");
|
|
|
+
|
|
|
+ new_softversion.Text = "";
|
|
|
+ dt = (DataTable)dh.ExecuteSql($"SELECT ms_softversion FROM makeserial WHERE ms_id = '{oMSID}'", "select");
|
|
|
+ new_softversion.Text = dt.Rows[0]["ms_softversion"].ToString();
|
|
|
+
|
|
|
+ new_softversion.Enabled = false;
|
|
|
+ ms_sncode.Focus();
|
|
|
+ ms_sncode.SelectAll();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|