Exemplo n.º 1
0
        private void ReturnResult(Partner pObjPartner)
        {
            WindowDialog lObjWindowDialog = this.GetParent() as WindowDialog;

            lObjWindowDialog.gObject = pObjPartner as object;
            this.GetParent().Close();
        }
Exemplo n.º 2
0
        private void ReturnResult(ItemType pObjItemType)
        {
            WindowDialog lObjWindowDialog = this.GetParent() as WindowDialog;

            lObjWindowDialog.gObject = pObjItemType as object;
            this.GetParent().Close();
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        private void ReturnResult(Batch pObjBatch)
        {
            WindowDialog lObjWindowDialog = this.GetParent() as WindowDialog;

            lObjWindowDialog.gObject = pObjBatch as object;
            this.GetParent().Close();
        }
Exemplo n.º 5
0
        private void ReturnItem()
        {
            Window lObjWindowParent = Window.GetWindow(this);

            lObjWindowParent.Close();
            WindowDialog lObjWindowDialog = lObjWindowParent as WindowDialog;

            Item lobjItem = dgItems.SelectedItem as Item;

            lObjWindowDialog.gObject = lobjItem as object;
        }
Exemplo n.º 6
0
        private WindowDialog GetWindowsDialog(IList <ReportBatchDTO> pLstObjBatches)
        {
            WindowDialog lObjWindowDialog = new WindowDialog();

            lObjWindowDialog.Owner       = Window.GetWindow(this);
            lObjWindowDialog.WindowState = WindowState.Maximized;
            lObjWindowDialog.grContent.Children.Add(GetReportViewer(pLstObjBatches));
            FormDefult();

            return(lObjWindowDialog);
        }
Exemplo n.º 7
0
        private void ReturnItemDefinition()
        {
            Window lObjWindowParent = Window.GetWindow(this);

            lObjWindowParent.Close();
            WindowDialog lObjWindowDialog = lObjWindowParent as WindowDialog;

            ItemDefinitionDTO lObjItemDefinition = dgItemDefinitions.SelectedItem as ItemDefinitionDTO;

            lObjWindowDialog.gObject = lObjItemDefinition as object;
        }
Exemplo n.º 8
0
 private void ReturnBatch()
 {
     try
     {
         Window       lObjWindowParent = Window.GetWindow(this);
         WindowDialog lObjWindowDialog = lObjWindowParent as WindowDialog;
         Batch        lobjAuction      = dgBatch.SelectedItem as Batch;
         lObjWindowDialog.gObject = lobjAuction as object;
         lObjWindowParent.Close();
     }
     catch
     {
     }
 }
Exemplo n.º 9
0
 private void ReturnAuction()
 {
     try
     {
         Auction      lobjAuction      = dgAuctions.SelectedItem as Auction;
         Window       lObjWindowParent = Window.GetWindow(this);
         Window       x = this.Parent as Window;
         WindowDialog lObjWindowDialog = lObjWindowParent as WindowDialog;
         lObjWindowDialog.gObject = lobjAuction as object;
         lObjWindowParent.Close();
     }
     catch
     {
     }
 }
Exemplo n.º 10
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);
        }
Exemplo n.º 11
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);
        }
Exemplo n.º 12
0
 private void ReturnResult(Auction pObjAcution)
 {
     WindowDialog lObjWindowDialog = this.GetParent() as WindowDialog;
     lObjWindowDialog.gObject = pObjAcution as object;
     this.GetParent().Close();
 }