Ejemplo n.º 1
0
        private void RemoveInternal(object value)
        {
            if (IsTrackingChanges)
            {
                if (NewItems.Contains(value))
                {
                    NewItems.Remove(value);
                }
                else
                {
                    DelItems.Add(value);
                }
            }

            OnRemove(value);
        }
Ejemplo n.º 2
0
 private void RemoveItemPricing()
 {
     if (listBox1.SelectedItem != null)
     {
         int index = listBox1.SelectedIndex;
         FormattedListBoxItem pricing = (FormattedListBoxItem)listBox1.SelectedItem;
         ItemPricingModel     model   = (ItemPricingModel)pricing.ReferenceObject;
         if (model.Id == 0)
         {
             NewItems.Remove(model);
         }
         else
         {
             RemovedItems.Add(model);
         }
         listBox1.Items.Remove(pricing);
         ClearFields();
         DoChangedValueEvent();
         InitializeListBox(index);
     }
 }
Ejemplo n.º 3
0
        public void ChangeMemberStatus(IEMember member, int newStatus)
        {
            switch (member.Status)
            {
            case IEMember.MEMBER_NEW:
                NewItems.Remove(member);
                break;

            case IEMember.MEMBER_REJECTED:
                RejectedItems.Remove(member);
                break;

            default:
                ActiveItems.Remove(member);
                break;
            }
            member.Status = newStatus;

            switch (member.Status)
            {
            case IEMember.MEMBER_NEW:
                NewItems.Add(member);
                break;

            case IEMember.MEMBER_REJECTED:
                RejectedItems.Add(member);
                break;

            default:
                ActiveItems.Add(member);
                break;
            }

            NewItems.Sort();
            RejectedItems.Sort();
            ActiveItems.Sort();

            SaveMember(member);
        }