partial void Deletewjgl_wjnrjs(wjgl_wjnrjs instance);
 partial void Updatewjgl_wjnrjs(wjgl_wjnrjs instance);
 /// <summary>
 /// 保存文件内容到数据库
 /// </summary>
 /// <param name="filePath"></param>
 /// <param name="ext"></param>
 private void SaveWjnr(string fileId,string filePath,string ext)
 {
     try
     {
         List<string> wjnrs = new List<string>();
         if (GlobalVar.WordExtension.Contains(ext))
             wjnrs = FileCommonOperations.GetWordContent(filePath);
         if (GlobalVar.ExcelExtension.Contains(ext))
             wjnrs = FileCommonOperations.GetExcelContent(filePath);
         if (GlobalVar.PPTExtension.Contains(ext))
             wjnrs = FileCommonOperations.GetPPTContent(filePath);
         else
         {
             return;
         }
         foreach (string wjnr in wjnrs)
         {
             var wjnrEntity = new wjgl_wjnrjs
             {
                 file_id = fileId,
                 file_nr = wjnr
             };
             fileDAO.AddFileNr(wjnrEntity);
         }
     }
     catch (Exception e)
     {
         throw e;
     }
 }
 partial void Insertwjgl_wjnrjs(wjgl_wjnrjs instance);
Esempio n. 5
0
 public void AddFileNr(wjgl_wjnrjs wjnrEntity)
 {
     wjnrDB.wjgl_wjnrjs.InsertOnSubmit(wjnrEntity);
     wjnrDB.SubmitChanges();
 }