添加条件

This commit is contained in:
李云虎 2024-07-25 14:19:34 +08:00
parent df3087c380
commit c73952e36f
3 changed files with 96 additions and 26 deletions

View File

@ -21,18 +21,25 @@
<Toolbars>
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtNum_NO" Label="No." LabelWidth="80px" LabelAlign="Right" Width="150px"></f:TextBox>
<f:TextBox runat="server" ID="txtSystem_No" Label="System No" LabelWidth="100px" LabelAlign="Right" Width="150px"></f:TextBox>
<f:TextBox runat="server" ID="txtSub_Sys_No" Label="Sub Sys No" LabelWidth="100px" LabelAlign="Right" Width="170px"></f:TextBox>
<f:DatePicker runat="server" Label="Date Raised" ID="txtStartDate_Raised" LabelAlign="Right" LabelWidth="200px"
Width="320px">
</f:DatePicker>
<f:Label ID="Label1" runat="server" Text="至">
</f:Label>
<f:DatePicker runat="server" ID="txtEndDate_Raised" LabelAlign="Right" Width="150px">
</f:DatePicker>
<f:TextBox runat="server" ID="txtNum_NO" Label="No." LabelWidth="40px" LabelAlign="Right" Width="120px"></f:TextBox>
<f:TextBox runat="server" ID="txtSystem_No" Label="System No" LabelWidth="100px" LabelAlign="Right" Width="180px"></f:TextBox>
<f:TextBox runat="server" ID="txtSub_Sys_No" Label="Sub Sys No" LabelWidth="100px" LabelAlign="Right" Width="180px"></f:TextBox>
<f:TextBox runat="server" ID="txtDisc" Label="Disc" LabelWidth="40px" LabelAlign="Right" Width="120px"></f:TextBox>
<f:DropDownList ID="ddlEng" runat="server" Label="Eng" AutoPostBack="true" Width="80px" LabelWidth="40px">
<f:ListItem Value="" Text=""></f:ListItem>
<f:ListItem Value="Y" Text="Y"></f:ListItem>
<f:ListItem Value="N" Text="N"></f:ListItem>
</f:DropDownList>
<f:DropDownList ID="ddlMatI" runat="server" Label="Mat'l" AutoPostBack="true" Width="80px" LabelWidth="40px">
<f:ListItem Value="" Text=""></f:ListItem>
<f:ListItem Value="Y" Text="Y"></f:ListItem>
<f:ListItem Value="N" Text="N"></f:ListItem>
</f:DropDownList>
<f:DropDownList ID="ddlPunchType" runat="server" Label="Punch Type" AutoPostBack="true" Width="180px" LabelWidth="100px">
<f:ListItem Value="" Text=""></f:ListItem>
<f:ListItem Value="PWD" Text="PWD"></f:ListItem>
<f:ListItem Value="FWD" Text="FWD"></f:ListItem>
</f:DropDownList>
<f:Button ID="btnSearch" Icon="SystemSearch" EnablePostBack="true" runat="server" OnClick="btnSearch_Click" ToolTip="查询">
</f:Button>
@ -48,19 +55,26 @@
</f:Toolbar>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DatePicker runat="server" Label="Required Date" ID="txtStartRequired_Date" LabelAlign="Right" LabelWidth="130px"
Width="320px">
<f:DatePicker runat="server" Label="Date Raised" ID="txtStartDate_Raised" LabelAlign="Right" LabelWidth="100px"
Width="220px">
</f:DatePicker>
<f:Label ID="Label1" runat="server" Text="至">
</f:Label>
<f:DatePicker runat="server" ID="txtEndDate_Raised" LabelAlign="Right" Width="110px">
</f:DatePicker>
<f:DatePicker runat="server" Label="Required Date" ID="txtStartRequired_Date" LabelAlign="Right" LabelWidth="110px"
Width="220px">
</f:DatePicker>
<f:Label ID="Label2" runat="server" Text="至">
</f:Label>
<f:DatePicker runat="server" ID="txtEndRequired_Date" LabelAlign="Right" Width="150px">
<f:DatePicker runat="server" ID="txtEndRequired_Date" LabelAlign="Right" Width="110px">
</f:DatePicker>
<f:DatePicker runat="server" Label="Actual_Date" ID="txtStartActual_Date" LabelAlign="Right" LabelWidth="130px"
Width="320px">
<f:DatePicker runat="server" Label="Actual_Date" ID="txtStartActual_Date" LabelAlign="Right" LabelWidth="110px"
Width="220px">
</f:DatePicker>
<f:Label ID="Label3" runat="server" Text="至">
</f:Label>
<f:DatePicker runat="server" ID="txtEndActual_Date" LabelAlign="Right" Width="150px">
<f:DatePicker runat="server" ID="txtEndActual_Date" LabelAlign="Right" Width="110px">
</f:DatePicker>
</Items>
</f:Toolbar>

