private void Route_comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            rn = route_comboBox1.Text;
            //添加年份
            DBlink db1 = new DBlink();

            if (db1.DBcon())     //填充Pname 数组
            {
                db1.GetYear(rn); //得到故障线路
            }
            db1.DBclose();
            year_comboBox1.Items.Clear();//

            for (int j = 0; j < guzhang.year.Count; j++)
            {
                year_comboBox1.Items.Add(guzhang.year[j].ToString());
            }
        }
        private void Barchart_Click(object sender, EventArgs e) //选择全部线路
        {
            route_comboBox1.Enabled = false;                    //选择框不可选
            single_or_all           = true;                     //当选择全部线路时,single_or_all为true

            //添加年份
            DBlink db1 = new DBlink();

            if (db1.DBcon())   //填充Pname 数组
            {
                db1.GetYear(); //得到故障线路
            }
            db1.DBclose();
            year_comboBox1.Items.Clear();//

            for (int j = 0; j < guzhang.year.Count; j++)
            {
                year_comboBox1.Items.Add(guzhang.year[j].ToString());
            }
        }