protected void Button_query_Click(object sender, EventArgs e) { if (base.Request["PrjCode"] == null) { this.DataGrid1.DataSource = ""; this.DataGrid1.DataBind(); return; } string text = "prjcode='" + base.Request["PrjCode"].ToString() + "'"; if (this.TextBox_lxdw.Text != "") { text = text + " and StandNapeUnit like '%" + this.TextBox_lxdw.Text + "%'"; } this.DataGrid1.DataSource = SuperviseAction.GetSuperviseCollections(text); this.DataGrid1.DataBind(); }
private void bind() { if (base.Request["PrjCode"] != null) { string text = "prjcode='" + base.Request["PrjCode"].ToString() + "'"; if (base.Request["Type"] == "List") { text += " and ApproveResult=1"; } this.DataGrid1.DataSource = SuperviseAction.GetSuperviseCollections(text); this.DataGrid1.DataBind(); return; } if (base.Request["Type"] == "ShenHe") { string strwhere = "ApproveResult=2"; this.DataGrid1.DataSource = SuperviseAction.GetSuperviseCollections(strwhere); this.DataGrid1.DataBind(); return; } this.DataGrid1.DataSource = ""; this.DataGrid1.DataBind(); }