View File

@ -83,6 +83,26 @@ namespace FineUIPro.Web.Transfer
strSql += " AND Actual_Date <= @Actual_Date";
listStr.Add(new SqlParameter("@Actual_Date", Funs.GetNewDateTime(txtEndActual_Date.Text.Trim())));
}
if (!string.IsNullOrEmpty(txtDisc.Text.Trim()))
{
strSql += " AND Disc = @Disc";
listStr.Add(new SqlParameter("@Disc", txtDisc.Text.Trim()));
}
if (!string.IsNullOrEmpty(ddlEng.SelectedValue.Trim()))
{
strSql += " AND IsEng = @IsEng";
listStr.Add(new SqlParameter("@IsEng", ddlEng.SelectedValue.Trim() == "Y" ? 1 : 0));
}
if (!string.IsNullOrEmpty(ddlMatI.SelectedValue.Trim()))
{
strSql += " AND IsMatI = @IsMatI";
listStr.Add(new SqlParameter("@IsMatI", ddlMatI.SelectedValue.Trim() == "Y" ? 1 : 0));
}
if (!string.IsNullOrEmpty(ddlPunchType.SelectedValue.Trim()))
{
strSql += " AND Punch_Type = @Punch_Type";
listStr.Add(new SqlParameter("@Punch_Type", ddlPunchType.SelectedValue.Trim()));
}
strSql += " order by Num_No ";
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@ -258,7 +278,7 @@ namespace FineUIPro.Web.Transfer
if (buttonList.Contains(BLL.Const.BtnAdd))
{
//this.btnNew.Hidden = false;
btnMenuAttachA.Hidden=false;
btnMenuAttachA.Hidden = false;
btnMenuAttachB.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnModify))
@ -295,7 +315,7 @@ namespace FineUIPro.Web.Transfer
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.PunchlistFromMenuId);
if (buttonList.Contains(BLL.Const.BtnAdd))
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/Transfer/PunchlistFrom&menuId={1}", this.CurrUser.LoginProjectId+ "PunchlistFrom", BLL.Const.PunchlistFromMenuId)));
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/Transfer/PunchlistFrom&menuId={1}", this.CurrUser.LoginProjectId + "PunchlistFrom", BLL.Const.PunchlistFromMenuId)));
}
else
{

View File

@ -87,31 +87,40 @@ namespace FineUIPro.Web.Transfer
protected global::FineUIPro.TextBox txtSub_Sys_No;
/// <summary>
/// txtStartDate_Raised 控件。
/// txtDisc 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtStartDate_Raised;
protected global::FineUIPro.TextBox txtDisc;
/// <summary>
/// Label1 控件。
/// ddlEng 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label1;
protected global::FineUIPro.DropDownList ddlEng;
/// <summary>
/// txtEndDate_Raised 控件。
/// ddlMatI 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEndDate_Raised;
protected global::FineUIPro.DropDownList ddlMatI;
/// <summary>
/// ddlPunchType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPunchType;
/// <summary>
/// btnSearch 控件。
@ -140,6 +149,33 @@ namespace FineUIPro.Web.Transfer
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtStartDate_Raised 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtStartDate_Raised;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label1;
/// <summary>
/// txtEndDate_Raised 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEndDate_Raised;
/// <summary>
/// txtStartRequired_Date 控件。
/// </summary>