protected void Page_Load(object sender, EventArgs e) { Ajax.Utility.RegisterTypeForAjax(typeof(UserArchiveAdd)); MyAddInit(); if (!IsPostBack) { tempPID.Attributes("onchange", "OnchangeBH()"); tempPID.AutoPostBack = false; if (Request.QueryString["WorkFlowID"] != null) { WorkFlowID.Value = Request.QueryString["WorkFlowID"].ToString(); } if (!String.IsNullOrEmpty(ID)) { SingleProjectID.Value = ID; tempPID.DataBindEx(Common.ConvertEx.ToInt(ID), true); } string Action = Request.QueryString["Action"].ToString(); if (Action == "Modify") { string FileListID = Request.QueryString["FileListID"].ToString(); BLL.T_FileList_BLL archiveListBLL = new DigiPower.Onlinecol.Standard.BLL.T_FileList_BLL(); Model.T_FileList_MDL archiveListMDL = archiveListBLL.GetModel(Common.ConvertEx.ToInt(FileListID)); Model.T_FileList_MDL parentMDL = archiveListBLL.GetModel("SingleProjectID=" + SingleProjectID.Value + " AND recID=" + archiveListMDL.PID); DigiPower.Onlinecol.Standard.Web.Comm.SetValueToPage(archiveListMDL, this.tbl); tempPID.SelectValue = parentMDL.FileListID.ToString();//父类 } } }
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); } }
/// <summary> /// 拆卷 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnDel_Click(object sender, EventArgs e) { if (TreeView2.Nodes[0].ChildNodes.Count > 0) { foreach (TreeNode tNode in TreeView2.Nodes[0].ChildNodes) { int iCount = 0; if (tNode.Checked)//选中案卷 { string ArchiveID = tNode.Value.ToString(); foreach (TreeNode tNode1 in tNode.ChildNodes) { if (tNode1.Checked) { iCount++; Model.T_FileList_MDL flMDL = fileListBLL.GetModel(Common.ConvertEx.ToInt(tNode1.Value.ToString())); flMDL.MyArchiveID = 0;//拆卷,则将文件对应的案卷设置为0 fileListBLL.Update(flMDL); } } } if (tNode.ChildNodes.Count == iCount && iCount > 0)//==0为空卷,直接删掉 { myArchiveBLL.Delete(Common.ConvertEx.ToInt(tNode.Value.ToString())); } } Redirect(); } }
/// <summary> /// 重置签章状态以及替换文件 /// </summary> /// <param name="model"></param> public void ResetFile(Model.T_FileList_MDL model) { string mEFilePath = string.Empty, oMDPdir = string.Empty, mOrgEFilePath = string.Empty; oMDPdir = string.Concat(model.RootPath, model.SingleProjectID, "\\OMPDF\\"); mEFilePath = string.Concat(model.RootPath, model.SingleProjectID, "\\MPDF\\", model.PDFFilePath.Replace("/", @"\")); mOrgEFilePath = string.Concat(oMDPdir, model.PDFFilePath.Replace("/", @"\")); if (!Directory.Exists(oMDPdir)) { Directory.CreateDirectory(oMDPdir); if (System.IO.File.Exists(mEFilePath)) { System.IO.File.Copy(mEFilePath, mOrgEFilePath, true); } } else { if (System.IO.File.Exists(mEFilePath)) { System.IO.File.Copy(mOrgEFilePath, mEFilePath, true); } } model.SIGNATURE_FLAG = false; model.SIGNATURE_DT = ""; fileBLL.Update(model); }
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.AddData.ToString(), string.Concat("T_EFile;key=", model.ArchiveListCellRptID, ";SingleProjectID=", singleProjectID, ";FileListID=", model.FileListID, ";Title=", model.Title, ";案卷补录")); //Leo 更新文件夹,晚上重新生产一次 int FileListID = model.FileListID; Model.T_FileList_MDL fileListMDL = filelistBLL.GetModel(FileListID); fileListMDL.CONVERT_FLAG = false; filelistBLL.Update(fileListMDL); } }
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { BLL.T_FileList_BLL docBLL = new T_FileList_BLL(); Model.T_FileList_MDL docMDL = docBLL.GetModel(Common.ConvertEx.ToInt(DropDownList1.SelectedValue)); if (docMDL != null) { Label1.Text = docMDL.BH; } }
/// <summary> /// 拆卷 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnDel_Click(object sender, EventArgs e) { if (TreeView2.Nodes[0].ChildNodes.Count > 0) { foreach (TreeNode tNode in TreeView2.Nodes[0].ChildNodes) { int iCount = 0; if (tNode.Checked)//选中案卷 { string ArchiveID = tNode.Value.ToString(); foreach (TreeNode tNode1 in tNode.ChildNodes) { if (tNode1.Checked) { iCount++; Model.T_FileList_MDL flMDL = fileListBLL.GetModel(Common.ConvertEx.ToInt(tNode1.Value.ToString())); flMDL.Status = flMDL.OldStatus; flMDL.ArchiveID = 0;//拆卷,则将文件对应的案卷设置为0 fileListBLL.Update(flMDL); PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_FileList;FileListID=", flMDL.FileListID, ";SingleProjectID=", flMDL.SingleProjectID, ";BH=", flMDL.BH, ";Title=", flMDL.Title, ";流程(接收整理)-拆卷")); } } archiveBLL.updateFileOrderIndexByArchiveID(ArchiveID.ToString()); } if (tNode.ChildNodes.Count == iCount)//==0为空卷,直接删掉 { T_Archive_MDL archiveMDL = archiveBLL.GetModel(Common.ConvertEx.ToInt(tNode.Value.ToString())); if (archiveMDL != null) { archiveBLL.Delete(Common.ConvertEx.ToInt(tNode.Value.ToString())); PublicModel.writeLog(SystemSet.EumLogType.DelData.ToString(), string.Concat("T_Archive;ArchiveID=", archiveMDL.ArchiveID, ";SingleProjectID=", archiveMDL.SingleProjectID, ";ajtm=", archiveMDL.ajtm, ";xh=", archiveMDL.xh, ";流程(接收整理)-拆卷")); } } } Redirect(); } }
/// <summary> /// 保存 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSave_Click(object sender, EventArgs e) { BLL.T_FileList_BLL bll = new DigiPower.Onlinecol.Standard.BLL.T_FileList_BLL(); Model.T_FileList_MDL model = new DigiPower.Onlinecol.Standard.Model.T_FileList_MDL(); string Action = Request.QueryString["Action"].ToString(); if (Action == "Modify") { string FileListID = Request.QueryString["FileListID"].ToString(); model = bll.GetModel(Common.ConvertEx.ToInt(FileListID)); model = (Model.T_FileList_MDL)Comm.GetValueToObject(model, this.tbl); Model.T_FileList_MDL parentModel = bll.GetModel(Common.ConvertEx.ToInt(tempPID.SelectValue)); model.PID = parentModel.recID;//换了父类的话 bll.Update(model); } else { //取父类的的呢东西, //model = bll.GetModel("recID=" + Common.ConvertEx.ToInt(PID.SelectValue) + " AND SingleProjectID=" + SingleProjectID.Value); Model.T_FileList_MDL parentModel = bll.GetModel(Common.ConvertEx.ToInt(tempPID.SelectValue)); model = parentModel; model = (Model.T_FileList_MDL)Comm.GetValueToObject(model, this.tbl); model.SingleProjectID = parentModel.SingleProjectID; model.DefaultCompanyType = parentModel.DefaultCompanyType; model.PID = parentModel.recID; model.recID = bll.GetMaxRecID(SingleProjectID.Value.ToString()); model.FileListID = 0; //新增的,不可以真用老的 model.IsFolder = false; model.IsSystem = false; //这是自定议的,可以删除 bll.Add(model); } Response.Redirect("Wjdj.aspx?SingleProjectID=" + SingleProjectID.Value + "&WorkFlowID=" + WorkFlowID.Value + "&PageIndex=" + pPageIndex); }
/// <summary> /// Flag=2表示按所选节点组卷,1,自动组卷,3加入到指定案卷 /// </summary> /// <param name="flag"></param> /// <param name="selId"></param> private void DoZJ(string flag, string selId) { string strWhere = "SingleProjectID=" + singleProjectID + "and status<>100"; if (flag == "2" || flag == "3") { strWhere += " and FileListID in (" + selId + ")"; } DataSet dsFileList = fileListBLL.GetList(strWhere); int ArchiveID = 0; int ManualCountTotal = 0; if (flag == "3") { if (TreeView2.Nodes[0].ChildNodes.Count > 0) { foreach (TreeNode tNode in TreeView2.Nodes[0].ChildNodes) { if (tNode.Checked)//选中案卷 { int tArchiveID = Common.ConvertEx.ToInt(tNode.Value.ToString()); Model.T_Archive_MDL acMDL = archiveBLL.GetModel(tArchiveID); if (acMDL != null) { ArchiveID = acMDL.ArchiveID; ManualCountTotal = acMDL.sl; } } } if (ArchiveID == 0) { MessageBox.Show(this, "请勾选右边的需加入的案卷!"); return; } } else { MessageBox.Show(this, "请勾选右边的需加入的案卷!"); return; } } if (dsFileList.Tables.Count > 0 && dsFileList.Tables[0].Rows.Count > 0) { for (int i = 0; i < dsFileList.Tables[0].Rows.Count; i++) { string bIsFolder = dsFileList.Tables[0].Rows[i]["IsFolder"].ToString(); //为目录的数据不处理,跳到下一条 if (ConvertEx.ToBool(bIsFolder)) { continue; } else { int ManualCount = ConvertEx.ToInt(dsFileList.Tables[0].Rows[i]["ManualCount"].ToString()); int FileListID = ConvertEx.ToInt(dsFileList.Tables[0].Rows[i]["FileListID"].ToString()); if (ArchiveID == 0) //在这里创建案卷 { ArchiveID = CreateAj(); } Model.T_FileList_MDL flMDL = fileListBLL.GetModel(FileListID); flMDL.ArchiveID = ConvertEx.ToInt(ArchiveID); flMDL.OldStatus = flMDL.Status; flMDL.Status = "100"; fileListBLL.Update(flMDL); } } if (ArchiveID > 0) { Model.T_Archive_MDL acMDL = archiveBLL.GetModel(ArchiveID); acMDL.sl = ManualCountTotal; archiveBLL.Update(acMDL); } } }
/// <summary> /// Flag=2表示按所选节点组卷,1,自动组卷,3加入到指定案卷 /// </summary> /// <param name="flag"></param> /// <param name="selId"></param> private void DoZJ(string flag, string selId) { if (!string.IsNullOrWhiteSpace(ddlSingleProject.SelectValue)) { string strWhere = "SingleProjectID=" + ddlSingleProject.SelectValue + " and ISNULL(MyArchiveID,0)=0 "; if (flag == "2" || flag == "3") { strWhere += " and FileListID in (" + selId + ")"; } DataSet dsFileList = fileListBLL.GetList(strWhere); int ArchiveID = 0; int ManualCountTotal = 0; if (flag == "3") { if (TreeView2.Nodes[0].ChildNodes.Count > 0) { foreach (TreeNode tNode in TreeView2.Nodes[0].ChildNodes) { if (tNode.Checked)//选中案卷 { int tArchiveID = Common.ConvertEx.ToInt(tNode.Value.ToString()); Model.T_MyArchive_MDL acMDL = myArchiveBLL.GetModel(tArchiveID); if (acMDL != null) { ArchiveID = acMDL.ArchiveID; ManualCountTotal = acMDL.sl; } } } if (ArchiveID == 0) { Common.MessageBox.FnLayerAlert(this.Page, "请勾选右边的需加入的案卷!"); return; } } else { Common.MessageBox.FnLayerAlert(this.Page, "请勾选右边的需加入的案卷!"); return; } } if (dsFileList.Tables.Count > 0 && dsFileList.Tables[0].Rows.Count > 0) { for (int i = 0; i < dsFileList.Tables[0].Rows.Count; i++) { string bIsFolder = dsFileList.Tables[0].Rows[i]["IsFolder"].ToString(); //为目录的数据不处理,跳到下一条 if (ConvertEx.ToBool(bIsFolder)) { continue; } else { int ManualCount = ConvertEx.ToInt(dsFileList.Tables[0].Rows[i]["ManualCount"].ToString()); int FileListID = ConvertEx.ToInt(dsFileList.Tables[0].Rows[i]["FileListID"].ToString()); if (ArchiveID == 0) //在这里创建案卷 { ArchiveID = CreateAj(ddlSingleProject.SelectValue); } Model.T_FileList_MDL flMDL = fileListBLL.GetModel(FileListID); flMDL.MyArchiveID = ConvertEx.ToInt(ArchiveID); fileListBLL.Update(flMDL); } } if (ArchiveID > 0) { Model.T_MyArchive_MDL acMDL = myArchiveBLL.GetModel(ArchiveID); acMDL.sl = ManualCountTotal; myArchiveBLL.Update(acMDL); } } } }
/// <summary> /// Flag=2表示按所选节点组卷,1,自动组卷,3加入到指定案卷 /// </summary> /// <param name="flag"></param> /// <param name="selId"></param> private void DoZJ(string flag, string selId) { string strWhere = "SingleProjectID=" + singleProjectID + "and status<>100"; if (flag == "2" || flag == "3") { strWhere += " and FileListID in (" + selId + ")"; } DataSet dsFileList = fileListBLL.GetList(strWhere); int ArchiveID = 0; int ManualCountTotal = 0; if (flag == "3") { if (TreeView2.Nodes[0].ChildNodes.Count > 0) { foreach (TreeNode tNode in TreeView2.Nodes[0].ChildNodes) { if (tNode.Checked)//选中案卷 { int tArchiveID = Common.ConvertEx.ToInt(tNode.Value.ToString()); Model.T_Archive_MDL acMDL = archiveBLL.GetModel(tArchiveID); if (acMDL != null) { ArchiveID = acMDL.ArchiveID; ManualCountTotal = acMDL.sl; } } } if (ArchiveID == 0) { MessageBox.Show(this, "请勾选右边的需加入的案卷!"); return; } } else { MessageBox.Show(this, "请勾选右边的需加入的案卷!"); return; } } if (dsFileList.Tables.Count > 0 && dsFileList.Tables[0].Rows.Count > 0) { for (int i = 0; i < dsFileList.Tables[0].Rows.Count; i++) { string bIsFolder = dsFileList.Tables[0].Rows[i]["IsFolder"].ToString(); //为目录的数据不处理,跳到下一条 if (ConvertEx.ToBool(bIsFolder)) { continue; } else { int ManualCount = ConvertEx.ToInt(dsFileList.Tables[0].Rows[i]["ManualCount"].ToString()); int FileListID = ConvertEx.ToInt(dsFileList.Tables[0].Rows[i]["FileListID"].ToString()); if (ArchiveID == 0) //在这里创建案卷 { ArchiveID = CreateAj(); } Model.T_FileList_MDL flMDL = fileListBLL.GetModel(FileListID); flMDL.ArchiveID = ConvertEx.ToInt(ArchiveID); flMDL.OldStatus = flMDL.Status; flMDL.Status = "100"; fileListBLL.Update(flMDL); PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_FileList;FileListID=", flMDL.FileListID, ";SingleProjectID=", flMDL.SingleProjectID, ";ArchiveID=", flMDL.ArchiveID, ";BH=", flMDL.BH, ";Title=", flMDL.Title, ";流程(接收整理)-组卷")); } } if (ArchiveID > 0) { Model.T_Archive_MDL acMDL = archiveBLL.GetModel(ArchiveID); acMDL.sl = ManualCountTotal; archiveBLL.Update(acMDL); archiveBLL.updateFileOrderIndexByArchiveID(ArchiveID.ToString()); } // Response.Redirect("ZJList.aspx?CompanyID=" + ctrlDropDownCompanyInfo1.SelectValue + "&SingleProjectID=" + SingleProjectID.Value + "&WorkFlowID=" + workflowid.Value); } }