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("数据库暂时无任何部门信息!");
            }

posted on 2010-08-18 21:28  08信工实训  阅读(141)  评论(0编辑  收藏  举报