|
|
@ -225,7 +225,13 @@ namespace WeighAndGrading |
|
|
{ |
|
|
{ |
|
|
VerifyConnection(); |
|
|
VerifyConnection(); |
|
|
if (connection) |
|
|
if (connection) |
|
|
tangList = GradeAndWeightRpc.GetGradeAndWeightList(butcherTimeInput.Date.Value, true); |
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
try |
|
|
|
|
|
{ |
|
|
|
|
|
tangList = GradeAndWeightRpc.GetGradeAndWeightList(butcherTimeInput.Date.Value, true); |
|
|
|
|
|
} |
|
|
|
|
|
catch (TimeoutException) { } |
|
|
|
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
if (tangList == null) |
|
|
if (tangList == null) |
|
|
@ -269,7 +275,13 @@ namespace WeighAndGrading |
|
|
{ |
|
|
{ |
|
|
VerifyConnection(); |
|
|
VerifyConnection(); |
|
|
if (connection) |
|
|
if (connection) |
|
|
maoList = GradeAndWeightRpc.GetGradeAndWeightList(butcherTimeInput.Date.Value, false); |
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
try |
|
|
|
|
|
{ |
|
|
|
|
|
maoList = GradeAndWeightRpc.GetGradeAndWeightList(butcherTimeInput.Date.Value, false); |
|
|
|
|
|
} |
|
|
|
|
|
catch (TimeoutException) { } |
|
|
|
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
if (maoList == null) |
|
|
if (maoList == null) |
|
|
@ -1012,7 +1024,8 @@ namespace WeighAndGrading |
|
|
SyncDiscontToSever(); |
|
|
SyncDiscontToSever(); |
|
|
LocalGradeAndWeightBL.Sync(); |
|
|
LocalGradeAndWeightBL.Sync(); |
|
|
} |
|
|
} |
|
|
catch(Exception ex) { |
|
|
|
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
|
{ |
|
|
File.WriteAllText(string.Format("{0:yyyyMMddHHmmss}log.txt", DateTime.Now), "错误:" + ex.Message + " \n详细信息:" + ex.StackTrace); |
|
|
File.WriteAllText(string.Format("{0:yyyyMMddHHmmss}log.txt", DateTime.Now), "错误:" + ex.Message + " \n详细信息:" + ex.StackTrace); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|