优化材料和焊接数据页面显示及筛选功能

This commit is contained in:
2022-09-19 09:35:49 +08:00
parent 456be52603
commit 951c54533d
36 changed files with 1728 additions and 90 deletions
@@ -70,9 +70,75 @@ namespace FineUIPro.Web.CLGL
{
string strSql = @"select *
from dbo.CLGL_PipelineMaterialCodeList c
where c.ProjectId=@ProjectId order by c.C1 desc";
where c.ProjectId=@ProjectId ";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", BLL.ProjectService.GetCLProjectCodeByProjectId(this.CurrUser.LoginProjectId)));
if (!string.IsNullOrEmpty(txtC1.Text.Trim()))
{
strSql += " AND c.C1 like @C1";
listStr.Add(new SqlParameter("@C1", "%" + txtC1.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC2.Text.Trim()))
{
strSql += " AND c.C2 like @C2";
listStr.Add(new SqlParameter("@C2", "%" + txtC2.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC3.Text.Trim()))
{
strSql += " AND c.C3 like @C3";
listStr.Add(new SqlParameter("@C3", "%" + txtC3.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC4.Text.Trim()))
{
strSql += " AND c.C4 like @C4";
listStr.Add(new SqlParameter("@C4", "%" + txtC4.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC5.Text.Trim()))
{
strSql += " AND c.C5 like @C5";
listStr.Add(new SqlParameter("@C5", "%" + txtC5.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC6.Text.Trim()))
{
strSql += " AND c.C6 like @C6";
listStr.Add(new SqlParameter("@C6", "%" + txtC6.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC7.Text.Trim()))
{
strSql += " AND c.C7 like @C7";
listStr.Add(new SqlParameter("@C7", "%" + txtC7.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC8.Text.Trim()))
{
strSql += " AND c.C8 like @C8";
listStr.Add(new SqlParameter("@C8", "%" + txtC8.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC9.Text.Trim()))
{
strSql += " AND c.C9 like @C9";
listStr.Add(new SqlParameter("@C9", "%" + txtC9.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC10.Text.Trim()))
{
strSql += " AND c.C10 like @C10";
listStr.Add(new SqlParameter("@C10", "%" + txtC10.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC11.Text.Trim()))
{
strSql += " AND c.C11 like @C11";
listStr.Add(new SqlParameter("@C11", "%" + txtC11.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC12.Text.Trim()))
{
strSql += " AND c.C12 like @C12";
listStr.Add(new SqlParameter("@C12", "%" + txtC12.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC13.Text.Trim()))
{
strSql += " AND c.C13 like @C13";
listStr.Add(new SqlParameter("@C13", "%" + txtC13.Text.Trim() + "%"));
}
strSql += " order by c.C1 desc";
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
@@ -82,6 +148,28 @@ namespace FineUIPro.Web.CLGL
Grid1.DataBind();
}
protected void btnQuery_Click(object sender, EventArgs e)
{
BindGrid();
}
protected void btnRset_Click(object sender, EventArgs e)
{
txtC1.Text = "";
txtC2.Text = "";
txtC3.Text = "";
txtC4.Text = "";
txtC5.Text = "";
txtC6.Text = "";
txtC7.Text = "";
txtC8.Text = "";
txtC9.Text = "";
txtC10.Text = "";
txtC11.Text = "";
txtC12.Text = "";
txtC13.Text = "";
BindGrid();
}
#region
/// <summary>
/// 分页