Merge branch 'master' of http://192.168.0.12:13000/sc/ProcessManageUI
This commit is contained in:
commit
0f342b087e
2 files changed
+12
-6
No files matched your search
@@ -40,7 +40,7 @@ namespace ProcessManageUI
|
|||||||
directoryInfo.Create();//创建日志路径
|
directoryInfo.Create();//创建日志路径
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static void ERRDATA(System.Exception dat)
|
public static void ERRDATA(System.Exception dat,string d)
|
||||||
{
|
{
|
||||||
string Log_time = DateTime.Now.ToString("yyyy-MM-dd");
|
string Log_time = DateTime.Now.ToString("yyyy-MM-dd");
|
||||||
string logpath = System.Environment.CurrentDirectory + "\\ERR";//日志文件目录
|
string logpath = System.Environment.CurrentDirectory + "\\ERR";//日志文件目录
|
||||||
@@ -57,6 +57,7 @@ namespace ProcessManageUI
|
|||||||
// wr.Close();
|
// wr.Close();
|
||||||
FileStream fil = new FileStream(log_path, FileMode.CreateNew, FileAccess.Write);//创建写入文件
|
FileStream fil = new FileStream(log_path, FileMode.CreateNew, FileAccess.Write);//创建写入文件
|
||||||
StreamWriter wfil = new StreamWriter(fil);//创建文件
|
StreamWriter wfil = new StreamWriter(fil);//创建文件
|
||||||
|
wfil.WriteLine("[" + Log_timehms + "];[DYELOT] ||" + d);
|
||||||
wfil.WriteLine("[" + Log_timehms + "];[Error] ||" + Environment.NewLine.ToString());
|
wfil.WriteLine("[" + Log_timehms + "];[Error] ||" + Environment.NewLine.ToString());
|
||||||
wfil.WriteLine("[" + Log_timehms + "];[Error source] ||" + dat.Source.ToString() + Environment.NewLine.ToString());
|
wfil.WriteLine("[" + Log_timehms + "];[Error source] ||" + dat.Source.ToString() + Environment.NewLine.ToString());
|
||||||
wfil.WriteLine("[" + Log_timehms + "];[Error message] ||" + dat.Message.ToString() + Environment.NewLine.ToString());
|
wfil.WriteLine("[" + Log_timehms + "];[Error message] ||" + dat.Message.ToString() + Environment.NewLine.ToString());
|
||||||
@@ -67,6 +68,7 @@ namespace ProcessManageUI
|
|||||||
{
|
{
|
||||||
FileStream fs = new FileStream(log_path, FileMode.Append, FileAccess.Write);//创建写入文件
|
FileStream fs = new FileStream(log_path, FileMode.Append, FileAccess.Write);//创建写入文件
|
||||||
StreamWriter wr = new StreamWriter(fs);//创建文件
|
StreamWriter wr = new StreamWriter(fs);//创建文件
|
||||||
|
wr.WriteLine("[" + Log_timehms + "];[DYELOT] ||" + d);
|
||||||
wr.WriteLine("[" + Log_timehms + "];[Error] ||" + Environment.NewLine.ToString());
|
wr.WriteLine("[" + Log_timehms + "];[Error] ||" + Environment.NewLine.ToString());
|
||||||
wr.WriteLine("[" + Log_timehms + "];[Error source] ||" + dat.ToString() + Environment.NewLine.ToString());
|
wr.WriteLine("[" + Log_timehms + "];[Error source] ||" + dat.ToString() + Environment.NewLine.ToString());
|
||||||
wr.WriteLine("[" + Log_timehms + "];[Error message] ||" + dat.Message.ToString() + Environment.NewLine.ToString());
|
wr.WriteLine("[" + Log_timehms + "];[Error message] ||" + dat.Message.ToString() + Environment.NewLine.ToString());
|
||||||
|
|||||||
@@ -171,17 +171,19 @@ namespace ProcessManageUI
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
LogGing.ERRDATA(ex);
|
LogGing.ERRDATA(ex, Dyelot);
|
||||||
Datalog.AppendText(ex.ToString());
|
Datalog.AppendText("Dyelot="+Dyelot+"=="+ex.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
gram += row.Field<double>("Grams");
|
gram += row.Field<double>("Grams");
|
||||||
row.Delete();
|
row.Delete();
|
||||||
row.AcceptChanges();
|
row.AcceptChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
string NAME = "Process";
|
string NAME = "Process";
|
||||||
int Class = 0;
|
int Class = 0;
|
||||||
int TANK = 0;
|
int TANK = 0;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
NAME = Gram.Select("Type='" + type_id + "' and min<=" + (int)gram + " and max>" + (int)gram + "").First().Field<string>("name");
|
NAME = Gram.Select("Type='" + type_id + "' and min<=" + (int)gram + " and max>" + (int)gram + "").First().Field<string>("name");
|
||||||
@@ -190,12 +192,14 @@ namespace ProcessManageUI
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
LogGing.ERRDATA(ex);
|
LogGing.ERRDATA(ex, Dyelot);
|
||||||
Datalog.AppendText(ex.ToString());
|
Datalog.AppendText(ex.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
string DyelotsBulkedRecipe_updata = "UPDATE [dbo].[DyelotsBulkedRecipe] SET Process ='" + NAME +
|
string DyelotsBulkedRecipe_updata = "UPDATE [dbo].[DyelotsBulkedRecipe] SET Process ='" + NAME +
|
||||||
"' ,ProductClass='" + Class + "',MixTankNo='" + TANK +
|
"' ,ProductClass='" + Class + "',MixTankNo='" + TANK +
|
||||||
"' WHERE Dyelot ='" + Dyelot + "' AND ReDye='" + ReDye + "' AND StepNumber ='" + StepNumber + "'";
|
"' WHERE Dyelot ='" + Dyelot + "' AND ReDye='" + ReDye + "' AND StepNumber ='" + StepNumber + "'";
|
||||||
|
|
||||||
if (dbr_machine == 1)//添加机台
|
if (dbr_machine == 1)//添加机台
|
||||||
{
|
{
|
||||||
string DyelotsBulkedRecipe_machine = "SELECT * FROM[dbo].[Dyelots] " +
|
string DyelotsBulkedRecipe_machine = "SELECT * FROM[dbo].[Dyelots] " +
|
||||||
@@ -215,14 +219,14 @@ namespace ProcessManageUI
|
|||||||
Datalog.AppendText("\n" + DateTime.Now.ToString("yyyy/MM/dd-HH:mm:ss") +
|
Datalog.AppendText("\n" + DateTime.Now.ToString("yyyy/MM/dd-HH:mm:ss") +
|
||||||
" 转换工单:" + Dyelot + "-重染:"+ReDye+"-步骤:"+StepNumber+"\n影响行数"+
|
" 转换工单:" + Dyelot + "-重染:"+ReDye+"-步骤:"+StepNumber+"\n影响行数"+
|
||||||
DyelotsBulkedRecipe_UP.ExecuteNonQuery() + "-流程:"+ NAME+ "-机台:" + machine_T);
|
DyelotsBulkedRecipe_UP.ExecuteNonQuery() + "-流程:"+ NAME+ "-机台:" + machine_T);
|
||||||
LogGing.LogGingDATA( "转换工单:" + Dyelot + "重染" + ReDye + "步骤" + StepNumber + "流程:" + NAME+"机台:" + machine_T);
|
LogGing.LogGingDATA( "转换工单:" + Dyelot + "重染" + ReDye + "质量" + gram + "步骤" + StepNumber + "流程:" + NAME+"机台:" + machine_T);
|
||||||
}
|
}
|
||||||
Datalog.AppendText("\n" + DateTime.Now.ToString("yyyy/MM/dd-HH:mm:ss") + $" 转换完成{Count}条");
|
Datalog.AppendText("\n" + DateTime.Now.ToString("yyyy/MM/dd-HH:mm:ss") + $" 转换完成{Count}条");
|
||||||
Count = 0;
|
Count = 0;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{//错误处理
|
{//错误处理
|
||||||
LogGing.ERRDATA(ex);
|
LogGing.ERRDATA(ex,"NULL");
|
||||||
Datalog.AppendText(ex.ToString());
|
Datalog.AppendText(ex.ToString());
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|||||||
Reference in new issue
Block a user