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); } } }
/// <summary> /// 保存 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSave_Click(object sender, EventArgs e) { DigiPower.Onlinecol.Standard.Model.T_FileList_MDL model = null; if (pageIndex != 1) { model = fileBLL.GetModel(Common.ConvertEx.ToInt(fileListID)); } else { model = fileBLL.GetModel(Common.ConvertEx.ToInt(ID)); } model = (Model.T_FileList_MDL)Comm.GetValueToObject(model, tbl); if (model != null && !model.IsFolder) { if (ConvertEx.ToInt(model.ManualCount) > 0) { if (model.wjgbdm == "ct" || model.wjgbdm == "yt" || model.wjgbdm == "dt" || model.wjgbdm == "lt") { model.tzz = ConvertEx.ToInt(model.ManualCount); } else { model.sl = ConvertEx.ToInt(model.ManualCount); } } model.qssj = DateTime.Now; model.zzsj = DateTime.Now; model.lrsj = DateTime.Now; model.shsj_1 = DateTime.Now; model.shsj_2 = DateTime.Now; model.shsj_3 = DateTime.Now; model.aipdate = DateTime.Now; model.pssj = DateTime.Now; model.CreateDate = DateTime.Now; model.Version = PublicModel.getFileVersion(model.SingleProjectID.ToString()); //获取文件的版本号 fileBLL.Update(model); PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_FileList;key=", model.FileListID, ";SingleProjectID=", model.SingleProjectID, ";bh=", model.BH, ";Title=", model.Title)); T_Other_BLL otherBLL = new T_Other_BLL(); otherBLL.UpdateArchiveStatus(model.FileListID.ToString(), 10, "0"); } Common.MessageBox.CloseLayerOpenWeb(this.Page); }
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); } } }
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)); }
public string ExctFileList(string strIsFolder, string strFileListID, string strSingleProjectId, string strTitle, string strZRR, string strWTH, string strStartTime, string strManualCount, string strBH, string strPID, string myCode, string DefaultCompanyType, string strOldRecID) { string ReturnValue = "0"; try { T_FileList_BLL Bll = new T_FileList_BLL(); T_FileList_MDL Mdl = new T_FileList_MDL(); int FileListId = ConvertEx.ToInt(strFileListID); string SingleProjectId = strSingleProjectId; if (FileListId > 0) { Mdl = Bll.GetModel(FileListId); } else { Mdl.PID = ConvertEx.ToInt(strPID); Mdl.DefaultCompanyType = ConvertEx.ToInt(DefaultCompanyType); Mdl.CompanyID = ConvertEx.ToInt(Common.Session.GetSession("CompanyID")); Mdl.OperateUserID = ConvertEx.ToInt(Common.Session.GetSession("UserID")); Mdl.recID = Bll.GetMaxRecID(SingleProjectId); Mdl.IsSystem = false; Mdl.BH = strBH; Mdl.IsFolder = ConvertEx.ToBool(strIsFolder); Mdl.PagesCount = 0; //上传页数默认为0 Mdl.OrderIndex = 0; //文件序号默认为0,组完卷,根据文件编号自动生成序号 } Mdl.OldRecID = ConvertEx.ToInt(strOldRecID);//归档目录模板ID不能变,以后用户签章,模板ID关联签章流程 Mdl.shr_3 = "0"; Mdl.w_t_h = strWTH; Mdl.SingleProjectID = ConvertEx.ToInt(SingleProjectId); Mdl.zrr = strZRR; Mdl.Title = strTitle; Mdl.ManualCount = ConvertEx.ToInt(strManualCount); Mdl.MyCode = myCode; Mdl.CreateDate = DateTime.Now; //文件登记时间 Mdl.Version = PublicModel.getFileVersion(SingleProjectId); //获取文件的版本号 if (strStartTime != null && strStartTime.Trim().Length > 0) { Mdl.StartTime = ConvertEx.ToDate(strStartTime).ToString("yyyy-MM-dd"); } if (FileListId > 0 && !Mdl.IsFolder) { Bll.Update(Mdl); PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_FileList;key=", Mdl.FileListID, ";SingleProjectID=", Mdl.SingleProjectID, ";bh=", Mdl.BH, ";Title=", Mdl.Title)); //更改已登记状态 BLL.T_Other_BLL otherBLL = new BLL.T_Other_BLL(); otherBLL.UpdateArchiveStatus(FileListId.ToString(), 10); } else { FileListId = Bll.Add(Mdl); PublicModel.writeLog(SystemSet.EumLogType.AddData.ToString(), string.Concat("T_FileList;key=", FileListId, ";SingleProjectID=", Mdl.SingleProjectID, ";bh=", Mdl.BH, ";Title=", Mdl.Title)); } ReturnValue = FileListId.ToString(); } catch (Exception ex) { LogUtil.Debug(this, "文件登记归档目录保存操作", ex); } return(ReturnValue); }