2022-11-01 焊接包装管理绑值修改,三维传参修改
This commit is contained in:
@@ -33,38 +33,42 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"select pack.PackagingManageId,
|
||||
pack.PackagingCode,
|
||||
com.PipelineComponentCode,
|
||||
unit.UnitWorkName,
|
||||
pipe.PlanStartDate,
|
||||
pack.ProjectId,
|
||||
pack.StackingPosition,
|
||||
pack.State,
|
||||
pack.ContactName,
|
||||
pack.ContactPhone,
|
||||
pack.ReceiveDate,
|
||||
person.PersonName
|
||||
from HJGL_PackagingManage as pack
|
||||
left join HJGL_Pipeline_Component com on com.PipelineComponentId=pack.PipelineComponentId
|
||||
left join HJGL_Pipeline pipe on pipe.PipelineId =com.PipelineId
|
||||
left join WBS_UnitWork unit on pipe.UnitWorkId=unit.UnitWorkId
|
||||
left join Person_Persons person on pack.ReceiveMan=person.PersonId
|
||||
WHERE pack.ProjectId = @ProjectId ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
if (!string.IsNullOrEmpty(this.txtPackagingCode.Text.Trim()))
|
||||
{
|
||||
strSql += " AND pack.PackagingCode LIKE @PackagingCode";
|
||||
listStr.Add(new SqlParameter("@PackagingCode", "%" + this.txtPackagingCode.Text.Trim() + "%"));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
// string strSql = @"select pack.PackagingManageId,
|
||||
// pack.PackagingCode,
|
||||
// com.PipelineComponentCode,
|
||||
// unit.UnitWorkName,
|
||||
// pipe.PlanStartDate,
|
||||
// pack.ProjectId,
|
||||
// pack.StackingPosition,
|
||||
// pack.State,
|
||||
// pack.ContactName,
|
||||
// pack.ContactPhone,
|
||||
//pack.ReceiveDate,
|
||||
//person.PersonName
|
||||
// from HJGL_PackagingManage as pack
|
||||
// left join HJGL_Pipeline_Component com on com.PipelineComponentId=pack.PipelineComponentId
|
||||
// left join HJGL_Pipeline pipe on pipe.PipelineId =com.PipelineId
|
||||
// left join WBS_UnitWork unit on pipe.UnitWorkId=unit.UnitWorkId
|
||||
// left join Person_Persons person on pack.ReceiveMan=person.PersonId
|
||||
// WHERE pack.ProjectId = @ProjectId ";
|
||||
// List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
// listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
// if (!string.IsNullOrEmpty(this.txtPackagingCode.Text.Trim()))
|
||||
// {
|
||||
// strSql += " AND pack.PackagingCode LIKE @PackagingCode";
|
||||
// listStr.Add(new SqlParameter("@PackagingCode", "%" + this.txtPackagingCode.Text.Trim() + "%"));
|
||||
// }
|
||||
// SqlParameter[] parameter = listStr.ToArray();
|
||||
// DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
//Grid1.RecordCount = tb.Rows.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
//var table = this.GetPagedDataTable(Grid1, tb);
|
||||
//Grid1.DataSource = table;
|
||||
//Grid1.DataBind();
|
||||
var list= BLL.HJGL_PackagingmanageService.GetPackagingManageList(this.CurrUser.LoginProjectId, this.txtPackagingCode.Text.Trim());
|
||||
Grid1.RecordCount = list.Count;
|
||||
Grid1.DataSource = list;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user