定义网格视图时出错

时间:2013-04-14 14:39:04

标签: asp.net

错误是删除一个网格视图

protected void dropdwnfilter_SelectedIndexChanged(object sender, EventArgs e)
{
    if (dropdwnfilter.SelectedItem.Value == "usd")
    {
        SqlCommand cmd = new SqlCommand(("Select name,prize*50,detail from product"), con);
        SqlDataAdapter adapter = new SqlDataAdapter(cmd);
        DataSet ds = new DataSet();
        adapter.Fill(ds);
        GridView1.DataSource = ds;
        GridView1.DataBind();
    }
    else
    {
        SqlCommand cmd = new SqlCommand(("Select * from product"), con);
        SqlDataAdapter adapter = new SqlDataAdapter(cmd);
        DataSet ds = new DataSet();
        adapter.Fill(ds);
        GridView1.DataSource = ds;
        GridView1.DataBind();
    }
}

我尝试这个。基本上,如果用户跟usd(doller)一起去,然后用50奖励倍数,如果他和另一个人一起获得相同的奖金

0 个答案:

没有答案