前台: <td nowrap align="right"> 中标状态: </td> <td colspan="2"> <table> <tr> <td> <asp:CheckBox ID="cb_notBidding" runat="server" Text="未中标" /> </td> <td> <asp:CheckBox ID="cb_haveBidding" runat="server" Text="中标" /> </td> <td> <asp:CheckBox ID="cb_cancelPublish" runat="server" Text="撤销发布" /> </td> </tr> </table> </td> 后台: string winState = string.Empty; if (cb_notBidding.Checked) { winState = " and ("; filter += winState + string.Format(V_IB3_IBINFOLST.Col_WINSTATEID + "= '{0}'", Convert.ToInt32(SHIB3.Business.Text.EvaluateIBResult.Fail)); } if (cb_haveBidding.Checked) { if (winState == " and (") { winState = " or "; } else if (winState == " or ") { winState = " or "; } else { winState = " and ("; } filter += winState + string.Format(V_IB3_IBINFOLST.Col_WINSTATEID + "= '{0}'", Convert.ToInt32(SHIB3.Business.Text.EvaluateIBResult.Win)); } if (cb_cancelPublish.Checked) { if (winState == " and (") { winState = " or "; } else if (winState == " or ") { winState = " or "; } else { winState = " and ("; } filter += winState + string.Format(V_IB3_IBINFOLST.Col_WINSTATEID + "= '{0}'", Convert.ToInt32(SHIB3.Business.Text.EvaluateIBResult.UdoRelease)); } if (!string.IsNullOrEmpty(winState)) { filter += ")"; }
checkbox的复选框查询
最新推荐文章于 2020-03-27 15:30:43 发布