Exemple #1
0
        private string Serialize()
        {
            global::AccessManagementService.Access.Settings _set = new global::AccessManagementService.Access.Settings();

            _set.Password             = new global::AccessManagementService.Access.Password();
            _set.Password.MinimumChar = TextBox1.Text;
            _set.Password.LowerLtter  = chkLower.Checked;
            _set.Password.Number      = chkNumer.Checked;
            _set.Password.Signs       = chkSign.Checked;
            _set.Password.UpperLetter = chkUpper.Checked;
            return(_set.Serialize());
        }
Exemple #2
0
        protected override void OnDataBinding(EventArgs e)
        {
            base.OnDataBinding(e);
            var xml = FieldValueEditString;

            if (string.IsNullOrEmpty(xml))
            {
                return;
            }
            global::AccessManagementService.Access.Settings _set = new global::AccessManagementService.Access.Settings();
            _set = _set.DeSerialize(xml);
            if (_set != null)
            {
                chkLower.Checked = _set.Password.LowerLtter;
                chkNumer.Checked = _set.Password.Number;
                chkSign.Checked  = _set.Password.Signs;
                chkUpper.Checked = _set.Password.UpperLetter;
                TextBox1.Text    = _set.Password.MinimumChar.ToString();
            }
        }