Esempio n. 1
0
        protected override void SetCreditCardAction()
        {
            CreditCardSelectForm form = new CreditCardSelectForm(this);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                _credit_card = form.Selected as CreditCardInfo;

                if (_credit_card.ETipoTarjeta != ETipoTarjeta.Credito)
                {
                    PgMng.ShowInfoException("Solo son válidas las tarjetas de crédito");
                    return;
                }

                _entity.OidTarjetaCredito = _credit_card.Oid;
                _entity.TarjetaCredito    = _credit_card.Nombre;
                _entity.OidCuentaBancaria = _credit_card.OidCuentaBancaria;
                _entity.CuentaBancaria    = _credit_card.CuentaBancaria;
                _entity.Agente            = _credit_card.Nombre;
                Cuenta_TB.Text            = _entity.CuentaBancaria;
                Tarjeta_TB.Text           = _entity.TarjetaCredito;

                _entity.SetFechas(Fecha_DTP.Value, _credit_card);
                Vencimiento_DTP.Value = _entity.Vencimiento;

                EstadoPago_TB.Text = _entity.EstadoPagoLabel;

                LoadCreditCardStatements();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Guarda en la bd el objeto actual
        /// </summary>
        protected override bool SaveObject()
        {
            this.Datos.RaiseListChangedEvents = false;

            //Creamos los cobros Fomento de los expedientes seleccionados
            if (!Asignar())
            {
                return(false);
            }

            // do the save
            try
            {
                Charge temp = _entity.Clone();
                temp.ApplyEdit();

                _entity = temp.Save();
                _entity.ApplyEdit();

                return(true);
            }
            catch (Exception ex)
            {
                PgMng.ShowInfoException(ex);
                return(false);
            }
            finally
            {
                this.Datos.RaiseListChangedEvents = true;
            }
        }
Esempio n. 3
0
        public void DoJob()
        {
            PgMng.Result = BGResult.Working;

            try
            {
                switch (_back_job)
                {
                case BackJob.Download:
                    DoDownload(null);
                    break;

                case BackJob.Upload:
                    DoUpload(null);
                    break;

                case BackJob.Delete:
                    DoDelete(null);
                    break;
                }
            }
            catch (Exception ex)
            {
                PgMng.ShowInfoException(ex);
            }
        }
        protected override void EditStockAction()
        {
            if (Stock_DGW.CurrentRow == null)
            {
                return;
            }
            if (Stock_DGW.CurrentRow.Index < 0)
            {
                return;
            }
            if (Stock_DGW.CurrentRow.DataBoundItem == null)
            {
                return;
            }

            Stock s = (Stock)Stock_DGW.CurrentRow.DataBoundItem;

            if ((s.OidAlbaran != 0) ||
                ((s.OidAlbaran == 0) && (s.Observaciones == Library.Store.Resources.Defaults.STOCK_INICIAL)))
            {
                PgMng.ShowInfoException(Resources.Messages.STOCK_FACTURADO);
                return;
            }

            EditStockActionForm form = new EditStockActionForm(s, _entity);

            form.ShowDialog(this);

            Stock_BS.ResetBindings(false);
        }
        public virtual void CrearFacturaAction()
        {
            InputDeliverySelectForm form = new InputDeliverySelectForm(this, InputDeliveryList.GetNoFacturados(true));

            form.ShowDialog(this);

            if (form.DialogResult == DialogResult.OK)
            {
                try
                {
                    PgMng.Reset(4, 1, Resources.Messages.GENERANDO_FACTURAS, this);
                    List <InputDeliveryInfo> deliveries = form.Selected as List <InputDeliveryInfo>;
                    PgMng.Grow();

                    InputInvoices invoices = InputInvoices.NewList();
                    invoices.NewItems(deliveries);
                    PgMng.Grow();

                    invoices.Save();
                    invoices.CloseSession();

                    _selected      = deliveries;
                    _action_result = DialogResult.OK;
                }
                catch (Exception ex)
                {
                    PgMng.ShowInfoException(ex);
                }
                finally
                {
                    PgMng.FillUp();
                    RefreshList();
                }
            }
        }
        protected virtual void CrearTicketAction()
        {
            if (_entity.EEstado != EEstado.Abierto)
            {
                return;
            }

            TicketInfo ticket = TicketInfo.GetByAlbaran(_entity.Oid, false);

            if (ticket != null && ticket.Oid != 0)
            {
                PgMng.ShowInfoException(Resources.Messages.ALBARAN_TICKET_EXISTS);
                return;
            }

            ExecuteAction(molAction.Save, true);

            if (_action_result == DialogResult.OK)
            {
                TicketAddForm form = new TicketAddForm(_entity.GetInfo(), this);
                form.ShowDialog();

                _entity.NumeroTicket = form.Entity.Codigo;
            }
        }
        protected override bool SaveObject()
        {
            this.Datos.RaiseListChangedEvents = false;

            // do the save
            try
            {
                PgMng.Reset(6, 1, Library.Store.Resources.Messages.ACTUALIZANDO_STOCKS, this);

                OutputDelivery temp = _entity.Clone();
                temp.ApplyEdit();
                PgMng.Grow();

                _entity = temp.Save();
                _entity.ApplyEdit();
                PgMng.Grow();

                return(true);
            }
            catch (Exception ex)
            {
                CleanCache();
                PgMng.ShowInfoException(ex);
                return(false);
            }
            finally
            {
                this.Datos.RaiseListChangedEvents = true;
                PgMng.FillUp();
            }
        }
Esempio n. 8
0
        /// <summary>
        /// Guarda en la bd el objeto actual
        /// </summary>
        protected override bool SaveObject()
        {
            this.Datos.RaiseListChangedEvents = false;

            InventarioAlmacen temp = _entity.Clone();

            temp.ApplyEdit();

            // do the save
            try
            {
                _entity = temp.Save();
                _entity.ApplyEdit();


                //Decomentar si se va a mantener en memoria
                //_entity.BeginEdit();
                return(true);
            }
            catch (Exception ex)
            {
                PgMng.ShowInfoException(ex);
                return(false);
            }
            finally
            {
                this.Datos.RaiseListChangedEvents = true;
            }
        }
        public virtual void CrearFacturaAction()
        {
            DeliverySelectForm form = new DeliverySelectForm(this, ETipoEntidad.Cliente, OutputDeliveryList.GetNoFacturados(true));

            form.ShowDialog(this);

            if (form.DialogResult == DialogResult.OK)
            {
                try
                {
                    PgMng.Reset(4, 1, Resources.Messages.GENERANDO_FACTURAS, this);
                    List <OutputDeliveryInfo> albaranes = form.Selected as List <OutputDeliveryInfo>;
                    PgMng.Grow();

                    OutputInvoices facturas = OutputInvoices.NewList();
                    facturas.NewItems(albaranes);
                    PgMng.Grow();

                    facturas.Save();
                    facturas.CloseSession();

                    _selected      = albaranes;
                    _action_result = DialogResult.OK;
                }
                catch (Exception ex)
                {
                    PgMng.ShowInfoException(ex);
                }
                finally
                {
                    PgMng.FillUp();
                }
            }
        }
        protected override void NuevoConceptoAction()
        {
            if (_entity.OidSerie == 0)
            {
                PgMng.ShowInfoException(Resources.Messages.NO_SERIE_SELECTED);
                return;
            }

            if (_entity.OidCliente == 0)
            {
                PgMng.ShowInfoException(Resources.Messages.NO_CLIENT_SELECTED);
                return;
            }

            _cliente = Datos_Cliente.Current as ClienteInfo;
            BudgetLineAddForm form = new BudgetLineAddForm(ETipoProducto.Almacen, _entity, _serie, _cliente, this);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                _entity.CalculaTotal();

                if (_entity.Conceptos.Count > 0)
                {
                    Serie_BT.Enabled = false;
                }

                RefreshConceptos();
                ControlsMng.UpdateBinding(Datos);

                HideComponentes();
            }
        }
        protected override bool SaveObject()
        {
            this.Datos.RaiseListChangedEvents = false;

            Budget temp = _entity.Clone();

            temp.ApplyEdit();

            // do the save
            try
            {
                _entity = temp.Save();
                _entity.ApplyEdit();
                //_entity.BeginEdit();
                return(true);
            }
            catch (Exception ex)
            {
                CleanCache();
                PgMng.ShowInfoException(ex);
                return(false);
            }
            finally
            {
                this.Datos.RaiseListChangedEvents = true;
                PgMng.FillUp();
            }
        }
