示例#1
0
        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            //if (e.Key == Key.F5)
            //{
            //    MessageBox.Show("delete pressed");
            //    e.Handled = true;
            //}


            if (e.Key == Key.F6)
            {
                m_fieldsPopup = new CompraDialog();
                //m_fieldsPopup = new CompraDialog(m_productList);
                m_fieldsPopup.CloseRequested  += myDialog_CloseRequested;
                m_fieldsPopup.UpdateRequested += myDialog_UpdateRequested;
                m_fieldsPopup.Activated       += fieldsPopup_Opened;
                m_fieldsPopup.Background       = new SolidColorBrush(Colors.Red);
                RootGrid.Opacity      = 0.1;
                m_fieldsPopup.Opacity = 1;
                m_fieldsPopup.ShowDialog();
                RootGrid.Opacity = 1;
            }


            if (e.Key == Key.F3)
            {
                m_fieldsCliente = new CompraProveedor();


                m_fieldsCliente.CloseRequestedc  += myDialog_CloseRequestedC;
                m_fieldsCliente.UpdateRequestedc += myDialog_UpdateRequestedc;
                m_fieldsCliente.Activated        += fieldsPopup_Openedc;
                m_fieldsCliente.Background        = new SolidColorBrush(Colors.Red);
                RootGrid.Opacity        = 0.1;
                m_fieldsCliente.Opacity = 1;
                m_fieldsCliente.ShowDialog();
                RootGrid.Opacity = 1;
            }


            if (e.Key == Key.F7)
            {
                tabla.Rows[m_selectedIndex].Delete();
                if (m_selectedIndex == -1)
                {
                    return;
                }

                RemoveItem(m_selectedIndex);
                this.DeleteButton.IsEnabled = false;
            }
        }
示例#2
0
        private void cleanscreen()
        {
            InvoiceGrid.Children.Clear();
            m_items = new List <CompraItem>();

            UpdateGrido();
            osomaloso++;
            m_fieldsCliente            = new CompraProveedor();
            txtradial.Text             = "";
            txtNombre.Text             = "";
            DateFactura.SelectedDate   = DateTime.Now;
            DateRecepcion.SelectedDate = DateTime.Now;
            Folioo.Text            = "";
            CantidadA.Text         = "";
            Ordenserv.Text         = "";
            txtradial.Text         = "";
            txtNombre.Text         = "";
            combodias.SelectedItem = null;
            Ivaa.SelectedItem      = null;

            estrella = 1;

            tabla.Rows.Clear();
        }