/// <summary> /// 合并PDF /// </summary> private void MergerPdf() { ArrayList list = new ArrayList(); BLL.T_EFile_BLL bll = new DigiPower.Onlinecol.Standard.BLL.T_EFile_BLL(); DataSet ds = bll.GetList("FileListID = " + ID + " and FileType = 1 order by OrderIndex"); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { list.Add(PdfPath + ds.Tables[0].Rows[i]["PDFFilePath"].ToString()); } } DataSet ds1 = bll.GetList("FileListID = " + ID + " and FileType = 0 order by OrderIndex"); if (ds1 != null && ds1.Tables.Count > 0 && ds1.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds1.Tables[0].Rows.Count; i++) { list.Add(PdfPath + ds1.Tables[0].Rows[i]["PDFFilePath"].ToString()); } } string[] newMPDF = new string[list.Count]; if (newMPDF != null && newMPDF.Length > 0) { for (int i = 0; i < newMPDF.Length; i++) { newMPDF[i] = list[i].ToString(); } } if (newMPDF != null && newMPDF.Length > 0) { //if (System.IO.Directory.Exists(MPdfPath)) //{ // System.IO.Directory.Delete(MPdfPath, true); // System.IO.Directory.CreateDirectory(MPdfPath); //} ////更新目录合并PDF信息 //DigiPower.Onlinecol.Standard.BLL.T_FileList_BLL tbll = new DigiPower.Onlinecol.Standard.BLL.T_FileList_BLL(); //DigiPower.Onlinecol.Standard.Model.T_FileList_MDL tmodel = tbll.GetModel(Common.ConvertEx.ToInt(ID)); //tmodel.PDFFilePath = NewGUID + ".pdf"; //Common.PrintToPDF pdfTool = new DigiPower.Onlinecol.Standard.Common.PrintToPDF(ProNo); //tmodel.PagesCount = pdfTool.GetPDFCount(MPdfPath + "\\" + NewGUID + ".pdf"); //tbll.Update(tmodel); } }
private int GetMaxOrder() { int MaxOrderIndex = 1; BLL.T_EFile_BLL bll = new DigiPower.Onlinecol.Standard.BLL.T_EFile_BLL(); DataSet ds = new DataSet(); ds = bll.GetList("1=1" + " and FileListID = " + ID + " and FileType = 1 order by OrderIndex desc"); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { MaxOrderIndex = Common.ConvertEx.ToInt(ds.Tables[0].Rows[0]["OrderIndex"].ToString()) + 1; } return(MaxOrderIndex); }