Esempio n. 12
0
        /// <summary>
        /// Guarda en la bd el objeto actual
        /// </summary>
        protected override bool SaveObject()
        {
            //Se está editando un objeto hijo de una lista. Ya se encargará la lista de guardar si procede
            if (IsChild)
            {
                _source.CopyFrom(_entity);
                return(true);
            }

            this.Datos.RaiseListChangedEvents = false;

            LivestockBookLine temp = _entity.Clone();

            temp.ApplyEdit();

            // do the save
            try
            {
                _entity = temp.Save();
                _entity.ApplyEdit();

                return(true);
            }
            catch (Exception ex)
            {
                PgMng.ShowInfoException(ex);
                return(false);
            }
            finally
            {
                this.Datos.RaiseListChangedEvents = true;
            }
        }
Esempio n. 13
0
        protected virtual bool Asignar()
        {
            if (_entity.Pendiente == 0)
            {
                PgMng.ShowInfoException("No existe cantidad pendiente de asignación en este cobro.");
                return(false);
            }

            if (NoAsignado > _entity.Pendiente)
            {
                PgMng.ShowInfoException(string.Format("La asignación {0:C2} es superior a la cantidad pendiente en el cobro {1:C2}.", NoAsignado, _entity.Pendiente));
                return(false);
            }

            foreach (FacREAInfo item in _facturas)
            {
                REAExpedient rea_expedient = _rea_expedients.GetItem(item.OidExpedienteREA);

                if (item.Vinculado == Library.Invoice.Resources.Labels.RESET_COBRO)
                {
                    try
                    {
                        if (item.Asignado < 0)
                        {
                            PgMng.ShowInfoException(string.Format("El importe de la asignación del expediente {0} es negativo.", item.NExpediente));
                            return(false);
                        }

                        CobroREA c = _entity.CobroREAs.GetItemByExpedienteREA(item.OidExpedienteREA);
                        if ((item.Asignado > item.TotalAyuda) && (c == null))
                        {
                            PgMng.ShowInfoException(string.Format("El importe de la asignación del expediente {0} es superior a la cantidad pendiente de cobro.", item.NExpediente));
                            return(false);
                        }
                    }
                    catch
                    {
                        PgMng.ShowInfoException(string.Format("El valor asignado al expediente {0} no es válido.", item.NExpediente));
                        return(false);
                    }

                    if (rea_expedient != null)
                    {
                        rea_expedient.EEstado = EEstado.Charged;
                    }
                }
                else
                {
                    if (rea_expedient != null)
                    {
                        if (rea_expedient.EEstado == EEstado.Charged)
                        {
                            rea_expedient.EEstado = EEstado.Abierto;
                        }
                    }
                }
            }

            return(true);
        }
