Ejemplo n.º 1
0
        void SetGroup(bool confirm = true)
        {
            if (isReverting)                //Prevent recursion if the user hits Cancel
            {
                return;
            }
            if (confirm && !ConfirmChange())
            {
                return;
            }

            currentGroup = groupSelector.SelectedGroup;
            currentYear  = groupSelector.SelectedYear;

            if (personSelector.SelectedPerson == null)
            {
                entryGrid.Hide();
                UpdateSummary();                    //Even if no person is selected, we still need to update the summary for the entire group
                return;
            }
            AddRecentMenuItem(personSelector.SelectedPerson);               //If the person didn't change, this is a no-op.

            entryGrid.BindTo(groupSelector.SelectedGroup.Auctions
                             .SelectMany(a => a.CreateItems(groupSelector.SelectedYear, personSelector.SelectedPerson))
                             );
            entryGrid.Show();
            UpdateSummary();
        }
        public void SetSelection(int year, AuctionGroup group)
        {
            if (group == null) throw new ArgumentNullException("group");
            SelectedYear = year;
            SelectedGroup = group;

            buttonEdit.Text = group.Name + ", " + (year - 5000).ToHebrewString(HebrewNumberFormat.LetterQuoted);
            OnSelectionChanged();
        }
Ejemplo n.º 3
0
        public void SetSelection(int year, AuctionGroup group)
        {
            if (group == null)
            {
                throw new ArgumentNullException("group");
            }
            SelectedYear  = year;
            SelectedGroup = group;

            buttonEdit.Text = group.Name + ", " + (year - 5000).ToHebrewString(HebrewNumberFormat.LetterQuoted);
            OnSelectionChanged();
        }
Ejemplo n.º 4
0
        void SetGroup(bool confirm = true)
        {
            if (isReverting)	//Prevent recursion if the user hits Cancel
                return;
            if (confirm && !ConfirmChange())
                return;

            currentGroup = groupSelector.SelectedGroup;
            currentYear = groupSelector.SelectedYear;

            if (personSelector.SelectedPerson == null) {
                entryGrid.Hide();
                UpdateSummary();	//Even if no person is selected, we still need to update the summary for the entire group
                return;
            }
            AddRecentMenuItem(personSelector.SelectedPerson);	//If the person didn't change, this is a no-op.

            entryGrid.BindTo(groupSelector.SelectedGroup.Auctions
                                .SelectMany(a => a.CreateItems(groupSelector.SelectedYear, personSelector.SelectedPerson))
            );
            entryGrid.Show();
            UpdateSummary();
        }