예제 #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            cbModelos.Focus();

            IControllerReport rc = ReportController.GetInstance();

            List <KeyValuePair <string, string> > reports = new List <KeyValuePair <string, string> >();

            rc.ReportFiles("PFRN").ForEach(rf => reports.Add(new KeyValuePair <string, string>(rf.LogicalName, rf.Alias)));

            cbModelos.ItemsSource       = reports;
            cbModelos.SelectedValuePath = "Key";
            cbModelos.DisplayMemberPath = "Value";

            GridFornecedor.IsEnabled = false;
            GridProduto.IsEnabled    = false;
        }
        public ParametrosRelatorio()
        {
            InitializeComponent();

            IControllerReport cr = ReportController.GetInstance();
            List <KeyValuePair <string, string> > modelos = new List <KeyValuePair <string, string> >();

            cr.ReportFiles("VND").ForEach(e => modelos.Add(new KeyValuePair <string, string>(e.FisicalName, e.Alias)));

            cbModelo.DisplayMemberPath = "Value";
            cbModelo.SelectedValuePath = "Key";
            cbModelo.ItemsSource       = modelos;

            txCod_inicio.ToNumeric();
            txCod_fim.ToNumeric();
            txComissao_inicio.ToMoney();
            txComissao_fim.ToMoney();
        }