private void btnDocSearchShow_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     Button btn = sender as Button;
     string content = btn.Content as string;
     int id = Int32.Parse(btn.Tag.ToString());
     DataSetBureauDocTableAdapters.T_PresidentBureauDocTableAdapter adapter = new DataSetBureauDocTableAdapters.T_PresidentBureauDocTableAdapter();
     DataSetBureauDoc.T_PresidentBureauDocDataTable dt = adapter.GetDataById(id);
     string address = dt[0].DocAddress;
     string filePDF = address;
     string FileISF = content + ".isf";
     DirectoryInfo di = new DirectoryInfo(System.Environment.CurrentDirectory);
     string strPath = di.Parent.Parent.FullName;
     if (System.IO.File.Exists(strPath + @"/PDF/" + filePDF))
     {
         webbrowserDocContent.Navigate(new Uri(strPath + @"/PDF/" + filePDF, UriKind.RelativeOrAbsolute));
     }
     else
     {
         MessageBox.Show("未找到PDF文件");
     }
     if (System.IO.File.Exists(strPath + @"/Comment/" + FileISF))
     {
         System.IO.FileStream fs = new System.IO.FileStream(strPath + @"/Comment/" + FileISF, FileMode.OpenOrCreate, FileAccess.ReadWrite);
         this.InkCanvasAnnotation1.Strokes = new System.Windows.Ink.StrokeCollection(fs);
         fs.Close();
     }
     else
         this.InkCanvasAnnotation1.Strokes = new System.Windows.Ink.StrokeCollection();
     this.InkCanvasAnnotation1.IsEnabled = true;
     fileCurrentPDF = content;
     iCurrentItem = id;
     //            PDFReader pdfReader = new PDFReader();
     //            pdfReader.showPdf(content + ".pdf");
 }
 private void btnCommentOK_Click(object sender, RoutedEventArgs e)
 {
     DirectoryInfo di = new DirectoryInfo(System.Environment.CurrentDirectory);
     string strPath = di.Parent.Parent.FullName;
     string filename = fileCurrentPDF;
     if (Directory.Exists(strPath + @"/Comment") == false)
     {
         Directory.CreateDirectory(strPath + @"/Comment");
     }
     System.IO.FileStream fs = new System.IO.FileStream(strPath + @"/Comment/" + filename + ".isf", FileMode.OpenOrCreate, FileAccess.ReadWrite);
     this.InkCanvasAnnotation1.Strokes.Save(fs);
     fs.Close();
     MessageBox.Show("批示保存成功!");
     DataSetBureauDocTableAdapters.T_PresidentBureauDocTableAdapter adapter = new DataSetBureauDocTableAdapters.T_PresidentBureauDocTableAdapter();
     adapter.UpdateState(true, iCurrentItem);
 }
 private void listboxDocsRefresh(bool Isread, int Doctype)
 {
     //IsRead&&DocType
     DataSetBureauDocTableAdapters.T_PresidentBureauDocTableAdapter adapter = new DataSetBureauDocTableAdapters.T_PresidentBureauDocTableAdapter();
     dtDocs = adapter.GetBureauDocByStatenTypeDESC(Isread, Doctype);
     //			dtCurrent=dtDocs;
     listboxDocs.ItemsSource = dtDocs;
 }
 private void tbxSearch_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
 {
     // TODO: Add event handler implementation here.
     if (tbxSearch.Text != "")
     {
         DataSetBureauDocTableAdapters.T_PresidentBureauDocTableAdapter adapter = new DataSetBureauDocTableAdapters.T_PresidentBureauDocTableAdapter();
         dtDocs = adapter.GetBureauDocByKey(tbxSearch.Text);
         listboxDocs.ItemsSource = dtDocs;
     }
 }
 private void btnSearch_Click(object sender, RoutedEventArgs e)
 {
     if (tbxSearch.Text != "")
     {
         DataSetBureauDocTableAdapters.T_PresidentBureauDocTableAdapter adapter = new DataSetBureauDocTableAdapters.T_PresidentBureauDocTableAdapter();
         dtDocs = adapter.GetBureauDocByKey(tbxSearch.Text);
         listboxDocs.ItemsSource = dtDocs;
     }
 }