1
This commit is contained in:
@@ -47,6 +47,7 @@ namespace FineUIPro.Web.Accident
|
||||
//}
|
||||
//this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
GetButtonPower();
|
||||
BLL.AccidentWarningService.InitAccidentTypeDropDownList(this.drpType, true);
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
}
|
||||
@@ -64,7 +65,7 @@ namespace FineUIPro.Web.Accident
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(this.txtSearch.Text.Trim()))
|
||||
{
|
||||
sb.Append("and (Code like @txtSearch or Title like @txtSearch or Type like @txtSearch or Address like @txtSearch or Source like @txtSearch ) ");
|
||||
sb.Append("and (Code like @txtSearch or Title like @txtSearch or Address like @txtSearch or Source like @txtSearch ) ");
|
||||
listStr.Add(new SqlParameter("@txtSearch", "%" + this.txtSearch.Text.Trim() + "%"));
|
||||
}
|
||||
//if (!string.IsNullOrEmpty(this.txtType.Text.Trim()))
|
||||
@@ -72,6 +73,11 @@ namespace FineUIPro.Web.Accident
|
||||
// sb.Append("and (Type like @txtType ) ");
|
||||
// listStr.Add(new SqlParameter("@txtType", "%" + this.txtType.Text.Trim() + "%"));
|
||||
//}
|
||||
if (!string.IsNullOrWhiteSpace(this.drpType.SelectedValue) && this.drpType.SelectedValue != Const._Null)
|
||||
{
|
||||
sb.Append("and Type = @Type ");
|
||||
listStr.Add(new SqlParameter("@Type", this.drpType.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtAccidentDateStart.Text.Trim()))
|
||||
{
|
||||
sb.Append("and AccidentDate >= @AccidentDateStart ");
|
||||
@@ -91,6 +97,17 @@ namespace FineUIPro.Web.Accident
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 事故类型下拉触发事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpType_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
|
||||
#region 分页 排序
|
||||
/// <summary>
|
||||
/// 改变索引事件
|
||||
|
||||
Reference in New Issue
Block a user