예제 #1
0
        private void llamada_movi_x_cta(XCONTA_Rpt019_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);
            }
        }
예제 #2
0
        private void gw_balance_comp_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e)
        {
            try
            {
                XCONTA_Rpt019_Info Info_Fila = (XCONTA_Rpt019_Info)gw_balance_comp.GetFocusedRow();

                if (col_pc_EsMovimiento.Name == e.Column.Name)
                {
                    llamada_movi_x_cta(Info_Fila);
                }
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #3
0
        public List <XCONTA_Rpt019_Info> Get_List_Reporte(int IdEmpresa, DateTime FechaIni, DateTime FechaFin, string IdCentro_Costo
                                                          , int IdPunto_Cargo_Grupo, int IdPunto_Cargo, bool Mostrar_Cero, bool MostrarCC, bool Considerar_asiento_cierre, string IdUsuario)
        {
            try
            {
                FechaIni = Convert.ToDateTime(FechaIni.ToShortDateString());
                FechaFin = Convert.ToDateTime(FechaFin.ToShortDateString());

                List <XCONTA_Rpt019_Info> Lista = new List <XCONTA_Rpt019_Info>();

                using (EntitiesContabilidadRptGeneral context = new EntitiesContabilidadRptGeneral())
                {
                    context.SetCommandTimeOut(3000);

                    var contact = from q in context.spCON_Mayorizar_x_fecha_corte(IdEmpresa, FechaIni, FechaFin, IdCentro_Costo, IdPunto_Cargo_Grupo, IdPunto_Cargo, Mostrar_Cero, MostrarCC, Considerar_asiento_cierre, IdUsuario)
                                  select q;


                    foreach (var item in contact)
                    {
                        XCONTA_Rpt019_Info Info = new XCONTA_Rpt019_Info();
                        Info.IdEmpresa      = item.IdEmpresa;
                        Info.IdCtaCble      = item.IdCtaCble;
                        Info.nom_cuenta     = item.nom_cuenta;
                        Info.IdNivelCta     = item.IdNivelCta;
                        Info.GrupoCble      = item.GrupoCble;
                        Info.OrderGrupoCble = item.OrderGrupoCble;
                        Info.IdCtaCblePadre = item.IdCtaCblePadre;

                        Info.Saldo_Inicial_debito  = item.Saldo_Inicial_deudor;
                        Info.Saldo_Inicial_credito = item.Saldo_Inicial_acreedor;

                        Info.Debito_Mes  = item.Debito_Mes;
                        Info.Credito_Mes = item.Credito_Mes;

                        Info.Saldo_final_debito  = item.Saldo_fin_deudor;
                        Info.Saldo_final_credito = item.Saldo_fin_acreedor;

                        Info.Debito_Mes_x_Movi  = item.Debito_Mes_x_Movi;
                        Info.Credito_Mes_x_Movi = item.Credito_Mes_x_Movi;

                        Info.pc_EsMovimiento = item.pc_EsMovimiento;

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


                        Info.nom_empresa = item.nom_empresa;

                        Lista.Add(Info);
                    }
                }
                return(Lista);
            }
            catch (Exception ex)
            {
                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);
                MensajeError = ex.ToString() + " " + ex.Message;
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref MensajeError);
                throw new Exception(ex.InnerException.ToString());
            }
        }