private void uCct_Menu_Reportes1_event_btn_Mostrar_en_tabla_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { splashScreenManager.ShowWaitForm();//Inicio splash XCONTA_Rpt019_Bus Bus = new XCONTA_Rpt019_Bus(); List <XCONTA_Rpt019_Info> lista = new List <XCONTA_Rpt019_Info>(); string IdCentroCosto = ""; string Nom_centro_Costo = ""; string Nom_Punto_Cargo_Grupo = ""; int IdPunto_cargo_grupo = 0; int IdPunto_cargo = 0; bool Mostrar_reg_cero = Convert.ToBoolean(uCct_Menu_Reportes1.bei_Check.EditValue == null ? false : uCct_Menu_Reportes1.bei_Check.EditValue); bool Mostrar_cc = Convert.ToBoolean(uCct_Menu_Reportes1.bei_Check2.EditValue == null ? false : uCct_Menu_Reportes1.bei_Check2.EditValue); bool Considerar_asiento_cierre = Convert.ToBoolean(uCct_Menu_Reportes1.bei_Check3.EditValue == null ? false : uCct_Menu_Reportes1.bei_Check3.EditValue); DateTime FechaIni = uCct_Menu_Reportes1.bei_Desde.EditValue == null ? DateTime.Now : Convert.ToDateTime(uCct_Menu_Reportes1.bei_Desde.EditValue); DateTime FechaFin = uCct_Menu_Reportes1.bei_Hasta.EditValue == null ? DateTime.Now : Convert.ToDateTime(uCct_Menu_Reportes1.bei_Hasta.EditValue); IdCentroCosto = uCct_Menu_Reportes1.Get_info_Centro_costo() == null ? "" : uCct_Menu_Reportes1.Get_info_Centro_costo().IdCentroCosto; Nom_centro_Costo = uCct_Menu_Reportes1.Get_info_Centro_costo() == null ? "" : uCct_Menu_Reportes1.Get_info_Centro_costo().Centro_costo; IdPunto_cargo_grupo = 0; Nom_Punto_Cargo_Grupo = uCct_Menu_Reportes1.Get_info_punto_cargo_grupo() == null ? "" : uCct_Menu_Reportes1.Get_info_punto_cargo_grupo().nom_punto_cargo_grupo; IdPunto_cargo = 0; lista = Bus.Get_List_Reporte(param.IdEmpresa, FechaIni, FechaFin, IdCentroCosto, IdPunto_cargo_grupo, IdPunto_cargo, Mostrar_reg_cero, Mostrar_cc, Considerar_asiento_cierre, param.IdUsuario); gc_balance_comp.DataSource = lista; string Titulo = ""; Titulo = "BALANCE DE COMPROBACION \n\n"; Titulo = Titulo + "Desde:" + FechaIni.ToShortDateString() + " hasta: " + FechaFin.ToShortDateString() + "\n\n"; gw_balance_comp.ViewCaption = Titulo; splashScreenManager.CloseWaitForm(); } catch (Exception ex) { if (splashScreenManager.IsSplashFormVisible) { splashScreenManager.CloseWaitForm(); } Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void XCONTA_Rpt019_Rpt_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) { try { XCONTA_Rpt019_Bus BusRpt = new XCONTA_Rpt019_Bus(); List <XCONTA_Rpt019_Info> ListaRpt = new List <XCONTA_Rpt019_Info>(); DateTime FechaIni, FechaFin; bool Mostrar_Cero = false; int IdPunto_Cargo = 0; int IdPunto_Cargo_Grupo = 0; string IdCentroCosto = ""; bool Mostrar_CC = false; bool Considera_asiento_cierrre = false; FechaIni = Convert.ToDateTime(this.PFechaIni.Value); FechaFin = Convert.ToDateTime(this.PFechaFin.Value); Mostrar_Cero = Convert.ToBoolean(this.PMostrar_Reg_en_cero.Value); IdPunto_Cargo = Convert.ToInt32(this.PIdPunto_Cargo.Value); IdPunto_Cargo_Grupo = Convert.ToInt32(this.PIdPunto_Cargo_Grupo.Value); IdCentroCosto = Convert.ToString(this.PIdCentroCosto.Value); Mostrar_CC = Convert.ToBoolean(this.P_MostrarCC.Value); Considera_asiento_cierrre = Convert.ToBoolean(P_Mostrar_asiento_cierre.Value); lblEmpresa.Text = param.NombreEmpresa; lblFecha_corte.Text = "Al " + FechaFin.ToLongDateString(); ListaRpt = BusRpt.Get_List_Reporte(param.IdEmpresa, FechaIni, FechaFin, IdCentroCosto, IdPunto_Cargo_Grupo, IdPunto_Cargo, Mostrar_Cero, Mostrar_CC, Considera_asiento_cierrre, param.IdUsuario); this.DataSource = ListaRpt.ToArray(); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message); throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "XCONTA_NATU_Rpt001_Rpt_BeforePrint", ex.Message), ex) { EntityType = typeof(XCONTA_Rpt019_Rpt) }; } }