Ejemplo n.º 1
0
 private void buttonHinzufuegen_Click(object sender, RoutedEventArgs e)
 {
     openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
     openFileDialog1.InitialDirectory = @"C:\";
     openFileDialog1.Title            = "Geeignete Datei auswählen";
     openFileDialog1.Filter           = "Word Documents (*.DOC;*.DOCX)|*.DOC;*.DOCX|Excel Workbook (*.XLS;*.XSLX)|*.XLS;*.XLSX|PowerPoint Präsentation (*.PPT;*.PPTX)|*.PPT;*.PPTX";
     openFileDialog1.ShowDialog();
     filename = openFileDialog1.FileName;
     try
     {
         FileInfo fi = new FileInfo(filename);
         String[] z  = filename.Split('.');
         db.AddDokus(fi.FullName, z[1], fi.CreationTime);
     }
     catch (Exception)
     {
         throw;
     }
 }
Ejemplo n.º 2
0
 public void addFile(String name, String dateiart, DateTime date)
 {
     ds.AddDokus(name, dateiart, date);
 }