private void XINV_FJ_Rpt006_Rpt_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) { try { xrLUsuario.Text = param.IdUsuario; lblFechaImpresion.Text = DateTime.Now.ToString("dddd, dd' de 'MMMM' de 'yyyy HH:mm:ss"); XINV_FJ_Rpt006_Bus BUS = new XINV_FJ_Rpt006_Bus(); List <XINV_FJ_Rpt006_Info> ListDataRpt = new List <XINV_FJ_Rpt006_Info>(); DateTime FechaIni; DateTime FechaFin; int IdSucursalIni = 0; int IdSucursalFin = 0; int IdBodegaIni = 0; int IdBodegaFin = 0; decimal IdProductoIni = 0; decimal IdProductoFin = 0; string IdCentroCosto = string.Empty; string IdSubCentroCosto = string.Empty; int IdMovi_inven_tipoIni = 0; int IdMovi_inven_tipoFin = 0; string TipoMov = string.Empty; //string nomtipomov = string.Empty; FechaIni = Convert.ToDateTime(Parameters["FechaIni"].Value); FechaFin = Convert.ToDateTime(Parameters["FechaFin"].Value); IdSucursalIni = Convert.ToInt32(Parameters["IdSucursalIni"].Value); IdSucursalFin = Convert.ToInt32(Parameters["IdSucursalFin"].Value); IdBodegaIni = Convert.ToInt32(Parameters["IdBodegaIni"].Value); IdBodegaFin = Convert.ToInt32(Parameters["IdBodegaFin"].Value); IdProductoIni = Convert.ToDecimal(Parameters["IdProductoIni"].Value); IdProductoFin = Convert.ToDecimal(Parameters["IdProductoFin"].Value); IdCentroCosto = (Parameters["IdCentro_costo"].Value).ToString(); IdSubCentroCosto = (Parameters["IdSubcentro_costo"].Value).ToString(); IdMovi_inven_tipoIni = Convert.ToInt32(Parameters["IdMovi_inven_tipoIni"].Value); IdMovi_inven_tipoFin = Convert.ToInt32(Parameters["IdMovi_inven_tipoFin"].Value); TipoMov = (Parameters["TipoMovimiento"].Value).ToString(); lblFechaInicio.Text = FechaIni.ToShortDateString(); lblFechaFin.Text = FechaFin.ToShortDateString(); ListDataRpt = BUS.Get_Kardes_Movimiento(param.IdEmpresa, IdSucursalIni, IdSucursalFin, IdBodegaIni, IdBodegaFin, IdProductoIni, IdProductoFin, IdCentroCosto, IdSubCentroCosto, IdMovi_inven_tipoIni, IdMovi_inven_tipoFin, TipoMov, FechaIni, FechaFin); this.DataSource = ListDataRpt; } 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("", "XINV_FJ_Rpt006_Rpt_BeforePrint", ex.Message), ex) { EntityType = typeof(XINV_FJ_Rpt006_Rpt) }; } }
private void XINV_FJ_Rpt002_rpt_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) { try { xrLUsuario.Text = param.IdUsuario; lblFechaImpresion.Text = DateTime.Now.ToString("dddd, dd' de 'MMMM' de 'yyyy HH:mm:ss"); string msg = ""; XINV_FJ_Rpt002_Bus OBUS = new XINV_FJ_Rpt002_Bus(); List <XINV_FJ_Rpt002_Info> ListDataRpt = new List <XINV_FJ_Rpt002_Info>(); DateTime FechaIni; DateTime FechaFin; int IdSucursalIni = 0; int IdSucursalFin = 0; int IdBodegaIni = 0; int IdBodegaFin = 0; decimal IdProductoIni = 0; decimal IdProductoFin = 0; string IdCentroCosto = ""; string IdCentroCosto_sub_centro_costo = ""; FechaIni = Convert.ToDateTime(Parameters["FechaIni"].Value); FechaFin = Convert.ToDateTime(Parameters["FechaFin"].Value); IdSucursalIni = Convert.ToInt32(Parameters["IdSucursalIni"].Value); IdSucursalFin = Convert.ToInt32(Parameters["IdSucursalFin"].Value); IdBodegaIni = Convert.ToInt32(Parameters["IdBodegaIni"].Value); IdBodegaFin = Convert.ToInt32(Parameters["IdBodegaFin"].Value); IdProductoIni = Convert.ToDecimal(Parameters["IdProductoIni"].Value); IdProductoFin = Convert.ToDecimal(Parameters["IdProductoFin"].Value); IdCentroCosto = (Parameters["IdCentroCosto"].Value).ToString(); IdCentroCosto_sub_centro_costo = (Parameters["IdCentroCosto_sub_centro_costo"].Value).ToString(); lblFechaInicio.Text = FechaIni.ToShortDateString(); lblFechaFin.Text = FechaFin.ToShortDateString(); xrPictureBox_Logo_Emp.Image = Core.Erp.Info.General.Funciones.ArrayAImage(param.InfoEmpresa.em_logo); ListDataRpt = OBUS.consultar_data(param.IdEmpresa, IdBodegaIni, IdBodegaFin, IdSucursalIni, IdSucursalFin, IdProductoIni, IdProductoFin, FechaIni, FechaFin, IdCentroCosto, IdCentroCosto_sub_centro_costo, ref msg); this.DataSource = ListDataRpt.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("", "XINV_FJ_Rpt002_rpt_BeforePrint", ex.Message), ex) { EntityType = typeof(XINV_FJ_Rpt002_rpt) }; } }
private void uCct_Menu_Reportes1_event_btn_Mostrar_en_tabla_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { splashScreenManager1.ShowWaitForm();//Inicio splash List <XCONTA_Rpt001_Info> lista = new List <XCONTA_Rpt001_Info>(); string msg = ""; XCONTA_Rpt001_Bus Bus = new XCONTA_Rpt001_Bus(); bool Mostrar_reg_cero = false; bool Mostrar_cc = false; bool Considerar_asiento_cierre = false; int IdEmpresa = 0; int IdNivel_a_mostrar = 0; int IdPunto_cargo_grupo = 0; int IdPunto_cargo = 0; DateTime FechaIni; DateTime FechaFin; string IdCentroCosto = ""; string Nom_centro_Costo = ""; string Nom_Punto_Cargo_Grupo = ""; string Nom_Punto_Cargo = ""; Mostrar_reg_cero = Convert.ToBoolean(uCct_Menu_Reportes1.bei_Check.EditValue == null ? false : uCct_Menu_Reportes1.bei_Check.EditValue); Mostrar_cc = Convert.ToBoolean(uCct_Menu_Reportes1.bei_Check2.EditValue == null ? false : uCct_Menu_Reportes1.bei_Check2.EditValue); Considerar_asiento_cierre = Convert.ToBoolean(uCct_Menu_Reportes1.bei_Check3.EditValue == null ? false : uCct_Menu_Reportes1.bei_Check3.EditValue); IdEmpresa = param.IdEmpresa; 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); 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; IdNivel_a_mostrar = (int)uCct_Menu_Reportes1.bei_Nivel.EditValue; 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; Nom_Punto_Cargo = ""; lista = Bus.consultar_data(IdEmpresa, FechaIni, FechaFin, IdCentroCosto, IdNivel_a_mostrar, IdPunto_cargo_grupo, IdPunto_cargo, Mostrar_reg_cero, Mostrar_cc, Considerar_asiento_cierre, param.IdUsuario, ref msg); gc_balance.DataSource = lista; gc_balance.RefreshDataSource(); string Titulo = ""; Titulo = "BALANCE GENERAL \n"; Titulo = Titulo + " Desde:" + FechaIni.ToShortDateString() + " Hasta:" + FechaFin.ToShortDateString() + "\n"; if (IdCentroCosto != "") { Titulo = Titulo + " Centro Costo:" + "[" + IdCentroCosto + "] - " + Nom_centro_Costo + "\n"; } if (IdPunto_cargo_grupo > 0) { Titulo = Titulo + " Grupo:" + Nom_Punto_Cargo_Grupo + "\n"; } if (IdPunto_cargo > 0) { Titulo = Titulo + " Punto Cargo:" + Nom_Punto_Cargo + "\n"; } gw_balance_comp.ViewCaption = Titulo; splashScreenManager1.CloseWaitForm();//terminar splash } catch (Exception ex) { if (splashScreenManager1.IsSplashFormVisible) { splashScreenManager1.CloseWaitForm(); } Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }