Ejemplo n.º 1
0
        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyboardDevice.Modifiers == ModifierKeys.Shift && e.Key == Key.F1)
            {
                FileClass saveFile = new FileClass();
                saveFile.SaveDocExcel(salesDataBase);
            }

            if (e.KeyboardDevice.Modifiers == ModifierKeys.Shift && e.Key == Key.F2)
            {
                NewSale_Click(sender, e);
            }

            if (e.KeyboardDevice.Modifiers == ModifierKeys.Shift && e.Key == Key.F3)
            {
                BackSale_Click(sender, e);
            }

            if (e.KeyboardDevice.Modifiers == ModifierKeys.Shift && e.Key == Key.F4)
            {
                DeleteSale_Click(sender, e);
            }

            if (e.KeyboardDevice.Modifiers == ModifierKeys.Shift && e.Key == Key.F5)
            {
                UpdateSale_Click(sender, e);
            }

            if (e.KeyboardDevice.Modifiers == ModifierKeys.Shift && e.Key == Key.F6)
            {
                AddProduct_Click(sender, e);
            }

            if (e.KeyboardDevice.Modifiers == ModifierKeys.Shift && e.Key == Key.F7)
            {
                AddDiscount_Click(sender, e);
            }

            if (e.KeyboardDevice.Modifiers == ModifierKeys.Shift && e.Key == Key.F8)
            {
                AddWorker_Click(sender, e);
            }

            if (e.Key == Key.Escape)
            {
                Close();
            }
        }
Ejemplo n.º 2
0
        private void SaveTable_Click(object sender, RoutedEventArgs e)
        {
            FileClass saveFile = new FileClass();

            saveFile.SaveDocExcel(salesDataBase);
        }