Пример #1
0
        /// <summary>
        /// Processes the delete command.
        /// </summary>
        /// <param name="items">The items.</param>
        void ProcessDeleteCommand(string[] items)
        {
            for (int i = 0; i < items.Length; i++)
            {
                string[] keys = EcfListView.GetPrimaryKeyIdStringItems(items[i]);
                if (keys != null)
                {
                    string id = keys[0];

                    // delete selected organizations
                    Organization org = ProfileContext.Current.GetOrganization(new Guid(id));
                    if (org != null)
                    {
                        org.Delete();
                        org.AcceptChanges();
                    }
                }
            }
        }