private byte[] GetUploadFile(UploadFileInfos fileinfo) {//回调客户端 return(base.CurrentContext.CallBackFunction <UploadFileInfos, byte[]>(fileinfo)); }
/// <summary> /// /// </summary> /// <param name="Info"></param> /// <returns></returns> public XElement CreateUploadFileElement(UploadFileInfos Info) { XElement el = new XElement("Item"); this.CreateChildNode(el, "ViewerType", Info.ViewerType.ToString()); this.CreateChildNode(el, "LapID", Info.LapID); this.CreateChildNode(el, "CaseID", Info.CaseID); this.CreateChildNode(el, "CaseJobItemID", Info.CaseJobItemID); this.CreateChildNode(el, "CaseNo", Info.CaseNo); this.CreateChildNode(el, "CaseUnit", Info.CaseUnit); this.CreateChildNode(el, "UserUnit", Info.UserUnit); this.CreateChildNode(el, "Barcode", Info.Barcode); this.CreateChildNode(el, "DataType", Info.DataType.ToString()); this.CreateChildNode(el, "ImageType", Info.ImageType.ToString()); this.CreateChildNode(el, "FileID", Info.FileID); this.CreateChildNode(el, "FileName", Info.FileName); this.CreateChildNode(el, "FileNodeType", Info.FileNodeType.ToString()); this.CreateChildNode(el, "FileExtension", Info.FileExtension); this.CreateChildNode(el, "FileSeq", Info.FileSeq); this.CreateChildNode(el, "FileRoot", Info.FileRoot); this.CreateChildNode(el, "FilePath", Info.FilePath); this.CreateChildNode(el, "FileBody", Info.FileBody); this.CreateChildNode(el, "FileSize", Info.FileSize.ToString()); this.CreateChildNode(el, "FileLapID", !String.IsNullOrEmpty(Info.FileLapID) ? Info.FileLapID.ToString() : string.Empty); this.CreateChildNode(el, "OperationDate", Info.OperationDate); this.CreateChildNode(el, "ScanTime", Info.ScanTime.ToString("yyyy/MM/dd HH:mm:ss", CultureInfo.InvariantCulture)); this.CreateChildNode(el, "ModifyUserID", Info.ModifyUserID); XElement elTransform = new XElement("Transform"); this.CreateChildNode(elTransform, "ImageType", Info.IImageType.ToString()); this.CreateChildNode(elTransform, "Type", Info.IType.ToString()); this.CreateChildNode(elTransform, "JZip", Info.IJZip.ToString()); this.CreateChildNode(elTransform, "Threshold", Info.IThreshold.ToString()); this.CreateChildNode(elTransform, "Size", Info.ISize.ToString()); el.Add(elTransform); XElement xelDrawInfo = new XElement("DrawInfo", new XElement("DrawImage")); el.Add(xelDrawInfo); if (Info.XmlNodeRoot == null) { XElement elImageItem = new XElement("Item"); this.CreateAttribute(elImageItem, "ID", Info.FileID); this.CreateAttribute(elImageItem, "Name", Info.FileName); this.CreateAttribute(elImageItem, "Seq", Info.FileSeq); this.CreateAttribute(elImageItem, "NodeType", Info.FileNodeType.ToString()); this.CreateAttribute(elImageItem, "CreateTime", DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss", CultureInfo.InvariantCulture)); this.CreateAttribute(elImageItem, "Update", "Y"); XElement eIlmage = this.CreateChildNode(elImageItem, "Image", Info.FilePath); this.CreateAttribute(eIlmage, "Transform", "Y"); this.CreateAttribute(eIlmage, "Draw", "N"); this.CreateAttribute(eIlmage, "FileRoot", string.Empty); this.CreateAttribute(eIlmage, "FilePath", string.Empty); Info.XmlNodeRoot = elImageItem; } el.Add(Info.XmlNodeRoot); return(el); }