private void LoadChars()
        {
            listView1.Clear();

            if (_reportChars == null)
            {
                ParameterData charsData = ParameterModel.ReadParameter("特殊字符", _userData.UserId);

                if (charsData == null)
                {
                    return;
                }
                if (string.IsNullOrEmpty(charsData.参数取值))
                {
                    return;
                }


                _reportChars = JsonHelper.DeserializeObject <JReportChars>(charsData.参数取值);
            }

            foreach (JReportCharItem charItem in _reportChars.字符明细)
            {
                listView1.Items.Add(charItem.字符内容);
            }

            listView1.View = View.LargeIcon;
        }
        private void butSure_Click(object sender, EventArgs e)
        {
            try
            {
                if (_charData == null)
                {
                    _charData = new JReportChars();
                }

                string[] chars = richTextBox1.Text.Split(new string[] { "\n" }, StringSplitOptions.RemoveEmptyEntries);

                _charData.字符明细.Clear();

                foreach (string curChar in chars)
                {
                    _charData.字符明细.Add(new JReportCharItem(curChar));
                }

                ParameterData parData = new ParameterData();

                parData.参数ID = SqlHelper.GetNumGuid();
                parData.参数名称 = "特殊字符";
                parData.参数标记 = _userId;
                parData.参数取值 = JsonHelper.SerializeObject(_charData);

                _pm.WriteParameter(parData);

                this.Close();
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
 private void butCancel_Click(object sender, EventArgs e)
 {
     try
     {
         _charData = null;
         this.Close();
     }
     catch (Exception ex)
     {
         MsgBox.ShowException(ex, this);
     }
 }
        public JReportChars ShowCharConfig(JReportChars charData, IDBQuery dbHelper, string userId, IWin32Window owner)
        {
            _userId = userId;

            _dbHelper = dbHelper;
            _pm       = new ParameterModel(dbHelper);
            _charData = charData;

            this.ShowDialog(owner);

            return(_charData);
        }
        private void CharsConfig()
        {
            using (frmCharConfig cc = new frmCharConfig())
            {
                JReportChars curChars = cc.ShowCharConfig(_reportChars, _dbQuery, _userData.UserId, this);

                if (curChars != null)
                {
                    listView1.Clear();
                    foreach (JReportCharItem charItem in _reportChars.字符明细)
                    {
                        listView1.Items.Add(charItem.字符内容);
                    }

                    listView1.View = View.LargeIcon;
                }
            }
        }