コード例 #1
0
        public void DeleteFile(string archiveListCellRptID, string singleProjectID)
        {
            T_EFile_BLL bll = new T_EFile_BLL();

            T_EFile_MDL model = new T_EFile_MDL();

            model = bll.GetModel(Convert.ToInt32(archiveListCellRptID));
            if (model != null)
            {
                //删除电子文件
                //if (model != null && model.PDFFilePath != "" && System.IO.File.Exists(PdfPath + model.PDFFilePath))
                //{
                //    System.IO.File.Delete(PdfPath + model.PDFFilePath);
                //}
                //string filePath = string.Concat(model.RootPath, singleProjectID, "\\ODOC\\", model.FilePath);

                //if (filePath != "" && System.IO.File.Exists(filePath))
                //{
                //    System.IO.File.Delete(filePath);
                //}
                //删除电子文件记录
                bll.Delete(Convert.ToInt32(archiveListCellRptID));

                //Leo 更新文件夹,晚上重新生产一次
                int FileListID = model.FileListID;
                BLL.T_FileList_BLL   fileListBLL = new DigiPower.Onlinecol.Standard.BLL.T_FileList_BLL();
                Model.T_FileList_MDL fileListMDL = fileListBLL.GetModel(FileListID);
                fileListMDL.CONVERT_FLAG = false;
                fileListBLL.Update(fileListMDL);
            }
        }
コード例 #2
0
        public void DeleteFile(string archiveListCellRptID, string singleProjectID)
        {
            T_EFile_MDL model = new T_EFile_MDL();

            model = eFileBLL.GetModel(Convert.ToInt32(archiveListCellRptID));
            if (model != null)
            {
                string filePath = string.Concat(model.RootPath, singleProjectID, "\\ODOC\\", model.FilePath);

                if (filePath != "" && System.IO.File.Exists(filePath))
                {
                    System.IO.File.Delete(filePath);
                }
                //删除电子文件记录
                eFileBLL.Delete(Convert.ToInt32(archiveListCellRptID));
                PublicModel.writeLog(SystemSet.EumLogType.DelData.ToString(), string.Concat("T_EFile;key=", model.ArchiveListCellRptID,
                                                                                            ";SingleProjectID=", SingleProjectID, ";FileListID=", model.FileListID, ";Title=", model.Title));

                //Leo 更新文件夹,晚上重新生产一次
                T_FileList_MDL fileListMDL = fileListBLL.GetModel(model.FileListID);
                if (fileListMDL != null)
                {
                    fileListMDL.CONVERT_FLAG = false;
                    fileListMDL.Version      = PublicModel.getFileVersion(fileListMDL.SingleProjectID.ToString());
                    fileListBLL.Update(fileListMDL);
                }
            }
        }