コード例 #1
0
ファイル: BUSDocument.cs プロジェクト: DR2010/FCM2
        /// <summary>
        /// Create new versions
        /// </summary>
        /// <param name="documentSaveRequest"></param>
        /// <returns></returns>
        public static DocumentNewVersionResponse DocumentNewVersion(
            DocumentNewVersionRequest documentSaveRequest)
        {
            var repNewVersionResp = RepDocument.NewVersion(
                documentSaveRequest.headerInfo,
                documentSaveRequest.inDocument);

            return(repNewVersionResp);
        }
コード例 #2
0
ファイル: UIDocumentEdit.cs プロジェクト: DR2010/FCM2
        private void btnNewIssue_Click(object sender, EventArgs e)
        {
            Document document = new Document();

            document.UID            = Convert.ToInt32(txtUID.Text);
            document.CUID           = txtCUID.Text;
            document.Location       = txtLocation.Text;
            document.IssueNumber    = Convert.ToInt32(txtIssueNumber.Text);
            document.Name           = txtName.Text;
            document.SequenceNumber = Convert.ToInt32(txtSeqNum.Text);
            document.FileName       = txtFileName.Text;
            document.ParentUID      = Convert.ToInt32(txtParentUID.Text);

            // var response = document.NewVersion(HeaderInfo.Instance);

            // var response = RepDocument.NewVersion(HeaderInfo.Instance, document);

            //
            var documentNewVersionRequest = new DocumentNewVersionRequest();

            documentNewVersionRequest.headerInfo = HeaderInfo.Instance;
            documentNewVersionRequest.inDocument = document;
            var respNewVersion = BUSDocument.DocumentNewVersion(documentNewVersionRequest);

            if (respNewVersion.response.ReturnCode != 0001)
            {
                ControllerUtils.ShowFCMMessage(respNewVersion.response.UniqueCode, Utils.UserID);
                return;
            }

            var i = respNewVersion.response.Contents.ToString();

            MessageBox.Show("New issue #" + i + " created successfully.");

            txtFileName.Text    = document.FileName;
            txtName.Text        = document.Name;
            txtIssueNumber.Text = document.IssueNumber.ToString();
        }