public Boolean ValidarPeriodoContrato() { TimeSpan diferencia = FechaFin - FechaInicio; Int32 Periodo = Int32.Parse(diferencia.TotalDays.ToString()) / 30; return(FechaFin.CompareTo(FechaInicio) == 1 && Periodo >= 3 && Periodo <= 12); }
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) }; } }
/// <summary> /// Si la fecha de fin no tiene la parte de tiempo entonces se interpreta como el inicio de día del siguiente día: /// Sección XBRL 2.1 4.7.2 /// A date, with no time part, in the endDate or instant element is defined to be equivalent to specifying a dateTime /// of the same date plus P1D and with a time part of T00:00:00. This represents midnight at the end of the day. /// The reason for defining it thus, i.e. as midnight at the start of the next day, is that [XML Schema Datatypes] /// mandates this representation by prohibiting the value of 24 in the "hours" part of a time specification, which is ISO 8601 syntax. /// </summary> /// <returns></returns> public DateTime ObtenerFechaFinEfectiva() { var ret = FechaFin; if (!TieneFechaFinParteTiempo()) { ret = FechaFin.AddDays(1); } return(ret); }
private void XCONTA_Rpt022_Rpt_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) { try { lblEmpresa.Text = param.NombreEmpresa; string msg = ""; XCONTA_Rpt022_Bus Bus = new XCONTA_Rpt022_Bus(); List <XCONTA_Rpt022_Info> lista = new List <XCONTA_Rpt022_Info>(); DateTime FechaIni; DateTime FechaFin; string IdCentroCosto = ""; int IdPuntoCargo = 0; int IdPuntoCargo_Grupo = 0; bool Mostrar_Reg_en_cero = true; bool Mostrar_CC = false; bool Mostrar_asiento_cierre = false; /* * IdNivel_a_mostrar = 3; * FechaIni = new DateTime ( 2017, 01, 01 ); * FechaFin = new DateTime(2017, 01, 31); */ FechaIni = Convert.ToDateTime(P_Fecha_ini.Value); FechaFin = Convert.ToDateTime(P_Fecha_fin.Value); lblFecha_corte.Text = "Al " + FechaFin.ToLongDateString(); IdPuntoCargo = Convert.ToInt32(P_IdPuntoCargo.Value); IdPuntoCargo_Grupo = Convert.ToInt32(P_IdPuntoCargo_grupo.Value); IdCentroCosto = Convert.ToString(P_IdCentroCosto.Value); IdNivel_a_mostrar = Convert.ToInt32(P_IdNivel_a_mostrar.Value); Mostrar_Reg_en_cero = Convert.ToBoolean(P_Mostrar_reg_en_cero.Value); Mostrar_CC = Convert.ToBoolean(P_Mostrar_CC.Value); Mostrar_asiento_cierre = Convert.ToBoolean(P_Mostrar_asiento_cierre.Value); lista = Bus.consultar_data(param.IdEmpresa, FechaIni, FechaFin, IdCentroCosto, IdNivel_a_mostrar, IdPuntoCargo_Grupo, IdPuntoCargo, Mostrar_Reg_en_cero, Mostrar_CC, Mostrar_asiento_cierre, param.IdUsuario, ref msg); this.DataSource = lista; } 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_Rpt001_rpt_BeforePrint", ex.Message), ex) { EntityType = typeof(XCONTA_Rpt001_rpt) }; } }
public override string ToString() { return(string.Format("Fecha Inicio:{6}{5}" + "Fecha Fin:{7}{5}" + "Duracion:{0}{5}" + "Usuario:{1}{5}" + "Accion:{2}{5}" + "Request:{5}{3}{5}" + "Response:{5}{4}{5}", (int)new TimeSpan(FechaFin.Ticks - FechaInicio.Ticks).TotalSeconds, Usuario, Accion, Request, Response, Environment.NewLine, FechaInicio.ToString("yy-MM-dd hh:mm:ss"), FechaFin.ToString("yy-MM-dd hh:mm:ss"))); }
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) }; } }
public CarteleraModelAndView() { idCarteleraModel = IdCartelera.ToString(); idSedeCarteleraModel = IdSede.ToString(); idPeliculaCarteleraModel = IdPelicula.ToString(); horaInicioModel = HoraInicio.ToString(); fechaInicioModel = FechaInicio.ToString(); fechaFinModel = FechaFin.ToString(); numeroSalaModel = NumeroSala.ToString(); idVersionModel = IdVersion.ToString(); lunesModel = Lunes.ToString(); martesModel = Martes.ToString(); miercolesModel = Miercoles.ToString(); juevesModel = Jueves.ToString(); viernesModel = Viernes.ToString(); sabadoModel = Sabado.ToString(); domingoModel = Domingo.ToString(); fechaCargaModel = FechaCarga.ToString(); listadoDeCarteleras = new List <Carteleras>(); llenarListados(); //Llena las listas Sedes, Peliculas y Versiones. }
private void EvaluarObjetivoDoce() { //Alcanzar un % de cobro de clientes corporativos para un período determinado en los próximos x días try { DateTime FechaCobroInicio = FechaInicio.AddDays(Dias); DateTime FechaCobroFin = FechaFin.AddDays(Dias); DataSet ds = new DataSet(); ds.Tables.Add("Datos"); //ds.Tables[0] = new DataTable(); SqlParameter pFechaInicio = new SqlParameter("@FechaInicio", Utiles.BaseDatos.FechaToSql(FechaInicio)); SqlParameter pFechaFin = new SqlParameter("@FechaFin", Utiles.BaseDatos.FechaToSql(FechaFin)); SqlParameter pFechaInicioCobro = new SqlParameter("@FechaInicioCobro", Utiles.BaseDatos.FechaToSql(FechaCobroInicio)); SqlParameter pFechaFinCobro = new SqlParameter("@FechaFinCobro", Utiles.BaseDatos.FechaToSql(FechaCobroFin)); Config.Conexion.LlenarTypeDataSet(ds.Tables[0], System.Data.CommandType.StoredProcedure, "EvaluarObjetivoDocePersonal", pFechaInicio, pFechaFin, pFechaInicioCobro, pFechaFinCobro); if (ds.Tables[0].Rows.Count > 0) { System.Data.DataRow dr = ds.Tables[0].Rows[0]; this.ValorAlcanzado = Convert.ToDouble(dr[0]) * 100; } else { this.ValorAlcanzado = 0; } //ValorAlcanzado = 100 * (Convert.ToDouble(Config.Conexion.EjecutarResultadoUnico("EvaluarObjetivoDocePersonal", Utiles.BaseDatos.FechaToSql(FechaInicio), Utiles.BaseDatos.FechaToSql(FechaFin),Utiles.BaseDatos.FechaToSql(FechaCobroInicio), Utiles.BaseDatos.FechaToSql(FechaCobroFin)))); PorcentajeAlcanzado = ValorAlcanzado; //porcentaje alcanzado respecto al objetivo? PorcentajeAlcanzadoRespectoPonderacion = Convert.ToDouble(PorcentajeAlcanzado * Ponderacion / 100); Cumplio = PorcentajeAlcanzado >= Valor ? true : false; } catch (Exception ex) { throw ex; } }
/// <summary> /// Comparar este periodo con otro objeto del tipo periodo /// </summary> /// <param name="obj"></param> /// <returns></returns> public override bool Equals(object obj) { if (obj == null || !(obj is Period)) { return(false); } if (this == obj) { return(true); } Period comparar = (Period)obj; if (Tipo != comparar.Tipo) { return(false); } if (Tipo == Instante && FechaInstante.CompareTo(comparar.FechaInstante) != 0) { return(false); } if (Tipo == Duracion && (FechaInicio.CompareTo(comparar.FechaInicio) != 0 || FechaFin.CompareTo(comparar.FechaFin) != 0)) { return(false); } return(true); }
public bool Insertar() { bool paso = conexion.EjecutarDB("insert into Semestres(Codigo, FechaInicio, FechaFin, FechaParcial1, FechaParcial2, FechaFinal, Activo) values(" + Codigo.ToDbString() + "," + FechaInicio.ToDbString() + "," + FechaFin.ToDbString() + "," + FechaParcial1.ToDbString() + "," + FechaParcial2.ToDbString() + "," + FechaFinal.ToDbString() + "," + Activo.ToDbString() + ")"); if (paso) { this.IdSemestre = (int)conexion.ObtenerValorDb("select MAX(IdSemestre) from Semestres"); } return(paso); }
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 bool Modificar() { ConexionDb conexion = new ConexionDb(); return(conexion.EjecutarDB("Update Semestres set Codigo = " + Codigo + "', FechaInicio ='" + FechaInicio.ToString("dd/MM//yyyy") + "', FechaInicio ='" + FechaFin.ToString("dd/MM//yyyy") + "', FechaParcial1 ='" + FechaParcial1.ToString("dd/MM//yyyy") + "', FechaParcial2 ='" + FechaParcial2.ToString("dd/MM//yyyy") + "', FechaFinal ='" + FechaFinal.ToString("dd/MM//yyyy") + "' where IdEstudiante= " + IdSemestre)); }
public bool Modificar() { return(conexion.EjecutarDB("Update Semestres set Codigo = " + Codigo.ToDbString() + ", FechaInicio = " + FechaInicio.ToDbString() + ", FechaFin = " + FechaFin.ToDbString() + ", FechaParcial1 = " + FechaParcial1.ToDbString() + ", FechaParcial2 = " + FechaParcial2.ToDbString() + ", FechaFinal = " + FechaFinal.ToDbString() + ", Activo = " + Activo.ToDbString() + " where IdSemestre = " + IdSemestre)); }
public bool Insertar() { ConexionDb conexion = new ConexionDb(); bool paso = false; paso = conexion.EjecutarDB("Insert into Semestres (Codigo, FechaInicio, FechaFin, FechaParcial1, FechaParcial2, FechaFinal, esActivo) Values ('" + Codigo + "', '" + FechaInicio.ToString("MM/dd/yyyy") + "', '" + FechaFin.ToString("MM/dd/yyyy") + "', '" + FechaParcial1.ToString("MM/dd/yyyy") + "','" + FechaParcial2.ToString("MM/dd/yyyy") + "', '" + FechaFinal.ToString("MM/dd/yyyy") + "' , '" + esActivo + "' )"); if (paso) { IdSemestre = (int)conexion.ObtenerValorDb("Select Max(IdSemestre) from Semestres"); } return(paso); }
public override string ToString() { return(ID + "|" + Nombre + "|" + FechaInicio.ToString("dd/MM/yyyy") + "|" + FechaFin.ToString("dd/MM/yyyy")); }
public object[] ToParams() { return(new object[] { FechaInicio.ToShortDateString(), FechaFin.ToShortDateString(), Descripcion, EsActivo, ClaveEstatus, ClaveDivision }); }
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); } }
/// <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 override string ToString() { return("Cod: " + codigo + " Matricula: " + vehiculo.Matricula + " C.I: " + cliente.Cedula + " Inicio: " + FechaInicio.ToShortDateString() + " Fin: " + FechaFin.ToShortDateString() + " Costo: " + Costo); }
public Boolean ObtenerVigencia() { DateTime fechaActual = DateTime.Now.Date; return(FechaFin.CompareTo(fechaActual) >= 0 && !Anulado); }