public override void RefreshSecondaryData()
        {
            PgMng.Grow();

            Preguntas_TB.Text = _entity.PreguntaExamenes.Count.ToString();
            PgMng.Grow();

            Desarrollo_CB.Checked = _entity.Desarrollo;
            PgMng.Grow();

            if (EntityInfo != null && EntityInfo.OidModulo != 0)
            {
                _modulo = ModuloInfo.Get(EntityInfo.OidModulo, false);
                PgMng.Grow(string.Empty, "_modulo");

                _preguntas_modulo = PreguntaList.GetPreguntasModulo(_modulo.Oid);
                PgMng.Grow(string.Empty, "_preguntas");

                _temas = TemaList.GetModuloList(_modulo.Oid, false);
                PgMng.Grow(string.Empty, "_temas");

                _submodulos = SubmoduloList.GetModuloList(_modulo.Oid, false);
                PgMng.Grow(string.Empty, "_submodulos");

                RellenaPreguntas();
            }
            PgMng.Grow();

            base.RefreshSecondaryData();
            PgMng.Grow();
        }
        protected virtual void LoadPartidasAction()
        {
            try
            {
                if (Cache.Instance.Get(typeof(BatchList)) != null)
                {
                    return;
                }

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

                Batch_BS.DataSource = BatchList.GetByProductList(EntityInfo.Oid, false);
                Cache.Instance.Save(typeof(BatchList), Batch_BS.DataSource as BatchList);
                PgMng.Grow();

                HideComponentes(Partidas_TP);

                ControlsMng.UpdateBinding(Batch_BS);
            }
            finally
            {
                PgMng.FillUp();
            }
        }
Beispiel #3
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);
            }
        }
Beispiel #4
0
        private void DoDownload(BackgroundWorker bk)
        {
            PgMng.Grow(Resources.Messages.CONNECTING_SERVER);

            if (_ftp == null)
            {
                _ftp = new FtpClient(Principal.GetHipatiaFTPHost(), Principal.GetHipatiaFTPUser(), Principal.GetHipatiaFTPPwd(), Principal.GetHipatiaFTPRootPath());
                HipatiaCtl.InitHipatia(_ftp, Principal.GetHipatiaFTPRootPath(), Principal.GetHipatiaFTPHost());
            }
            PgMng.Grow();

            if (HipatiaCtl.ExistsDirectory(_ftp, CurrentDocumento.Ruta))
            {
                PgMng.Message = Resources.Messages.DOWNLOADING_FILE;
                PgMng.Grow();
                _ftp.DownloadFile(Path.GetDirectoryName(CurrentDocumento.Ruta), DestinationPath, Path.GetFileName(CurrentDocumento.Nombre));
                PgMng.Message = Resources.Messages.CLOSING_SERVER;
                PgMng.Grow();
                PgMng.Result = BGResult.OK;
            }
            else
            {
                PgMng.Result = BGResult.Error;
                throw new iQException(Resources.Errors.FILE_NOT_FOUND);
            }
        }
Beispiel #5
0
        protected override void ViewAction()
        {
            if (CurrentDocumento == null)
            {
                return;
            }

            _destination_path = System.Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);

            _back_job = BackJob.Download;
            PgMng.Reset(6, 1, Resources.Messages.CONNECTING_SERVER, this);
            //PgMng.StartBackJob(this);
            DoJob();

            PgMng.Grow();
            if (PgMng.Result == BGResult.OK)
            {
                System.Diagnostics.Process process = new System.Diagnostics.Process();
                process.StartInfo.FileName = TempFile;
                process.Start();
                PgMng.FillUp();
                try
                {
                    process.WaitForExit();
                }
                catch { }

                File.Delete(TempFile);
            }
            else
            {
                PgMng.FillUp();
            }
        }
        /// <summary>
        /// Implementa Save_button_Click
        /// </summary>
        protected override void BkSubmitAction()
        {
            PgMng.Reset(4, 1, Face.Resources.Messages.RETRIEVING_DATA);

            long oid_auditoria = TodosAuditorias_CkB.Checked ? -1 : _auditoria.Oid;
            long oid_plan      = TodosPlanes_CkB.Checked ? -1 : _plan.Oid;

            _estado = !TodosEstados_CkB.Checked ? EstadoAuditoria.CREADA : (EstadoAuditoria)Enum.Parse(typeof(EstadoAuditoria), Estado_CB.Text);
            long     estado         = TodosEstados_CkB.Checked ? -1 : (long)_estado;
            DateTime f_ini          = FInicial_DTP.Checked ? FInicial_DTP.Value : DateTime.MinValue;
            DateTime f_fin          = FFinal_DTP.Checked ? FFinal_DTP.Value : DateTime.MaxValue;
            DateTime f_comunicacion = FComunicacion_DTP.Checked ? FComunicacion_DTP.Value : DateTime.MinValue;

            string filtro = GetFilterValues();

            PgMng.Grow();

            moleQule.Library.Application.Tools.WordExporter word = new moleQule.Library.Application.Tools.WordExporter();

            AuditoriaList lista = AuditoriaList.GetAbiertasList(oid_auditoria, oid_plan, estado, f_ini, f_fin, f_comunicacion, FInicial_DTP.Checked, FFinal_DTP.Checked, FComunicacion_DTP.Checked);

            word.ExportSeguimientoAuditorias(lista);
            PgMng.FillUp();

            _action_result = DialogResult.Ignore;
        }
Beispiel #7
0
        /// <summary>
        /// Asigna el objeto principal al origen de datos
        /// <returns>void</returns>
        /// </summary>
        protected override void RefreshMainData()
        {
            Datos.DataSource = _entity;
            PgMng.Grow(string.Empty, "Datos");

            //SetDependentControlSource(Fecha_DTP.Name);
            //PgMng.Grow(string.Empty, "Esquema de datos Fecha del Horario");

            SetDependentControlSource(Horario_GB.Name);
            PgMng.Grow(string.Empty, "Esquema de Datos de Horario");

            relleno_automatico = false;

            Lunes_LB.Text = "LUNES (" + EntityInfo.FechaInicial.Day.ToString("00") + "/" +
                            EntityInfo.FechaInicial.Month.ToString("00") + ")";
            Martes_LB.Text = "MARTES (" + EntityInfo.FechaInicial.AddDays(1).Day.ToString("00") + "/" +
                             EntityInfo.FechaInicial.AddDays(1).Month.ToString("00") + ")";
            Miercoles_LB.Text = "MIÉRCOLES (" + EntityInfo.FechaInicial.AddDays(2).Day.ToString("00") + "/" +
                                EntityInfo.FechaInicial.AddDays(2).Month.ToString("00") + ")";
            Jueves_LB.Text = "JUEVES (" + EntityInfo.FechaInicial.AddDays(3).Day.ToString("00") + "/" +
                             EntityInfo.FechaInicial.AddDays(3).Month.ToString("00") + ")";
            Viernes_LB.Text = "VIERNES (" + EntityInfo.FechaInicial.AddDays(4).Day.ToString("00") + "/" +
                              EntityInfo.FechaInicial.AddDays(4).Month.ToString("00") + ")";
            Sabado_LB.Text = "SÁBADO (" + EntityInfo.FechaInicial.AddDays(5).Day.ToString("00") + "/" +
                             EntityInfo.FechaInicial.AddDays(5).Month.ToString("00") + ")";
        }
        public override void RefreshSecondaryData()
        {
            if (_entity.OidSerie != 0)
            {
                SetSerie(SerieInfo.Get(_entity.OidSerie, false), false);
            }
            PgMng.Grow();

            if (_entity.OidAcreedor != 0)
            {
                SetAcreedor(ProviderBaseInfo.Get(_entity.OidAcreedor, _entity.ETipoAcreedor, false));
            }
            PgMng.Grow();

            if (_entity.OidAlmacen != 0)
            {
                SetAlmacen(StoreInfo.Get(_entity.OidAlmacen, false));
            }
            PgMng.Grow();

            if (_entity.OidExpediente != 0)
            {
                SetExpediente(ExpedientInfo.Get(_entity.OidExpediente, false));
            }
            PgMng.Grow();

            if (_acreedor != null)
            {
                ProductList.GetList(_acreedor, _serie, false, true);
            }
        }
Beispiel #9
0
        protected override void RefreshMainData()
        {
            if (_practicas.Count == 0)
            {
                for (int i = 0; i < 3; i++)
                {
                    _practicas.Add(null);
                }
            }

            for (int i = 1; i < 3; i++)
            {
                _practicas[i] = ClasePracticaList.GetDisponiblesList(EntityInfo.Oid, OidPromocion, 0, i);
                PgMng.Grow();
            }

            _teoricas = ClaseTeoricaList.GetDisponiblesList(EntityInfo.Oid, OidPromocion, 0);
            PgMng.Grow();

            _lista = new ListaClases();
            RellenaLista();
            PgMng.FillUp();

            Datos_Clases.DataSource = _lista;
        }
        public override void DownloadAction()
        {
            PgMng.Reset(5, 1, Resources.Messages.CONNECTING_SERVER, this);

            HipatiaCtl.InitHipatia(_ftp, Principal.GetHipatiaFTPRootPath(), Principal.GetHipatiaFTPHost());
            PgMng.Grow();

            if (HipatiaCtl.ExistsDirectory(_ftp, ActiveItem.Ruta))
            {
                if (Browser.ShowDialog() == DialogResult.OK)
                {
                    string destinationPath = Browser.SelectedPath;
                    string tempFile        = destinationPath + "\\" + System.Web.HttpUtility.UrlEncode(ActiveItem.Nombre);

                    PgMng.Message = Resources.Messages.DOWNLOADING_FILE;
                    PgMng.Grow();
                    _ftp.DownloadFile(Path.GetDirectoryName(ActiveItem.Ruta), destinationPath, Path.GetFileName(ActiveItem.Nombre));
                    PgMng.Message = Resources.Messages.CLOSING_SERVER;
                    PgMng.Grow();
                    PgMng.Result = BGResult.OK;
                }
            }
            else
            {
                PgMng.Result = BGResult.Error;
                throw new iQException(Resources.Errors.FILE_NOT_FOUND);
            }

            PgMng.FillUp();
        }
        public override void RefreshSecondaryData()
        {
            Datos_MedioPago.DataSource = Library.Common.EnumText <EMedioPago> .GetList(false, true);

            MedioPago_CB.SelectedValue = (long)EMedioPago.Todos;
            PgMng.Grow();
        }
        protected override void RefreshMainData()
        {
            PgMng.Grow(string.Empty, "Documento");

            _selectedOid = ActiveOID;

            switch (DataType)
            {
            case EntityMngFormTypeData.Default:
                if (CurrentEntidad != null)
                {
                    List = DocumentoList.GetListByEntidad(CurrentEntidad);
                }
                else
                {
                    List = DocumentoList.GetListByEntidad(null);
                }
                break;

            case EntityMngFormTypeData.ByParameter:
                _sorted_list = List.GetSortedList();
                break;
            }

            PgMng.Grow(string.Empty, "Lista de Documentos");
        }
        protected override void DeleteLineAction()
        {
            if (Lines_BS.Current == null)
            {
                return;
            }

            if (ProgressInfoMng.ShowQuestion(Face.Resources.Messages.DELETE_CONFIRM) == DialogResult.Yes)
            {
                if (Concepto.OidPedido == 0)
                {
                    PgMng.Reset(4, 1, Store.Resources.Messages.UPDATING_STOCK, this);

                    if (Concepto.OidPartida != 0)
                    {
                        BatchInfo partida = BatchInfo.Get(Concepto.OidPartida, true);
                        PgMng.Grow();

                        if (partida.IsKit)
                        {
                            DeleteKit(partida);
                        }
                        PgMng.Grow();
                    }

                    _entity.Conceptos.Remove(Concepto, true);
                    _entity.CalculateTotal();
                    PgMng.Grow();
                }
                else
                {
                    long oidPedido = Concepto.OidPedido;

                    _entity.Conceptos.Remove(Concepto, true);
                    _entity.CalculateTotal();

                    bool free_pedido = true;

                    foreach (OutputDeliveryLine item in _entity.Conceptos)
                    {
                        if (item.OidPedido == Concepto.OidPedido)
                        {
                            free_pedido = false;
                        }
                    }

                    //Actualizamos la lista de pedidos disponibles
                    if (free_pedido)
                    {
                        _pedidos.AddItem(_pedidos_cliente.GetItem(oidPedido));
                    }
                }

                ControlsMng.UpdateBinding(Lines_BS);
                ControlsMng.UpdateBinding(Datos);
                PgMng.FillUp();
            }

            Serie_BT.Enabled = (_entity.Conceptos.Count > 0);
        }
        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();
            }
        }
Beispiel #15
0
 protected virtual void AcceptAction()
 {
     using (StatusBusy st = new StatusBusy(Resources.Messages.LOADING_DATA))
     {
         using (ProgressInfoMng bar = new ProgressInfoMng())
         {
             try
             {
                 PgMng.Grow();
                 PrintAction();
                 DialogResult = DialogResult.OK;
                 Close();
             }
             catch (Exception ex)
             {
                 MessageBox.Show(iQExceptionHandler.GetAllMessages(ex),
                                 Labels.APP_TITLE,
                                 MessageBoxButtons.OK,
                                 MessageBoxIcon.Exclamation);
             }
             finally
             {
                 PgMng.FillUp();
             }
         }
     }
 }
Beispiel #16
0
        protected override void RefreshMainData()
        {
            PgMng.Grow(string.Empty, "LineaRegistro");

            long oid = ActiveOID;

            switch (DataType)
            {
            case EntityMngFormTypeData.Default:
                if (Library.Common.ModulePrincipal.GetUseActiveYear())
                {
                    List = LineaRegistroList.GetList(_tipo, Library.Common.ModulePrincipal.GetActiveYear().Year, false);
                }
                else
                {
                    List = LineaRegistroList.GetList(_tipo, false);
                }
                break;

            case EntityMngFormTypeData.ByParameter:
                _sorted_list = List.GetSortedList();
                break;
            }
            PgMng.Grow(string.Empty, "Lista de LineaRegistros");
        }
Beispiel #17
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();
            }
        }
        protected override void LoadWorkReports(bool reload = false)
        {
            if (_work_reports == null || reload)
            {
                PgMng.Reset(4, 1, Face.Resources.Messages.LOADING_DATA, this);
                try
                {
                    _work_reports            = WorkReportList.GetByExpedientList(_entity.Oid, false);
                    WorkReport_BS.DataSource = _work_reports;

                    PgMng.Grow(string.Empty);

                    _work_reports_works = WorkReportList.GetByExpedientList(_entity.Relations.ToChildsOidList(), false);

                    PgMng.Grow(string.Empty);

                    UpdateWorkReportsTotals();

                    PgMng.Grow(string.Empty);
                }
                finally
                {
                    PgMng.FillUp();
                }
            }
        }
Beispiel #19
0
        /// <summary>
        /// Asigna el objeto principal al origen de datos
        /// <returns>void</returns>
        /// </summary>
        protected override void RefreshMainData()
        {
            Datos.DataSource = _entity;

            Batchs pes = _expediente.Partidas;
            ProductoProveedorList ppl = _proveedor.Productos;

            PgMng.Grow();

            List <ProductoProveedorInfo> lista = new List <ProductoProveedorInfo>();

            foreach (ProductoProveedorInfo ppi in ppl)
            {
                if (!(pes.ContainsProducto(ppi.OidProducto) && pes.ContainsProveedor(_proveedor.Oid)))
                {
                    lista.Add(ppi);
                }
            }

            Datos_ProductoProveedor.DataSource = lista;
            PgMng.Grow();

            AsignaPrecios();
            PgMng.Grow();
        }
        protected override void RefreshMainData()
        {
            if (_entity == null)
            {
                return;
            }

            Datos.DataSource = _entity;
            PgMng.Grow(string.Empty, "Datos");

            Stock_BS.DataSource = _entity.Stocks;
            PgMng.Grow(string.Empty, "Stocks");

            Batchs_BS.RaiseListChangedEvents = false;
            Batchs_BS.DataSource             = _entity.Partidas;
            Batchs_BS.RaiseListChangedEvents = true;
            PgMng.Grow(string.Empty, "Partidas");

            Datos_Gastos.DataSource = _entity.Gastos;
            UpdateExpensesList();
            PgMng.Grow(string.Empty, "Gastos");

            ExpensesInvoices_BS.DataSource = _entity.Facturas;
            PgMng.Grow(string.Empty, "Facturas de Acreedores");

            Works_BS.DataSource = _works;
        }
Beispiel #21
0
        protected override void RefreshMainData()
        {
            PgMng.Grow(string.Empty, "Effect");

            _selectedOid = ActiveOID;

            switch (DataType)
            {
            case EntityMngFormTypeData.Default:
                if (Library.Common.ModulePrincipal.GetUseActiveYear())
                {
                    List = FinancialCashList.GetList(Library.Common.ModulePrincipal.GetActiveYear().Year, false);
                }
                else
                {
                    List = FinancialCashList.GetList(false);
                }
                break;

            case EntityMngFormTypeData.ByParameter:
                _sorted_list = List.GetSortedList();
                break;
            }
            PgMng.Grow(string.Empty, "Lista de Effects");
        }
Beispiel #22
0
        protected virtual void LoadProductos()
        {
            if (Datos_Productos.DataSource as ProductList != null)
            {
                return;
            }

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

                Datos_Productos.RaiseListChangedEvents = false;
                Datos_Productos.DataSource             = ProductList.GetSortedList(ProductList.GetListByAlmacen(EntityInfo.Oid, false),
                                                                                   ProductoNombre.DataPropertyName,
                                                                                   ListSortDirection.Ascending);
                Datos_Productos.RaiseListChangedEvents = true;
                PgMng.Grow();

                Datos_Productos.ResetBindings(false);
            }
            finally
            {
                PgMng.FillUp();
            }
        }
Beispiel #23
0
        private void DoUpload(BackgroundWorker bk)
        {
            PgMng.Grow(Resources.Messages.CONNECTING_SERVER);

            if (_ftp == null)
            {
                _ftp = new FtpClient(Principal.GetHipatiaFTPHost(), Principal.GetHipatiaFTPUser(), Principal.GetHipatiaFTPPwd(), Principal.GetHipatiaFTPRootPath());
                HipatiaCtl.InitHipatia(_ftp, Principal.GetHipatiaFTPRootPath(), Principal.GetHipatiaFTPHost());
            }
            PgMng.Grow();

            if (HipatiaCtl.ExistsDirectory(_ftp, CurrentDocumento.Ruta))
            {
                PgMng.Message = Resources.Messages.UPLOADING_FILE;
                PgMng.Grow();
                HipatiaCtl.Copy(_ftp, TempFile, CurrentDocumento.Ruta);
                PgMng.Message = Resources.Messages.CLOSING_SERVER;
                PgMng.Grow();
                PgMng.Result = BGResult.OK;
            }
            else
            {
                PgMng.Result = BGResult.Error;
                throw new iQException(Resources.Messages.OPERATION_ERROR);
            }
        }
        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();
                }
            }
        }
Beispiel #25
0
        protected override void DeleteAction()
        {
            if (CurrentDocumento == null)
            {
                return;
            }

            if (ProgressInfoMng.ShowQuestion(Resources.Messages.DELETE_CONFIRM) == DialogResult.No)
            {
                return;
            }

            _back_job = BackJob.Delete;
            PgMng.Reset(9, 1, Resources.Messages.CONNECTING_SERVER, this);
            //PgMng.StartBackJob(this);
            DoJob();

            PgMng.Grow();
            if (PgMng.Result == BGResult.OK)
            {
                _entity.ApplyEdit();
                _entity.Save();
            }

            RefreshSecondaryData();
            PgMng.FillUp();
        }
        protected void GeneralAction(Library.Invoice.QueryConditions conditions, string filtro)
        {
            bool            detalle   = Detallado_RB.Checked;
            CommonReportMng reportMng = new CommonReportMng(AppContext.ActiveSchema, this.Text, filtro);

            if (!detalle)
            {
                _list = VentasList.GetListMensual(conditions);
                PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT);

                InformeVentasMensualRpt rpt = reportMng.GetVentasMensualReport(_list);
                PgMng.FillUp();

                if (Informe_RB.Checked)
                {
                    ShowReport(rpt);
                }
                else
                {
                    ShowVentasChart();
                }
            }
            else if (Cliente_RB.Checked)
            {
                if (detalle)
                {
                    _list = VentasList.GetListByClienteMensual(conditions);
                    PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT);

                    InformeVentasMensualxClienteRpt rpt = reportMng.GetVentasMensualxClienteReport(_list);
                    PgMng.FillUp();

                    if (Informe_RB.Checked)
                    {
                        ShowReport(rpt);
                    }
                    else
                    {
                        ShowClientesChart();
                    }
                }
            }
            else if (Producto_RB.Checked)
            {
                _list = VentasList.GetListByProductoMensual(conditions);
                PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT);

                InformeVentasMensualxProductoRpt rpt = reportMng.GetVentasMensualxProductoReport(_list);
                PgMng.FillUp();

                if (Informe_RB.Checked)
                {
                    ShowReport(rpt);
                }
                else
                {
                    ShowProductosChart();
                }
            }
        }
        protected virtual void LoadStockAction()
        {
            try
            {
                if (Partidas_DGW.CurrentRow == null)
                {
                    return;
                }
                if (Partidas_DGW.CurrentRow.DataBoundItem == null)
                {
                    return;
                }

                BatchInfo batch = Partidas_DGW.CurrentRow.DataBoundItem as BatchInfo;

                //if (Cache.Instance.Get(typeof(StockList)) != null) return;

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

                StockList list = StockList.GetByBatchList(batch.Oid, false, true);
                list.UpdateStocksByBatch(false);
                Stock_BS.DataSource = list;
                //Cache.Instance.Save(typeof(StockList), Stock_BS.DataSource as StockList);
                PgMng.Grow();

                HideComponentes(Stock_TP);

                ControlsMng.UpdateBinding(Stock_BS);
            }
            finally
            {
                PgMng.FillUp();
            }
        }
Beispiel #28
0
        protected void DoAddAlbaran(BackgroundWorker bk)
        {
            Datos.RaiseListChangedEvents          = false;
            Datos_Concepto.RaiseListChangedEvents = false;

            try
            {
                PgMng.Reset(_results.Count + 1, 1, Resources.Messages.IMPORTANDO_ALBARANES, this);

                _entity.CopyFrom(_results[0]);

                foreach (OutputDeliveryInfo item in _results)
                {
                    _entity.Insert(item);
                    _albaranes.Add(item);
                    PgMng.Grow(string.Empty, "Insertar el Albarán");
                }

                Result = BGResult.OK;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                PgMng.FillUp();

                Datos.RaiseListChangedEvents          = true;
                Datos_Concepto.RaiseListChangedEvents = true;
#if TRACE
                PgMng.ShowCronos();
#endif
            }
        }
Beispiel #29
0
        /// <summary>
        /// Asigna el objeto principal al origen de datos
        /// <returns>void</returns>
        /// </summary>
        protected override void RefreshMainData()
        {
            Datos.DataSource = _entity;
            PgMng.Grow();

            base.RefreshMainData();
        }
Beispiel #30
0
        protected void RemoveFacturaGastos(Expedient expediente, InputInvoiceInfo fac)
        {
            this.Enabled = false;

            try
            {
                PgMng.Reset(5, 1, "Recalculando gastos y costes del expediente...", this);

                if (fac.Conceptos == null)
                {
                    fac.LoadChilds(typeof(InputInvoiceLine), false);
                }

                foreach (InputInvoiceLineInfo item in fac.Conceptos)
                {
                    item.IsSelected = true;
                }
                PgMng.Grow();

                expediente.LoadConceptosAlbaranes(false);
                PgMng.Grow();

                expediente.RemoveGasto(fac, expediente.Conceptos, true);
                PgMng.Grow();

                UpdateExpensesList();
                Datos.ResetBindings(false);
                PgMng.Grow();
            }
            finally
            {
                PgMng.FillUp();
                this.Enabled = true;
            }
        }