예제 #1
0
        public override void OpenAddForm()
        {
            if (CurrentEntidad == null)
            {
                PgMng.ShowInfoException(Library.Hipatia.Resources.Messages.NO_ENTIDAD_SELECTED);
                _action_result = DialogResult.Ignore;
                return;
            }

            AgenteSelectForm f = new AgenteSelectForm(this, CurrentEntidad);

            if (f.ShowDialog() == DialogResult.Cancel)
            {
                _action_result = DialogResult.Ignore;
                return;
            }

            AgenteAddForm form = new AgenteAddForm(CurrentEntidad, f.Selected as IAgenteHipatia, this);

            AddForm(form);
            _entity = form.Entity;
        }
        public override void ExportPDFAction()
        {
            if (ActiveItem == null)
            {
                return;
            }

            try
            {
                PgMng.Reset(7, 1, Face.Resources.Messages.RETRIEVING_DATA, this);

                OutputDeliveryReportMng reportMng = new OutputDeliveryReportMng(AppContext.ActiveSchema, this.Text, this.FilterValues);

                SerieInfo serie = SerieInfo.Get(ActiveItem.OidSerie, false);
                PgMng.Grow();

                ClienteInfo cliente = ClienteInfo.Get(ActiveItem.OidHolder, false);
                PgMng.Grow();

                FormatConfFacturaAlbaranReport conf = new FormatConfFacturaAlbaranReport();

                conf.nota            = (cliente.OidImpuesto == 1) ? Library.Invoice.Resources.Messages.NOTA_EXENTO_IGIC : string.Empty;
                conf.nota           += Environment.NewLine + (ActiveItem.Nota ? serie.Cabecera : "");
                conf.cuenta_bancaria = ActiveItem.CuentaBancaria;
                PgMng.Grow();

                OutputDeliveryInfo item = OutputDeliveryInfo.Get(ActiveOID, ActiveItem.EHolderType, true);
                PgMng.Grow();

                ReportClass rpt = reportMng.GetDetailReport(item, conf);
                PgMng.Grow();

                ExportPDF(rpt, ActiveItem.FileName);
            }
            finally
            {
                PgMng.FillUp();
            }
        }
예제 #3
0
        /// <summary>
        /// Guarda en la bd el objeto actual
        /// </summary>
        protected override bool SaveObject()
        {
            this.Datos.RaiseListChangedEvents = false;


            // do the save
            try
            {
                if (_holder != null)
                {
                    //IAcreedor temp = _acreedor.IClone();
                    //temp.ApplyEdit();
                    //_acreedor = temp.ISave(_entity);
                    //_acreedor.ApplyEdit();

                    _holder.ApplyEdit();
                    _holder.ISave(_entity);
                    _holder.BeginEdit();
                }
                else
                {
                    Payment temp = _entity.Clone();
                    temp.ApplyEdit();
                    _entity = temp.Save();
                    _entity.ApplyEdit();
                }

                return(true);
            }
            catch (Exception ex)
            {
                PgMng.ShowWarningException(ex.Message);
                return(false);
            }
            finally
            {
                this.Datos.RaiseListChangedEvents = true;
            }
        }
예제 #4
0
        public override void RefreshSecondaryData()
        {
            Preguntas_TB.Text = _entity.PreguntaExamens.Count.ToString();
            PgMng.Grow(string.Empty, "Preguntas_TB");

            Desarrollo_CB.Checked = _entity.Desarrollo;
            PgMng.Grow(string.Empty, "Desarrollo_CB");

            if (Entity != null && Entity.OidModulo != 0)
            {
                _modulo = ModuloInfo.Get(Entity.OidModulo, false);
                PgMng.Grow(string.Empty, "_modulo");
                _submodulos = SubmoduloList.GetModuloList(_modulo.Oid, false);
                PgMng.Grow(string.Empty, "_submodulos");
                _temas = TemaList.GetModuloList(_modulo.Oid, false);
                PgMng.Grow(string.Empty, "_temas");
            }
            PgMng.Grow();

            base.RefreshSecondaryData();
            PgMng.Grow();
        }
        public override void OpenEditForm()
        {
            try
            {
                Library.Common.EntityBase.CheckEditAllowedEstado(ActiveItem.EEstado, EEstado.Abierto);
            }
            catch (iQException ex)
            {
                PgMng.ShowInfoException(ex);
                _action_result = DialogResult.Ignore;
                return;
            }

            InvoiceEditForm form = new InvoiceEditForm(ActiveOID, this);

            if (form.Entity != null)
            {
                AddForm(form);
                _entity        = form.Entity;
                _action_result = DialogResult.OK;
            }
        }
