Ejemplo n.º 1
0
        private string Devovle2DP2(HN_OA2DP hn_oa2dp, string sDPID)
        {
            string sXml = "";

            FounderSoftware.ADIM.OA.OA2DP.HNDP_CArchiveNode ar = new HNDP_CArchiveNode();

            List <FounderSoftware.ADIM.OA.OA2DP.DevKVItem> ls = hn_oa2dp.MapFunction("DP", base.TemplateName);

            B_GS_WorkItems entity = this.ControlToEntity(false) as B_GS_WorkItems;

            entity.FormsData = XmlUtility.SerializeXml(entity);
            B_ReceiveEdit RecvEditEntity = new B_ReceiveEdit();

            RecvEditEntity.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;
                string value = hn_oa2dp.PreHandel(entity, sName, sType);
                if (string.IsNullOrEmpty(value))
                {
                    value = hn_oa2dp.PreHandel(RecvEditEntity, sName, sType);
                }
                ar.SetAttribute(skey, value /*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归档节点

            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);
        }
Ejemplo n.º 2
0
        private string Devolve2DC(HN_OA2DC oaDev)
        {
            string sXml = "";

            List <FounderSoftware.ADIM.OA.OA2DC.DevKVItem> ls = oaDev.MapFunction("DC", base.TemplateName);

            B_GS_WorkItems entity = this.ControlToEntity(false) as B_GS_WorkItems;

            entity.FormsData = XmlUtility.SerializeXml(entity);
            B_ReceiveEdit pEntity = new B_ReceiveEdit();

            pEntity.ID = Convert.ToInt32(B_ReceiveEdit.GetID(base.TemplateName, this.txtReceiveNo.Text));

            FounderSoftware.ADIM.OA.OA2DC.HNDC_CArchiveNode ar = new HNDC_CArchiveNode();
            FounderSoftware.ADIM.OA.OA2DC.HNDC_CFileNode    fl = new HNDC_CFileNode();

            //string sPath = @"E:\QWDMS\Non Baseline Library\Development\03 Code\FounderSoftware.ADIM\FounderSoftware.ADIM.OA\OADevolveLib\DevolveConfig.xml";

            #region 开始生成Archive节点
            ar.System = "OA_" + base.IdentityID.ToString();
            string ObjPlatForm = oaDev.GetCfgNodeValues("/Devolve/Process[@Name='" + base.TemplateName + "']/Object");
            switch (ObjPlatForm)
            {
            case "DC":
                ar.SysFlag = "1";
                break;

            case "FC":
                ar.SysFlag = "2";
                break;

            default:
                ar.SysFlag = "1";
                break;
            }

            #region 根据DevolveConfig.xml配置参数设置Archive归档节点
            for (int i = 0; i < ls.Count; i++)
            {
                string skey  = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sKey;
                string sName = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sValue;
                string sType = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sType;
                string value = oaDev.PreHandel(entity, sName, sType);
                if (string.IsNullOrEmpty(value))
                {
                    value = oaDev.PreHandel(pEntity, sName, sType);
                }
                ar.SetAttribute(skey, oaDev.PreHandel(entity, sName, sType) /*(entity.GetVal(sName) as string)*/);
            }
            ar.SetOAArchiveNode();
            // 其他节点处理应放置在SetOAArchiveNode方法之后

            //return Devolve2DP(oaDev, sDPID, ar);
            #endregion 根据DevolveConfig.xml配置参数设置Archive归档节点

            ar.ElectronicDocumentCount = ucAttachment.UCDataList.Count.ToString();
            #endregion
            sXml = oaDev.GenOAArchiveNode(ar, base.TemplateName);

            /****开始生成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         = ar.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 = oaDev.GenOAFileNode(fl);
            /****完成生成File节点************************************************************************/

            #region 始生成Attachment节点
            /****开始生成Attachment节点******************************************************************/
            string sServerWeb = oaDev.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++)
            {
                HNDC_CAttachmentNode at = new HNDC_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 = oaDev.GenOAAttachmentNode(fl.FK_ArchiveID, at);
            }
            #endregion
            /****完成生成Attachment节点******************************************************************/

            return(sXml);
        }
Ejemplo n.º 3
0
        private string Devolve2DP(FounderSoftware.ADIM.OA.OA2DP.HN_OA2DP hn_oa2dp, string sDPID)
        {
            string         sXml    = "";
            B_GS_WorkItems entity  = this.ControlToEntity(false) as B_GS_WorkItems;
            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  = "公司收文";//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);
        }
Ejemplo n.º 4
0
        private string Devolve2DC(HN_OA2DC oaDev)
        {
            string sXml = "";

            FounderSoftware.ADIM.OA.OA2DC.HNDC_CArchiveNode ar = new HNDC_CArchiveNode();
            FounderSoftware.ADIM.OA.OA2DC.HNDC_CFileNode    fl = new HNDC_CFileNode();

            //if (String.IsNullOrEmpty(this.id)) return "";

            B_HSEdit l_BusReceiveEdit = new B_HSEdit();

            l_BusReceiveEdit.ID = Convert.ToInt32(B_ReceiveEdit.GetID(base.TemplateName, this.txtReceiveNo.Text));
            //l_BusReceiveEdit.Load(Convert.ToInt32(REGISTER_ID));

            #region 开始生成Archive节点
            ar.System = "OA_" + base.IdentityID.ToString();
            string ObjPlatForm = oaDev.GetCfgNodeValues("/Devolve/Process[@Name='" + base.TemplateName + "']/Object");
            switch (ObjPlatForm)
            {
            case "DC":
                ar.SysFlag = "1";
                break;

            case "FC":
                ar.SysFlag = "2";
                break;

            default:
                ar.SysFlag = "1";
                break;
            }


            // 编制单位-单位
            ar.FormationDept = l_BusReceiveEdit.CommunicationUnit;
            // 题名-文件标题
            ar.Title = l_BusReceiveEdit.DocumentTitle;
            // 收文号-收文号
            ar.ReceiveCode = l_BusReceiveEdit.DocumentNo;
            // 通讯渠道号-文件编码
            ar.CommunicationChannelCode = l_BusReceiveEdit.FileEncoding;
            // 纸质文件接收日期-收文日期
            ar.PaperDocumentTransceiverTime = this.ucPrint.CheckDateTime(l_BusReceiveEdit.ReceiptDate.ToString());
            // 批准日期-形成日期
            ar.AuthorizeTime = this.ucPrint.CheckDateTime(l_BusReceiveEdit.FormationDate.ToString());
            // 缓急程度-紧急程度
            ar.Pace = l_BusReceiveEdit.UrgentDegree;
            // 页数-页数
            ar.DocPages = l_BusReceiveEdit.Pages.ToString();
            // 拟办人-拟办人
            ar.Proposer = txtPlotMember.Text;
            // 拟办日期-拟办日期
            ar.ProposeDate = txtPlotTime.Text;
            // 批示人-公司领导
            ar.Instructioner = txtLeadShipName.Text;
            // 批示日期-批示日期
            ar.InstructionDate = txtLeadShipTime.Text;
            // 承办部门-承办部门
            ar.UndertakeDepartment = txtUnderTake.Text;
            // 登记时间
            ar.ImporterTime = DateTime.Now.ToString();

            // 公共常量
            //ar.GatherLevel = "件";
            //ar.D_StorageCarrierType = "纸质";
            //ar.Amount = "1";
            //ar.D_Language = "中文";
            ar.ElectronicDocumentCount = l_BusReceiveEdit.FileList.Count.ToString();
            #endregion
            sXml = oaDev.GenOAArchiveNode(ar, base.TemplateName);

            /****开始生成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         = ar.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 = oaDev.GenOAFileNode(fl);
            /****完成生成File节点************************************************************************/

            #region 始生成Attachment节点
            /****开始生成Attachment节点******************************************************************/
            string sServerWeb = oaDev.GetCfgNodeValues("/Devolve/Other/ServerWeb");
            //"http://172.29.128.239";
            //string sDocumentName = oaDev.GetCfgNodeValues("/Devolve/Other/DocumentName");
            for (int i = 0; i < l_BusReceiveEdit.FileList.Count; i++)
            {
                HNDC_CAttachmentNode at = new HNDC_CAttachmentNode();
                CFuJian file            = l_BusReceiveEdit.FileList[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 = oaDev.GenOAAttachmentNode(fl.FK_ArchiveID, at);
            }
            #endregion
            /****完成生成Attachment节点******************************************************************/

            return(sXml);
        }