コード例 #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
        protected void Page_Load(object sender, EventArgs e)
        {
            MyAddInit();
            if (!String.IsNullOrEmpty(ID))
            {
                if (DNTRequest.GetQueryString("fileType") == "PDF")  //查看单个PDF
                {
                    T_EFile_MDL Emodel = efileBLL.GetModel(ConvertEx.ToInt(ID));
                    if (Emodel != null)
                    {
                        T_FileList_MDL model = fileBLL.GetModel(ConvertEx.ToInt(Emodel.FileListID));
                        if (model != null)
                        {
                            string LastPath = model.RootPath.Substring(0, model.RootPath.Length - 1);
                            int    iPos1    = LastPath.LastIndexOf('\\');
                            LastPath = LastPath.Substring(iPos1 + 1);
                            string mHttpUrl = "http://" + Request.ServerVariables["HTTP_HOST"] + "/" + LastPath;
                            mEFilePath = mHttpUrl + "/" + model.SingleProjectID + "/PDF/" + Emodel.PDFFilePath;

                            if (Convert.ToString(Emodel.PDFFilePath).Trim().Length == 0)
                            {
                                MessageBox.ShowAndCloseWin(this, "没有文件,无法查看!");
                            }
                        }
                    }
                }
                else    //查看文件所有的PDF
                {
                    T_FileList_MDL model = fileBLL.GetModel(ConvertEx.ToInt(ID));
                    if (model != null)
                    {
                        if (model.RootPath.Length > 0)
                        {
                            mEFilePath = FormatPdfSrc(model.RootPath, model.SingleProjectID.ToString(), model.PDFFilePath);

                            int    outSideRelatedDtCount = 0;           //附件PDF数量
                            string outSideRelatedString  = string.Empty;
                            LoadEFileOutSideRelated(model.FileListID.ToString(), out outSideRelatedDtCount, out outSideRelatedString);

                            if (outSideRelatedDtCount > 0)
                            {
                                string btnStr = " <input type=\"button\" id=\"btnfirst\" class=\"buttonFileList\" onclick=\"loadPdf(this,'{0}')\" title=\"{1}\" value=\" 主件 \" />";
                                ltBtnHtml.Text += "<div class=\"divTree\">";
                                ltBtnHtml.Text += String.Format(btnStr, FormatPdfSrc(model.RootPath, model.SingleProjectID.ToString(), model.PDFFilePath), model.Title);
                                ltBtnHtml.Text += outSideRelatedString;
                                ltBtnHtml.Text += "</div>";
                            }
                        }
                        else
                        {
                            MessageBox.ShowAndCloseWin(this, "没有文件,无法查看!");
                        }
                    }
                }
            }
            else
            {
                MessageBox.ShowAndCloseWin(this, "没有文件,无法查看!");
            }
        }
コード例 #3
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);
                }
            }
        }
コード例 #4
0
        public void UpdateEFileIndex(string archiveListCellRptID, string OrderIndex)
        {
            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)
            {
                model.OrderIndex = ConvertEx.ToInt(OrderIndex);
                bll.Update(model);
            }
        }
コード例 #5
0
        /// <summary>
        /// 电子文件上传
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnUpLoad_Click(object sender, EventArgs e)
        {
            try {
                if (FileUpload1.HasFile)
                {
                    string odocFilePath = string.Concat(Common.Common.EFileStartPath, SingleProjectID, "\\ODOC\\");

                    if (!System.IO.Directory.Exists(Common.Common.EFileStartPath))
                    {
                        System.IO.Directory.CreateDirectory(Common.Common.EFileStartPath);
                    }

                    if (!System.IO.Directory.Exists(odocFilePath))
                    {
                        System.IO.Directory.CreateDirectory(odocFilePath);
                    }

                    string fileNewName = Guid.NewGuid().ToString() + FileUpload1.FileName.Substring(FileUpload1.FileName.LastIndexOf('.'));;

                    //电子文件存放全路径
                    string FileFullPath = odocFilePath + fileNewName;
                    FileUpload1.SaveAs(FileFullPath);  //保存原始文件

                    T_EFile_MDL model = new T_EFile_MDL();

                    model.PageCounts = 0;
                    model.FileListID = Common.ConvertEx.ToInt(FileListID);
                    model.FileType   = 1;
                    model.OrderIndex = GetEfileMaxOrderIndex(FileListID);
                    model.Title      = FileUpload1.FileName.Substring(0, FileUpload1.FileName.LastIndexOf('.'));
                    model.RootPath   = Common.Common.EFileStartPath;
                    model.FilePath   = fileNewName;

                    model.FileType     = 0;
                    model.Status_Text  = "上传成功,当晚批量计算页数!";
                    model.CREATE_DT    = System.DateTime.Now.ToShortDateString();
                    model.CONVERT_FLAG = false;
                    int ArchiveListCellRptID = efileBLL.Add(model);

                    //更新文件级转换标志,等批量转换晚上转
                    T_FileList_MDL fileListMDL = filelistBLL.GetModel(model.FileListID);
                    fileListMDL.CONVERT_FLAG = false;
                    fileListMDL.RootPath     = Common.Common.EFileStartPath;
                    filelistBLL.Update(fileListMDL);
                    BindGridView(AspNetPager.CurrentPageIndex);

                    PublicModel.writeLog(SystemSet.EumLogType.AddData.ToString(), string.Concat("T_EFile;key=", ArchiveListCellRptID,
                                                                                                ";SingleProjectID=", fileListMDL.SingleProjectID, ";FileListID=", model.FileListID, ";Title=", model.Title, "'案卷补录"));
                }
            } catch (Exception ex) {
                Common.LogUtil.Debug(this, "补卷-电子文件上传错误", ex);
            }
        }
コード例 #6
0
        public void UpdateEFileIndex(string archiveListCellRptID, string OrderIndex)
        {
            T_EFile_MDL model = new T_EFile_MDL();

            model = efileBLL.GetModel(ConvertEx.ToInt(archiveListCellRptID));
            if (model != null)
            {
                model.OrderIndex = ConvertEx.ToInt(OrderIndex);
                efileBLL.Update(model);

                PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_EFile;key=", model.ArchiveListCellRptID,
                                                                                            ";FileListID=", model.FileListID, ";Title=", model.Title, ";案卷补录-更新电子文件序号"));

                T_FileList_MDL fileListMDL = filelistBLL.GetModel(model.FileListID);
                if (fileListMDL != null)
                {
                    fileListMDL.CONVERT_FLAG = false;   //重新转换PDF
                    filelistBLL.Update(fileListMDL);
                }
            }
        }
コード例 #7
0
        public void UpdateEFileIndex(string archiveListCellRptID, string OrderIndex)
        {
            T_EFile_MDL model = new T_EFile_MDL();

            model = eFileBLL.GetModel(ConvertEx.ToInt(archiveListCellRptID));
            if (model != null)
            {
                model.OrderIndex = ConvertEx.ToInt(OrderIndex);
                eFileBLL.Update(model);

                PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_EFile;key=", model.ArchiveListCellRptID,
                                                                                            ";FileListID=", model.FileListID, ";Title=", model.Title, ";电子文件排序编号"));

                T_FileList_MDL fileListMDL = fileListBLL.GetModel(model.FileListID);
                if (fileListMDL != null)
                {
                    fileListMDL.CONVERT_FLAG = false;     //重新转换PDF,按照新的电子文件顺序
                    fileListMDL.Version      = PublicModel.getFileVersion(fileListMDL.SingleProjectID.ToString());
                    fileListBLL.Update(fileListMDL);
                }
            }
        }
コード例 #8
0
        private void UpdateFile(string singleProjectID, string fileListID, string newFileName, string oldFileName)
        {
            T_EFile_MDL model = new T_EFile_MDL();

            model.PageCounts = 0;// PDFcount;
            model.FileListID = Common.ConvertEx.ToInt(fileListID);

            model.FileType   = 1;
            model.OrderIndex = GetEfileMaxOrderIndex(fileListID);

            model.Title    = oldFileName.Substring(0, oldFileName.LastIndexOf('.'));
            model.RootPath = Common.Common.EFileStartPath;//记信根目录即可
            model.FilePath = newFileName;

            model.FileType     = 0;
            model.Status_Text  = "上传成功,当晚批量计算页数!";
            model.CREATE_DT    = System.DateTime.Now.ToShortDateString();
            model.CONVERT_FLAG = false;

            T_EFile_BLL bll = new T_EFile_BLL();
            int         archiveListCellRptID = bll.Add(model);

            //更新文件级转换标志,等批量转换晚上转
            T_FileList_MDL fileListMDL = fileListBLL.GetModel(model.FileListID);

            fileListMDL.CONVERT_FLAG = false;
            fileListMDL.RootPath     = Common.Common.EFileStartPath;
            fileListMDL.Version      = PublicModel.getFileVersion(fileListMDL.SingleProjectID.ToString());
            fileListBLL.Update(fileListMDL);

            BLL.T_Other_BLL otherBLL = new DigiPower.Onlinecol.Standard.BLL.T_Other_BLL();
            otherBLL.UpdateArchiveStatus(model.FileListID.ToString(), 10, "0");

            PublicModel.writeLog(SystemSet.EumLogType.AddData.ToString(), string.Concat("T_EFile;key=", archiveListCellRptID,
                                                                                        ";SingleProjectID=", singleProjectID, ";FileListID=", model.FileListID, ";Title=", model.Title));
        }