예제 #6
0
        protected override void PrintAction()
        {
            PgMng.Reset(4, 1, Face.Resources.Messages.RETRIEVING_DATA, this);

            Library.Invoice.QueryConditions conditions = new Library.Invoice.QueryConditions();
            conditions.Cliente  = TodosCliente_CkB.Checked ? null : _cliente;
            conditions.Familia  = TodosFamilia_CkB.Checked ? null : _familia;
            conditions.Producto = TodosProducto_CkB.Checked ? null : _producto;;
            conditions.FechaIni = FInicial_DTP.Checked ? FInicial_DTP.Value : DateTime.MinValue;;
            conditions.FechaFin = FFinal_DTP.Checked ? FFinal_DTP.Value : DateTime.MaxValue;
            conditions.Order    = (Ascendente_RB.Checked) ? ListSortDirection.Ascending : ListSortDirection.Descending;

            string filtro = GetFilterValues();

            if (Cliente_RB.Checked)
            {
                VentasList ventas = VentasList.GetHistoricoPreciosClientesList(conditions);
                PgMng.Grow();

                CommonReportMng rptMng = new CommonReportMng(AppContext.ActiveSchema, this.Text, filtro);
                InformeHistoricoPreciosClientesRpt rpt = rptMng.GetInformeHistoricoPreciosClientesReport(ventas);
                PgMng.FillUp();

                ShowReport(rpt);
            }
            else
            {
                VentasList ventas = VentasList.GetHistoricoPreciosProductosList(conditions);
                PgMng.Grow();

                CommonReportMng rptMng = new CommonReportMng(AppContext.ActiveSchema, this.Text, filtro);
                InformeHistoricoPreciosProductosRpt rpt = rptMng.GetInformeHistoricoPreciosProductosReport(ventas);
                PgMng.FillUp();

                ShowReport(rpt);
            }

            _action_result = DialogResult.Ignore;
        }
예제 #7
0
        public override void OpenEditForm()
        {
            try
            {
                OutputInvoiceInfo factura = OutputInvoiceInfo.Get(ActiveItem.OidFactura, false);
                EntityBase.CheckEditAllowedEstado(factura.EEstado, EEstado.Abierto);
            }
            catch (iQException ex)
            {
                PgMng.ShowInfoException(ex);
                _action_result = DialogResult.Ignore;
                return;
            }

            InvoiceEditForm form = new InvoiceEditForm(ActiveItem.OidFactura, this);

            if (form.Entity != null)
            {
                AddForm(form);
                _action_result = DialogResult.OK;
            }
        }
        protected override void ResumenAction()
        {
            if (_entity == null)
            {
                return;
            }
            List <RegistroResumenPlanDocente> lista_extras = null;

            PgMng.Reset(1, 1, Resources.Messages.LOADING_DATA, this);
            try
            {
                lista_extras = RegistroResumenPlanDocente.ContabilizaClasesExtra(_entity.Oid);
            }
            finally
            {
                PgMng.FillUp();
            }

            ResumenPlanExtraForm form = new ResumenPlanExtraForm(true, lista_extras, this);

            form.ShowDialog();
        }
        /// <summary>
        /// Asigna el objeto principal al origen de datos
        /// <returns>void</returns>
        /// </summary>
        protected override void RefreshMainData()
        {
            //_timer.Record("RefreshMainData begin");

            Datos.DataSource = _entity;
            if (_entity.OidProducto > 0)
            {
                ProductoInstruccion_TB.Text = _productos.GetItem(_entity.OidProducto).Nombre;
            }
            if (_entity.OidSerie > 0)
            {
                SerieInstruccion_TB.Text = _series.GetItem(_entity.OidSerie).Nombre;
            }
            PgMng.Grow();

            Datos_Clases.DataSource = _entity.CExtras;
            PgMng.Grow();

            base.RefreshMainData();
            PgMng.FillUp();
            //_timer.Record("RefreshMainData end");
        }
