提交代码
This commit is contained in:
parent
d5df13592b
commit
b60a408dd5
|
@ -73,7 +73,7 @@ namespace FineUIPro.Web.WeldMat.Stock
|
|||
LEFT JOIN dbo.Sys_User AS Users ON Users.UserId=StockIn.Materialman
|
||||
LEFT JOIN dbo.Weld_UnitStore store ON store.UnitStoreId = StockIn.UnitStoreId
|
||||
LEFT JOIN dbo.Base_Unit unit ON unit.UnitId = store.UnitId
|
||||
WHERE (StockIn.Amount-ISNULL(StockIn.UsingAmount,0))>=0 ";
|
||||
WHERE (StockIn.Amount-ISNULL(StockIn.UsingAmount,0))>0 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!cbShowAll.Checked)
|
||||
{
|
||||
|
|
|
@ -188,27 +188,29 @@ namespace FineUIPro.Web.WeldMat.UsingPlan
|
|||
}
|
||||
|
||||
string unitId = string.Empty;
|
||||
if (ds.Tables[0].Rows[i]["使用单位"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["使用单位"].ToString()))
|
||||
{
|
||||
var unit = from x in Funs.DB.Project_Unit
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
where x.ProjectId == projectId && y.UnitName == ds.Tables[0].Rows[i]["使用单位"].ToString()
|
||||
select x;
|
||||
if (unit.Count() > 0)
|
||||
{
|
||||
usingPlan.UsingUnit = unit.First().UnitId;
|
||||
unitId = unit.First().UnitId;
|
||||
}
|
||||
else
|
||||
{
|
||||
errorInfos += (i + 2) + "行, [使用单位] 不存在</br>";
|
||||
}
|
||||
//if (ds.Tables[0].Rows[i]["使用单位"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["使用单位"].ToString()))
|
||||
//{
|
||||
// var unit = from x in Funs.DB.Project_Unit
|
||||
// join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
// where x.ProjectId == projectId && y.UnitName == ds.Tables[0].Rows[i]["使用单位"].ToString()
|
||||
// select x;
|
||||
// if (unit.Count() > 0)
|
||||
// {
|
||||
// usingPlan.UsingUnit = this.CurrUser.UnitId;
|
||||
// unitId = this.CurrUser.UnitId;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// errorInfos += (i + 2) + "行, [使用单位] 不存在</br>";
|
||||
// }
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
errorInfos += (i + 2) + "行, [使用单位] 不能为空</br>";
|
||||
}
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// errorInfos += (i + 2) + "行, [使用单位] 不能为空</br>";
|
||||
//}
|
||||
usingPlan.UsingUnit = this.CurrUser.UnitId;
|
||||
unitId = this.CurrUser.UnitId;
|
||||
|
||||
if (ds.Tables[0].Rows[i]["使用位置"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["使用位置"].ToString()))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue