Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Se agrego el website del laboratorio central (incluyendo los cambios … #8

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions Business/Business.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
<Compile Include="BaseDataAccess.cs" />
<Compile Include="cAppConfig.cs" />
<Compile Include="Data\AutoAnalizador\ClinitekItem.cs" />
<Compile Include="Data\AutoAnalizador\CobasC311.cs" />
<Compile Include="Data\AutoAnalizador\FusionItem.cs" />
<Compile Include="Data\AutoAnalizador\Cobasb221Item.cs" />
<Compile Include="Data\AutoAnalizador\InccaItem.cs" />
Expand Down Expand Up @@ -141,6 +142,7 @@
<Compile Include="Data\Laboratorio\AlarmaScreening.cs" />
<Compile Include="Data\Laboratorio\AuditoriaItem.cs" />
<Compile Include="Data\Laboratorio\EfectorRel.cs" />
<Compile Include="Data\Laboratorio\Ficha.cs" />
<Compile Include="Data\Laboratorio\ItemMuestra.cs" />
<Compile Include="Data\Laboratorio\ItemPresentacion.cs" />
<Compile Include="Data\Laboratorio\Marca.cs" />
Expand Down Expand Up @@ -312,6 +314,8 @@
<Content Include="bin\Debug\Iesi.Collections.dll" />
<Content Include="bin\Debug\log4net.dll" />
<Content Include="bin\Debug\NHibernate.dll" />
<Content Include="Data\AutoAnalizador\CobasC311.hbm.xml" />
<Content Include="Data\Laboratorio\Ficha.hbm.xml" />
<EmbeddedResource Include="Data\Laboratorio\ItemMuestra.hbm.xml" />
<EmbeddedResource Include="Data\Laboratorio\Marca.hbm.xml" />
<EmbeddedResource Include="Data\Laboratorio\ItemPresentacion.hbm.xml" />
Expand Down
48 changes: 48 additions & 0 deletions Business/Data/Laboratorio/DetalleProtocolo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1231,5 +1231,53 @@ public void GuardarValorReferencia()
this.Save();
//Fin calculo de valor de refrencia y metodo
}

public bool VerificarSiEsDerivable( Efector i_IdEfector)
{
bool ok = false;
/// buscar idefectorderivacion desde lab_itemefector
ISession m_session = NHibernateHttpModule.CurrentSession;
ICriteria critItemEfector = m_session.CreateCriteria(typeof(ItemEfector));
critItemEfector.Add(Expression.Eq("IdItem", this.IdItem));
critItemEfector.Add(Expression.Eq("IdEfector", i_IdEfector));
IList detalle1 = critItemEfector.List();
if (detalle1.Count > 0)
{
foreach (ItemEfector oitemEfector in detalle1)
{
if (this.IdEfector.IdEfector != oitemEfector.IdEfectorDerivacion.IdEfector)
{
ok = true; break;
}
}
}
else
ok = false;

return ok;
}

public void GuardarDerivacion(Usuario oUser)
{
if (this.IdItem.esDerivado(oUser.IdEfector))
{
Business.Data.Laboratorio.Derivacion oRegistro = new Business.Data.Laboratorio.Derivacion();
oRegistro.IdDetalleProtocolo = this;
oRegistro.Estado = 0;
oRegistro.Observacion = "";// txtObservacion.Text;
oRegistro.IdUsuarioRegistro = oUser.IdUsuario;//int.Parse(Session["idUsuario"].ToString());
oRegistro.FechaRegistro = DateTime.Now;
oRegistro.FechaResultado = DateTime.Parse("01/01/1900");

oRegistro.IdEfectorDerivacion = this.IdItem.GetIDEfectorDerivacion(oUser.IdEfector); // se graba el efector configurado en ese momento.

oRegistro.Save();

// graba el resultado en ResultadCar "Derivado: " + oItem.GetEfectorDerivacion(oCon.IdEfector);
//oDetalle.ResultadoCar = "Pendiente de Derivacion";//"se podria poner a que efector....
//oDetalle.Save();
this.GrabarAuditoriaDetalleProtocolo("Graba Derivado", oUser.IdUsuario);
}
}
}
}
281 changes: 281 additions & 0 deletions Business/Data/Laboratorio/Ficha.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,281 @@
/*
insert license info here
*/
using Business.Data.Facturacion;
using NHibernate;
using NHibernate.Expression;
using System;
using System.Collections;
using System.Data;
using System.Data.SqlClient;

namespace Business.Data.Laboratorio
{
/// <summary>
/// Generated by MyGeneration using the NHibernate Object Mapping template
/// </summary>
[Serializable]
public sealed class Ficha : Business.BaseDataAccess
{

#region Private Members
private bool m_isChanged;

private int m_idFichaRecepcion;
private Efector m_idefector;
private string m_idFicha;
private string m_tipoFicha;
private string m_solicitante;
private Efector m_idEfectorSolicitante;
private string m_identificadorlabo;
private string m_clasificacion;

private DateTime m_fecha ;
private int m_idusuarioregistro;
private DateTime m_fecharegistro;
private string m_analisis;


#region Default ( Empty ) Class Constuctor
/// <summary>
/// default constructor
/// </summary>
public Ficha()
{

m_idFicha = String.Empty;
m_analisis = String.Empty;
m_solicitante = String.Empty;
m_tipoFicha = String.Empty;
m_identificadorlabo = String.Empty;

m_idusuarioregistro = 0;
m_fecharegistro = DateTime.MinValue;
m_clasificacion = String.Empty;

m_fecha = DateTime.MinValue;
}




#endregion // End of Default ( Empty ) Class Constuctor

#region Required Fields Only Constructor
/// <summary>
/// required (not null) fields only constructor
/// </summary>
public Ficha(


string idFicha,
string tipoFicha,
string solicitante,
string analisis,
string identificadorlabo,
string clasificacion,
int idusuarioregistro,
DateTime fecharegistro,
DateTime fecha


)
: this()
{
m_idFicha = idFicha;
m_tipoFicha = tipoFicha;
m_idusuarioregistro = idusuarioregistro;
m_fecharegistro = DateTime.MinValue;
m_fecha = DateTime.MinValue;
m_analisis = analisis;
}
#endregion // End Required Fields Only Constructor

#region Public Properties

/// <summary>
///
/// </summary>
public int IdFichaRecepcion
{
get { return m_idFichaRecepcion; }
set
{
m_isChanged |= (m_idFichaRecepcion != value );
m_idFichaRecepcion = value;
}

}

public Efector IdEfector
{
get { return m_idefector; }
set
{
m_isChanged |= (m_idefector != value);
m_idefector = value;
}

}

public Efector IdEfectorSolicitante
{
get { return m_idEfectorSolicitante; }
set
{
m_isChanged |= (m_idEfectorSolicitante != value);
m_idEfectorSolicitante = value;
}

}
/// <summary>
///
/// </summary>
public string IdFicha
{
get { return m_idFicha; }

set
{
if( value == null )
throw new ArgumentOutOfRangeException("Null value not allowed for m_idFicha", value, "null");

if( value.Length > 500)
throw new ArgumentOutOfRangeException("Invalid value for m_idFicha", value, value.ToString());

m_isChanged |= (m_idFicha != value); m_idFicha = value;
}
}


public string TipoFicha
{
get { return m_tipoFicha; }

set
{
//if (value == null)
// throw new ArgumentOutOfRangeException("Null value not allowed for MotivoBaja", value, "null");

if (value.Length > 500)
throw new ArgumentOutOfRangeException("Invalid value for m_tipoFicha", value, value.ToString());

m_isChanged |= (m_tipoFicha != value); m_tipoFicha = value;
}
}

public string Analisis
{
get { return m_analisis; }

set
{
//if (value == null)
// throw new ArgumentOutOfRangeException("Null value not allowed for MotivoBaja", value, "null");

if (value.Length > 200)
throw new ArgumentOutOfRangeException("Invalid value for m_analisis", value, value.ToString());

m_isChanged |= (m_analisis != value); m_analisis = value;
}
}

public string Solicitante
{
get { return m_solicitante; }

set
{
if (value == null)
throw new ArgumentOutOfRangeException("Null value not allowed for m_solicitante", value, "null");

if (value.Length > 5000)
throw new ArgumentOutOfRangeException("Invalid value for m_solicitante", value, value.ToString());

m_isChanged |= (m_solicitante != value); m_solicitante = value;
}
}


public string Identificadorlabo
{
get { return m_identificadorlabo; }
set
{
m_isChanged |= (m_identificadorlabo != value);
m_identificadorlabo = value;
}
}
public string Clasificacion
{
get { return m_clasificacion; }
set
{
m_isChanged |= (m_clasificacion != value);
m_clasificacion = value;
}
}

public int IdUsuarioRegistro
{
get { return m_idusuarioregistro; }
set
{
m_isChanged |= (m_idusuarioregistro != value);
m_idusuarioregistro = value;
}

}


/// <summary>
///
/// </summary>
public DateTime FechaRegistro
{
get { return m_fecharegistro; }
set
{
m_isChanged |= (m_fecharegistro != value);
m_fecharegistro = value;
}

}

public DateTime Fecha
{
get { return m_fecha; }
set
{
m_isChanged |= (m_fecha != value);
m_fecha = value;
}

}

/// <summary>
/// Returns whether or not the object has changed it's values.
/// </summary>
public bool IsChanged
{
get { return m_isChanged; }
}















#endregion
}
}
#endregion
27 changes: 27 additions & 0 deletions Business/Data/Laboratorio/Ficha.hbm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="Business.Data.Laboratorio.Ficha,Business" table="LAB_FichaRecepcion">

<id name="IdFichaRecepcion" column="idFichaRecepcion" type="Int32" unsaved-value="0">
<generator class="native"/>
</id>

<many-to-one name="IdEfector" column="idEfector" class="Business.Data.Efector,Business" />
<property column="fecha" type="DateTime" name="Fecha" not-null="true" />
<property column="idFicha" type="String" name="IdFicha" not-null="true" length="500" />
<property column="tipoFicha" type="String" name="TipoFicha" not-null="true" length="100" />
<property column="solicitante" type="String" name="Solicitante" not-null="true" length="200" />
<many-to-one name="IdEfectorSolicitante" column="idEfectorSolicitante" class="Business.Data.Efector,Business" />

<property column="identificadorlabo" type="String" name="Identificadorlabo" not-null="true" length="100" />
<property column="clasificacion" type="String" name="Clasificacion" not-null="true" length="100" />
<property column="analisis" type="String" name="Analisis" not-null="true" length="200" />

<property column="fechaRegistro" type="DateTime" name="FechaRegistro" not-null="true" />



<property column="idUsuarioRegistro" type="Int32" name="IdUsuarioRegistro" not-null="true" />

</class>
</hibernate-mapping>
Loading