save() public method

public save ( EA rep, FieldType fieldType ) : void
rep EA
fieldType FieldType
return void
        private void SaveItem()
        {
            FindAndReplaceItem frItem = _fr.l_items[_fr.Index];

            frItem.Name        = rtfName.Text;
            frItem.Description = rtfNotes.Text.Replace("\n", "\r\n");
            frItem.Stereotype  = rtfStereotype.Text;
            if (frItem.isUpdated)
            {
                chkIsChanged.Checked = true;
            }
            else
            {
                chkIsChanged.Checked = false;
            }
            frItem.save(_fr.rep, FindAndReplaceItem.FieldType.Description | FindAndReplaceItem.FieldType.Name | FindAndReplaceItem.FieldType.Stereotype);

            // tagged values for elements
            if (_fr.isTagSearch && (gridTags != null))
            {
                foreach (FindAndReplaceItemTag tag in frItem.l_itemTag)
                {
                    tag.save();
                }
            }
        }
        /// <summary>
        /// Replace all occurences of "Search string" by "Replace String" in current selected item.
        /// </summary>
        public int ReplaceItem()
        {
            if (_index < 0)
            {
                return(0);
            }
            FindAndReplaceItem item = _l_items[_index];// get item

            item.load(_rep);

            // search for name
            if ((_searchFieldTypes & FindAndReplaceItem.FieldType.Name) > 0)
            {
                item.Name = ChangeString(item.Name);
            }

            // search for description
            if ((_searchFieldTypes & FindAndReplaceItem.FieldType.Description) > 0)
            {
                item.Description = ChangeString(item.Description);
            }
            // search for stereotype
            if ((_searchFieldTypes & FindAndReplaceItem.FieldType.Stereotype) > 0)
            {
                item.Stereotype = ChangeString(item.Stereotype);
            }



            if ((_searchFieldTypes & FindAndReplaceItem.FieldType.Tag) > 0)
            {
                foreach (FindAndReplaceItemTag tag in item.l_itemTag)
                {
                    tag.Value = ChangeString(tag.Value);
                    tag.save();
                }
            }

            // set to changed
            item.save(_rep, _searchFieldTypes);
            return(item.CountChanges);
        }