Esempio n. 14
0
        /// <summary>
        /// Guarda en la bd el objeto actual
        /// </summary>
        protected override bool SaveObject()
        {
            this.Datos.RaiseListChangedEvents = false;

            Registro temp = _entity.Clone();

            temp.ApplyEdit();
            PgMng.Grow();

            // do the save
            try
            {
                _entity = temp.Save();
                _entity.ApplyEdit();
                PgMng.Grow(string.Empty, "temp.Save()");

                return(true);
            }
            catch (iQValidationException ex)
            {
                PgMng.ShowInfoException(ex);
                return(false);
            }
            catch (Exception ex)
            {
                PgMng.ShowErrorException(ex);
                return(false);
            }
            finally
            {
                this.Datos.RaiseListChangedEvents = true;
            }
        }
Esempio n. 15
0
        /// <summary>
        /// Guarda en la bd el objeto actual
        /// </summary>
        protected override bool SaveObject()
        {
            using (StatusBusy busy = new StatusBusy(moleQule.Face.Resources.Messages.SAVING))
            {
                this.Datos.RaiseListChangedEvents = false;

                IAcreedor temp = _entity.IClone();
                temp.ApplyEdit();

                // do the save
                try
                {
                    _entity = temp.ISave();
                    _entity.ApplyEdit();

                    return(true);
                }
                catch (Exception ex)
                {
                    PgMng.ShowInfoException(iQExceptionHandler.GetAllMessages(ex));
                    return(false);
                }
                finally
                {
                    this.Datos.RaiseListChangedEvents = true;
                }
            }
        }
