protected void btnSearch_Click(object sender, EventArgs e) { string text = " where (1=1) "; QueryItemCollection queryItemCollection = (QueryItemCollection)this.Session["QUERY"]; for (int i = 0; i < queryItemCollection.Count; i++) { if (queryItemCollection[i].ItemValue.Trim() != "") { text = text + " and " + queryItemCollection[i].StrSql.Replace("[]", queryItemCollection[i].ItemValue.Trim()).Trim(); } } string text2 = base.Request["type"].ToString(); string text3 = ""; string a; if ((a = text2) != null) { if (!(a == "1")) { if (!(a == "2")) { if (!(a == "3")) { if (!(a == "4")) { if (a == "5") { text3 = "其他"; } } else { text3 = "租赁"; } } else { text3 = "采购"; } } else { text3 = "分包"; } } else { text3 = "承包"; } } if (text3.Trim() != "") { text = text + " and 合同类型 like '" + text3 + "合同' "; } this.DG1_BIND(text); }
protected void btnSearch_Click(object sender, EventArgs e) { string text = " "; QueryItemCollection queryItemCollection = (QueryItemCollection)this.Session["QUERY"]; for (int i = 0; i < queryItemCollection.Count; i++) { text = text + queryItemCollection[i].StrSql.Replace("[]", queryItemCollection[i].ItemValue.Trim()).Trim() + " "; } this.dgdOrder_Bind(text); }
protected void btnSearch_Click(object sender, EventArgs e) { string text = " where (1=1) "; QueryItemCollection queryItemCollection = (QueryItemCollection)this.Session["QUERY"]; for (int i = 0; i < queryItemCollection.Count; i++) { if (queryItemCollection[i].ItemValue.Trim() != "") { text = text + " and " + queryItemCollection[i].StrSql.Replace("[]", queryItemCollection[i].ItemValue.Trim()).Trim(); } } this.DG1_BIND(text, this.DropDownList1.SelectedValue); }
protected void btnexecl_Click(object sender, EventArgs e) { string text = " where (1=1) "; if (this.Session["QUERY"] != null) { QueryItemCollection queryItemCollection = (QueryItemCollection)this.Session["QUERY"]; for (int i = 0; i < queryItemCollection.Count; i++) { if (queryItemCollection[i].ItemValue.Trim() != "") { text = text + " and " + queryItemCollection[i].StrSql.Replace("[]", queryItemCollection[i].ItemValue.Trim()).Trim(); } } } DataTable reportList = QueryItemAction.GetReportList(this.reportid, text); this.ExportToExecelAll(reportList, this.Lb_Title.Text + ".xls"); }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { this.ReportID = Convert.ToInt32(base.Request["reportid"]); this.Options = QueryItemAction.QueryValidItems(this.ReportID); QueryItemCollection queryItemCollection = new QueryItemCollection(); for (int i = 0; i < this.Options.Rows.Count; i++) { queryItemCollection.Add(new QueryItem { ItemName = this.Options.Rows[i]["TermName"].ToString(), ItemSign = "", ItemValue = "", StrSql = this.Options.Rows[i]["StrSql"].ToString(), ToolTip = this.Options.Rows[i]["ToolTip"].ToString(), DataType = (int)this.Options.Rows[i]["DataType"], IsEmpty = (bool)this.Options.Rows[i]["IsEmpty"] }); } this.ItemList = queryItemCollection; this.dgdQuery_Bind(); } }