Example #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);
            }
        }
Example #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, "没有文件,无法查看!");
            }
        }
Example #3
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);
            }
        }
Example #4
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);
                }
            }
        }
Example #5
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);
                }
            }
        }