fix:尾项管理下拉多选
This commit is contained in:
parent
15bbe21c67
commit
9a169d1711
|
@ -67,5 +67,101 @@ namespace BLL
|
||||||
select x.Action_By).Distinct().OrderBy(x => x).ToList();
|
select x.Action_By).Distinct().OrderBy(x => x).ToList();
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 责任人pic下拉框
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="projectId">项目id</param>
|
||||||
|
/// <param name="dropName">下拉框名字</param>
|
||||||
|
/// <param name="isShowPlease">是否显示请选择</param>
|
||||||
|
public static void InitPICDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
|
||||||
|
{
|
||||||
|
dropName.DataValueField = "string";
|
||||||
|
dropName.DataTextField = "string";
|
||||||
|
dropName.DataSource = GetPICDropDownList(projectId);
|
||||||
|
dropName.DataBind();
|
||||||
|
if (isShowPlease)
|
||||||
|
{
|
||||||
|
Funs.FineUIPleaseSelect(dropName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取责任人pic下拉选项
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="projectId">项目id</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static List<string> GetPICDropDownList(string projectId)
|
||||||
|
{
|
||||||
|
var list = (from x in Funs.DB.Transfer_PunchlistFrom
|
||||||
|
where x.ProjectId == projectId
|
||||||
|
select x.PIC).Distinct().OrderBy(x => x).ToList();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 责任人-五环/PIC-WUH下拉框
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="projectId">项目id</param>
|
||||||
|
/// <param name="dropName">下拉框名字</param>
|
||||||
|
/// <param name="isShowPlease">是否显示请选择</param>
|
||||||
|
public static void InitWUHPICDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
|
||||||
|
{
|
||||||
|
dropName.DataValueField = "string";
|
||||||
|
dropName.DataTextField = "string";
|
||||||
|
dropName.DataSource = GetWUHPICDropDownList(projectId);
|
||||||
|
dropName.DataBind();
|
||||||
|
if (isShowPlease)
|
||||||
|
{
|
||||||
|
Funs.FineUIPleaseSelect(dropName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取责任人-五环/PIC-WUH下拉选项
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="projectId">项目id</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static List<string> GetWUHPICDropDownList(string projectId)
|
||||||
|
{
|
||||||
|
var list = (from x in Funs.DB.Transfer_PunchlistFrom
|
||||||
|
where x.ProjectId == projectId
|
||||||
|
select x.PIC_WUH).Distinct().OrderBy(x => x).ToList();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// disc下拉框
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="projectId">项目id</param>
|
||||||
|
/// <param name="dropName">下拉框名字</param>
|
||||||
|
/// <param name="isShowPlease">是否显示请选择</param>
|
||||||
|
public static void InitDiscDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
|
||||||
|
{
|
||||||
|
dropName.DataValueField = "string";
|
||||||
|
dropName.DataTextField = "string";
|
||||||
|
dropName.DataSource = GetDiscDropDownList(projectId);
|
||||||
|
dropName.DataBind();
|
||||||
|
if (isShowPlease)
|
||||||
|
{
|
||||||
|
Funs.FineUIPleaseSelect(dropName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取disc下拉选项
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="projectId">项目id</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static List<string> GetDiscDropDownList(string projectId)
|
||||||
|
{
|
||||||
|
var list = (from x in Funs.DB.Transfer_PunchlistFrom
|
||||||
|
where x.ProjectId == projectId
|
||||||
|
select x.Disc).Distinct().OrderBy(x => x).ToList();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,8 +26,9 @@
|
||||||
<f:DropDownList ID="drpTurnoverSystemCode" runat="server" Label="Turnover System Code" AutoPostBack="true" AutoSelectFirstItem="false" EnableMultiSelect="true" EnableCheckBoxSelect="true" LabelWidth="180px">
|
<f:DropDownList ID="drpTurnoverSystemCode" runat="server" Label="Turnover System Code" AutoPostBack="true" AutoSelectFirstItem="false" EnableMultiSelect="true" EnableCheckBoxSelect="true" LabelWidth="180px">
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
<f:TextBox runat="server" ID="txtRaised_By" Label="Raised By" LabelWidth="90px" LabelAlign="Right" Width="150px"></f:TextBox>
|
<f:TextBox runat="server" ID="txtRaised_By" Label="Raised By" LabelWidth="90px" LabelAlign="Right" Width="150px"></f:TextBox>
|
||||||
<f:TextBox runat="server" ID="txtDisc" Label="Disc" LabelWidth="40px" LabelAlign="Right" Width="120px"></f:TextBox>
|
<%-- <f:TextBox runat="server" ID="txtDisc" Label="Disc" LabelWidth="40px" LabelAlign="Right" Width="120px"></f:TextBox> --%>
|
||||||
|
<f:DropDownList ID="ddlDisc" runat="server" Label="Disc" AutoPostBack="true" AutoSelectFirstItem="false" EnableMultiSelect="true" EnableCheckBoxSelect="true" Width="150px" LabelWidth="40px">
|
||||||
|
</f:DropDownList>
|
||||||
|
|
||||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||||
|
|
||||||
|
@ -91,9 +92,13 @@
|
||||||
<Items>
|
<Items>
|
||||||
<f:DropDownList ID="ddlAction_By" runat="server" Label="责任单位" AutoPostBack="true" AutoSelectFirstItem="false" EnableMultiSelect="true" EnableCheckBoxSelect="true" Width="220px" LabelWidth="80px">
|
<f:DropDownList ID="ddlAction_By" runat="server" Label="责任单位" AutoPostBack="true" AutoSelectFirstItem="false" EnableMultiSelect="true" EnableCheckBoxSelect="true" Width="220px" LabelWidth="80px">
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
|
<f:DropDownList ID="ddlPIC" runat="server" Label="责任人PIC" AutoPostBack="true" AutoSelectFirstItem="false" EnableMultiSelect="true" EnableCheckBoxSelect="true" Width="200px" LabelWidth="90px">
|
||||||
|
</f:DropDownList>
|
||||||
|
<f:DropDownList ID="ddlPIC_WUH" runat="server" Label="责任人-五环/PIC-WUH" AutoPostBack="true" AutoSelectFirstItem="false" EnableMultiSelect="true" EnableCheckBoxSelect="true" Width="260px" LabelWidth="160px">
|
||||||
|
</f:DropDownList>
|
||||||
<%--<f:TextBox runat="server" ID="txtAction_By" Label="责任单位" LabelWidth="80px" LabelAlign="Right" Width="180px"></f:TextBox>--%>
|
<%--<f:TextBox runat="server" ID="txtAction_By" Label="责任单位" LabelWidth="80px" LabelAlign="Right" Width="180px"></f:TextBox>--%>
|
||||||
<f:TextBox runat="server" ID="txtPIC" Label="责任人PIC" LabelWidth="90px" LabelAlign="Right" Width="170px"></f:TextBox>
|
<%-- <f:TextBox runat="server" ID="txtPIC" Label="责任人PIC" LabelWidth="90px" LabelAlign="Right" Width="170px"></f:TextBox> --%>
|
||||||
<f:TextBox runat="server" ID="txtPIC_WUH" Label="责任人-五环/PIC-WUH" LabelWidth="160px" LabelAlign="Right" Width="240px"></f:TextBox>
|
<%-- <f:TextBox runat="server" ID="txtPIC_WUH" Label="责任人-五环/PIC-WUH" LabelWidth="160px" LabelAlign="Right" Width="240px"></f:TextBox> --%>
|
||||||
|
|
||||||
<f:DatePicker runat="server" Label="Required Date" ID="txtEndRequired_Date" LabelAlign="Right" LabelWidth="110px"
|
<f:DatePicker runat="server" Label="Required Date" ID="txtEndRequired_Date" LabelAlign="Right" LabelWidth="110px"
|
||||||
Width="220px">
|
Width="220px">
|
||||||
|
|
|
@ -33,6 +33,9 @@ namespace FineUIPro.Web.Transfer
|
||||||
GetButtonPower();
|
GetButtonPower();
|
||||||
BLL.PunchlistFromService.InitTurnoverSystemCodeUnitDropDownList(this.drpTurnoverSystemCode, this.CurrUser.LoginProjectId, false);
|
BLL.PunchlistFromService.InitTurnoverSystemCodeUnitDropDownList(this.drpTurnoverSystemCode, this.CurrUser.LoginProjectId, false);
|
||||||
BLL.PunchlistFromService.InitActionByUnitDropDownList(this.ddlAction_By, this.CurrUser.LoginProjectId, false);
|
BLL.PunchlistFromService.InitActionByUnitDropDownList(this.ddlAction_By, this.CurrUser.LoginProjectId, false);
|
||||||
|
BLL.PunchlistFromService.InitPICDropDownList(this.ddlPIC, this.CurrUser.LoginProjectId, false);//责任人PIC
|
||||||
|
BLL.PunchlistFromService.InitWUHPICDropDownList(this.ddlPIC_WUH, this.CurrUser.LoginProjectId, false);//责任人-五环/PIC-WUH
|
||||||
|
BLL.PunchlistFromService.InitDiscDropDownList(this.ddlDisc, this.CurrUser.LoginProjectId, false);//Disc
|
||||||
BindGrid();
|
BindGrid();
|
||||||
|
|
||||||
this.btnNew.OnClientClick = Window1.GetShowReference("PunchlistFromEdit.aspx") + "return false;";
|
this.btnNew.OnClientClick = Window1.GetShowReference("PunchlistFromEdit.aspx") + "return false;";
|
||||||
|
@ -109,11 +112,26 @@ namespace FineUIPro.Web.Transfer
|
||||||
// strSql += " AND Actual_Date <= @EndActual_Date";
|
// strSql += " AND Actual_Date <= @EndActual_Date";
|
||||||
// listStr.Add(new SqlParameter("@EndActual_Date", Funs.GetNewDateTime(txtEndActual_Date.Text.Trim())));
|
// listStr.Add(new SqlParameter("@EndActual_Date", Funs.GetNewDateTime(txtEndActual_Date.Text.Trim())));
|
||||||
//}
|
//}
|
||||||
if (!string.IsNullOrEmpty(txtDisc.Text.Trim()))
|
if (this.ddlDisc.SelectedItemArray.Count() > 1 || (this.ddlDisc.SelectedValue != BLL.Const._Null && this.ddlDisc.SelectedItemArray.Count() == 1))
|
||||||
{
|
{
|
||||||
strSql += " AND Disc = @Disc";
|
strSql += " AND (1=2 ";
|
||||||
listStr.Add(new SqlParameter("@Disc", txtDisc.Text.Trim()));
|
int i = 0;
|
||||||
|
foreach (var item in this.ddlDisc.SelectedValueArray)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(item) && item != BLL.Const._Null)
|
||||||
|
{
|
||||||
|
strSql += " OR Disc = @Disc" + i.ToString();
|
||||||
|
listStr.Add(new SqlParameter("@Disc" + i.ToString(), item));
|
||||||
}
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
strSql += ")";
|
||||||
|
}
|
||||||
|
// if (!string.IsNullOrEmpty(txtDisc.Text.Trim()))
|
||||||
|
// {
|
||||||
|
// strSql += " AND Disc = @Disc";
|
||||||
|
// listStr.Add(new SqlParameter("@Disc", txtDisc.Text.Trim()));
|
||||||
|
// }
|
||||||
if (!string.IsNullOrEmpty(ddlEng.SelectedValue.Trim()))
|
if (!string.IsNullOrEmpty(ddlEng.SelectedValue.Trim()))
|
||||||
{
|
{
|
||||||
strSql += " AND IsEng = @IsEng";
|
strSql += " AND IsEng = @IsEng";
|
||||||
|
@ -160,22 +178,52 @@ namespace FineUIPro.Web.Transfer
|
||||||
}
|
}
|
||||||
strSql += ")";
|
strSql += ")";
|
||||||
}
|
}
|
||||||
|
if (this.ddlPIC.SelectedItemArray.Count() > 1 || (this.ddlPIC.SelectedValue != BLL.Const._Null && this.ddlPIC.SelectedItemArray.Count() == 1))
|
||||||
|
{
|
||||||
|
strSql += " AND (1=2 ";
|
||||||
|
int i = 0;
|
||||||
|
foreach (var item in this.ddlPIC.SelectedValueArray)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(item) && item != BLL.Const._Null)
|
||||||
|
{
|
||||||
|
strSql += " OR PIC = @PIC" + i.ToString();
|
||||||
|
listStr.Add(new SqlParameter("@PIC" + i.ToString(), item));
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
strSql += ")";
|
||||||
|
}
|
||||||
|
if (this.ddlPIC_WUH.SelectedItemArray.Count() > 1 || (this.ddlPIC_WUH.SelectedValue != BLL.Const._Null && this.ddlPIC_WUH.SelectedItemArray.Count() == 1))
|
||||||
|
{
|
||||||
|
strSql += " AND (1=2 ";
|
||||||
|
int i = 0;
|
||||||
|
foreach (var item in this.ddlPIC_WUH.SelectedValueArray)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(item) && item != BLL.Const._Null)
|
||||||
|
{
|
||||||
|
strSql += " OR PIC_WUH = @PIC_WUH" + i.ToString();
|
||||||
|
listStr.Add(new SqlParameter("@PIC_WUH" + i.ToString(), item));
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
strSql += ")";
|
||||||
|
}
|
||||||
|
|
||||||
//if (ddlAction_By.SelectedValue != null && ddlAction_By.SelectedValue != BLL.Const._Null)
|
//if (ddlAction_By.SelectedValue != null && ddlAction_By.SelectedValue != BLL.Const._Null)
|
||||||
//{
|
//{
|
||||||
// strSql += " AND Action_By = @Action_By";
|
// strSql += " AND Action_By = @Action_By";
|
||||||
// listStr.Add(new SqlParameter("@Action_By", ddlAction_By.SelectedValue.Trim()));
|
// listStr.Add(new SqlParameter("@Action_By", ddlAction_By.SelectedValue.Trim()));
|
||||||
//}
|
//}
|
||||||
if (!string.IsNullOrEmpty(txtPIC.Text.Trim()))
|
// if (!string.IsNullOrEmpty(txtPIC.Text.Trim()))
|
||||||
{
|
// {
|
||||||
strSql += " AND PIC like @PIC";
|
// strSql += " AND PIC like @PIC";
|
||||||
listStr.Add(new SqlParameter("@PIC", "%" + this.txtPIC.Text.Trim() + "%"));
|
// listStr.Add(new SqlParameter("@PIC", "%" + this.txtPIC.Text.Trim() + "%"));
|
||||||
}
|
// }
|
||||||
if (!string.IsNullOrEmpty(txtPIC_WUH.Text.Trim()))
|
// if (!string.IsNullOrEmpty(txtPIC_WUH.Text.Trim()))
|
||||||
{
|
// {
|
||||||
strSql += " AND PIC_WUH like @PIC_WUH";
|
// strSql += " AND PIC_WUH like @PIC_WUH";
|
||||||
listStr.Add(new SqlParameter("@PIC_WUH", "%" + this.txtPIC_WUH.Text.Trim() + "%"));
|
// listStr.Add(new SqlParameter("@PIC_WUH", "%" + this.txtPIC_WUH.Text.Trim() + "%"));
|
||||||
}
|
// }
|
||||||
if (!string.IsNullOrEmpty(ddlStatus.SelectedValue.Trim()))
|
if (!string.IsNullOrEmpty(ddlStatus.SelectedValue.Trim()))
|
||||||
{
|
{
|
||||||
strSql += " AND Status = @Status";
|
strSql += " AND Status = @Status";
|
||||||
|
|
|
@ -87,13 +87,13 @@ namespace FineUIPro.Web.Transfer
|
||||||
protected global::FineUIPro.TextBox txtRaised_By;
|
protected global::FineUIPro.TextBox txtRaised_By;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtDisc 控件。
|
/// ddlDisc 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtDisc;
|
protected global::FineUIPro.DropDownList ddlDisc;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnSearch 控件。
|
/// btnSearch 控件。
|
||||||
|
@ -222,22 +222,22 @@ namespace FineUIPro.Web.Transfer
|
||||||
protected global::FineUIPro.DropDownList ddlAction_By;
|
protected global::FineUIPro.DropDownList ddlAction_By;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtPIC 控件。
|
/// ddlPIC 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtPIC;
|
protected global::FineUIPro.DropDownList ddlPIC;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtPIC_WUH 控件。
|
/// ddlPIC_WUH 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtPIC_WUH;
|
protected global::FineUIPro.DropDownList ddlPIC_WUH;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtEndRequired_Date 控件。
|
/// txtEndRequired_Date 控件。
|
||||||
|
|
Loading…
Reference in New Issue