Esempio n. 16
0
        private void DeleteUser_TI_Click(object sender, EventArgs e)
        {
            if (Datos.Current == null)
            {
                return;
            }

            if (((User)Datos.Current).Name == AppContext.User.Name)
            {
                PgMng.ShowInfoException(Resources.Messages.NO_DELETE_USER);
                return;
            }

            User item = (User)Datos.Current;

            if (item.Oid == 1)
            {
                PgMng.ShowInfoException(String.Format(moleQule.Library.Resources.Messages.DELETE_USER_NOT_ALLOWED, item.Name));
                return;
            }

            if (ProgressInfoMng.ShowQuestion(Resources.Messages.DELETE_CONFIRM) == DialogResult.Yes)
            {
                _usuarios.Remove(item.Oid);
            }
        }
Esempio n. 17
0
        protected override void SubmitAction()
        {
            string msg = string.Empty;

            switch (_entity.ETipoStock)
            {
            case ETipoStock.Todos:
                msg = "Seleccione un tipo de Movimiento de Stock";
                break;

            case ETipoStock.Compra:
                msg = "Las entradas de Stock por Compra deben realizarse mediante un Albarán Recibido";
                break;

            case ETipoStock.Venta:
                msg = "Las salidas de Stock por Venta deben realizarse mediante un Albarán Emitido";
                break;

            case ETipoStock.AltaKit:
            case ETipoStock.BajaKit:
                msg = "Las entradas y salidas de Stock de este tipo deben realizarse mediante Mezclas";
                break;
            }

            if (msg != string.Empty)
            {
                PgMng.ShowInfoException(msg);

                _action_result = DialogResult.Ignore;
                return;
            }

            _entity.SetSignoStock();

            /*if (_entity.Bultos < 0)
             * {
             *  if (Decimal.Round(_producto_actual.StockBultos, 2) + Decimal.Round(_entity.Bultos, 2) < 0)
             *  {
             *      PgMng.ShowInfoException(Resources.Messages.BULTOS_INSUFICIENTES + " " + _producto_actual.StockBultos.ToString("N2"));
             *
             *      _action_result = DialogResult.Ignore;
             *      return;
             *  }
             * }
             *
             * if (_entity.Kilos < 0)
             * {
             *  if (Decimal.Round(_producto_actual.StockKilos, 2) + Decimal.Round(_entity.Kilos, 2) < 0)
             *  {
             *                          PgMng.ShowInfoException(Resources.Messages.STOCK_INSUFICIENTE + " " + _producto_actual.StockKilos.ToString("N2"));
             *
             *      _action_result = DialogResult.Ignore;
             *      return;
             *  }
             * }*/

            _expedient.UpdateStocks(_current_batch, true);

            _action_result = DialogResult.OK;
        }
Esempio n. 18
0
        protected void ChangeStateAction(EEstado estado)
        {
            if (_entity.EEstado == EEstado.Anulado)
            {
                PgMng.ShowInfoException(Face.Resources.Messages.ITEM_ANULADO_NO_EDIT);
                return;
            }

            switch (estado)
            {
            case EEstado.Anulado:
            {
                if (_entity.EEstado == EEstado.Contabilizado)
                {
                    PgMng.ShowInfoException(Library.Common.Resources.Messages.NULL_CONTABILIZADO_NOT_ALLOWED);
                    return;
                }

                if (ProgressInfoMng.ShowQuestion(Face.Resources.Messages.NULL_CONFIRM) != DialogResult.Yes)
                {
                    return;
                }
            }
            break;
            }

            _entity.EEstado = estado;
        }
        protected virtual void SelectClienteAction()
        {
            //if ((_entity.Conceptos.Count > 0) && (!_entity.Contado))
            //{
            //    PgMng.ShowInfoException("No es posible cambiar el cliente a un albarán con conceptos asociados.");
            //    return;
            //}

            if (_entity.OidSerie == 0)
            {
                PgMng.ShowInfoException(Resources.Messages.NO_SERIE_SELECTED);
                return;
            }

            ClientSelectForm form = new ClientSelectForm(this, EEstado.Active);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                _cliente = form.Selected as ClienteInfo;
                if (_cliente.Oid != _entity.OidHolder)
                {
                    SetCliente(_cliente);
                }
            }
        }