예제 #10
0
        protected override void LoadRegistroEmailsAction()
        {
            if (_entity.Emails == null)
            {
                try
                {
                    PgMng.Reset(4, 1, Face.Resources.Messages.LOADING_DATA, this);

                    PgMng.Grow();

                    _entity.LoadChilds(typeof(LineaRegistro), false);
                    PgMng.Grow();

                    Datos_Emails.DataSource = _entity.Emails;
                    PgMng.Grow();
                }
                finally
                {
                    PgMng.FillUp();
                }
            }
        }
예제 #11
0
        protected override void LoadPreciosAction()
        {
            if (_entity.Productos == null || _entity.Productos.Count == 0)
            {
                try
                {
                    PgMng.Reset(4, 1, Face.Resources.Messages.LOADING_DATA, this);

                    PgMng.Grow();

                    _entity.LoadChilds(typeof(ProductoCliente), false);
                    PgMng.Grow();

                    Datos_ProductoCliente.DataSource = _entity.Productos;
                    PgMng.Grow();
                }
                finally
                {
                    PgMng.FillUp();
                }
            }
        }
예제 #12
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.LoadSchema:
                    BkLoadSchema(bk);
                    break;

                default:
                    base.BackGroundJob(bk);
                    break;
                }
            }
            catch (Exception ex)
            {
                CancelBackGroundJob();
                PgMng.ShowInfoException(ex.Message);
                PgMng.FillUp();
            }
        }
        protected override void NewLineaFomentoAction()
        {
            BatchList lista = BatchList.GetList(_entity.Partidas);

            BatchSelectForm form = new BatchSelectForm(this, lista);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                BatchInfo partida = form.Selected as BatchInfo;

                partida = lista.GetPartidaAgrupada(partida);

                try
                {
                    _entity.ExpedientesFomento.NewItem(_entity, partida);
                }
                catch (iQException ex)
                {
                    PgMng.ShowInfoException(ex);
                }
            }
        }
        public override void RefreshSecondaryData()
        {
            base.RefreshSecondaryData();

            _planes = PlanEstudiosList.GetList(false);
            PgMng.Grow(string.Empty, "Planes de Estudio");

            _combo_planes = new Library.Instruction.HComboBoxSourceList(_planes);
            PgMng.Grow(string.Empty, "ComboBox Planes de Estudio");

            _promociones = PromocionList.GetList(false);
            PgMng.Grow(string.Empty, "Promociones");

            _combo_planes.Childs = new Library.Instruction.HComboBoxSourceList(_promociones);
            PgMng.Grow(string.Empty, "ComboBox de Promociones");

            Datos_Planes.DataSource = _combo_planes;
            PgMng.Grow(string.Empty, "Datos_Planes");

            _no_asignables = new List <SesionNoAsignable>();
            PgMng.Grow();
        }
        protected override void ChangeFicha()
        {
            if (Ficha_TP.SelectedTab == Capacitacion_TP)
            //||
            //   (Ficha_TP.SelectedTab == Autorizados_TP))
            {
                if (_modulos == null)
                {
                    PgMng.Reset(4, 1, Resources.Messages.LOADING_DATA, this);

                    _modulos                 = ModuloList.GetList(false);
                    _combo_modulos           = new Library.Instruction.HComboBoxSourceList(ModuloList.SortList(_modulos, "NumeroOrden", ListSortDirection.Ascending));
                    Datos_Modulos.DataSource = _combo_modulos;
                    PgMng.Grow(string.Empty, "Modulos");

                    _submodulos                 = SubmoduloList.GetList(false);
                    _combo_modulos.Childs       = new Library.Instruction.HComboBoxSourceList(SubmoduloList.SortList(_submodulos, "CodigoOrden", ListSortDirection.Ascending));
                    Datos_Submodulos.DataSource = _combo_modulos.Childs;
                    PgMng.Grow(string.Empty, "Submodulos");

                    _promociones = PromocionList.GetList(false);
                    Library.Instruction.HComboBoxSourceList _combo_promociones = new Library.Instruction.HComboBoxSourceList(PromocionList.SortList(_promociones, "Nombre", ListSortDirection.Ascending));
                    Datos_Promociones_CB.DataSource = _combo_promociones;
                    PgMng.Grow(string.Empty, "Promociones");

                    _instructores = InstructorList.GetList(false);
                    Library.Instruction.HComboBoxSourceList _combo_instructores = new Library.Instruction.HComboBoxSourceList(InstructorList.SortList(_instructores, "Apellidos", ListSortDirection.Ascending));
                    Datos_Instructores.DataSource = _combo_instructores;
                    PgMng.FillUp(string.Empty, "Instructores");
                }

                if (Ficha_TP.SelectedTab == Capacitacion_TP)
                {
                    LoadChildsAction(typeof(Submodulo_Instructor_Promocion));
                }
                //if (Ficha_TP.SelectedTab == Autorizados_TP) LoadChildsAction(typeof(Submodulo_Instructor));
            }
        }
        protected void RefreshHorario()
        {
            try
            {
                PgMng.Reset(7, 1, Resources.Messages.UPDATING_PROMOCION_HORARIO, this);

                for (int i = 1; i < 3; i++)
                {
                    _practicas[i] = ClasePracticaList.GetDisponiblesList(Entity.OidPlan, Entity.OidPromocion, Entity.Oid, i);
                }
                _teoricas = ClaseTeoricaList.GetDisponiblesList(Entity.OidPlan, Entity.OidPromocion, Entity.Oid);
                _extras   = ClaseExtraList.GetDisponiblesList(Entity.OidPromocion, Entity.Oid);
                PgMng.Grow(string.Empty, "clases");

                _instructores_asignados = Sesion.CargaSesionesProfesores(Entity.FechaInicial, Entity.OidPromocion);
                _profesores             = InstructorList.GetInstructoresHorariosList(EntityInfo.OidPromocion, EntityInfo.FechaInicial, EntityInfo.FechaFinal);

                _disponibilidades = _profesores.GetDisponibilidadesProfesores(_entity.FechaInicial);
                PgMng.Grow(string.Empty, "Instructores y profesores");

                //Se rellena el horario

                //_lista_sesiones = new ListaSesiones(Entity.FechaInicial);
                //ResetSesiones(false);
                PgMng.Grow(string.Empty, "lista sesiones");

                Horario.MuestraSesiones(Entity.Sesions, _lista_sesiones, _teoricas, ClasePracticaList.Merge(_practicas[1], _practicas[2]), _extras);

                _combo_clases           = Submodulo.GetComboClases(_teoricas, ClasePracticaList.Merge(_practicas[1], _practicas[2]), _extras);
                _combo_clases.Childs    = _combo_instructores;
                Datos_Clases.DataSource = _combo_clases;
                PgMng.Grow(string.Empty, "combo_clases");
            }
            finally
            {
                PgMng.FillUp();
            }
        }
        /// <summary>
        /// Guarda en la bd el objeto actual
        /// </summary>
        protected override bool SaveObject()
        {
            this.Datos.RaiseListChangedEvents = false;

            try
            {
                //Creamos la cache con los expedientes implicados
                //Expedients exps = Expedients.GetListFromList(_oidExpedientes, false);
                PgMng.Grow();

                /*foreach (Expediente item in exps)
                 * {
                 *      item.LoadChildsFromList(typeof(Batch), _oidPartidas, false);
                 *      item.LoadChildsFromList(typeof(Stock), _oidPartidas, false);
                 * }
                 * PgMng.Grow();*/

                //Cache.Instance.Save(typeof(Expedients), exps);
                PgMng.Grow();

                Pedido 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;
            }
        }
