Exemplo n.º 1
0
 private void treeListBG_FocusedNodeChanged(object sender, FocusedNodeChangedEventArgs e)
 {
     try
     {
         Info_Fila = new XCONTA_Rpt001_Info();
         //Info_Fila  = (XCONTA_Rpt001_Info)treeListBG.GetDataRecordByNode(e.Node);
     }
     catch (Exception ex)
     {
         Log_Error_bus.Log_Error(ex.ToString());
         MessageBox.Show(ex.Message, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 2
0
        private void llamada_movi_x_cta(XCONTA_Rpt001_Info Info_Fila)
        {
            try
            {
                if (Info_Fila != null)
                {
                    if (Info_Fila.pc_EsMovimiento == "S")
                    {
                        DateTime FechaIni = DateTime.Now;
                        DateTime FechaFin = DateTime.Now;


                        int    IdPunto_Cargo_Grupo = 0;
                        int    IdPunto_Cargo       = 0;
                        string IdCentroCosto       = "";

                        IdPunto_Cargo_Grupo = uCct_Menu_Reportes1.Get_info_punto_cargo_grupo() == null ? 0 : uCct_Menu_Reportes1.Get_info_punto_cargo_grupo().IdPunto_cargo_grupo;
                        IdPunto_Cargo       = 0;
                        IdCentroCosto       = uCct_Menu_Reportes1.Get_info_Centro_costo() == null ? "" : uCct_Menu_Reportes1.Get_info_Centro_costo().IdCentroCosto;

                        FechaIni = uCct_Menu_Reportes1.bei_Desde.EditValue == null ? DateTime.Now : Convert.ToDateTime(uCct_Menu_Reportes1.bei_Desde.EditValue);
                        FechaFin = uCct_Menu_Reportes1.bei_Hasta.EditValue == null ? DateTime.Now : Convert.ToDateTime(uCct_Menu_Reportes1.bei_Hasta.EditValue);


                        XCONTA_Rpt006_rpt Reporte = new XCONTA_Rpt006_rpt();

                        Reporte.RequestParameters = false;
                        ReportPrintTool pt = new ReportPrintTool(Reporte);
                        pt.AutoShowParametersPanel = false;

                        Reporte.Visible_col_CentroCosto    = false;
                        Reporte.Visible_col_PuntoCargo     = false;
                        Reporte.P_IdEmpresa.Value          = param.IdEmpresa;
                        Reporte.P_FechaIni.Value           = FechaIni;
                        Reporte.P_FechaFin.Value           = FechaFin;
                        Reporte.P_IdCtaCble.Value          = Info_Fila.IdCtaCble;
                        Reporte.P_IdPuntoCargo.Value       = IdPunto_Cargo;
                        Reporte.P_IdPuntoCargo_Grupo.Value = IdPunto_Cargo_Grupo;
                        Reporte.P_IdCentro_Costo.Value     = IdCentroCosto;

                        Reporte.ShowPreview();
                    }
                }
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                MessageBox.Show(ex.Message, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 3
0
        private void gw_balance_comp_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e)
        {
            try
            {
                Info_Fila = (XCONTA_Rpt001_Info)gw_balance_comp.GetFocusedRow();

                if (col_pc_EsMovimiento.Name == e.Column.Name)
                {
                    llamada_movi_x_cta();
                }
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                MessageBox.Show(ex.Message, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 4
0
        public List <XCONTA_Rpt001_Info> consultar_data(int IdEmpresa, DateTime FechaIni, DateTime FechaFin, string IdCentroCosto, int IdNivel_a_mostrar
                                                        , int IdPunto_cargo_grupo
                                                        , int IdPunto_cargo
                                                        , bool Mostrar_reg_Cero
                                                        , bool MostrarCC, bool Considerar_Asiento_cierre_anual, string IdUsuario, ref String MensajeError)
        {
            try
            {
                List <XCONTA_Rpt001_Info> listadedatos = new List <XCONTA_Rpt001_Info>();

                FechaIni = Convert.ToDateTime(FechaIni.ToShortDateString());
                FechaFin = Convert.ToDateTime(FechaFin.ToShortDateString());

                using (EntitiesContabilidadRptGeneral BalanceGeneral = new EntitiesContabilidadRptGeneral())
                {
                    BalanceGeneral.SetCommandTimeOut(30000);//timeout 3 minutos

                    IList <spCON_Mayorizar_x_fecha_corte_Result> listBalance =
                        BalanceGeneral.spCON_Mayorizar_x_fecha_corte(IdEmpresa, FechaIni, FechaFin, IdCentroCosto, IdPunto_cargo_grupo, IdPunto_cargo, Mostrar_reg_Cero, MostrarCC, Considerar_Asiento_cierre_anual, IdUsuario).Where(v => v.gc_estado_financiero == "BG" && v.IdNivelCta <= IdNivel_a_mostrar).ToList();


                    foreach (var item in listBalance)
                    {
                        XCONTA_Rpt001_Info itemInfo = new XCONTA_Rpt001_Info();
                        itemInfo.IdEmpresa            = item.IdEmpresa;
                        itemInfo.IdCtaCble            = item.IdCtaCble;
                        itemInfo.nom_cuenta           = item.nom_cuenta;
                        itemInfo.IdNivelCta           = item.IdNivelCta;
                        itemInfo.IdCtaCblePadre       = item.IdCtaCblePadre;
                        itemInfo.GrupoCble            = item.GrupoCble;
                        itemInfo.OrderGrupoCble       = Convert.ToInt32(item.OrderGrupoCble);
                        itemInfo.gc_estado_financiero = item.gc_estado_financiero;

                        itemInfo.Saldo_Inicial = item.Saldo_Inicial;
                        itemInfo.Debito_Mes    = item.Debito_Mes;
                        itemInfo.Credito_Mes   = item.Credito_Mes;
                        itemInfo.Saldo         = item.Saldo;

                        itemInfo.Saldo_inicial_x_Movi = item.Saldo_inicial_x_Movi;
                        itemInfo.Debito_Mes_x_Movi    = item.Debito_Mes_x_Movi;
                        itemInfo.Credito_Mes_x_Movi   = item.Credito_Mes_x_Movi;
                        itemInfo.Saldo_x_Movi         = item.Saldo_x_Movi;



                        itemInfo.pc_EsMovimiento = item.pc_EsMovimiento;
                        itemInfo.nom_cuenta2     = item.IdCtaCble + " - " + item.nom_cuenta;

                        itemInfo.IdPuntoCargo         = item.IdPunto_cargo;
                        itemInfo.IdPuntoCargo_Grupo   = item.IdPunto_cargo_grupo;
                        itemInfo.IdCentroCosto        = item.IdCentroCosto;
                        itemInfo.nom_PuntoCargo       = item.nom_punto_cargo;
                        itemInfo.nom_PuntoCargo_Grupo = item.nom_punto_cargo_grupo;
                        itemInfo.nom_CentroCosto      = item.nom_centro_costo;
                        itemInfo.nom_empresa          = item.nom_empresa;



                        listadedatos.Add(itemInfo);
                    }
                }
                return(listadedatos);
            }
            catch (Exception ex)
            {
                string mensaje = "";
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "",
                                                                                          "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.ToString();
                throw new Exception(ex.ToString());
            }
        }