Esempio n. 20
0
        protected override void EditPagoAction()
        {
            bool locked = false;

            if (Pago == null)
            {
                PgMng.ShowInfoException(Face.Resources.Messages.NO_SELECTED);
                return;
            }

            if (Pago.EEstado == moleQule.Base.EEstado.Anulado)
            {
                PgMng.ShowInfoException(Face.Resources.Messages.ITEM_ANULADO_NO_EDIT);
                return;
            }

            PayrollPaymentEditForm form = new PayrollPaymentEditForm(this, _entity, Pago.Oid, locked);

            form.MedioPago_BT.Enabled = false;
            form.ShowDialog(this);

            Payment current = Pago;

            Payments_BS.ResetBindings(false);
            _summary.Refresh(_entity);
            Summary_BS.ResetBindings(false);
            SetGridColors(Pagos_DGW.Name);
            _payrolls = PayrollList.GetListByEmpleado(_entity.Oid, false);
            Select(current);
        }
Esempio n. 21
0
        protected void NewApunteBancario(NotifyEntity item)
        {
            if (item.ETipoNotificacion != ETipoNotificacion.PagoTarjetaVencido)
            {
                if (((PaymentList)item.List).Count > 0)
                {
                    //PgMng.ShowInfoException("Seleccione un extracto pendiente de la tarjeta");

                    PaymentInfo    pg      = ((PaymentList)item.List)[0];
                    CreditCardInfo tarjeta = CreditCardInfo.Get(pg.OidTarjetaCredito, false);
                    PaymentInfo    pago    = PaymentInfo.GetByVencimientoTarjeta(tarjeta, pg.Vencimiento, false);

                    PagoFraccionadoTarjetaEditForm form = new PagoFraccionadoTarjetaEditForm(pago.Oid, ETipoPago.FraccionadoTarjeta, this);
                    form.ShowDialog();
                }
                return;
            }

            PaymentList list = (PaymentList)item.List;

            if (list.Count == 0)
            {
                PgMng.ShowInfoException("No existen extractos pendientes para esta tarjeta");
                return;
            }

            Library.Invoice.ModuleController.CreateApuntesBancarios(list);

            RefreshAction();
        }
Esempio n. 22
0
        /// <summary>
        /// Guarda en la bd el objeto actual
        /// </summary>
        protected override bool SaveObject()
        {
            this.Datos.RaiseListChangedEvents = false;

            LineaFomento temp = _entity.Clone();

            temp.ApplyEdit();

            // do the save
            try
            {
                _entity = temp.Save();
                _entity.ApplyEdit();


                return(true);
            }
            catch (Exception ex)
            {
                PgMng.ShowInfoException(iQExceptionHandler.GetAllMessages(ex));
                return(false);
            }
            finally
            {
                this.Datos.RaiseListChangedEvents = true;
            }
        }
        /// <summary>
        /// Guarda en la bd el objeto actual
        /// </summary>
        protected override bool SaveObject()
        {
            this.Datos.RaiseListChangedEvents = false;

            Expedient temp = _entity.Clone();

            temp.ApplyEdit();

            // do the save
            try
            {
                _entity = temp.Save();
                _entity.ApplyEdit();

                return(true);
            }
            catch (Exception ex)
            {
                PgMng.ShowInfoException(ex.Message);
                return(false);
            }
            finally
            {
                this.Datos.RaiseListChangedEvents = true;
            }
        }
Esempio n. 24
0
        /// <summary>
        /// Asigna el objeto al origen de datos y los orígenes de datos auxiliares
        /// <returns>void</returns>
        /// </summary>
        protected void SetFormData()
        {
            try
            {
                EnableEvents(false);
                RefreshSecondaryData();
                RefreshMainData();
            }
            catch (Exception ex)
            {
                if (null != iQExceptionHandler <iQLockException> .GetiQException(ex))
                {
                    PgMng.ShowInfoException(Messages.LOCK_ERROR);
                }
                else
                {
                    PgMng.ShowInfoException(ex);
                }

                Dispose();
            }
            finally
            {
                EnableEvents(true);
            }
        }
Esempio n. 25
0
        public virtual void EmailAction()
        {
            if (ActiveItem == null)
            {
                return;
            }

            PgMng.Reset(3, 1, Face.Resources.Messages.OPENING_EMAIL_CLIENT, this);

            MailParams mail = new MailParams();

            mail.To = ActiveItem.Email;

            try
            {
                PgMng.Grow();

                EMailSender.MailTo(mail);
            }
            catch
            {
                PgMng.ShowInfoException(moleQule.Face.Resources.Messages.NO_EMAIL_CLIENT);
            }
            finally
            {
                PgMng.FillUp();
            }
        }
