DataTable dt = SystemBLL.DataSeachBLL.GetFillUnitNames();
DataRow dr = dt.NewRow();
dt.Rows.Add(SystemBLL.DataSeachBLL.GetUnitnamesss().Rows[0][0].ToString());
int count = dt.Rows.Count;
Random ran = new Random();
if (count > 0)
{
int RandKey = ran.Next(0, count);
string strsql = dt.Rows[RandKey][0].ToString();
selectcity.Text = "本次随机查询的地区是:" + strsql+"的统计情况";
GVStatistics.DataSource = SystemBLL.DataSeachBLL.SystematicRandomStatisticals(DateTime.Now.Year.ToString(),strsql);
}
else
{
MessageBox.Show("数据库暂时无任何部门信息!");
}