예제 #18
0
        protected void BkGetFormData(BackgroundWorker bk)
        {
            try
            {
                EnableEvents(false);
#if TRACE
                PgMng.Record("ManagerForm::RefreshSecondaryData INI");
#endif
                RefreshSecondaryData();
                PgMng.Grow(string.Empty, "ManagerForm::RefreshSecondaryData END");
#if TRACE
                PgMng.Record("ManagerForm::RefreshMainData INI");
#endif
                RefreshMainData();
                PgMng.Grow(string.Empty, "ManagerForm::RefreshMainData END");
#if TRACE
                PgMng.Record("ManagerForm::BuildCache INI");
#endif
                BuildCache();
                PgMng.Grow();
#if TRACE
                PgMng.Record("ManagerForm::BuildCache END");
#endif
            }

            /*catch (System.Security.SecurityException ex)
             * {
             *                  PgMng.ShowInfoException(ex);
             *          }*/
            catch (Exception ex)
            {
                PgMng.ShowInfoException(ex);
            }
            finally
            {
                EnableEvents(true);
            }
        }
        public override void RefreshSecondaryData()
        {
            PromocionList promociones = PromocionList.GetList(false);

            _combo_promociones = new Library.Instruction.HComboBoxSourceList(promociones);

            Datos_Promociones.DataSource = _combo_promociones;
            PgMng.Grow();

            _alumnos = AlumnoList.GetList(false);
            _combo_promociones.Childs = new Library.Instruction.HComboBoxSourceList(_alumnos);

            Datos_ComboAlumnos.DataSource = _combo_promociones.Childs;
            PgMng.Grow();

            _combo_tipo = new Library.Instruction.HComboBoxSourceList();
            _combo_tipo.Add(new ComboBoxSource());
            _combo_tipo.Add(new ComboBoxSource(1, "Curso"));
            _combo_tipo.Add(new ComboBoxSource(2, "Módulo"));

            Datos_Tipo.DataSource = _combo_tipo;
            PgMng.Grow();
        }
        /// <summary>
        /// Asigna el objeto principal al origen de datos
        /// <returns>void</returns>
        /// </summary>
        protected override void RefreshMainData()
        {
            Datos.DataSource = _entity;
            PgMng.Grow();

            Datos_Alumnos_Promociones.DataSource = _entity.Promociones;
            PgMng.Grow();

            Datos_Alumno_Examen.DataSource = _entity.AlumnoExamens;
            PgMng.Grow();

            Datos_Alumno_Practica.DataSource = _entity.AlumnosPracticas;
            PgMng.Grow();

            FCriteria <bool> criteria = new FCriteria <bool>("Falta", true);

            Datos_Alumno_Parte.DataSource = _entity.AlumnoPartes.GetSubList(criteria);
            PgMng.Grow();


            base.RefreshMainData();
            PgMng.FillUp();
        }
