public getDocumentAllPathByPathID ( string pathid ) : string | ||
pathid | string | |
Результат | string |
/// <summary> /// 检出 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnDetect_Click(object sender, EventArgs e) { if (txtFileName.Text.Trim() == string.Empty || txtFilePath.Text.Trim() == string.Empty) { MessageBox.Show("文件名或文件路径不能为空!", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { //Util.FTPHelper helper = Util.Common.FtpHepler(); var info = ""; //var result = helper.DownloadFile(txtFilePath.Text, txtFileName.Text, out info); // MessageBox.Show(this.txtFilePath.Text.ToString() + @"\" + this.txtFileName.Text.ToString()); ///下载文件并存放到指定的本地文件夹中 HYDocumentMS.IFileHelper fileHelper=new FileHelper(); string srvFilePath=fileHelper.getDocumentAllPathByPathID(DocFileEntity.DFL_FILE_CHILD_PATH)+this.txtFileName.Text.ToString(); FileSockClient.DownLoadFileSocketClient down = new FileSockClient.DownLoadFileSocketClient(srvFilePath, this.txtFilePath.Text.ToString() +@"\"+ this.txtFileName.Text.ToString()); FileServerAckResult = down.AckStatus; this.DialogResult = DialogResult.OK; } }
private void BindProcessFileTreeData(TreeGridView tgv, DataType.FileType fileType) { //this.tvFileList.Nodes.Clear(); tgv.Nodes.Clear(); IDocFileListService service = ServiceContainer.GetService<IDocFileListService>(); dtDocFile = service.GetDocFileDataTableByDCID(Document.DOCID, fileType.ToString()); // Font boldFont = new Font(tvFileList.DefaultCellStyle.Font, FontStyle.Bold); Font boldFont = new Font(tgv.DefaultCellStyle.Font, FontStyle.Bold); // DataView dv = new DataView(dt); node = new TreeGridNode(); // dv.RowFilter = "[PARENT]=" + parentId; //foreach (DataRowView dr in dv) //{ // if (parentId == "0") // { // node = tvFileList.Nodes.Add(Document.DOCNO, "", "", "", "", "", "", ""); node = tgv.Nodes.Add(Document.DOCNO, "", "", "", "", "", "", ""); node.DefaultCellStyle.Font = boldFont; // BindChildNode(node, (string)dr["PHYSICALID"]); HYDocumentMS.IFileHelper file = new FileHelper(); foreach (DataRow dr in dtDocFile.Rows) { node.Nodes.Add(dr["DFL_FILE_NAME"].ToString(), file.getDocumentAllPathByPathID(dr["DFL_FILE_CHILD_PATH"].ToString()), dr["DFL_VER_LATEST"].ToString(), dr["CHECKINFLG"].ToString(), dr["CHECKINDATE"].ToString(), dr["CHECKOUTFLG"].ToString(), dr["CHECKOUTDATE"].ToString(), dr["DFL_ID"].ToString()); node.Expand(); } }