private void btnQuery_Click(object sender, EventArgs e) { string str = this.txtgfmc.Text.Trim(); string str2 = this.txtgfsh.Text.Trim(); string djh = this.txtdjh.Text.Trim(); List <Aisino.Fwkp.Fptk.Form.Djfp> collection = this.SelectByDjh(djh); if (str2 != "") { for (int i = collection.Count - 1; i >= 0; i--) { Aisino.Fwkp.Fptk.Form.Djfp djfp = collection[i]; if ((djfp != null) && (djfp.Fpxx != null)) { string gfsh = ""; if (((this.mFplx == 0) || ((int)this.mFplx == 2)) || ((int)this.mFplx == 0x33)) { gfsh = djfp.Fpxx.gfsh; } else if ((int)this.mFplx == 11) { gfsh = djfp.Fpxx.spfnsrsbh; } else if ((int)this.mFplx == 12) { gfsh = djfp.Fpxx.gfsh; } if ((gfsh != "") && !gfsh.Contains(str2)) { collection.RemoveAt(i); } } } } if (str != "") { for (int j = collection.Count - 1; j >= 0; j--) { Aisino.Fwkp.Fptk.Form.Djfp djfp2 = collection[j]; if ((djfp2 != null) && (djfp2.Fpxx != null)) { string gfmc = ""; if (((this.mFplx == 0) || ((int)this.mFplx == 2)) || ((int)this.mFplx == 0x33)) { gfmc = djfp2.Fpxx.gfmc; } else if ((int)this.mFplx == 11) { gfmc = djfp2.Fpxx.spfmc; } else if ((int)this.mFplx == 12) { gfmc = djfp2.Fpxx.gfmc; } if ((gfmc != "") && !gfmc.Contains(str)) { collection.RemoveAt(j); } } } } this.dgDJ.Rows.Clear(); this.DjfpList.Clear(); this.DjfpList.AddRange(collection); this.FillGridView(collection); }