1
This commit is contained in:
@@ -216,13 +216,14 @@ namespace FineUIPro.Web.WeldMat.UsingPlan
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var amount = (from y in db.Weld_StockIn where y.UnitStoreId == this.drpUnitStore.SelectedValue && y.WeldId == this.hdWeldId.Text.Trim() select y.Amount ?? 0).Sum();
|
||||
var usingAmount = (from y in db.Weld_StockIn where y.UnitStoreId == this.drpUnitStore.SelectedValue && y.WeldId == this.hdWeldId.Text.Trim() select y.UsingAmount ?? 0).Sum();
|
||||
var recycleAmount = (from y in db.Weld_StockIn where y.UnitStoreId == this.drpUnitStore.SelectedValue && y.WeldId == this.hdWeldId.Text.Trim() select y.RecycleAmount ?? 0).Sum();
|
||||
var list = (from y in db.Weld_StockIn where y.UnitStoreId == this.drpUnitStore.SelectedValue && y.WeldId == this.hdWeldId.Text.Trim() select y).ToList();
|
||||
var amount = list.Sum(x => x.Amount ?? 0);
|
||||
var usingAmount = list.Sum(x => x.UsingAmount ?? 0);
|
||||
var recycleAmount = list.Sum(x => x.RecycleAmount ?? 0);
|
||||
decimal a = amount - usingAmount + recycleAmount;
|
||||
if (Funs.GetNewDecimal(this.txtAmount.Text.Trim()) > a)
|
||||
{
|
||||
Alert.ShowInTop("焊材库存仅剩"+a.ToString("0.##")+"根,领用数量不能超过库存数量!", MessageBoxIcon.Warning);
|
||||
Alert.ShowInTop("焊材库存仅剩" + a.ToString("0.##") + "根,领用数量不能超过库存数量!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
SaveData(false);
|
||||
@@ -231,9 +232,10 @@ namespace FineUIPro.Web.WeldMat.UsingPlan
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var amount = (from y in db.Weld_StockIn where y.UnitStoreId == this.drpUnitStore.SelectedValue && y.WeldId == this.hdWeldId.Text.Trim() select y.Amount ?? 0).Sum();
|
||||
var usingAmount = (from y in db.Weld_StockIn where y.UnitStoreId == this.drpUnitStore.SelectedValue && y.WeldId == this.hdWeldId.Text.Trim() select y.UsingAmount ?? 0).Sum();
|
||||
var recycleAmount = (from y in db.Weld_StockIn where y.UnitStoreId == this.drpUnitStore.SelectedValue && y.WeldId == this.hdWeldId.Text.Trim() select y.RecycleAmount ?? 0).Sum();
|
||||
var list = (from y in db.Weld_StockIn where y.UnitStoreId == this.drpUnitStore.SelectedValue && y.WeldId == this.hdWeldId.Text.Trim() select y).ToList();
|
||||
var amount = list.Sum(x => x.Amount ?? 0);
|
||||
var usingAmount = list.Sum(x => x.UsingAmount ?? 0);
|
||||
var recycleAmount = list.Sum(x => x.RecycleAmount ?? 0);
|
||||
decimal a = amount - usingAmount + recycleAmount;
|
||||
if (Funs.GetNewDecimal(this.txtAmount.Text.Trim()) > a)
|
||||
{
|
||||
@@ -692,17 +694,17 @@ namespace FineUIPro.Web.WeldMat.UsingPlan
|
||||
&& (x.IsSteelStru == false || x.IsSteelStru == null)
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
|
||||
foreach (var q in qualifys)
|
||||
{
|
||||
if (q.QualifiedProjectCode.Split('-').Length == 3) //该种合格项目只能领盘状焊丝
|
||||
{
|
||||
if (q.QualifiedProjectCode.Contains("SAW"))
|
||||
if (q.QualifiedProjectCode.Contains("SAW"))
|
||||
{
|
||||
if (weldTypeId == "9770311b-af69-4b6f-b8ad-161a4df88015" || weldTypeId == "23900d2f-f0e6-4d76-a44d-eb47eede3914") //SAW可以领用焊剂和盘装焊丝没有材质的限制
|
||||
{
|
||||
isPass = true;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user