Example #1
0
        private void Eliminar_Event(object sender, RoutedEventArgs e)
        {
            DataRowView dataRowView        = (DataRowView)((Button)e.Source).DataContext;
            var         deleteConfirmation = new DeleteConfirmation("DELETE FROM [FlemidraDB].[dbo].[Products] Where id =", dataRowView[0].ToString());

            deleteConfirmation.ShowDialog();
            Update_DataGrid();
        }
Example #2
0
 private void Eliminar_Event(object sender, RoutedEventArgs e)
 {
     try
     {
         var dataRowView        = (DataRowView)((Button)e.Source).DataContext;
         var deleteConfirmation = new DeleteConfirmation("DELETE FROM dbo.Users Where id = ", dataRowView[0].ToString());
         deleteConfirmation.ShowDialog();
         Update_DataGrid();
     }
     catch (Exception exception)
     {
         MessageBox.Show("Error inesperado al eliminar usuario. " + exception);
     }
 }
Example #3
0
        private void Eliminar_Event(object sender, RoutedEventArgs e)
        {
            try
            {
                var dataRowView = (DataRowView)((Button)e.Source).DataContext;

                var deleteConfirmation = new DeleteConfirmation("DELETE FROM [FlemidraDB].[dbo].[Categories] Where id =", dataRowView[0].ToString());
                deleteConfirmation.ShowDialog();
                Update_DataGrid();
            }
            catch (Exception en)
            {
                MessageBox.Show("Error al realizar operacion de borrado de categoria. " + en);
            }
        }