Esempio n. 1
0
        private void btSavePara_Click(object sender, EventArgs e)
        {
            store.UpdateParagraph(this.para, memoInp.Text, false);

            var paramlist = store.SaveParagraphBD(this.para);

            if (paramlist == null)
            {
                return;
            }

            foreach (var par in paramlist)
            {
                if (par.Name == "ParagraphID")
                {
                    this.para.ParagraphID = Convert.ToInt32(par.Value, 10);
                    break;
                }
            }
            memoOut.Text = this.para.ParagraphID.ToString();
        }
Esempio n. 2
0
        private void btParaSave_Click(object sender, EventArgs e)
        {
            try
            {
                store.UpdateParagraph(this.paraMap, memoHeader.Text, true);
                //memoBody.Text = rtbBody.Text;

                store.UpdateParagraph(this.paraMap, rtbBody.Text, false);
                var paramlist = store.SaveParagraphBD(this.paraMap);

                if (this.typeOper == treeOper.toEdit)
                {
                    var pMap = store.GetParagraph(contID, docID, parID);
                    if (pMap != null)
                    {
                        pMap = this.paraMap;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, ex.Source);
            }
        }