Beispiel #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);
            }
        }
Beispiel #2
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);
            }
        }
Beispiel #3
0
        /// <summary>
        /// 绑定列表
        /// </summary>
        private void BindGridView(int pageIndex)
        {
            T_EFile_BLL bll = new T_EFile_BLL();

            string    strWhere = " FileListID = " + ID + " and FileType = 1 ";
            DataTable dt       = bll.GetListPaging(strWhere, pageSize, pageIndex, out itemCount);;

            AspNetPager.AlwaysShow = true;
            AspNetPager.PageSize   = pageSize;

            AspNetPager.RecordCount = itemCount;

            gvData.DataSource = dt;
            gvData.DataBind();
        }
Beispiel #4
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));
        }