string whereClause = "";
if(DropDown1.SelectItem.Value = -1) {
whereClause = ""
}
else if(DropDown1.SelectItem.Value = 1) {
whereClause = "where 分类='分类1'"
}
else if(...cmdText.CommandText = "select * from theTable " + whereClause;
if(DropDown1.SelectItem.Value = -1) {
whereClause = ""
}
else if(DropDown1.SelectItem.Value = 1) {
whereClause = "where 分类='分类1'"
}
else if(...cmdText.CommandText = "select * from theTable " + whereClause;
解决方案 »
- C#,IE9,怎么调试跟踪代码?
- GDI+ 时钟 求助! 恳请各位指点!
- 控制台访问数据库读不到数据,在PLSQL Developer中能查到数据,请各位朋友帮忙
- 关于Mutex、FindWindow以及SendMessage的问题
- 谁能帮我发个简单的例子
- a couple of limitations of C#
- winfrom中个用户控件,怎么以插件形势加载到另一个项目中。
- 急救啊,怎么将一个数组传递给oracle的存储过程啊?!
- GDI制图问题
- sprint.net加nhibernate 配置出现问题
- 来发一个C#的 QQ群!
- 请问如何在PrintPreviewDialog的ToolBar中增加BUTTON
string varWhere = ""
if(this.ddl....SelectedValue != -1)
{
varWhere = " pclass_id = " + this.ddl......SelectedValue;
}string sql = "select * from xxx" + varWhere;....
{
string strSql="";
strSql="select wynumber,wytitle,wysenddate,wykeyword,wysavedate from wypolicy where 1<>2 ";
if(condition!="")
{
strSql += condition + " order by wysavedate desc";
}
else
{
strSql+=" order by wysavedate desc";
} string varWhere = "";
if(this.wyclass.SelectedIndex != -1)
{
varWhere = " Value = " + this.wyclass.SelectedValue;
} string sql = "select * from wypolicy" + varWhere;
//Response.Write(strSql);
DataSet ds = cc.GetDataSet(strSql,myCn);
dgShow.DataSource=ds;
dgShow.DataBind(); PageUpDown1.DataSource = ds;
PageUpDown1.Select();
}
不对啊
还是不行啊
请指出我的错误