예제 #21
0
        protected bool SaveObject()
        {
            this.Datos.RaiseListChangedEvents = false;

            // do the save
            try
            {
                _holder.ApplyEdit();
                _holder.ISave(_entity);
                _holder.BeginEdit();

                return(true);
            }
            catch (Exception ex)
            {
                PgMng.ShowErrorException(ex);
                return(false);
            }
            finally
            {
                this.Datos.RaiseListChangedEvents = true;
            }
        }
예제 #22
0
        protected override void NewLineAction(bool stock)
        {
            if (_entity.OidSerie == 0)
            {
                PgMng.ShowInfoException(Resources.Messages.NO_SERIE_SELECTED);
                return;
            }

            if (_entity.OidAcreedor == 0)
            {
                PgMng.ShowInfoException(Resources.Messages.SELECT_HOLDER);
                return;
            }

            _provider = Providers_BS.Current as ProviderBaseInfo;

            InputDeliveryLineAddForm form = new InputDeliveryLineAddForm(_entity, _serie, _provider, this);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                _entity.CalculateTotal();
            }
        }
예제 #23
0
        protected override void RemoveStockAction()
        {
            if (Stock_DGW.CurrentRow == null)
            {
                return;
            }

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

            if ((stock.OidAlbaran != 0) || (stock.Inicial))
            {
                PgMng.ShowInfoException(Resources.Messages.STOCK_FACTURADO);
                return;
            }

            if (PgMng.ShowDeleteConfirmation() == DialogResult.No)
            {
                return;
            }

            _entity.RemoveStock(stock);
            ActualizaBindings();
        }
