예제 #1
0
        public void EditItemType(User u, Events event_, Boolean Important)
        {
            EventItemsHelper client = new EventItemsHelper();

            //Insert server code here
            ItemTypes Item2Edit=ItemTypeCollection[lv.SelectedIndex];
            ItemTypeCollection[lv.SelectedIndex].IsImportantType = Important;
            client.SetItemTypeImportance(u, Item2Edit, Important);
            client.Close();
        }
예제 #2
0
        public void ToggleItemTypeImpt(User u, Events event_)
        {
            if (lv.SelectedIndex==-1)
            {
                MessageBox.Show("Please Select an Item Type to toggle!", "Error!",
                    MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }
            EventItemsHelper client = new EventItemsHelper();

            //Insert server code here
            ItemTypes Item2Edit = ItemTypeCollection[lv.SelectedIndex];
            bool Important=!Item2Edit.IsImportantType;
            ItemTypeCollection[lv.SelectedIndex].IsImportantType = Important;
            client.SetItemTypeImportance(u, Item2Edit, Important);
            client.Close();
        }