|
|
@@ -187,13 +187,13 @@ namespace UAS_MES.Packing
|
|
|
//更新彩盒重量最大值最小值
|
|
|
if (isKg)
|
|
|
{
|
|
|
- dh.ExecuteSql("update product set PR_COLORBOXMAXW ='" + (sum + double.Parse(errorValue.Text))/1000 + "', PR_COLORBOXMINW = '" + (sum - double.Parse(errorValue.Text))/1000 + "',PR_COLORBOXUNIT='" + pr_cartonunit.Text + "' where pr_code='" + pr_code.Text + "'", "update");
|
|
|
- OperateResult.AppendText("<<重量设置成功,最大值" + (sum + double.Parse(errorValue.Text))/1000 + "kg,最小值" + (sum - double.Parse(errorValue.Text))/1000 + "kg\n", Color.Green);
|
|
|
+ dh.ExecuteSql("update product set PR_COLORBOXMAXW ='" +Math.Round( (sum + double.Parse(errorValue.Text))/1000) + "', PR_COLORBOXMINW = '" +Math.Round( (sum - double.Parse(errorValue.Text))/1000) + "',PR_COLORBOXUNIT='" + pr_cartonunit.Text + "' where pr_code='" + pr_code.Text + "'", "update");
|
|
|
+ OperateResult.AppendText("<<重量设置成功,最大值" +Math.Round( (sum + double.Parse(errorValue.Text))/1000 )+ "kg,最小值" +Math.Round( (sum - double.Parse(errorValue.Text))/1000 ) + "kg\n", Color.Green);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- dh.ExecuteSql("update product set PR_COLORBOXMAXW ='" + (sum + double.Parse(errorValue.Text)) + "', PR_COLORBOXMINW = '" + (sum - double.Parse(errorValue.Text)) + "',PR_COLORBOXUNIT='" + pr_cartonunit.Text + "' where pr_code='" + pr_code.Text + "'", "update");
|
|
|
- OperateResult.AppendText("<<重量设置成功,最大值"+ (sum + double.Parse(errorValue.Text)) + "g,最小值"+ (sum - double.Parse(errorValue.Text)) + "g\n", Color.Green);
|
|
|
+ dh.ExecuteSql("update product set PR_COLORBOXMAXW ='" +Math.Round( (sum + double.Parse(errorValue.Text)) ) + "', PR_COLORBOXMINW = '" + Math.Round((sum - double.Parse(errorValue.Text))) + "',PR_COLORBOXUNIT='" + pr_cartonunit.Text + "' where pr_code='" + pr_code.Text + "'", "update");
|
|
|
+ OperateResult.AppendText("<<重量设置成功,最大值"+ Math.Round( (sum + double.Parse(errorValue.Text)) ) + "g,最小值"+ Math.Round((sum - double.Parse(errorValue.Text))) + "g\n", Color.Green);
|
|
|
}
|
|
|
//更新采样记录表
|
|
|
string serialNum = dh.GetSerialNumberByCaller("ProdWeightSample");
|