Пример #1
0
        private void buttonApriDocumenti_Click(object sender, RoutedEventArgs e)
        {
            wDocumenti documenti = new wDocumenti();

            documenti.ReadOnly  = ReadOnly;
            documenti.Titolo    = "Indice Documenti per Cliente";
            documenti.Tipologia = TipoVisualizzazione.Documenti;
            documenti.Tree      = IDTree;
            documenti.Cliente   = IDCliente;
            documenti.Sessione  = IDSessione;

            documenti.Owner = this;

            if (System.Windows.SystemParameters.PrimaryScreenWidth < 1100 || System.Windows.SystemParameters.PrimaryScreenHeight < 600)
            {
                documenti.Height    = System.Windows.SystemParameters.PrimaryScreenHeight * 90.0 / 100.0;
                documenti.Width     = System.Windows.SystemParameters.PrimaryScreenWidth * 90.0 / 100.0;
                documenti.MaxHeight = System.Windows.SystemParameters.PrimaryScreenHeight * 90.0 / 100.0;
                documenti.MaxWidth  = System.Windows.SystemParameters.PrimaryScreenWidth * 90.0 / 100.0;
                documenti.MinHeight = System.Windows.SystemParameters.PrimaryScreenHeight * 90.0 / 100.0;
                documenti.MinWidth  = System.Windows.SystemParameters.PrimaryScreenWidth * 90.0 / 100.0;
            }
            else
            {
                documenti.Width  = 1100;
                documenti.Height = 600;
            }

            documenti.Load();
            documenti.ShowDialog();
        }
Пример #2
0
        private void buttonCerca_Click(object sender, RoutedEventArgs e)
        {
            //controllo selezione clienti
            if (cmbClienti.SelectedIndex == -1)
            {
                MessageBox.Show("selezionare un cliente");
                return;
            }


            //Process wait - START  andrea
            //ProgressWindow pw = new ProgressWindow();



            string IDCliente = htClienti[cmbClienti.SelectedIndex].ToString();

            wDocumenti documenti = new wDocumenti();

            documenti.ReadOnly   = true;
            documenti.Permanente = "1";
            documenti.Titolo     = "Indice Documenti per Cliente";
            documenti.Tipologia  = TipoVisualizzazione.Documenti;
            documenti.Cliente    = IDCliente;

            if (System.Windows.SystemParameters.PrimaryScreenWidth < 1100 || System.Windows.SystemParameters.PrimaryScreenHeight < 600)
            {
                documenti.Height    = System.Windows.SystemParameters.PrimaryScreenHeight * 90.0 / 100.0;
                documenti.Width     = System.Windows.SystemParameters.PrimaryScreenWidth * 90.0 / 100.0;
                documenti.MaxHeight = System.Windows.SystemParameters.PrimaryScreenHeight * 90.0 / 100.0;
                documenti.MaxWidth  = System.Windows.SystemParameters.PrimaryScreenWidth * 90.0 / 100.0;
                documenti.MinHeight = System.Windows.SystemParameters.PrimaryScreenHeight * 90.0 / 100.0;
                documenti.MinWidth  = System.Windows.SystemParameters.PrimaryScreenWidth * 90.0 / 100.0;
            }
            else
            {
                documenti.Width  = 1100;
                documenti.Height = 600;
            }



            documenti.Owner = this;
            documenti.Load();
            Hide();
            documenti.ShowDialog();
            Close();


            //Process wait - STOP
            //pw.Close();
        }