Example #1
0
        private void btnSendOrder_Click(object sender, EventArgs e)
        {
            this.FormErrorProvider.Clear();

            if (ucDriverSelection.SelectedDriver == null)
            {
                this.FormErrorProvider.SetError(ucDriverSelection, "El campo conductor es requerido");
                return;
            }

            if (ucTruckSelection.SelectedTruck == null)
            {
                this.FormErrorProvider.SetError(ucTruckSelection, "El campo camión es requerido");
                return;
            }

            _messageBoxDisplayService.ShowConfirmationDialog("Esta seguro que desea enviar este pedido?", "Armar Pedido",
                                                             () =>
            {
                using (var service = _serviceFactory.Create <IOrderService>())
                {
                    service.SendOrder(Order.Id, ucDriverSelection.SelectedDriver.Id, ucTruckSelection.SelectedTruck.Id);

                    TransitionManager.LoadOrdersManagerView();
                }
            });
        }
Example #2
0
        private void GridSeñas_CommandCellClick(object sender, EventArgs e)
        {
            var commandCell = (GridCommandCellElement)sender;

            var selectedRow = this.GridSeñas.SelectedRows.FirstOrDefault();

            if (selectedRow == null)
            {
                return;
            }

            var senia = selectedRow.DataBoundItem as ClienteMontoFavor;

            if (senia == null)
            {
                return;
            }

            switch (commandCell.ColumnInfo.Name)
            {
            case "Eliminar":
                _messageBoxDisplayService.ShowConfirmationDialog(
                    Resources.MensajeConfirmarAnularSenia,
                    Resources.TituloConfirmarAnularSenia,
                    () => Anular(senia));
                break;

            case "Imprimir":
                var formaPago = _comprobanteNegocio.FormaDePagoReimpresion(senia.Id);
                ImprimirComprobante(senia, formaPago);
                break;
            }
        }
Example #3
0
        private void GridSenias_CommandCellClick(object sender, EventArgs e)
        {
            var commandCell = (GridCommandCellElement)sender;

            var selectedRow = this.GridSenias.SelectedRows.FirstOrDefault();

            if (selectedRow == null)
            {
                return;
            }

            var senia = selectedRow.DataBoundItem as ProveedorSenia;

            if (senia == null)
            {
                return;
            }

            switch (commandCell.ColumnInfo.Name)
            {
            case "Eliminar":
                _messageBoxDisplayService.ShowConfirmationDialog(
                    Resources.MensajeConfirmarAnularSenia,
                    Resources.TituloConfirmarAnularSenia,
                    () => Anular(senia));
                break;

            case "Anular":
                AnularParcial(senia);
                break;
            }
        }
Example #4
0
        private void btnCancelBuildedOrder_Click(object sender, EventArgs e)
        {
            _messageBoxDisplayService.ShowConfirmationDialog("Esta seguro que desea cancelar el armado de este pedido?", "Cancelar Armado de Pedido",
                                                             () =>
            {
                using (var service = _serviceFactory.Create <IOrderService>())
                {
                    service.CancelBuildedOrder(Order.Id);

                    TransitionManager.LoadOrdersManagerView();
                }
            });
        }
 private void btnShowStandardSelection_Click(object sender, EventArgs e)
 {
     if (ucLoadDailyMeasures.IsDirty)
     {
         _messageBoxDisplayService.ShowConfirmationDialog(
             Resources.PendingChangesConfirmation, Resources.EnterMeasures,
             () => TransitionManager.LoadStandardSelectionView());
     }
     else
     {
         TransitionManager.LoadStandardSelectionView();
     }
 }
        private void ActualizarPrecioTitulo(Titulo titulo)
        {
            //MOdificar el de todos los proveedores?
            var titulosModificar = new List <Titulo>();
            int _codigo;
            var co = int.TryParse(titulo.CodigoBarra, out _codigo);


            if (String.IsNullOrEmpty(titulo.CodigoBarra) || _codigo == 0)
            {
                titulosModificar = Uow.Titulos.Listado().Where(t => t.Id == titulo.Id).ToList();
            }
            else
            {
                titulosModificar = Uow.Titulos.Listado().Where(t => t.CodigoBarra == titulo.CodigoBarra).ToList();
            }

            if (titulosModificar.Count > 0)
            {
                foreach (var tituloModificar in titulosModificar)
                {
                    if (tituloModificar.ProveedorId == _titulo.ProveedorId)
                    {
                        //Precio de Venta
                        if (PrecioVenta >= tituloModificar.PrecioVentaTitulo)
                        {
                            ActualizarPrecioVenta(tituloModificar);
                        }

                        else if (PrecioVenta < tituloModificar.PrecioVentaTitulo)
                        {
                            //_messageBoxDisplayService.ShowInfo("")
                            _messageBoxDisplayService.ShowConfirmationDialog(
                                "El precio del título es menor. Desea almacenarlo?", "Actualizar Precio",
                                () => { ActualizarPrecioVenta(tituloModificar); });
                        }

                        //Precio de Compra
                        //if (PrecioBase >= tituloModificar.PrecioCompraTitulo)
                        //    ActualizarPrecioCompra(tituloModificar);
                    }
                    else
                    {
                        if ((PrecioVenta > tituloModificar.PrecioVentaTitulo))//|| (PrecioBase > tituloModificar.PrecioCompraTitulo))
                        {
                            ActualizarPrecioVenta(tituloModificar);
                        }
                    }
                }
            }
        }
Example #7
0
 private void BtnPasarLibro_Click(object sender, EventArgs e)
 {
     if (_libroPasado == false)
     {
         if (CantidadConsignada > 0 || CantidadPropia > 0)
         {
             _messageBoxDisplayService.ShowConfirmationDialog("Ya tiene un libro en stock, desea pasarlo?",
                                                              "Pase de stock", () => { PaseLibro(); });
         }
         else
         {
             PaseLibro();
         }
     }
     else
     {
         if (CantidadConsignada > 0 || CantidadPropia > 0)
         {
             _messageBoxDisplayService.ShowConfirmationDialog("Ya paso un stock de este libro. Desea pasar otro?",
                                                              "Pase de stock", () => { PaseLibro(); });
         }
     }
 }
        private void btnFinishOrder_Click(object sender, EventArgs e)
        {
            if (ucEggsAmount.TotalDozens != Order.Dozens)
            {
                _messageBoxDisplayService.ShowError("El total de docenas debe ser igual al solicitado en el pedido");
                return;
            }

            _messageBoxDisplayService.ShowConfirmationDialog("Esta seguro que desea finalizar el armado este pedido?", "Finalizar Pedido",
                                                             () =>
            {
                using (var service = _serviceFactory.Create <IOrderService>())
                {
                    service.FinishOrder(Order.Id, ucEggsAmount.Boxes, ucEggsAmount.Mapples, ucEggsAmount.Eggs);

                    TransitionManager.LoadOrdersManagerView();
                }
            });
        }
 private void BtnEliminar_Click(object sender, EventArgs e)
 {
     _messageBoxDisplayService.ShowConfirmationDialog(Resources.ConfirmationMessageEliminarLibro,
                                                      Resources.DialogTitleEliminarLibro,
                                                      EliminarLibro);
 }