2022-10-15 材料匹配数据绑定修改

This commit is contained in:
2022-10-15 17:58:32 +08:00
parent 0ec0031e20
commit baebd011ae
4 changed files with 51 additions and 34 deletions
@@ -227,7 +227,10 @@ namespace BLL
public static bool isInStockByPipeline(string pipelineid,string projectid) public static bool isInStockByPipeline(string pipelineid,string projectid)
{ {
bool state = true ; bool state = true ;
var q = from x in Funs.DB.HJGL_PipeLineMat where x.PipelineId==pipelineid try
{
var q = from x in Funs.DB.HJGL_PipeLineMat
where x.PipelineId == pipelineid
group x by x.MaterialCode into s group x by x.MaterialCode into s
select new select new
{ {
@@ -271,6 +274,16 @@ namespace BLL
state = false; //库存不足 state = false; //库存不足
} }
}
catch (System.Exception ex)
{
state = false;
ErrLogInfo.WriteLog(ex.ToString ());
}
return state; return state;
} }
@@ -78,7 +78,7 @@
</Toolbars> </Toolbars>
<Items> <Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="材料匹配明细" OnRowClick="Grid1_RowClick" EnableRowClickEvent="true" <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="材料匹配明细" OnRowClick="Grid1_RowClick" EnableRowClickEvent="true"
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="MaterialCode,Number" EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="MaterialCode,Number" ForceFit="true"
EnableColumnLines="true" DataIDField="MaterialCode" AllowSorting="true" OnRowDataBound="Grid1_RowDataBound" EnableColumnLines="true" DataIDField="MaterialCode" AllowSorting="true" OnRowDataBound="Grid1_RowDataBound"
SortField="MaterialCode" SortDirection="ASC" OnSort="Grid1_Sort"> SortField="MaterialCode" SortDirection="ASC" OnSort="Grid1_Sort">
<Columns> <Columns>
@@ -139,11 +139,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
e.Node.Nodes.Clear(); e.Node.Nodes.Clear();
if (e.Node.CommandName == "单位工程") if (e.Node.CommandName == "单位工程")
{ {
var pipeline = (from x in Funs.DB.HJGL_Pipeline var pipeline = (from x in Funs.DB.HJGL_Pipeline
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID && x.PipeArea == PipeArea where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID && x.PipeArea == PipeArea
&& x.PipelineCode.Contains(txtPipelineCode.Text.Trim())
orderby x.PipelineCode orderby x.PipelineCode
select x).ToList(); select x).ToList();
if (!string .IsNullOrEmpty (txtPipelineCode.Text.Trim()))
{
pipeline= pipeline.Where(x => x.PipelineCode.Contains(txtPipelineCode.Text.Trim())).ToList();
}
foreach (var item in pipeline) foreach (var item in pipeline)
{ {
//var jotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null select x).Count(); //var jotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null select x).Count();
+4 -4
View File
@@ -20,10 +20,10 @@ namespace Model
/// 规格 /// 规格
/// </summary> /// </summary>
public string MaterialSpec { get; set; } public string MaterialSpec { get; set; }
/// <summary> ///// <summary>
/// 材质 ///// 材质
/// </summary> ///// </summary>
public string MaterialMade { get; set; } //public string MaterialMade { get; set; }
/// <summary> /// <summary>
/// 单位 /// 单位
/// </summary> /// </summary>