private bool?ShowReportViewer()
        {
            bool?lBolResult = false;

            FormLoading();

            try
            {
                IList <ReportBatchDTO> lLstObjBatches = mObjReportFactory.GetAuctionsReportsService().GetBatchesBySeller(GetStartDate(), GetEndDate(), GetAuction(), GetSeller(), GetStatusFilter());

                this.Dispatcher.Invoke((Action) delegate
                {
                    if (lLstObjBatches.Count > 0)
                    {
                        WindowDialog lObjWindowDialog = GetWindowsDialog(lLstObjBatches);
                        lBolResult = lObjWindowDialog.ShowDialog();
                    }
                    else
                    {
                        lBolResult = false;
                        ShowMessage("Busqueda de lotes", "No hay lotes para esta subasta");
                        FormDefult();
                    }
                });
            }
            catch (Exception lObjException)
            {
                FormDefult();
                ShowMessage("Error", lObjException.Message);
            }

            return(lBolResult);
        }
Beispiel #2
0
        /// <summary>
        /// Muestra dialogo de busqueda y regresa el objeto seleccionado.
        /// </summary>
        public static object ShowWindowDialog(UserControl pUCUserControl, Window pWindow)
        {
            WindowDialog lObjWindow = new WindowDialog();

            lObjWindow.Owner = Window.GetWindow(pWindow);
            //lobjWindow.SizeToContent = System.Windows.SizeToContent.Height;
            //lObjWindow.Width = 600;
            //lObjWindow.SizeToContent = System.Windows.SizeToContent.Width;
            lObjWindow.Width  = pUCUserControl.MinWidth;
            lObjWindow.Height = 400;
            lObjWindow.grContent.Children.Add(pUCUserControl);

            object lObjObject = new object();

            if (lObjWindow.ShowDialog() == false)
            {
                lObjObject = lObjWindow.gObject;
            }
            return(lObjObject);
        }
Beispiel #3
0
        private bool?ShowReportViewer()
        {
            bool?lBolResult = false;

            FormLoading();

            try
            {
                IList <ReportBatchDTO> lLstObjBatches = mObjReportFactory.GetAuctionsReportsService().GetBatchesByBuyer(GetStartDate(), GetEndDate(), GetAuction(), GetBuyer());

                this.Dispatcher.Invoke((Action) delegate
                {
                    WindowDialog lObjWindowDialog = GetWindowsDialog(lLstObjBatches);
                    lBolResult = lObjWindowDialog.ShowDialog();
                });
            }
            catch (Exception lObjException)
            {
                FormDefult();
                ShowMessage("Error", lObjException.Message);
            }

            return(lBolResult);
        }