예제 #24
0
        protected override void LoadPartidas(ProductInfo producto)
        {
            if (producto == null)
            {
                return;
            }

            try
            {
                PgMng.Reset(4, 1, Face.Resources.Messages.LOADING_DATA, this);
                PgMng.Grow();

                _entity.LoadPartidasByProducto(producto.Oid, true);
                PgMng.Grow();

                ActualizaBindings();
                PgMng.Grow();
            }
            finally
            {
                PgMng.FillUp();
            }
        }
예제 #25
0
        protected override void EditCobroAction()
        {
            bool locked = false;

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

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

            CobroFacturaEditForm form = new CobroFacturaEditForm(_entity, Cobro, locked, this);

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

            RefreshAction();
        }
        protected override void RefreshMainData()
        {
            PgMng.Grow(string.Empty, "Producto");

            _selectedOid = ActiveOID;

            switch (DataType)
            {
            case EntityMngFormTypeData.Default:
                switch (_tipo)
                {
                case ETipoProducto.Todos:
                    List = ProductList.GetList(false);
                    break;

                case ETipoProducto.Kit:
                    List = ProductList.GetKitList(true, false);
                    break;
                }
                break;
            }
            PgMng.Grow(string.Empty, "Lista de Productos");
        }
예제 #27
0
        protected virtual void LoadIncomes(bool reload = false)
        {
            LoadIncomes(EntityInfoNoChilds.Oid);

            if (_works_output_invoices == null || reload)
            {
                try
                {
                    PgMng.Reset(3, 1, Face.Resources.Messages.LOADING_DATA, this);

                    _works_output_invoices = OutputInvoiceList.GetByExpedienteList(EntityInfo.Relations.ToChildsOidList(), false);
                    PgMng.Grow();

                    BeWorksPurchases_NTB.Text = (_works_output_invoices != null) ? _works_output_invoices.TotalExpediente().ToString("C2") : (0).ToString("C2");

                    CalculateBeneficios();
                }
                finally
                {
                    PgMng.FillUp();
                }
            }
        }
예제 #28
0
 protected override void LoadStock()
 {
     if (_entity.Stocks.Count == 0)
     {
         PgMng.Reset(3, 1, Face.Resources.Messages.LOADING_DATA, this);
         try
         {
             PgMng.Grow();
             _entity.LoadChilds(typeof(Stock), true, false);
             string stock_warning = _entity.GetStockWarning();
             if (stock_warning != string.Empty)
             {
                 PgMng.ShowInfoException(stock_warning);
             }
             PgMng.Grow();
         }
         finally
         {
             PgMng.FillUp();
         }
     }
     SelectStockAction(Datos_Productos.Current as ProductInfo);
 }
        /// <summary>
        /// Implementa Save_button_Click
        /// </summary>
        protected override void SubmitAction()
        {
            if (((ComboBoxSource)Tema_O_CB.SelectedItem).Oid == 0 ||
                ((ComboBoxSource)Tema_D_CB.SelectedItem).Oid == 0)
            {
                MessageBox.Show("Debe seleccionar temas de origen y destino válidos");
                return;
            }

            if (((ComboBoxSource)Tema_O_CB.SelectedItem).Oid ==
                ((ComboBoxSource)Tema_D_CB.SelectedItem).Oid)
            {
                MessageBox.Show("Debe seleccionar temas de origen y destino diferentes");
                return;
            }

            Tema.CompletaDuplicado(((ComboBoxSource)Tema_O_CB.SelectedItem).Oid, ((ComboBoxSource)Tema_D_CB.SelectedItem).Oid);

            PgMng.ShowInfoException(Resources.Messages.TEMA_DUPLICADO_OK);

            _action_result = DialogResult.OK;
            Close();
        }
예제 #30
0
        /// <summary>
        /// Asigna el objeto principal al origen de datos
        /// <returns>void</returns>
        /// </summary>
        protected override void RefreshMainData()
        {
            if (_entity == null)
            {
                return;
            }

            Datos.DataSource = _entity;

            PartidaList lista;

            lista = PartidaList.GetListBySerie(_serie.Oid, false, true);

            _partida = lista.GetItem(_entity.OidPartida);

            Datos_Partida.DataSource = _partida;

            PgMng.Grow();

            base.RefreshMainData();

            EnableKilos();
        }