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

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
+13 -1
View File
@@ -30,8 +30,20 @@
SortDirection="desc" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtC1" Label="供应商名称" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC2" Label="合同号" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC3" Label="请购单号" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC4" Label="箱号" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC5" Label="材料编码" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC6" Label="位号" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC30" Label="到货批次号" LabelAlign="Right"></f:TextBox>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnQuery" OnClick="btnQuery_Click" ToolTip="查询" Text="查询" Icon="SystemSearch" EnablePostBack="true" runat="server" >
</f:Button>
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置" Text="重置" Icon="ArrowUndo" EnablePostBack="true" runat="server" >
</f:Button>
<f:Button ID="btnUrl" Text="进入软件" ToolTip="进入材料软件" Icon="FolderPage" runat="server" OnClick="btnUrl_Click">
</f:Button>
<f:Button ID="btnGetAll" Text="获取全部" ToolTip="从材料系统中获取数据" Icon="FolderPage" Hidden="true" runat="server" OnClick="btnGetAll_Click">
@@ -70,9 +70,45 @@ namespace FineUIPro.Web.CLGL
{
string strSql = @"select *
from dbo.CLGL_ArrivalDetailList c
where c.ProjectId=@ProjectId order by c.C3 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(txtC30.Text.Trim()))
{
strSql += " AND c.C30 like @C30";
listStr.Add(new SqlParameter("@C30", "%" + txtC30.Text.Trim() + "%"));
}
strSql += " order by c.C3 desc";
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
@@ -82,6 +118,22 @@ 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 = "";
txtC30.Text = "";
BindGrid();
}
#region
/// <summary>
/// 分页
+83 -2
View File
@@ -49,13 +49,94 @@ namespace FineUIPro.Web.CLGL {
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtC1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC1;
/// <summary>
/// txtC2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC2;
/// <summary>
/// txtC3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC3;
/// <summary>
/// txtC4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC4;
/// <summary>
/// txtC5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC5;
/// <summary>
/// txtC6 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC6;
/// <summary>
/// txtC30 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC30;
/// <summary>
/// btnQuery 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnQuery;
/// <summary>
/// btnRset 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnRset;
/// <summary>
/// btnUrl 控件。
@@ -30,8 +30,29 @@
SortDirection="desc" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtC1" Label="专业" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC2" Label="领料单号" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC3" Label="领料时间" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC4" Label="出库原因" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC5" Label="物资类别" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC7" Label="领料单位" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC12" Label="材料名称" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC13" Label="材料编码" LabelAlign="Right"></f:TextBox>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtC14" Label="位号" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC23" Label="装置号" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC24" Label="管线号" LabelAlign="Right"></f:TextBox>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnQuery" OnClick="btnQuery_Click" ToolTip="查询" Text="查询" Icon="SystemSearch" EnablePostBack="true" runat="server" >
</f:Button>
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置" Text="重置" Icon="ArrowUndo" EnablePostBack="true" runat="server" >
</f:Button>
<f:Button ID="btnUrl" Text="进入软件" ToolTip="进入材料软件" Icon="FolderPage" runat="server" OnClick="btnUrl_Click">
</f:Button>
<f:Button ID="btnGetAll" Text="获取全部" ToolTip="从材料系统中获取数据" Icon="FolderPage" Hidden="true" runat="server" OnClick="btnGetAll_Click">
@@ -70,9 +70,65 @@ namespace FineUIPro.Web.CLGL
{
string strSql = @"select *
from dbo.CLGL_CheckOutDetailList c
where c.ProjectId=@ProjectId order by c.C3 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(txtC7.Text.Trim()))
{
strSql += " AND c.C7 like @C7";
listStr.Add(new SqlParameter("@C7", "%" + txtC7.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() + "%"));
}
if (!string.IsNullOrEmpty(txtC14.Text.Trim()))
{
strSql += " AND c.C14 like @C14";
listStr.Add(new SqlParameter("@C14", "%" + txtC14.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC23.Text.Trim()))
{
strSql += " AND c.C23 like @C23";
listStr.Add(new SqlParameter("@C23", "%" + txtC23.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC24.Text.Trim()))
{
strSql += " AND c.C24 like @C24";
listStr.Add(new SqlParameter("@C24", "%" + txtC24.Text.Trim() + "%"));
}
strSql += " order by c.C3 desc";
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
@@ -82,6 +138,26 @@ 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 = "";
txtC7.Text = "";
txtC12.Text = "";
txtC13.Text = "";
txtC14.Text = "";
txtC23.Text = "";
txtC24.Text = "";
BindGrid();
}
#region
/// <summary>
/// 分页
+128 -2
View File
@@ -49,13 +49,139 @@ namespace FineUIPro.Web.CLGL {
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtC1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC1;
/// <summary>
/// txtC2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC2;
/// <summary>
/// txtC3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC3;
/// <summary>
/// txtC4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC4;
/// <summary>
/// txtC5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC5;
/// <summary>
/// txtC7 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC7;
/// <summary>
/// txtC12 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC12;
/// <summary>
/// txtC13 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC13;
/// <summary>
/// Toolbar3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// txtC14 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC14;
/// <summary>
/// txtC23 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC23;
/// <summary>
/// txtC24 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC24;
/// <summary>
/// btnQuery 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnQuery;
/// <summary>
/// btnRset 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnRset;
/// <summary>
/// btnUrl 控件。
+21 -1
View File
@@ -30,8 +30,28 @@
SortDirection="desc" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtC1" Label="合同号" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC2" Label="合同名称" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC3" Label="请购单号" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC4" Label="专业" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC7" Label="供应商" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC8" Label="材料编码" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC9" Label="位号" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC20" Label="装置号" LabelAlign="Right"></f:TextBox>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtC21" Label="主项号" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC22" Label="材料用途" LabelAlign="Right"></f:TextBox>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnQuery" OnClick="btnQuery_Click" ToolTip="查询" Text="查询" Icon="SystemSearch" EnablePostBack="true" runat="server" >
</f:Button>
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置" Text="重置" Icon="ArrowUndo" EnablePostBack="true" runat="server" >
</f:Button>
<f:Button ID="btnUrl" Text="进入软件" ToolTip="进入材料软件" Icon="FolderPage" runat="server" OnClick="btnUrl_Click">
</f:Button>
<f:Button ID="btnGetAll" Text="获取全部" ToolTip="从材料系统中获取数据" Icon="FolderPage" Hidden="true" runat="server" OnClick="btnGetAll_Click">
+71 -1
View File
@@ -70,9 +70,60 @@ namespace FineUIPro.Web.CLGL
{
string strSql = @"select *
from dbo.CLGL_ContractList c
where c.ProjectId=@ProjectId order by c.C5 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(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(txtC20.Text.Trim()))
{
strSql += " AND c.C20 like @C20";
listStr.Add(new SqlParameter("@C20", "%" + txtC20.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC21.Text.Trim()))
{
strSql += " AND c.C21 like @C21";
listStr.Add(new SqlParameter("@C21", "%" + txtC21.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC22.Text.Trim()))
{
strSql += " AND c.C22 like @C22";
listStr.Add(new SqlParameter("@C22", "%" + txtC22.Text.Trim() + "%"));
}
strSql += " order by c.C5 desc";
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
@@ -82,6 +133,25 @@ 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 = "";
txtC7.Text = "";
txtC8.Text = "";
txtC9.Text = "";
txtC20.Text = "";
txtC21.Text = "";
txtC22.Text = "";
BindGrid();
}
#region
/// <summary>
/// 分页
+119 -2
View File
@@ -49,13 +49,130 @@ namespace FineUIPro.Web.CLGL {
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtC1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC1;
/// <summary>
/// txtC2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC2;
/// <summary>
/// txtC3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC3;
/// <summary>
/// txtC4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC4;
/// <summary>
/// txtC7 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC7;
/// <summary>
/// txtC8 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC8;
/// <summary>
/// txtC9 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC9;
/// <summary>
/// txtC20 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC20;
/// <summary>
/// Toolbar3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// txtC21 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC21;
/// <summary>
/// txtC22 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC22;
/// <summary>
/// btnQuery 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnQuery;
/// <summary>
/// btnRset 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnRset;
/// <summary>
/// btnUrl 控件。
+15 -2
View File
@@ -29,9 +29,22 @@
DataIDField="Id" AllowSorting="true" SortField="C5"
SortDirection="desc" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtC1" Label="专业" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC2" Label="合同号" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC3" Label="合同名称" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC4" Label="供货商" LabelAlign="Right"></f:TextBox>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnQuery" OnClick="btnQuery_Click" ToolTip="查询" Text="查询" Icon="SystemSearch" EnablePostBack="true" runat="server" >
</f:Button>
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置" Text="重置" Icon="ArrowUndo" EnablePostBack="true" runat="server" >
</f:Button>
<f:Button ID="btnUrl" Text="进入软件" ToolTip="进入材料软件" Icon="FolderPage" runat="server" OnClick="btnUrl_Click">
</f:Button>
<f:Button ID="btnGetAll" Text="获取全部" ToolTip="从材料系统中获取数据" Icon="FolderPage" Hidden="true" runat="server" OnClick="btnGetAll_Click">
@@ -70,9 +70,30 @@ namespace FineUIPro.Web.CLGL
{
string strSql = @"select *
from dbo.CLGL_ContractListSum c
where c.ProjectId=@ProjectId order by c.C5 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() + "%"));
}
strSql += " order by c.C5 desc";
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
@@ -82,6 +103,19 @@ 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 = "";
BindGrid();
}
#region
/// <summary>
/// 分页
+65 -2
View File
@@ -49,13 +49,76 @@ namespace FineUIPro.Web.CLGL {
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtC1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC1;
/// <summary>
/// txtC2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC2;
/// <summary>
/// txtC3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC3;
/// <summary>
/// txtC4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC4;
/// <summary>
/// Toolbar3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// btnQuery 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnQuery;
/// <summary>
/// btnRset 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnRset;
/// <summary>
/// btnUrl 控件。
+17 -1
View File
@@ -30,8 +30,24 @@
SortDirection="desc" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtDeviceNo" Label="装置号" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtIsoNo" Label="区域管线号" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtMaterialCode" Label="材料编码" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtSIZE1" Label="SIZE1" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtSIZE2" Label="SIZE2" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtSCH1" Label="SCH1" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtSCH2" Label="SCH2" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtPressClass" Label="压力等级" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtEndFace" Label="端面" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtStandard" Label="标准" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtMaterial" Label="材质" LabelAlign="Right"></f:TextBox>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnQuery" OnClick="btnQuery_Click" ToolTip="查询" Text="查询" Icon="SystemSearch" EnablePostBack="true" runat="server" >
</f:Button>
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置" Text="重置" Icon="ArrowUndo" EnablePostBack="true" runat="server" >
</f:Button>
<f:Button ID="btnUrl" Text="进入软件" ToolTip="进入材料软件" Icon="FolderPage" runat="server" OnClick="btnUrl_Click">
</f:Button>
<f:Button ID="btnGetAll" Text="获取全部" ToolTip="从材料系统中获取数据" Icon="FolderPage" Hidden="true" runat="server" OnClick="btnGetAll_Click">
+77 -1
View File
@@ -70,9 +70,65 @@ namespace FineUIPro.Web.CLGL
{
string strSql = @"select *
from dbo.CLGL_MTODetail c
where c.ProjectId=@ProjectId order by c.MaterialCode 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(txtDeviceNo.Text.Trim()))
{
strSql += " AND c.DeviceNo like @DeviceNo";
listStr.Add(new SqlParameter("@DeviceNo", "%" + txtDeviceNo.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtIsoNo.Text.Trim()))
{
strSql += " AND c.IsoNo like @IsoNo";
listStr.Add(new SqlParameter("@IsoNo", "%" + txtIsoNo.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtMaterialCode.Text.Trim()))
{
strSql += " AND c.MaterialCode like @MaterialCode";
listStr.Add(new SqlParameter("@MaterialCode", "%" + txtMaterialCode.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtSIZE1.Text.Trim()))
{
strSql += " AND c.SIZE1 like @SIZE1";
listStr.Add(new SqlParameter("@SIZE1", "%" + txtSIZE1.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtSIZE2.Text.Trim()))
{
strSql += " AND c.SIZE2 like @SIZE2";
listStr.Add(new SqlParameter("@SIZE2", "%" + txtSIZE2.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtSCH1.Text.Trim()))
{
strSql += " AND c.SCH1 like @SCH1";
listStr.Add(new SqlParameter("@SCH1", "%" + txtSCH1.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtSCH2.Text.Trim()))
{
strSql += " AND c.SCH2 like @SCH2";
listStr.Add(new SqlParameter("@SCH2", "%" + txtSCH2.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtPressClass.Text.Trim()))
{
strSql += " AND c.PressClass like @PressClass";
listStr.Add(new SqlParameter("@PressClass", "%" + txtPressClass.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtEndFace.Text.Trim()))
{
strSql += " AND c.EndFace like @EndFace";
listStr.Add(new SqlParameter("@EndFace", "%" + txtEndFace.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtStandard.Text.Trim()))
{
strSql += " AND c.Standard like @Standard";
listStr.Add(new SqlParameter("@Standard", "%" + txtStandard.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtMaterial.Text.Trim()))
{
strSql += " AND c.Material like @Material";
listStr.Add(new SqlParameter("@Material", "%" + txtMaterial.Text.Trim() + "%"));
}
strSql += " order by c.MaterialCode desc";
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
@@ -82,6 +138,26 @@ namespace FineUIPro.Web.CLGL
Grid1.DataBind();
}
protected void btnQuery_Click(object sender, EventArgs e)
{
BindGrid();
}
protected void btnRset_Click(object sender, EventArgs e)
{
txtDeviceNo.Text = "";
txtIsoNo.Text = "";
txtMaterialCode.Text = "";
txtSIZE1.Text = "";
txtSIZE2.Text = "";
txtSCH1.Text = "";
txtSCH2.Text = "";
txtPressClass.Text = "";
txtEndFace.Text = "";
txtStandard.Text = "";
txtMaterial.Text = "";
BindGrid();
}
#region
/// <summary>
/// 分页
+119 -2
View File
@@ -49,13 +49,130 @@ namespace FineUIPro.Web.CLGL {
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtDeviceNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtDeviceNo;
/// <summary>
/// txtIsoNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtIsoNo;
/// <summary>
/// txtMaterialCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtMaterialCode;
/// <summary>
/// txtSIZE1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSIZE1;
/// <summary>
/// txtSIZE2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSIZE2;
/// <summary>
/// txtSCH1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSCH1;
/// <summary>
/// txtSCH2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSCH2;
/// <summary>
/// txtPressClass 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPressClass;
/// <summary>
/// txtEndFace 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEndFace;
/// <summary>
/// txtStandard 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtStandard;
/// <summary>
/// txtMaterial 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtMaterial;
/// <summary>
/// btnQuery 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnQuery;
/// <summary>
/// btnRset 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnRset;
/// <summary>
/// btnUrl 控件。
@@ -29,9 +29,33 @@
DataIDField="Id" AllowSorting="true" SortField="C1"
SortDirection="desc" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtC1" Label="材料编码" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC2" Label="位号" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC3" Label="材料名称" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC4" Label="SIZE1" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC5" Label="SIZE2" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC6" Label="SCH1" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC7" Label="SCH2" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC8" Label="压力等级" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC9" Label="端面" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC10" Label="螺栓长度" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC11" Label="标准" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC12" Label="材质" LabelAlign="Right"></f:TextBox>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtC13" Label="装置号" LabelAlign="Right"></f:TextBox>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnQuery" OnClick="btnQuery_Click" ToolTip="查询" Text="查询" Icon="SystemSearch" EnablePostBack="true" runat="server" >
</f:Button>
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置" Text="重置" Icon="ArrowUndo" EnablePostBack="true" runat="server" >
</f:Button>
<f:Button ID="btnUrl" Text="进入软件" ToolTip="进入材料软件" Icon="FolderPage" runat="server" OnClick="btnUrl_Click">
</f:Button>
<f:Button ID="btnGetAll" Text="获取全部" ToolTip="从材料系统中获取数据" Icon="FolderPage" Hidden="true" runat="server" OnClick="btnGetAll_Click">
@@ -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>
/// 分页
@@ -49,13 +49,157 @@ namespace FineUIPro.Web.CLGL {
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtC1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC1;
/// <summary>
/// txtC2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC2;
/// <summary>
/// txtC3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC3;
/// <summary>
/// txtC4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC4;
/// <summary>
/// txtC5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC5;
/// <summary>
/// txtC6 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC6;
/// <summary>
/// txtC7 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC7;
/// <summary>
/// txtC8 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC8;
/// <summary>
/// txtC9 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC9;
/// <summary>
/// txtC10 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC10;
/// <summary>
/// txtC11 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC11;
/// <summary>
/// txtC12 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC12;
/// <summary>
/// Toolbar3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// txtC13 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC13;
/// <summary>
/// btnQuery 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnQuery;
/// <summary>
/// btnRset 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnRset;
/// <summary>
/// btnUrl 控件。
@@ -30,8 +30,34 @@
SortDirection="desc" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtC1" Label="主项号" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC2" Label="材料编码" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC3" Label="材料名称" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC4" Label="位号" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC6" Label="SIZE1" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC7" Label="SIZE2" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC8" Label="SCH1" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC9" Label="SCH2" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC13" Label="材质" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC14" Label="标准" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC15" Label="材料用途" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC21" Label="采购包编号" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC22" Label="采购包名称" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC23" Label="合同号" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC24" Label="请购单号" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC26" Label="专业名称" LabelAlign="Right"></f:TextBox>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtC29" Label="供货商" LabelAlign="Right"></f:TextBox>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnQuery" OnClick="btnQuery_Click" ToolTip="查询" Text="查询" Icon="SystemSearch" EnablePostBack="true" runat="server" >
</f:Button>
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置" Text="重置" Icon="ArrowUndo" EnablePostBack="true" runat="server" >
</f:Button>
<f:Button ID="btnUrl" Text="进入软件" ToolTip="进入材料软件" Icon="FolderPage" runat="server" OnClick="btnUrl_Click">
</f:Button>
<f:Button ID="btnGetAll" Text="获取全部" ToolTip="从材料系统中获取数据" Icon="FolderPage" Hidden="true" runat="server" OnClick="btnGetAll_Click">
@@ -70,9 +70,95 @@ namespace FineUIPro.Web.CLGL
{
string strSql = @"select *
from dbo.CLGL_PipelineMaterialList c
where c.ProjectId=@ProjectId order by c.C28 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(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(txtC13.Text.Trim()))
{
strSql += " AND c.C13 like @C13";
listStr.Add(new SqlParameter("@C13", "%" + txtC13.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC14.Text.Trim()))
{
strSql += " AND c.C14 like @C14";
listStr.Add(new SqlParameter("@C14", "%" + txtC14.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC15.Text.Trim()))
{
strSql += " AND c.C15 like @C15";
listStr.Add(new SqlParameter("@C15", "%" + txtC15.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC21.Text.Trim()))
{
strSql += " AND c.C21 like @C21";
listStr.Add(new SqlParameter("@C21", "%" + txtC21.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC22.Text.Trim()))
{
strSql += " AND c.C22 like @C22";
listStr.Add(new SqlParameter("@C22", "%" + txtC22.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC23.Text.Trim()))
{
strSql += " AND c.C23 like @C23";
listStr.Add(new SqlParameter("@C23", "%" + txtC23.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC24.Text.Trim()))
{
strSql += " AND c.C24 like @C24";
listStr.Add(new SqlParameter("@C24", "%" + txtC24.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC26.Text.Trim()))
{
strSql += " AND c.C26 like @C26";
listStr.Add(new SqlParameter("@C26", "%" + txtC26.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtC29.Text.Trim()))
{
strSql += " AND c.C29 like @C29";
listStr.Add(new SqlParameter("@C29", "%" + txtC29.Text.Trim() + "%"));
}
strSql += " order by c.C28 desc";
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
@@ -82,6 +168,32 @@ 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 = "";
txtC6.Text = "";
txtC7.Text = "";
txtC8.Text = "";
txtC9.Text = "";
txtC13.Text = "";
txtC14.Text = "";
txtC15.Text = "";
txtC21.Text = "";
txtC22.Text = "";
txtC23.Text = "";
txtC24.Text = "";
txtC26.Text = "";
txtC29.Text = "";
BindGrid();
}
#region
/// <summary>
/// 分页
+182 -2
View File
@@ -49,13 +49,193 @@ namespace FineUIPro.Web.CLGL {
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtC1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC1;
/// <summary>
/// txtC2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC2;
/// <summary>
/// txtC3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC3;
/// <summary>
/// txtC4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC4;
/// <summary>
/// txtC6 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC6;
/// <summary>
/// txtC7 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC7;
/// <summary>
/// txtC8 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC8;
/// <summary>
/// txtC9 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC9;
/// <summary>
/// txtC13 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC13;
/// <summary>
/// txtC14 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC14;
/// <summary>
/// txtC15 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC15;
/// <summary>
/// txtC21 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC21;
/// <summary>
/// txtC22 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC22;
/// <summary>
/// txtC23 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC23;
/// <summary>
/// txtC24 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC24;
/// <summary>
/// txtC26 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC26;
/// <summary>
/// Toolbar3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// txtC29 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC29;
/// <summary>
/// btnQuery 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnQuery;
/// <summary>
/// btnRset 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnRset;
/// <summary>
/// btnUrl 控件。
@@ -30,8 +30,16 @@
SortDirection="desc" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtC1" Label="供货商" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC2" Label="合同号" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtC3" Label="合同名称" LabelAlign="Right"></f:TextBox>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnQuery" OnClick="btnQuery_Click" ToolTip="查询" Text="查询" Icon="SystemSearch" EnablePostBack="true" runat="server" >
</f:Button>
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置" Text="重置" Icon="ArrowUndo" EnablePostBack="true" runat="server" >
</f:Button>
<f:Button ID="btnUrl" Text="进入软件" ToolTip="进入材料软件" Icon="FolderPage" runat="server" OnClick="btnUrl_Click">
</f:Button>
<f:Button ID="btnGetAll" Text="获取全部" ToolTip="从材料系统中获取数据" Icon="FolderPage" Hidden="true" runat="server" OnClick="btnGetAll_Click">
@@ -62,6 +70,9 @@
<f:RenderField Width="100px" ColumnID="C6" DataField="C6" SortField="C6"
FieldType="String" HeaderText="到货量" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Rate" DataField="Rate" SortField="Rate" RendererFunction="renderGender"
FieldType="String" HeaderText="到货百分比" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
</Columns>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
@@ -84,6 +95,14 @@
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
function renderGender(value) {
var returnValue = null;
if (value != null) {
returnValue = (value * 1).toFixed(2).toString() + "%";
}
return returnValue;
}
</script>
</body>
</html>
@@ -68,11 +68,28 @@ namespace FineUIPro.Web.CLGL
/// </summary>
private void BindGrid()
{
string strSql = @"select *
string strSql = @"select *,
cast((case when c.C5='0' or c.C5='' then 0 when c.C6='0' or c.C6='' then 0 else 100.0 * cast(c.C6 as DECIMAL(9,2))/(1.0 * cast(c.C5 as DECIMAL(9,2))) end) AS DECIMAL(9,2)) as Rate
from dbo.CLGL_PipelineSupplierList c
where c.ProjectId=@ProjectId order by c.C4 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() + "%"));
}
strSql += " order by c.C4 desc";
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
@@ -82,6 +99,18 @@ 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 = "";
BindGrid();
}
#region
/// <summary>
/// 分页
+47 -2
View File
@@ -49,13 +49,58 @@ namespace FineUIPro.Web.CLGL {
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtC1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC1;
/// <summary>
/// txtC2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC2;
/// <summary>
/// txtC3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtC3;
/// <summary>
/// btnQuery 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnQuery;
/// <summary>
/// btnRset 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnRset;
/// <summary>
/// btnUrl 控件。