Esempio n. 1
0
        /// <summary>
        /// 保存整体模板
        /// </summary>
        /// <returns></returns>
        public bool SaveModel()
        {
            bool isSaved = false;

            if (null != this._currentMRichTextBox && this._currentMRichTextBox.TempletFlag == DocTempletType.AnesSummary)
            {
                SetNewDocumentTemplet newDocumentTemplet = new SetNewDocumentTemplet();
                XtraForm xtraForm = GetDialogForm("保存整体模板", newDocumentTemplet);
                xtraForm.Size    = new Size(340, 320);
                xtraForm.TopMost = true;
                if (xtraForm.ShowDialog() == DialogResult.OK && newDocumentTemplet.DialogResultData != null)
                {
                    MED_DOCUMENT_TEMPLET row = newDocumentTemplet.DialogResultData;
                    row.DOCUMENT_NAME = Path.GetFileNameWithoutExtension(_baseDoc.ReportName);
                    row.ISJUBU        = 0;
                    row.TEMPLET_VALUE = StringHelper.Str2Arr(this._currentMRichTextBox.Text.Trim());
                    isSaved           = SaveModel(row);
                }
                else
                {
                    MessageBoxFormPC.Show("除患者基本信息外其他信息为空—请填写后再保存模板", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            return(isSaved);
        }
Esempio n. 2
0
        /// <summary>
        /// 保存整个文书的模板
        /// </summary>
        /// <returns></returns>
        public bool SaveAllDataModel(DataTable TotalModelDT)
        {
            TotalModelDT.TableName = "TOTALMODEL";
            bool isSaved = false;
            SetNewDocumentTemplet newDocumentTemplet = new SetNewDocumentTemplet();
            XtraForm xtraForm = GetDialogForm("保存整体模板", newDocumentTemplet);

            xtraForm.Size    = new Size(340, 320);
            xtraForm.TopMost = true;
            if (xtraForm.ShowDialog() == DialogResult.OK && newDocumentTemplet.DialogResultData != null)
            {
                MED_DOCUMENT_TEMPLET row = newDocumentTemplet.DialogResultData;
                row.DOCUMENT_NAME = Path.GetFileNameWithoutExtension(_baseDoc.ReportName);
                row.ISJUBU        = 0;
                using (MemoryStream stream = new MemoryStream())
                {
                    TotalModelDT.WriteXml(stream);
                    stream.Position   = 0;
                    row.TEMPLET_VALUE = FileHelper.StreamToBytes(stream);
                }
                isSaved = SaveModel(row);
            }
            else
            {
                MessageBoxFormPC.Show("除患者基本信息外其他信息为空—请填写后再保存模板", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            return(isSaved);
        }