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); } }
public override string ToString() { return("Matrícula: " + Vehiculo.Matricula + " | Cédula de cliente: " + Cliente.Cedula + " | Fecha de inicio: " + FechaInicio.ToShortDateString() + " | Fecha fin: " + FechaFin.ToShortDateString() + " | Costo total: " + Costo); }
public override string ToString() { return("Cod: " + codigo + " Matricula: " + vehiculo.Matricula + " C.I: " + cliente.Cedula + " Inicio: " + FechaInicio.ToShortDateString() + " Fin: " + FechaFin.ToShortDateString() + " Costo: " + Costo); }
/// <summary> /// Copia los atributos del objeto /// </summary> /// <param name="source">Objeto origen</param> protected void CopyValues(CompanyInfo empresa, AuditoriaInfo source, ClaseAuditoriaInfo clase, TipoAuditoriaInfo tipo) { if (source == null) { return; } Oid = source.Oid; _base.Record.OidAuditor = source.OidAuditor; _base.Record.OidTipoAuditoria = source.OidTipoAuditoria; _base.Record.OidPlan = source.OidPlan; _base.Record.Codigo = source.Codigo; _base.Record.Serial = source.Serial; _base.Record.OidResponsable = source.OidResponsable; _base.Record.FechaInicio = source.FechaInicio; _base.Record.FechaFin = source.FechaFin; _base.Record.Referencia = source.Referencia; _base.Record.Estado = source.Estado; _base.Record.Observaciones = source.Observaciones; _base.Record.OidDepartamentoAuditor = source.OidDepartamentoAuditor; _base.Record.OidDepartamentoResponsable = source.OidDepartamentoResponsable; _base.Auditor = source.Auditor; _base.Responsable = source.Responsable; _cuestiones = source.Cuestiones; _informes = source.Informes; _historial = source.Historial; _titulo_informe = "INFORME DE AUDITORÍA"; if (clase != null) { _numero_clase_auditoria = clase.Numero.ToString(); _nombre_clase_auditoria = clase.Nombre; _nombre_clase_auditoria_upper = clase.Nombre.ToUpper(); } if (tipo != null) { _codigo_tipo_auditoria = tipo.Numero; _nombre_tipo_auditoria = tipo.Nombre; _nombre_tipo_auditoria_upper = _nombre_tipo_auditoria.ToUpper(); foreach (Auditoria_AreaInfo item in tipo.Areas) { AreaInfo area = AreaInfo.Get(item.OidArea); _areas += area.Nombre; if (tipo.Areas.IndexOf(item) != tipo.Areas.Count - 1) { _areas += ", "; } } _documentacion = tipo.Documentacion; _apreciaciones = tipo.Apreciaciones; } _fecha_inicio_string = FechaInicio.ToShortDateString(); _fecha_fin_string = FechaFin.ToShortDateString(); if (empresa == null) { return; } string path = Library.Common.ModuleController.LOGOS_EMPRESAS_PATH + empresa.Logo; // Cargamos la imagen en el buffer if (File.Exists(path)) { //Declaramos fs para poder abrir la imagen. FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read); // Declaramos un lector binario para pasar la imagen a bytes BinaryReader br = new BinaryReader(fs); _logo_emp = new byte[(int)fs.Length]; br.Read(LogoEmp, 0, (int)fs.Length); br.Close(); fs.Close(); } _texto_pie = empresa.Direccion + " C.P " + empresa.CodPostal.ToString() + " " + empresa.Municipio + " " + empresa.Provincia + " tfno: " + empresa.Telefonos; }
public object[] ToParams() { return(new object[] { FechaInicio.ToShortDateString(), FechaFin.ToShortDateString(), Descripcion, EsActivo, ClaveEstatus, ClaveDivision }); }