예제 #1
0
        private async void MenuDelete_OnClick(object sender, RoutedEventArgs e)
        {
            if (this.employeeAdmin.ucEmployeeList.itemList.SelectedItems.Count > 0)
            {
                Employee deleteEmployee = this.employeeAdmin.ucEmployeeList.itemList.SelectedItem as Employee;
                await employeeManager.Delete(deleteEmployee);

                InitLUC();
            }
        }
예제 #2
0
        private async void ClickDelete(object sender, RoutedEventArgs e)
        {
            if (this.animalAdmin.UCAnimal.Animal.Id != 0)
            {
                await animalManager.Delete(this.animalAdmin.UCAnimal.Animal);

                this.animalAdmin.UCAnimal.Animal = new Animal();
                InitLists();
                MessageBox.Show("You have deleted an animal");
            }
        }
예제 #3
0
 private void BtnDelete_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     structureManager.Delete(this.structureAdmin.ucStructure.Structure);
     structureAdmin.UCstructureList.Obs.Remove(this.structureAdmin.ucStructure.Structure);
     this.structureAdmin.ucStructure.txtBSurface.Text = "0";
     this.structureAdmin.ucStructure.txtBName.Text    = "";
 }
예제 #4
0
        private async void btnDelJob_Click(object sender, RoutedEventArgs e)
        {
            await jobManager.Delete(this.jobAdmin.UCJob.Job);

            InitLUC();
            InitUC();
        }
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            T item = await db.Get(id);

            await db.Delete(item);

            return(RedirectToAction("Index"));
        }
예제 #6
0
        private async void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            if (this.scheduleAdmin.scheduleUC.Schedule.Id != 0)
            {
                await scheduleManager.Delete(this.scheduleAdmin.scheduleUC.Schedule);

                SupInList();
            }
        }
예제 #7
0
 public async Task <ActionResult> DeleteConfirmed(int?id)
 {
     if (ModelState.IsValid)
     {
         User user = new User();
         user.Id = id;
         await manager.Delete(user);
     }
     return(RedirectToAction("Index"));
 }
예제 #8
0
        private async void confirmDelete()
        {
            MessageBoxResult mbr = MessageBox.Show("Do you really want to delete this item ?", "Confirm", MessageBoxButton.OKCancel, MessageBoxImage.Exclamation);

            if (mbr == MessageBoxResult.OK)
            {
                await addressManager.Delete(currentAddress);

                this.addressAdmin.UCAddressList.RemoveItem(currentAddress);
                this.ResetAddress();
            }
        }
        private async void RemoveNutritionContextMenu_OnClick(object sender, RoutedEventArgs e)
        {
            var schedule = new Schedule();

            schedule = ItemsList.SelectedItem as Schedule;
            if (schedule.Id > 0 && schedule != null)
            {
                await scheduleManager.Delete(schedule);

                Obs.Remove(schedule);  // remove the selected Item
                MessageBox.Show("You are in remove schedule for:\nStart : " + schedule.Start + "\nEnd : " + schedule.End, "Delete", MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }
예제 #10
0
        private async void BtnRemoveMap_Click(object sender, RoutedEventArgs e)
        {
            if (currentMap == null)
            {
                MessageBox.Show("No map selected!");
                return;
            }
            MessageBoxResult mbr = MessageBox.Show("Do you really want to delete this item ?", "Confirm", MessageBoxButton.OKCancel, MessageBoxImage.Exclamation);

            if (mbr == MessageBoxResult.OK)
            {
                await mapManager.Delete(currentMap);

                this.mainAdmin.ListMapUC.RemoveItem(currentMap);
                currentMap = null;
            }
        }
예제 #11
0
        private async void BtnSupprimer_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            if (this.lootAdminV.UCLoot.Loot.Id != 0)
            {
                if (MessageBox.Show("Voulez vous vraiement supprimer l'item " + this.lootAdminV.UCLoot.Loot.Id + " ?", "Supprimer Item", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
                {
                    this.lootAdminV.LUCLoot.Obs.Remove(lootAdminV.UCLoot.Loot);
                    await lootManager.Delete(lootAdminV.UCLoot.Loot);

                    currentLoot = new Loot();
                    this.lootAdminV.UCLoot.Loot = currentLoot;
                }
            }
            else
            {
                MessageBox.Show("Vous devez selectionner un object a supprimer", "Supprimer Loot", MessageBoxButton.OK, MessageBoxImage.Exclamation);
            }
        }
예제 #12
0
        private async void BtnSupprimer_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            if (this.itemsAdminV.UCItems.Items.Id != 0)
            {
                if (MessageBox.Show("Voulez vous vraiement supprimer l'item " + this.itemsAdminV.UCItems.Items.Name + " ?", "Supprimer Item", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
                {
                    this.itemsAdminV.LUCItems.Obs.Remove(itemsAdminV.UCItems.Items);
                    await itemsManager.Delete(itemsAdminV.UCItems.Items);

                    currentItems = new Items();
                    this.itemsAdminV.UCItems.Items = currentItems;
                }
            }
            else
            {
                MessageBox.Show("Vous devez selectionner un object a supprimer", "Supprimer Item", MessageBoxButton.OK, MessageBoxImage.Exclamation);
            }
        }
예제 #13
0
 public async Task <IHttpActionResult> Delete(T value)
 {
     return(Ok(await manager.Delete(value)));
 }
 private void CMRemove_Click(object sender, RoutedEventArgs e)
 {
     mySQLManager.Delete(ItemsList.SelectedItem as Structure);
     Obs.Remove(ItemsList.SelectedItem as Structure);
 }
예제 #15
0
 private async void BtnDelete_Click(object sender, RoutedEventArgs e)
 {
     await streetNumberManager.Delete(this.streetNumberAdmin.ucStreetNumber.StreetNumber);
 }