Esempio n. 26
0
        public override void OpenEditForm()
        {
            try
            {
                EntityBase.CheckEditLockedEstado(ActiveItem.EEstado, moleQule.Base.EEstado.Contabilizado);
            }
            catch (iQException ex)
            {
                PgMng.ShowInfoException(ex);
                _action_result = DialogResult.Ignore;
                return;
            }

            if ((ActiveItem.ECategoriaGasto == ECategoriaGasto.GeneralesExpediente) ||
                (ActiveItem.ECategoriaGasto == ECategoriaGasto.OtrosExpediente) ||
                (ActiveItem.ECategoriaGasto == ECategoriaGasto.Stock))
            {
                PgMng.ShowInfoException("No es posible editar un gasto asociado a un expediente");

                _action_result = DialogResult.Ignore;
                return;
            }

            ExpenseEditForm form = new ExpenseEditForm(ActiveItem.Oid, this);

            if (form.Entity != null)
            {
                AddForm(form);
                _entity = form.Entity;
            }
        }
Esempio n. 27
0
        /// <summary>
        /// La llama el backgroundworker para ejecutar codigo en segundo plano
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public new void BackGroundJob(BackgroundWorker bk)
        {
            try
            {
                switch (_back_job)
                {
                case BackJob.Download:
                    DoDownload(bk);
                    break;

                case BackJob.Upload:
                    DoUpload(bk);
                    break;

                case BackJob.Delete:
                    DoDelete(bk);
                    break;

                default:
                    base.BackGroundJob(bk);
                    return;
                }
            }
            catch (Exception ex)
            {
                CancelBackGroundJob();
                PgMng.ShowInfoException(ex);
            }
        }
Esempio n. 28
0
        protected override void EditPagoAction()
        {
            bool locked = false;

            if (Pago == null)
            {
                PgMng.ShowInfoException(Face.Resources.Messages.NO_SELECTED);
                return;
            }

            if (Pago.EEstado == moleQule.Base.EEstado.Anulado)
            {
                PgMng.ShowInfoException(Face.Resources.Messages.ITEM_ANULADO_NO_EDIT);
                return;
            }

            InvoicePaymentEditForm form = new InvoicePaymentEditForm(this, _entity, Pago, locked);

            form.MedioPago_BT.Enabled = false;
            form.ShowDialog(this);

            RefreshAction();

            Refresh();
        }
Esempio n. 29
0
        protected void ExportPDF(ReportClass rpt, string output_file_name)
        {
            if (rpt != null)
            {
                ExportOptions options = new ExportOptions();
                DiskFileDestinationOptions diskFileDestinationOptions = new DiskFileDestinationOptions();

                SaveFile_SFD.InitialDirectory = SettingsMng.Instance.GetPDFPrintsFolder();
                SaveFile_SFD.FileName         = output_file_name;
                SaveFile_SFD.AddExtension     = true;
                SaveFile_SFD.DefaultExt       = "pdf";

                if (SaveFile_SFD.ShowDialog() == DialogResult.OK)
                {
                    PgMng.Grow(String.Format(Face.Resources.Messages.EXPORTING_PDF, SaveFile_SFD.FileName), string.Empty);

                    diskFileDestinationOptions.DiskFileName = SaveFile_SFD.FileName;
                    options.ExportFormatType         = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat;
                    options.ExportDestinationType    = CrystalDecisions.Shared.ExportDestinationType.DiskFile;
                    options.ExportDestinationOptions = diskFileDestinationOptions;

                    PgMng.Grow();

                    rpt.Export(options);
                }
            }
            else
            {
                PgMng.ShowInfoException(Resources.Messages.NO_DATA_REPORTS);
            }
        }
Esempio n. 30
0
        protected void SetExpedient(ExpedientInfo expedient)
        {
            _expedient = expedient;

            if (_expedient != null)
            {
                if (_product != null)
                {
                    switch (_expedient.ETipo)
                    {
                    case moleQule.Store.Structs.ETipoExpediente.Ganado:

                        if (_product.ETipoFacturacion != ETipoFacturacion.Unitaria)
                        {
                            PgMng.ShowInfoException(Resources.Messages.NO_UNITS_ALLOWED);
                            return;
                        }

                        break;
                    }
                }

                _entity.OidExpediente = _expedient.Oid;
                _entity.Expediente    = _expedient.Codigo;
            }
            else
            {
                _entity.OidExpediente = 0;
                _entity.Expediente    = string.Empty;
            }

            Expediente_TB.Text = _entity.Expediente;
        }