Browse Source

fixed bug

master
wugang 8 years ago
parent
commit
d3a177194a
3 changed files with 8 additions and 21 deletions
  1. +7
    -4
      CowOutputClient/OperateWindow.xaml.cs
  2. +1
    -1
      CowOutputClient/app.config
  3. +0
    -16
      WeighBusiness/BL/GoodsWeightFloatBL.cs

+ 7
- 4
CowOutputClient/OperateWindow.xaml.cs View File

@ -202,17 +202,18 @@ namespace CowOutputClient
} }
} }
private void SetStandardWeight(GoodsWeightFloat_Detail floatData, ProCataGoods detail, decimal? num, WeightInfo weight)
private bool SetStandardWeight(GoodsWeightFloat_Detail floatData, ProCataGoods detail, decimal? num, WeightInfo weight)
{ {
if (floatData != null && floatData.StandardWeight != null) { if (floatData != null && floatData.StandardWeight != null) {
if (!CheckGoodsWeight(detail, num, floatData)) { if (!CheckGoodsWeight(detail, num, floatData)) {
return;
return false;
} else { } else {
weight.Weight = floatData.StandardWeight.Value; weight.Weight = floatData.StandardWeight.Value;
} }
} else { } else {
weight.Weight = num.Value; weight.Weight = num.Value;
} }
return true;
} }
private void ReadWeight(ProCataGoods detail) private void ReadWeight(ProCataGoods detail)
@ -255,10 +256,12 @@ namespace CowOutputClient
weight.SecondNum = goodsWeight; weight.SecondNum = goodsWeight;
} }
} else if (rbSelectedNum.IsChecked == true) { } else if (rbSelectedNum.IsChecked == true) {
SetStandardWeight(floatData, detail, num, weight);
if (!SetStandardWeight(floatData, detail, num, weight))
return;
weight.SecondNum = goodsWeight; weight.SecondNum = goodsWeight;
} else { } else {
SetStandardWeight(floatData, detail, goodsWeight??0, weight);
if (!SetStandardWeight(floatData, detail, goodsWeight??0, weight))
return;
} }
weight.SubWeight = tare; weight.SubWeight = tare;
weight.NetWeight = weight.Weight - (weight.SubWeight??0); weight.NetWeight = weight.Weight - (weight.SubWeight??0);


+ 1
- 1
CowOutputClient/app.config View File

@ -35,7 +35,7 @@
<add key="Format" value="{0:0.000}" /> <add key="Format" value="{0:0.000}" />
<add key="Delay" value="4" /> <add key="Delay" value="4" />
<add key="NoBeginChar" value="false" /> <add key="NoBeginChar" value="false" />
<add key="Weight" value="2" />
<add key="Weight" value="5" />
<!--前腿勾重量配置--> <!--前腿勾重量配置-->
<add key="ForeLeg" value="1.4,2.8" /> <add key="ForeLeg" value="1.4,2.8" />
<!--后腿勾重量配置--> <!--后腿勾重量配置-->


+ 0
- 16
WeighBusiness/BL/GoodsWeightFloatBL.cs View File

@ -199,22 +199,6 @@ namespace WeighBusiness.BL
} }
return errorMessage; return errorMessage;
} }
public static ProductTeam GetProductTeam(long? employeeId)
{
var table = SqlHelperEx.DoQuery("select ProductTeam_ID,Name,ProduceType from {0} where Employee_ID = {1}".FormatWith(TableNames., employeeId == null ? "null" : employeeId.Value.ToString()));
if (table.Rows.Count > 0) {
foreach (DataRow row in table.Rows) {
var team = new ProductTeam();
team.ProductTeam_ID = (long)(int.Parse(row[0].ToString()));
team.Name = row[1].ToString();
team.ProduceType = row[2].ToString();
return team;
}
}
return null;
}
} }
} }


Loading…
Cancel
Save