private void RecycledGrid_OnRecordDeleting(object sender, RecordDeletingEventArgs e)
 {
     if (MessageBox.Show("Are you sure? This action is irreversible. These records will be permanently deleted.",
                         "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.No)
     {
         e.Cancel = true;
     }
 }
        private async void SfDataGrid_OnRecordDeleting(object sender, RecordDeletingEventArgs e)
        {
            var itemToDelete = e.Items[0] as Data.Entities.Source;

            if (await Confirm($"Вы уверены, что хотите удалить упоминание {itemToDelete?.Title}?",
                              $"Подтверждение удаления {itemToDelete?.Title}"))
            {
                await _viewModel.DeleteSource(itemToDelete);
            }
        }
        private void MechanicDataGrid_RecordDeleting(object sender, RecordDeletingEventArgs args)
        {
            var mechanic = args.Items.Cast <Mechanic>().ToArray();
            var errors   = Remove(mechanic);

            if (errors.Count > 0)
            {
                //Manejar Errores
            }
        }
        private void ServiceDataGrid_RecordDeleting(object sender, RecordDeletingEventArgs args)
        {
            var service = args.Items.Cast <Service>().ToArray();
            var errors  = Remove(service);

            if (errors.Count > 0)
            {
                //Manejar Errores
            }
        }
        private void AccesoriesDataGrid_RecordDeleting(object sender, RecordDeletingEventArgs args)
        {
            var accessory = args.Items.Cast <Accessory>().ToArray();
            var errors    = Remove(accessory);

            if (errors.Count > 0)
            {
                //Manejar Errores
            }
        }
        private void ProviderDataGrid_RecordDeleting(object sender, RecordDeletingEventArgs args)
        {
            var user   = args.Items.Cast <Provider>().ToArray();
            var errors = Remove(user);

            if (errors.Count > 0)
            {
                //Manejar Errores
            }
        }
        private void ClientsDataGrid_RecordDeleting(object sender, RecordDeletingEventArgs args)
        {
            var client = args.Items.Cast <Client>().ToArray();
            var errors = Remove(client);

            if (errors.Count > 0)
            {
                //Manejar Errores
            }
        }
Example #8
0
        private async void SfDataGrid_OnRecordDeleting(object sender, RecordDeletingEventArgs e)
        {
            var itemToDelete = e.Items[0] as Data.Entities.Architecture;

            if (await Confirm($"Вы уверены, что хотите удалить архитектурное сооружение {itemToDelete?.Title}?",
                              $"Подтверждение удаления {itemToDelete?.Title}"))
            {
                await _viewModel.DeleteArchitecture(itemToDelete);
            }
        }
        private async void SfDataGrid_OnRecordDeleting(object sender, RecordDeletingEventArgs e)
        {
            var itemToDelete = e.Items[0] as Data.Entities.Repair;


            if (await Confirm($"Вы уверены, что хотите удалить реставрацию {itemToDelete?.RestorationKind} для сооружения {itemToDelete?.Architecture.Title}?",
                              $"Подтверждение удаления {itemToDelete?.RestorationKind}"))
            {
                await _viewModel.DeleteRepair(itemToDelete);
            }
        }
Example #10
0
        void dataGrid_RecordDeleting(object sender, RecordDeletingEventArgs args)
        {
            MessageBoxResult result = MessageBox.Show("Quieres borrar la linea?",
                                                      "Confirma",
                                                      MessageBoxButton.YesNo,
                                                      MessageBoxImage.Question);

            if (result != MessageBoxResult.Yes)
            {
                args.Cancel = true;
            }
        }
        /// <summary>
        /// Delete record
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        public void dataGrid_RecordDeleting(object sender, RecordDeletingEventArgs args)
        {
            CustomerDatabaseEntities context = new CustomerDatabaseEntities();
            var item      = args.Items[0] as Employee_Details;
            var id        = item.employeeID;
            var email     = item.email;
            var password  = item.password;
            var firstName = item.firstName;
            var lastName  = item.lastName;

            context.Entry(item).State = EntityState.Deleted;
            context.SaveChanges();
            context.Dispose();
        }
        /// <summary>
        /// Delete record
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        public void dataGrid_RecordDeleting(object sender, RecordDeletingEventArgs args)
        {
            CustomerDatabaseEntities context = new CustomerDatabaseEntities();
            var item         = args.Items[0] as Ticket_Details;
            var id           = item.ticketId;
            var title        = item.eventTitle;
            var start        = item.eventStart;
            var end          = item.eventEnd;
            var price        = item.price;
            var seatLocation = item.seatLocation;

            context.Entry(item).State = EntityState.Deleted;
            context.SaveChanges();
            context.Dispose();
        }
Example #13
0
        /// <summary>
        /// Delete record
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        public void dataGrid_RecordDeletingForCustomerTransactions(object sender, RecordDeletingEventArgs args)
        {
            CustomerDatabaseEntities context = new CustomerDatabaseEntities();
            var item          = args.Items[0] as Customer_Transaction;
            var transactionId = item.transactionId;
            var email         = item.email;
            var eventAddress  = item.eventAddress;
            var fullname      = item.fullname;
            var eventName     = item.eventName;
            var totalPrice    = item.totalPrice;
            var address       = item.address;

            context.Entry(item).State = EntityState.Deleted;
            context.SaveChanges();
            context.Dispose();
        }
        /// <summary>
        /// Delete record
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        public void dataGrid_RecordDeleting(object sender, RecordDeletingEventArgs args)
        {
            CustomerDatabaseEntities context = new CustomerDatabaseEntities();
            var item           = args.Items[0] as Event_Details;
            var id             = item.eventID;
            var address        = item.eventAddress;
            var description    = item.eventDescription;
            var capacity       = item.capacity;
            var eventStart     = item.eventStart;
            var eventEnd       = item.eventEnd;
            var eventPic       = item.eventPicture;
            var eventTitle     = item.eventTitle;
            var eventGenre     = item.eventGenre;
            var showOnHomePage = item.showOnHomePage;

            context.Entry(item).State = EntityState.Deleted;
            context.SaveChanges();
            context.Dispose();
        }
Example #15
0
        /// <summary>
        /// Delete record
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        public void dataGrid_RecordDeletingForTickets(object sender, RecordDeletingEventArgs args)
        {
            CustomerDatabaseEntities context = new CustomerDatabaseEntities();
            var item         = args.Items[0] as Guest_Ticket_Details;
            var ticketId     = item.ticketId;
            var email        = item.email;
            var eventAddress = item.eventAddress;
            var fullName     = item.fullName;
            var eventName    = item.eventName;
            var placeName    = item.placeName;
            var price        = item.price;
            var seatLocation = item.seatLocation;
            var timeEnd      = item.timeEnd;
            var timeStart    = item.timeStart;

            context.Entry(item).State = EntityState.Deleted;
            context.SaveChanges();
            context.Dispose();
        }
        /// <summary>
        /// Delete record
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        public void dataGrid_RecordDeleting(object sender, RecordDeletingEventArgs args)
        {
            CustomerDatabaseEntities context = new CustomerDatabaseEntities();
            var item        = args.Items[0] as Customer_Details;
            var id          = item.customerID;
            var email       = item.email;
            var password    = item.password;
            var firstName   = item.firstName;
            var lastName    = item.lastName;
            var address     = item.address;
            var city        = item.city;
            var state       = item.state;
            var postcode    = item.postcode;
            var dateOfBirth = item.dateOfBirth;
            var dateCreated = item.dateCreated;

            context.Entry(item).State = EntityState.Deleted;
            context.SaveChanges();
            context.Dispose();
        }
Example #17
0
        private async void SfDataGrid_OnRecordDeleting(object sender, RecordDeletingEventArgs e)
        {
            var itemToDelete = e.Items[0];

            await _viewModel.DeleteWorkplace(itemToDelete);
        }