private string Devovle2DP2(HN_OA2DP hn_oa2dp, string sDPID) { string sXml = ""; List<FounderSoftware.ADIM.OA.OA2DP.DevKVItem> ls = hn_oa2dp.MapFunction("DP", base.TemplateName); FounderSoftware.ADIM.OA.OA2DP.HNDP_CArchiveNode ar = new HNDP_CArchiveNode(); B_HSEdit l_BusReceiveEdit = new B_HSEdit(); l_BusReceiveEdit.ID = Convert.ToInt32(B_ReceiveEdit.GetID(base.TemplateName, this.txtReceiveNo.Text)); //ar.SetAttribute("FormationTime"/*配置文件中的归档字段*/, "2009-12-12"/*cEntity.GetValue(配置文件中的实体属性名)*/); //string sValue = ar.GetAttribute("FormationTime"); #region 生成Archive节点 ar.System = "OA_" + base.IdentityID.ToString(); #region 根据DevolveConfig.xml配置参数设置Archive归档节点 for (int i = 0; i < ls.Count; i++) { string skey = (ls[i] as FounderSoftware.ADIM.OA.OA2DP.DevKVItem).sKey; string sName = (ls[i] as FounderSoftware.ADIM.OA.OA2DP.DevKVItem).sValue; string sType = (ls[i] as FounderSoftware.ADIM.OA.OA2DP.DevKVItem).sType; ar.SetAttribute(skey, hn_oa2dp.PreHandel(l_BusReceiveEdit, sName, sType, true)/*(entity.GetVal(sName) as string)*/); } ar.SetOAArchiveNode(); // 其他节点处理应放置在SetOAArchiveNode方法之后 ar.FK_DPID = sDPID; //return Devolve2DP(oaDev, sDPID, ar); #endregion 根据DevolveConfig.xml配置参数设置Archive归档节点 ar.ElectronicDocumentCount = ucAttachment.UCDataList.Count.ToString(); #endregion sXml = hn_oa2dp.GenOAArchiveNode(ar, base.TemplateName); FounderSoftware.ADIM.OA.OA2DP.HNDP_CFileNode fl = new HNDP_CFileNode(); /****开始生成File节点************************************************************************/ #region 开始生成File节点 fl.AuthorizeTime = ar.AuthorizeTime; fl.Code = ar.Code; fl.Code19 = ar.Code19; fl.D_FileStatus = ar.D_FileStatus; fl.DocCodesExplain = ""; fl.DocPages = ar.DocPages; fl.ElectronicDocumentTransceiverTime = ar.ElectronicDocumentTransceiverTime; fl.Ext_1 = ""; fl.Ext_2 = ar.Ext_2; fl.Ext_3 = ar.Ext_3; fl.Ext_4 = ar.Ext_4; fl.Ext_5 = ar.Ext_5; fl.Title = ar.Title; //fl.FK_ArchiveID = ar.FK_Archive; fl.FK_CategoryID = ar.FK_CategoryID; fl.FormationDept = ar.FormationDept; fl.FormationTime = ar.FormationTime; fl.Importer = ar.Importer; fl.ImporterTime = ar.ImporterTime; fl.OriginalID = ar.OriginalID; fl.OtherTitle = ar.OtherTitle; fl.PaperDocumentTransceiverTime = ar.PaperDocumentTransceiverTime; fl.RelatedCode = ar.RelatedCode; fl.Revision = ar.Revision; #endregion sXml = hn_oa2dp.GenOAFileNode(fl); /****完成生成File节点************************************************************************/ #region 始生成Attachment节点 /****开始生成Attachment节点******************************************************************/ string sServerWeb = hn_oa2dp.GetCfgNodeValues("/Devolve/Other/ServerWeb"); //"http://172.29.128.239"; //string sDocumentName = oaDev.GetCfgNodeValues("/Devolve/Other/DocumentName"); for (int i = 0; i < ucAttachment.UCDataList.Count; i++) { FounderSoftware.ADIM.OA.OA2DP.HNDP_CAttachmentNode at = new HNDP_CAttachmentNode(); CFuJian file = ucAttachment.UCDataList[i]; at.DocumentName = "函件收文";//file.FileName; at.FK_FileID = ""; at.MakeDate = ""; at.MakeUnit = ""; at.PublishedTime = ""; at.Remark = ""; at.ServerWeb = sServerWeb; Double iSize = 0; string sSize = file.Size.ToUpper(); if (sSize.Contains("K")) { sSize = sSize.Replace("K", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024; } if (sSize.Contains("M")) { sSize = sSize.Replace("M", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024 * 1024; } at.Size = ((int)iSize).ToString(); at.TimeSize = ""; at.Title = file.Alias; at.Type = file.Type; at.Url = file.URL; sXml = hn_oa2dp.GenOAAttachmentNode(fl.FK_ArchiveID, at); } #endregion /****完成生成Attachment节点******************************************************************/ return sXml; }
private string Devolve2DP(FounderSoftware.ADIM.OA.OA2DP.HN_OA2DP hn_oa2dp, string sDPID) { string sXml = ""; M_DJGTSend entity = this.ControlToEntity(false) as M_DJGTSend; #region ArchiveNode FounderSoftware.ADIM.OA.OA2DP.HNDP_CArchiveNode ar = new HNDP_CArchiveNode(); ar.System = "OA_" + base.IdentityID.ToString(); ar.FK_DPID = sDPID; //ar.Code = entity.DocumentNo; //ar.Authorizer = entity.SignerName; //ar.DistributionTime = entity.FenFaDate.ToShortDateString(); //ar.Countersigner = entity.DeptSigners + entity.LeadSigners; //ar.Auditby = entity.CheckDrafterName; //ar.AuditDate = entity.CheckDate.ToShortDateString(); //ar.FormationDept = entity.HostDeptName; //ar.Author = entity.Drafter; //ar.Title = entity.DocumentTitle; //ar.ThemeWord = entity.SubjectWord; //ar.MainDispenseUnit = entity.MainSenders; //ar.RelatedDespenseUnit = entity.CopySenders; //ar.EffectTime = entity.SendDate.ToShortDateString(); //ar.DocPages = entity.SheetCount.ToString(); ar.ElectronicDocumentCount = ucAttachment.UCDataList.Count.ToString(); #endregion sXml = hn_oa2dp.GenOAArchiveNode(ar, base.TemplateName); FounderSoftware.ADIM.OA.OA2DP.HNDP_CFileNode fl = new HNDP_CFileNode(); /****开始生成File节点************************************************************************/ #region 开始生成File节点 fl.AuthorizeTime = ar.AuthorizeTime; fl.Code = ar.Code; fl.Code19 = ar.Code19; fl.D_FileStatus = ar.D_FileStatus; fl.DocCodesExplain = ""; fl.DocPages = ar.DocPages; fl.ElectronicDocumentTransceiverTime = ar.ElectronicDocumentTransceiverTime; fl.Ext_1 = ""; fl.Ext_2 = ar.Ext_2; fl.Ext_3 = ar.Ext_3; fl.Ext_4 = ar.Ext_4; fl.Ext_5 = ar.Ext_5; fl.Title = ar.Title; //fl.FK_ArchiveID = ar.FK_Archive; fl.FK_CategoryID = ar.FK_CategoryID; fl.FormationDept = ar.FormationDept; fl.FormationTime = ar.FormationTime; fl.Importer = ar.Importer; fl.ImporterTime = ar.ImporterTime; fl.OriginalID = ar.OriginalID; fl.OtherTitle = ar.OtherTitle; fl.PaperDocumentTransceiverTime = ar.PaperDocumentTransceiverTime; fl.RelatedCode = ar.RelatedCode; fl.Revision = ar.Revision; #endregion sXml = hn_oa2dp.GenOAFileNode(fl); /****完成生成File节点************************************************************************/ #region 始生成Attachment节点 /****开始生成Attachment节点******************************************************************/ string sServerWeb = hn_oa2dp.GetCfgNodeValues("/Devolve/Other/ServerWeb"); //"http://172.29.128.239"; //string sDocumentName = oaDev.GetCfgNodeValues("/Devolve/Other/DocumentName"); for (int i = 0; i < ucAttachment.UCDataList.Count; i++) { FounderSoftware.ADIM.OA.OA2DP.HNDP_CAttachmentNode at = new HNDP_CAttachmentNode(); CFuJian file = ucAttachment.UCDataList[i]; at.DocumentName = "公司发文";//file.FileName; at.FK_FileID = ""; at.MakeDate = ""; at.MakeUnit = ""; at.PublishedTime = ""; at.Remark = ""; at.ServerWeb = sServerWeb; Double iSize = 0; string sSize = file.Size.ToUpper(); if (sSize.Contains("K")) { sSize = sSize.Replace("K", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024; } if (sSize.Contains("M")) { sSize = sSize.Replace("M", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024 * 1024; } at.Size = ((int)iSize).ToString(); at.TimeSize = ""; at.Title = file.Alias; at.Type = file.Type; at.Url = file.URL; sXml = hn_oa2dp.GenOAAttachmentNode(fl.FK_ArchiveID, at); } #endregion /****完成生成Attachment节点******************************************************************/ return sXml; }
private string Devolve2DP(FounderSoftware.ADIM.OA.OA2DP.HN_OA2DP hn_oa2dp, string sDPID) { string sXml = ""; B_MergeReceiveBase entity = this.ControlToEntity(false) as B_MergeReceiveBase; B_ReceiveEdit cEntity = new B_ReceiveEdit(); cEntity.ID = Convert.ToInt32(B_ReceiveEdit.GetID(base.TemplateName, entity.DocumentNo)); #region ArchiveNode FounderSoftware.ADIM.OA.OA2DP.HNDP_CArchiveNode ar = new HNDP_CArchiveNode(); ar.System = "OA_" + base.IdentityID.ToString(); ar.FK_DPID = sDPID; ar.Title = entity.DocumentTitle; ar.ReceiveCode = entity.DocumentNo; ar.Code = entity.SendNo; ar.PaperDocumentTransceiverTime = entity.DocumentReceiveDate.ToShortDateString(); ar.DocCode = entity.VolumeNo; ar.Proposer = entity.OfficerName; ar.Instructioner = entity.LeaderShipName; ar.FormationDept = cEntity.ReceiveUnit; ar.D_DocStorageLife = cEntity.KeepTime; ar.ThemeWord = cEntity.SubjectWord; ar.DocPages = cEntity.PageCount.ToString(); ar.ReceiveCode = cEntity.ReceiveNo; ar.ElectronicDocumentCount = ucAttachment.UCDataList.Count.ToString(); #endregion sXml = hn_oa2dp.GenOAArchiveNode(ar, base.TemplateName); FounderSoftware.ADIM.OA.OA2DP.HNDP_CFileNode fl = new HNDP_CFileNode(); /****开始生成File节点************************************************************************/ #region 开始生成File节点 fl.AuthorizeTime = ar.AuthorizeTime; fl.Code = ar.Code; fl.Code19 = ar.Code19; fl.D_FileStatus = ar.D_FileStatus; fl.DocCodesExplain = ""; fl.DocPages = ar.DocPages; fl.ElectronicDocumentTransceiverTime = ar.ElectronicDocumentTransceiverTime; fl.Ext_1 = ""; fl.Ext_2 = ar.Ext_2; fl.Ext_3 = ar.Ext_3; fl.Ext_4 = ar.Ext_4; fl.Ext_5 = ar.Ext_5; fl.Title = ar.Title; //fl.FK_ArchiveID = ar.FK_Archive; fl.FK_CategoryID = ar.FK_CategoryID; fl.FormationDept = ar.FormationDept; fl.FormationTime = ar.FormationTime; fl.Importer = ar.Importer; fl.ImporterTime = ar.ImporterTime; fl.OriginalID = ar.OriginalID; fl.OtherTitle = ar.OtherTitle; fl.PaperDocumentTransceiverTime = ar.PaperDocumentTransceiverTime; fl.RelatedCode = ar.RelatedCode; fl.Revision = ar.Revision; #endregion sXml = hn_oa2dp.GenOAFileNode(fl); /****完成生成File节点************************************************************************/ #region 始生成Attachment节点 /****开始生成Attachment节点******************************************************************/ string sServerWeb = hn_oa2dp.GetCfgNodeValues("/Devolve/Other/ServerWeb"); //"http://172.29.128.239"; //string sDocumentName = oaDev.GetCfgNodeValues("/Devolve/Other/DocumentName"); for (int i = 0; i < ucAttachment.UCDataList.Count; i++) { FounderSoftware.ADIM.OA.OA2DP.HNDP_CAttachmentNode at = new HNDP_CAttachmentNode(); CFuJian file = ucAttachment.UCDataList[i]; at.DocumentName = base.TemplateName; at.FK_FileID = ""; at.MakeDate = ""; at.MakeUnit = ""; at.PublishedTime = ""; at.Remark = ""; at.ServerWeb = sServerWeb; Double iSize = 0; string sSize = file.Size.ToUpper(); if (sSize.Contains("K")) { sSize = sSize.Replace("K", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024; } if (sSize.Contains("M")) { sSize = sSize.Replace("M", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024 * 1024; } at.Size = ((int)iSize).ToString(); at.TimeSize = ""; at.Title = file.Alias; at.Type = file.Type; at.Url = file.URL; sXml = hn_oa2dp.GenOAAttachmentNode(fl.FK_ArchiveID, at); } #endregion /****完成生成Attachment节点******************************************************************/ return sXml; }
private string Devolve2DP(FounderSoftware.ADIM.OA.OA2DP.HN_OA2DP hn_oa2dp, string sDPID) { string sXml = ""; #region ArchiveNode FounderSoftware.ADIM.OA.OA2DP.HNDP_CArchiveNode ar = new HNDP_CArchiveNode(); List<FounderSoftware.ADIM.OA.OA2DP.DevKVItem> ls = hn_oa2dp.MapFunction("DP", base.TemplateName); EntityLetterSend entity = this.ControlToEntity(false) as EntityLetterSend; ar.System = "OA_" + base.IdentityID.ToString(); #region 根据DevolveConfig.xml配置参数设置Archive归档节点 for (int i = 0; i < ls.Count; i++) { string skey = (ls[i] as FounderSoftware.ADIM.OA.OA2DP.DevKVItem).sKey; string sName = (ls[i] as FounderSoftware.ADIM.OA.OA2DP.DevKVItem).sValue; string sType = (ls[i] as FounderSoftware.ADIM.OA.OA2DP.DevKVItem).sType; ar.SetAttribute(skey, hn_oa2dp.PreHandel(entity, sName, sType, true)/*(entity.GetVal(sName) as string)*/); } ar.SetOAArchiveNode(); // 其他节点处理应放置在SetOAArchiveNode方法之后 ar.FK_DPID = sDPID; //return Devolve2DP(oaDev, sDPID, ar); #endregion 根据DevolveConfig.xml配置参数设置Archive归档节点 #region 注释保留 /* // Pace-缓急程度 //ar.Pace = chkJinJi.Checked ? "0" : "1"; // 页数 ar.DocPages = txtPages.Text; // 通讯渠道号 ar.CommunicationChannelCode = txtOurRef.Text; #region 签发人 签发日期 if (txtSignDate.Text != "") { if (txtSignDate.Text.Contains(" ")) { //签发日期-批准日期 ar.AuthorizeTime = txtSignDate.Text.Split(' ')[1]; } else { //签发日期-批准日期 ar.AuthorizeTime = txtSignDate.Text; } //签发人-批准者 ar.Authorizer = txtQianFaRen.Text; } #endregion // 会签者 //ar.Countersigner = txtHuiQianRen.Text; // 会签日期 //ar.CountersignedDate = txtHuiQianRenDates.Text; #region 核稿人-校核者 ////核稿人-校核者 //if (txtHeGaoRenDate.Text != "") //{ // if (txtHeGaoRenDate.Text.Contains(" ")) // { // //核稿日期-校核日期 // ar.CheckDate = txtHeGaoRenDate.Text.Split(' ')[1]; // } // else // { // //核稿日期-校核日期 // ar.CheckDate = txtHeGaoRenDate.Text; // } // //核稿人-校核者 // ar.Checkthose = txtHeGaoRenDate.Text; //} #endregion // 编制人/编制日期 // 编制单位 ar.FormationDept = drpSendDept.SelectedItem.Text; // 题名 ar.Title = txtSubject.Text; // 主送单位 ar.MainDispenseUnit = txtCompany.Text; // 抄送单位 ar.RelatedDespenseUnit = txtccCompany.Text; // 备注 ar.Remark = txtComment.Text; //ar.FK_CategoryID = "903"; // 公共常量 //ar.GatherLevel = "件"; //ar.D_StorageCarrierType = "纸质"; //ar.Amount = "1"; //ar.D_Language = "中文"; * */ #endregion ar.ElectronicDocumentCount = ucAttachment.UCDataList.Count.ToString(); #endregion sXml = hn_oa2dp.GenOAArchiveNode(ar, base.TemplateName); FounderSoftware.ADIM.OA.OA2DP.HNDP_CFileNode fl = new HNDP_CFileNode(); /****开始生成File节点************************************************************************/ #region 开始生成File节点 fl.AuthorizeTime = ar.AuthorizeTime; fl.Code = ar.Code; fl.Code19 = ar.Code19; fl.D_FileStatus = ar.D_FileStatus; fl.DocCodesExplain = ""; fl.DocPages = ar.DocPages; fl.ElectronicDocumentTransceiverTime = ar.ElectronicDocumentTransceiverTime; fl.Ext_1 = ""; fl.Ext_2 = ar.Ext_2; fl.Ext_3 = ar.Ext_3; fl.Ext_4 = ar.Ext_4; fl.Ext_5 = ar.Ext_5; fl.Title = ar.Title; //fl.FK_ArchiveID = ar.FK_Archive; fl.FK_CategoryID = ar.FK_CategoryID; fl.FormationDept = ar.FormationDept; fl.FormationTime = ar.FormationTime; fl.Importer = ar.Importer; fl.ImporterTime = ar.ImporterTime; fl.OriginalID = ar.OriginalID; fl.OtherTitle = ar.OtherTitle; fl.PaperDocumentTransceiverTime = ar.PaperDocumentTransceiverTime; fl.RelatedCode = ar.RelatedCode; fl.Revision = ar.Revision; #endregion sXml = hn_oa2dp.GenOAFileNode(fl); /****完成生成File节点************************************************************************/ #region 始生成Attachment节点 /****开始生成Attachment节点******************************************************************/ string sServerWeb = hn_oa2dp.GetCfgNodeValues("/Devolve/Other/ServerWeb"); //"http://172.29.128.239"; //string sDocumentName = oaDev.GetCfgNodeValues("/Devolve/Other/DocumentName"); for (int i = 0; i < ucAttachment.UCDataList.Count; i++) { FounderSoftware.ADIM.OA.OA2DP.HNDP_CAttachmentNode at = new HNDP_CAttachmentNode(); CFuJian file = ucAttachment.UCDataList[i]; at.DocumentName = "函件发文";//file.FileName; at.FK_FileID = ""; at.MakeDate = ""; at.MakeUnit = ""; at.PublishedTime = ""; at.Remark = ""; at.ServerWeb = sServerWeb; Double iSize = 0; string sSize = file.Size.ToUpper(); if (sSize.Contains("K")) { sSize = sSize.Replace("K", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024; } if (sSize.Contains("M")) { sSize = sSize.Replace("M", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024 * 1024; } at.Size = ((int)iSize).ToString(); at.TimeSize = ""; at.Title = file.Alias; at.Type = file.Type; at.Url = file.URL; sXml = hn_oa2dp.GenOAAttachmentNode(fl.FK_ArchiveID, at); } #endregion /****完成生成Attachment节点******************************************************************/ return sXml; }
/// <summary> /// 生成归档XML的Archive节点 /// </summary> /// <param name="ArchiveNode"></param> /// <param name="sProcess"></param> /// <returns></returns> public string GenOAArchiveNode(HNDP_CArchiveNode ArchiveNode, string sProcess) { m_doc.LoadXml(m_sArchiveNode); XmlNode node = m_doc.SelectSingleNode("/Devolve/Params"); if (node != null && node.HasChildNodes) { SetNodeValue(node, "/Devolve/Params/System", ArchiveNode.System); //XmlNode element = (XmlNode)node.SelectSingleNode("/Devolve/Params/System"); //if (element != null) // element.InnerText = ArchiveNode.System; SetNodeValue(node, "/Devolve/Params/DeptName", ArchiveNode.DeptName); } node = m_doc.SelectSingleNode("/Devolve/Archive"); DoConfig(sProcess); if (node != null && node.HasChildNodes) { string CategID = GetCfgNodeValues("/Devolve/Process[@Name='" + sProcess + "']/CategID"); if (!string.IsNullOrEmpty(CategID)) node.Attributes["ArchiveType"].Value = "1";//sArchiveType; else node.Attributes["ArchiveType"].Value = "0"; ArchiveNode.FK_CategoryID = CategID; SetNodeValue(node, "/Devolve/Archive/FK_CategoryID", CategID/*ArchiveNode.FK_CategoryID*/); SetNodeValue(node, "/Devolve/Archive/DCTableName", ArchiveNode.DCTableName); SetNodeValue(node, "/Devolve/Archive/FK_DC_ArchiveId", ArchiveNode.FK_DC_ArchiveId); SetNodeValue(node, "/Devolve/Archive/FK_DPID", ArchiveNode.FK_DPID); SetNodeValue(node, "/Devolve/Archive/Is_Piece", ArchiveNode.Is_Piece); SetNodeValue(node, "/Devolve/Archive/FormationDept", ArchiveNode.FormationDept); SetNodeValue(node, "/Devolve/Archive/FormationTime", CheckDateTime(ArchiveNode.FormationTime)); SetNodeValue(node, "/Devolve/Archive/Authorizer", ArchiveNode.Authorizer); SetNodeValue(node, "/Devolve/Archive/AuthorizeTime", CheckDateTime(ArchiveNode.AuthorizeTime)); SetNodeValue(node, "/Devolve/Archive/ReceiveCode", ArchiveNode.ReceiveCode); SetNodeValue(node, "/Devolve/Archive/PaperDocumentTransceiverTime", CheckDateTime(ArchiveNode.PaperDocumentTransceiverTime)); SetNodeValue(node, "/Devolve/Archive/ElectronicDocumentTransceiverTime", CheckDateTime(ArchiveNode.ElectronicDocumentTransceiverTime)); SetNodeValue(node, "/Devolve/Archive/CommunicationChannelCode", ArchiveNode.CommunicationChannelCode); SetNodeValue(node, "/Devolve/Archive/Importer", ArchiveNode.Importer); SetNodeValue(node, "/Devolve/Archive/ImporterTime", CheckDateTime(ArchiveNode.ImporterTime)); SetNodeValue(node, "/Devolve/Archive/MainDispenseUnit", ArchiveNode.MainDispenseUnit); SetNodeValue(node, "/Devolve/Archive/D_FillingUnit", ArchiveNode.D_FillingUnit); SetNodeValue(node, "/Devolve/Archive/FillingTime", ArchiveNode.FillingTime); SetNodeValue(node, "/Devolve/Archive/D_DocStorageLife", ArchiveNode.D_DocStorageLife); SetNodeValue(node, "/Devolve/Archive/D_SecretLevel", ArchiveNode.D_SecretLevel); SetNodeValue(node, "/Devolve/Archive/DocStorageLife", ArchiveNode.DocStorageLife); SetNodeValue(node, "/Devolve/Archive/InvalidTime", CheckDateTime(ArchiveNode.InvalidTime)); SetNodeValue(node, "/Devolve/Archive/D_InvalidType", ArchiveNode.D_InvalidType); SetNodeValue(node, "/Devolve/Archive/Code", ArchiveNode.Code); SetNodeValue(node, "/Devolve/Archive/Code19", ArchiveNode.Code19); SetNodeValue(node, "/Devolve/Archive/RelatedCode", ArchiveNode.RelatedCode); SetNodeValue(node, "/Devolve/Archive/Revision", ArchiveNode.Revision); SetNodeValue(node, "/Devolve/Archive/DocCode", ArchiveNode.DocCode); SetNodeValue(node, "/Devolve/Archive/D_StorageCarrierType", ArchiveNode.D_StorageCarrierType); SetNodeValue(node, "/Devolve/Archive/FrameCode", ArchiveNode.FrameCode); SetNodeValue(node, "/Devolve/Archive/D_DocStandards", ArchiveNode.D_DocStandards); SetNodeValue(node, "/Devolve/Archive/DocPages", ArchiveNode.DocPages); SetNodeValue(node, "/Devolve/Archive/Amount", ArchiveNode.Amount); SetNodeValue(node, "/Devolve/Archive/Title", ArchiveNode.Title); SetNodeValue(node, "/Devolve/Archive/OtherTitle", ArchiveNode.OtherTitle); SetNodeValue(node, "/Devolve/Archive/SubTitle", ArchiveNode.SubTitle); SetNodeValue(node, "/Devolve/Archive/KeyWords", ArchiveNode.KeyWords); SetNodeValue(node, "/Devolve/Archive/ThemeWord", ArchiveNode.ThemeWord); SetNodeValue(node, "/Devolve/Archive/Remark", ArchiveNode.Remark); SetNodeValue(node, "/Devolve/Archive/CoverRange", ArchiveNode.CoverRange); SetNodeValue(node, "/Devolve/Archive/SystemCode", ArchiveNode.SystemCode); SetNodeValue(node, "/Devolve/Archive/D_Reactor", ArchiveNode.D_Reactor); SetNodeValue(node, "/Devolve/Archive/D_EquipmentRelation", ArchiveNode.D_EquipmentRelation); SetNodeValue(node, "/Devolve/Archive/OverhaulCode", ArchiveNode.OverhaulCode); SetNodeValue(node, "/Devolve/Archive/NucleusCode", ArchiveNode.NucleusCode); SetNodeValue(node, "/Devolve/Archive/FunctionField", ArchiveNode.FunctionField); SetNodeValue(node, "/Devolve/Archive/StaffCode", ArchiveNode.StaffCode); SetNodeValue(node, "/Devolve/Archive/RecorderCode", ArchiveNode.RecorderCode); SetNodeValue(node, "/Devolve/Archive/Profession", ArchiveNode.Profession); SetNodeValue(node, "/Devolve/Archive/GatherLevel", ArchiveNode.GatherLevel); SetNodeValue(node, "/Devolve/Archive/ElectronicDocumentCount", ArchiveNode.ElectronicDocumentCount); SetNodeValue(node, "/Devolve/Archive/PictureCode", ArchiveNode.PictureCode); SetNodeValue(node, "/Devolve/Archive/D_Language", ArchiveNode.D_Language); SetNodeValue(node, "/Devolve/Archive/QualitySafeLevel", ArchiveNode.QualitySafeLevel); SetNodeValue(node, "/Devolve/Archive/CDNumber", ArchiveNode.CDNumber); SetNodeValue(node, "/Devolve/Archive/D_FileStatus", ArchiveNode.D_FileStatus); SetNodeValue(node, "/Devolve/Archive/DevolveStatus", ArchiveNode.DevolveStatus); SetNodeValue(node, "/Devolve/Archive/Is_Lend", ArchiveNode.Is_Lend); SetNodeValue(node, "/Devolve/Archive/Is_Dispose", ArchiveNode.Is_Dispose); SetNodeValue(node, "/Devolve/Archive/OriginalID", ArchiveNode.OriginalID); SetNodeValue(node, "/Devolve/Archive/D_AuditStatus", ArchiveNode.D_AuditStatus); SetNodeValue(node, "/Devolve/Archive/OriginalInfoURL", ArchiveNode.OriginalInfoURL); SetNodeValue(node, "/Devolve/Archive/Is_Transfer", ArchiveNode.Is_Transfer); SetNodeValue(node, "/Devolve/Archive/Ext_2", ArchiveNode.Ext_2); SetNodeValue(node, "/Devolve/Archive/Ext_3", ArchiveNode.Ext_3); SetNodeValue(node, "/Devolve/Archive/Ext_4", ArchiveNode.Ext_4); SetNodeValue(node, "/Devolve/Archive/Ext_5", ArchiveNode.Ext_5); SetNodeValue(node, "/Devolve/Archive/FK_ArchiveID", ArchiveNode.FK_ArchiveID); SetNodeValue(node, "/Devolve/Archive/Author", ArchiveNode.Author); SetNodeValue(node, "/Devolve/Archive/DigitalResourceFormationDept", ArchiveNode.DigitalResourceFormationDept); SetNodeValue(node, "/Devolve/Archive/DigitalResourceFormationTime", CheckDateTime(ArchiveNode.DigitalResourceFormationTime)); SetNodeValue(node, "/Devolve/Archive/D_ReceiveType", ArchiveNode.D_ReceiveType); SetNodeValue(node, "/Devolve/Archive/ReceiveTime", CheckDateTime(ArchiveNode.ReceiveTime)); SetNodeValue(node, "/Devolve/Archive/OriginalInfomationSystem", ArchiveNode.OriginalInfomationSystem); SetNodeValue(node, "/Devolve/Archive/EffectTime", CheckDateTime(ArchiveNode.EffectTime)); SetNodeValue(node, "/Devolve/Archive/UndertakeDepartment", ArchiveNode.UndertakeDepartment); SetNodeValue(node, "/Devolve/Archive/RelatedDespenseUnit", ArchiveNode.RelatedDespenseUnit); SetNodeValue(node, "/Devolve/Archive/FormMaker", ArchiveNode.FormMaker); SetNodeValue(node, "/Devolve/Archive/D_DisposeStatus", ArchiveNode.D_DisposeStatus); SetNodeValue(node, "/Devolve/Archive/DocCodesExplain", ArchiveNode.DocCodesExplain); SetNodeValue(node, "/Devolve/Archive/Summary", ArchiveNode.Summary); SetNodeValue(node, "/Devolve/Archive/DocmentType", ArchiveNode.DocmentType); SetNodeValue(node, "/Devolve/Archive/ExpertOpinion", ArchiveNode.ExpertOpinion); SetNodeValue(node, "/Devolve/Archive/D_ProcessStatus", ArchiveNode.D_ProcessStatus); SetNodeValue(node, "/Devolve/Archive/ArchiveName", ArchiveNode.ArchiveName); SetNodeValue(node, "/Devolve/Archive/FondNumber", ArchiveNode.FondNumber); SetNodeValue(node, "/Devolve/Archive/FondName", ArchiveNode.FondName); SetNodeValue(node, "/Devolve/Archive/PlantCode", ArchiveNode.PlantCode); SetNodeValue(node, "/Devolve/Archive/PlantName", ArchiveNode.PlantName); SetNodeValue(node, "/Devolve/Archive/Checkthose", ArchiveNode.Checkthose); SetNodeValue(node, "/Devolve/Archive/CheckDate", CheckDateTime(ArchiveNode.CheckDate)); SetNodeValue(node, "/Devolve/Archive/Auditby", ArchiveNode.Auditby); SetNodeValue(node, "/Devolve/Archive/AuditDate", CheckDateTime(ArchiveNode.AuditDate)); SetNodeValue(node, "/Devolve/Archive/Countersigner", ArchiveNode.Countersigner); SetNodeValue(node, "/Devolve/Archive/CountersignedDate", CheckDateTime(ArchiveNode.CountersignedDate)); SetNodeValue(node, "/Devolve/Archive/Proposer", ArchiveNode.Proposer); SetNodeValue(node, "/Devolve/Archive/ProposeDate", CheckDateTime(ArchiveNode.ProposeDate)); SetNodeValue(node, "/Devolve/Archive/Pace", ArchiveNode.Pace); SetNodeValue(node, "/Devolve/Archive/Instructioner", ArchiveNode.Instructioner); SetNodeValue(node, "/Devolve/Archive/InstructionDate", CheckDateTime(ArchiveNode.InstructionDate)); SetNodeValue(node, "/Devolve/Archive/MainDeliveryDate", CheckDateTime(ArchiveNode.MainDeliveryDate)); SetNodeValue(node, "/Devolve/Archive/DistributionCode", ArchiveNode.DistributionCode); SetNodeValue(node, "/Devolve/Archive/DistributionUnits", ArchiveNode.DistributionUnits); SetNodeValue(node, "/Devolve/Archive/DistributionForm", ArchiveNode.DistributionForm); SetNodeValue(node, "/Devolve/Archive/DistributeCopies", ArchiveNode.DistributeCopies); SetNodeValue(node, "/Devolve/Archive/DistributionTime", CheckDateTime(ArchiveNode.DistributionTime)); SetNodeValue(node, "/Devolve/Archive/IdentificationDate", ArchiveNode.IdentificationDate); SetNodeValue(node, "/Devolve/Archive/Identifier", ArchiveNode.Identifier); SetNodeValue(node, "/Devolve/Archive/AuthorizationObject", ArchiveNode.AuthorizationObject); SetNodeValue(node, "/Devolve/Archive/AuthorizationAct", ArchiveNode.AuthorizationAct); SetNodeValue(node, "/Devolve/Archive/AuthorizedStartTime", CheckDateTime(ArchiveNode.AuthorizedStartTime)); SetNodeValue(node, "/Devolve/Archive/LicenseExpiryDate", CheckDateTime(ArchiveNode.LicenseExpiryDate)); SetNodeValue(node, "/Devolve/Archive/Changer", ArchiveNode.Changer); SetNodeValue(node, "/Devolve/Archive/Modified", ArchiveNode.Modified); SetNodeValue(node, "/Devolve/Archive/Modifications", ArchiveNode.Modifications); SetNodeValue(node, "/Devolve/Archive/EditDescription", ArchiveNode.EditDescription); SetNodeValue(node, "/Devolve/Archive/Disposaler", ArchiveNode.Disposaler); SetNodeValue(node, "/Devolve/Archive/DisposalDate", CheckDateTime(ArchiveNode.DisposalDate)); SetNodeValue(node, "/Devolve/Archive/DisposalType", ArchiveNode.DisposalType); SetNodeValue(node, "/Devolve/Archive/DisposalResults", ArchiveNode.DisposalResults); SetNodeValue(node, "/Devolve/Archive/DestructionApproval", ArchiveNode.DestructionApproval); SetNodeValue(node, "/Devolve/Archive/Destroyer", ArchiveNode.Destroyer); SetNodeValue(node, "/Devolve/Archive/DestructionDate", CheckDateTime(ArchiveNode.DestructionDate)); SetNodeValue(node, "/Devolve/Archive/DestructionReason", ArchiveNode.DestructionReason); SetNodeValue(node, "/Devolve/Archive/Transfer", ArchiveNode.Transfer); SetNodeValue(node, "/Devolve/Archive/TransferTime", CheckDateTime(ArchiveNode.TransferTime)); SetNodeValue(node, "/Devolve/Archive/Takeover", ArchiveNode.Takeover); SetNodeValue(node, "/Devolve/Archive/User", ArchiveNode.User); SetNodeValue(node, "/Devolve/Archive/UseDate", CheckDateTime(ArchiveNode.UseDate)); SetNodeValue(node, "/Devolve/Archive/Usetype", ArchiveNode.Usetype); SetNodeValue(node, "/Devolve/Archive/Physicallocation", ArchiveNode.Physicallocation); SetNodeValue(node, "/Devolve/Archive/StorageCarrierLogo", ArchiveNode.StorageCarrierLogo); SetNodeValue(node, "/Devolve/Archive/RelevanceItemID", ArchiveNode.RelevanceItemID); SetNodeValue(node, "/Devolve/Archive/AssociationType", ArchiveNode.AssociationType); SetNodeValue(node, "/Devolve/Archive/Attachment", ArchiveNode.Attachment); } return m_doc.InnerXml; }
private string Devolve2DP(FounderSoftware.ADIM.OA.OA2DP.HN_OA2DP hn_oa2dp, string sDPID) { string sXml = ""; B_WorkRelation entity = ControlToEntity(false) as B_WorkRelation; #region ArchiveNode FounderSoftware.ADIM.OA.OA2DP.HNDP_CArchiveNode ar = new HNDP_CArchiveNode(); ar.System = "OA_" + base.IdentityID.ToString(); ar.FK_DPID = sDPID; //ar.Amount = ""; //ar.Area = ""; //ar.Author = entity.Drafter; //ar.Authorizer = entity.DeptPrincipal; //ar.AuthorizeTime = entity.ConfirmDate.ToShortDateString(); //ar.CallBackWebServiceMethod = ""; //ar.CallBackWebServiceUrl = ""; //ar.CDNumber = ""; //ar.Code = entity.DocumentNo; //ar.Code19 = ""; //ar.CommunicationChannelCode = ""; //ar.CoverRange = ""; //ar.D_AuditStatus = ""; //ar.D_DisposeStatus = ""; //ar.D_DocStandards = ""; //ar.D_DocStorageLife = ""; //ar.D_EquipmentRelation = ""; //ar.D_FileFormat = ""; //ar.D_FileStatus = ""; //ar.D_FillingUnit = ""; //ar.D_InvalidType = ""; //ar.D_Language = ""; //ar.D_ProcessStatus = entity.D_StepStatus; //ar.D_Reactor = ""; //ar.D_ReceiveType = ""; //ar.D_SecretLevel = ""; //ar.D_StorageCarrierType = ""; //ar.DCTableName = ""; //ar.DevolveStatus = ""; //ar.DigitalResourceFormationDept = ""; //ar.DigitalResourceFormationTime = ""; //ar.DocCode = ""; //ar.DocCodesExplain = ""; //ar.DocmentType = ""; //ar.DocPages = ""; //ar.DocStorageLife = ""; //ar.EffectTime = ""; ////ar.ElectronicDocumentCount = ""; //ar.ElectronicDocumentTransceiverTime = ""; //ar.ExpertOpinion = ""; //ar.Ext_2 = ""; //ar.Ext_3 = ""; //ar.Ext_4 = ""; //ar.Ext_5 = ""; //ar.FileName = entity.DocumentTitle; //ar.FillingTime = ""; //ar.FK_CategoryID = ""; //ar.FK_DC_ArchiveId = ""; //ar.FormationDept = entity.Department; //ar.FormationTime = entity.DraftDate.ToShortDateString(); //ar.FrameCode = ""; //ar.FunctionField = ""; //ar.GatherLevel = ""; //ar.Importer = ""; //ar.ImporterTime = ""; //ar.InvalidTime = ""; //ar.Is_Dispose = ""; //ar.Is_Lend = ""; //ar.Is_Piece = ""; //ar.Is_Transfer = ""; //ar.IsDeleteAfterProcess = ""; //ar.IsDownLoadAttachment = ""; //ar.KeyWords = ""; //ar.Level = ""; //ar.MainDispenseUnit = ""; //ar.MediaTimespan = ""; //ar.NucleusCode = ""; //ar.OriginalID = ""; //ar.OriginalInfomationSystem = ""; //ar.OtherFileName = ""; //ar.OtherTitle = ""; //ar.OverhaulCode = ""; //ar.PaperDocumentTransceiverTime = ""; //ar.PictureCode = ""; //ar.Profession = ""; //ar.QualitySafeLevel = ""; //ar.ReceiveCode = ""; //ar.ReceiveTime = ""; //ar.RecorderCode = ""; //ar.RelatedCode = ""; //ar.RelatedDespenseUnit = ""; //ar.Remark = ""; //ar.Revision = ""; //ar.Room = ""; //ar.StaffCode = ""; //ar.SubTitle = ""; //ar.Summary = ""; ////ar.System = ""; //ar.SystemCode = ""; //ar.ThemeWord = entity.Subject; //ar.Title = ""; //ar.UndertakeDepartment = entity.MainSend; //ar.Workshop = ""; ar.ElectronicDocumentCount = ucAttachment.UCDataList.Count.ToString(); #endregion sXml = hn_oa2dp.GenOAArchiveNode(ar, base.TemplateName); FounderSoftware.ADIM.OA.OA2DP.HNDP_CFileNode fl = new HNDP_CFileNode(); /****开始生成File节点************************************************************************/ #region 开始生成File节点 fl.AuthorizeTime = ar.AuthorizeTime; fl.Code = ar.Code; fl.Code19 = ar.Code19; fl.D_FileStatus = ar.D_FileStatus; fl.DocCodesExplain = ""; fl.DocPages = ar.DocPages; fl.ElectronicDocumentTransceiverTime = ar.ElectronicDocumentTransceiverTime; fl.Ext_1 = ""; fl.Ext_2 = ar.Ext_2; fl.Ext_3 = ar.Ext_3; fl.Ext_4 = ar.Ext_4; fl.Ext_5 = ar.Ext_5; fl.Title = ar.Title; //fl.FK_ArchiveID = ar.FK_Archive; fl.FK_CategoryID = ar.FK_CategoryID; fl.FormationDept = ar.FormationDept; fl.FormationTime = ar.FormationTime; fl.Importer = ar.Importer; fl.ImporterTime = ar.ImporterTime; fl.OriginalID = ar.OriginalID; fl.OtherTitle = ar.OtherTitle; fl.PaperDocumentTransceiverTime = ar.PaperDocumentTransceiverTime; fl.RelatedCode = ar.RelatedCode; fl.Revision = ar.Revision; #endregion sXml = hn_oa2dp.GenOAFileNode(fl); /****完成生成File节点************************************************************************/ #region 始生成Attachment节点 /****开始生成Attachment节点******************************************************************/ string sServerWeb = hn_oa2dp.GetCfgNodeValues("/Devolve/Other/ServerWeb"); //"http://172.29.128.239"; //string sDocumentName = oaDev.GetCfgNodeValues("/Devolve/Other/DocumentName"); for (int i = 0; i < ucAttachment.UCDataList.Count; i++) { FounderSoftware.ADIM.OA.OA2DP.HNDP_CAttachmentNode at = new HNDP_CAttachmentNode(); CFuJian file = ucAttachment.UCDataList[i]; at.DocumentName = "工作联系单";//file.FileName; at.FK_FileID = ""; at.MakeDate = ""; at.MakeUnit = ""; at.PublishedTime = ""; at.Remark = ""; at.ServerWeb = sServerWeb; Double iSize = 0; string sSize = file.Size.ToUpper(); if (sSize.Contains("K")) { sSize = sSize.Replace("K", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024; } if (sSize.Contains("M")) { sSize = sSize.Replace("M", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024 * 1024; } at.Size = ((int)iSize).ToString(); at.TimeSize = ""; at.Title = file.Alias; at.Type = file.Type; at.Url = file.URL; sXml = hn_oa2dp.GenOAAttachmentNode(fl.FK_ArchiveID, at); } #endregion /****完成生成Attachment节点******************************************************************/ return sXml; }