private void delete_Click(object sender, RoutedEventArgs e)
 {
     if (LV.SelectedIndex != -1)
     {
         OleDbConnection conn = new OleDbConnection(odbcConnStr);
         conn.Open();
         string sql = "select 测站,N,E,Z from Buildstation";
         OleDbDataAdapter adp = new OleDbDataAdapter(sql, conn);
         DataSet ds = new DataSet();
         adp.Fill(ds, "Buildstation");
         int c = LV.SelectedIndex;
         string s = ds.Tables["Buildstation"].Rows[c]["测站"].ToString().Trim();
         DBClass.Manipulation("Delete from Buildstation where 测站='" + s + "'");
         Window_jianzhan7_1 window_jianzhan7_1 = new Window_jianzhan7_1();//刷新界面
         window_jianzhan7_1.Show();
         this.Close();//关闭当前窗口
     }
     else
     {
         MessageBox.Show("请选择数据!", "提示");
     }
 }
 private void ESC_Click()
 {
     Window_jianzhan7_1 window_jianzhan7 = new Window_jianzhan7_1();
     window_jianzhan7.Show();
     this.Close();//关闭当前窗口
 }
 private void Next_Click(object sender, RoutedEventArgs e)
 {
     if (station.Text.ToString() != "")
     {
         
         if (DBClass.Judge("select 测站 from Buildstation where 测站='" + station.Text.Trim() + "'"))//判断测站是否存在,不存在不能进行下一步
         {
             DBClass.Manipulation("Update Buildstation set 仪高='" + YH.Text.Trim() + "',镜高='" + JH.Text.Trim() + "' where 测站='" + station.Text.Trim() + "' ");
             Window_jianzhan7_1 window_jianzhan7_1 = new Window_jianzhan7_1();
             window_jianzhan7_1.Show();
             this.Close();//关闭当前窗口
         }  
         else
         {
             MessageBox.Show("该测站不存在!");
         }
     }
     else
     {
         MessageBox.Show("请输入站名!");
     }
 }
 private void ESC_Click(object sender, RoutedEventArgs e)
 {
     Window_jianzhan7_1 window_jianzhan7_1 = new Window_jianzhan7_1();
     window_jianzhan7_1.Show();
     this.Close();//关闭当前窗口
 }