包装管理修改
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
namespace FineUIPro.Web.HJGL.PreDesign
|
||||
@@ -43,14 +45,36 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
|
||||
DataTable tb = BLL.HJGL_PackagingmanageService.GetPackagingDetailById(PackagingManageId);
|
||||
var pack = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(PackagingManageId);
|
||||
if (pack == null) return;
|
||||
if (pack.TypeInt == (int)HJGL_PackagingmanageService.TypeInt.预制组件)
|
||||
{
|
||||
DataTable tb = BLL.HJGL_PackagingmanageService.GetPackagingDetailById(PackagingManageId);
|
||||
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
else
|
||||
{
|
||||
var result = HJGLPackagingmanagedetailService.GetPackagingData(PackagingManageId).ToList();
|
||||
var detailList = from x in result
|
||||
select new
|
||||
{
|
||||
PipelineComponentId = x.Id,
|
||||
PipelineComponentCode = x.MaterialCode,
|
||||
num = x.Number,
|
||||
CU = x.MaterialUnit,
|
||||
UnitWorkName = x.UnitWorkId == null ? "" : UnitWorkService.GetNameById(x.UnitWorkId)
|
||||
};
|
||||
Grid1.RecordCount = detailList.Count();
|
||||
Grid1.DataSource = detailList;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user