日期:2014-05-20 浏览次数:20799 次
int sun = 0; double sum = 0; string sql = "select * from Users where Dates between #" + this.DtXsrq.Value.ToString() + "# and #" + this.nosql.Value.ToString() + "#"; DataSet ds = DBHepler.GetDataSet(sql); dataviwe.DataSource = ds.Tables[0].DefaultView;
StringBuilder sb = new StringBuilder(); sb.Append("select * from Users A where 1=1"); if (comsheng.Text != "") { sb.Append("and A.Province='" + comsheng.Text + "'"); } if (comshi.Text != "") { sb.Append(" and A.City='" + comshi.Text + "'"); } if (txtxue.Text != "") { sb.Append(" and A.District='" + txtxue.Text + "'"); } if (txtzhen.Text != "") { sb.Append(" and A.Town='" + txtzhen.Text + "'"); } if (txtname.Text != "") { sb.Append(" and A.Name='" + txtname.Text + "'"); } if (comProduct.Text != "") { sb.Append(" and A.Product='" + comProduct.Text + "'"); } string sql = sb.ToString(); DataSet ds = DBHepler.GetDataSet(sql); dataviwe.DataSource = ds.Tables[0].DefaultView;
int sun = 0; double sum = 0; string sql = "select * from Users where Dates between #" + this.DtXsrq.Value.ToString() + "# and #" + this.nosql.Value.ToString() + "#"; if (comsheng.Text != "") { sql += (" and A.Province='" + comsheng.Text + "'"); } DataSet ds = DBHepler.GetDataSet(sql); dataviwe.DataSource = ds.Tables[0].DefaultView;