Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 72 additions & 28 deletions Business/Data/UsuarioEfector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,32 @@ public sealed class UsuarioEfector: Business.BaseDataAccess
private int m_idusuarioefector;
private Usuario m_idusuario;
private Efector m_idefector;

private bool m_activo;

private int m_idPerfil;
private int m_idEfectorDestino;
private int m_idArea;
private int m_idUsuarioRegistro;
private DateTime m_fechaRegistro;

#endregion

#region Default ( Empty ) Class Constuctor
/// <summary>
/// default constructor
/// </summary>
public UsuarioEfector()
#endregion

#region Default ( Empty ) Class Constuctor
/// <summary>
/// default constructor
/// </summary>
public UsuarioEfector()
{
m_idusuarioefector = 0;
m_idusuario = new Usuario();
m_idefector = new Efector();

m_activo = false;



}
m_idPerfil = 0;
m_idEfectorDestino = 0;
m_idArea = 0;
m_idUsuarioRegistro = 0;
m_fechaRegistro = DateTime.MinValue;
}


#endregion // End of Default ( Empty ) Class Constuctor
Expand All @@ -49,12 +54,11 @@ public UsuarioEfector()
/// required (not null) fields only constructor
/// </summary>
public UsuarioEfector(
bool activo)
bool activo)
: this()
{
m_idusuario = new Usuario();
m_idefector = new Efector();

m_activo = activo;


Expand Down Expand Up @@ -112,30 +116,70 @@ public bool Activo
m_activo = value;
}

}
public int IdPerfil
{
get { return m_idPerfil; }
set
{
m_isChanged |= (m_idPerfil != value );
m_idPerfil = value;
}

}


public bool IsChanged
public int IdEfectorDestino
{
get { return m_isChanged; }
get { return m_idEfectorDestino; }
set
{
m_isChanged |= (m_idEfectorDestino != value );
m_idEfectorDestino = value;
}

}

public int IdArea
{
get { return m_idArea; }
set
{
m_isChanged |= (m_idArea != value );
m_idArea = value;
}

#endregion
}

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

}

public DateTime FechaRegistro
{
get { return m_fechaRegistro; }
set
{
m_isChanged |= (m_fechaRegistro != value );
m_fechaRegistro = value;
}

#region Metodos
}


public bool IsChanged
{
get { return m_isChanged; }
}

#endregion

//public bool esHemoterapia()
//{
// var index=this.IdPerfil.Nombre.ToUpper().IndexOf("HEMOTERAPIA");
// if (index > -1) return true;
// else return false;

//}


}
}
11 changes: 5 additions & 6 deletions Business/Data/UsuarioEfector.hbm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@

<many-to-one name="IdEfector" column="idEfector" class="Business.Data.Efector,Business" />
<many-to-one name="IdUsuario" column="idUsuario" class="Business.Data.Usuario,Business" />


<property column="activo" type="Boolean" name="Activo" not-null="true" />



<!--<property column="matricula" type="String" name="Matricula" length="50" />-->
<property column="idPerfil" type="Int32" name="IdPerfil" />
<property column="idArea" type="Int32" name="IdArea" />
<property column="idEfectorDestino" type="Int32" name="IdEfectorDestino" />
<property column="idUsuarioRegistro" type="Int32" name="IdUsuarioRegistro" />
<property column="fechaRegistro" type="DateTime" name="FechaRegistro" />
</class>
</hibernate-mapping>
4 changes: 3 additions & 1 deletion WebLab/Informes/AuditoriaUser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,16 @@ public CrystalDecisions.CrystalReports.Engine.Section Section3 {

[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section4
{
get {
return this.ReportDefinition.Sections[3];
}
}

[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section3 {
public CrystalDecisions.CrystalReports.Engine.Section Section5 {
get {
return this.ReportDefinition.Sections[4];
}
Expand Down
142 changes: 77 additions & 65 deletions WebLab/Usuarios/UsuarioEdit.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
MaxLength="50"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvUsuario" runat="server"
ControlToValidate="txtUsername" ErrorMessage="Usuario" ValidationGroup="0">*</asp:RequiredFieldValidator>
<asp:CustomValidator ID="customValidacionGeneral" runat="server" ErrorMessage="Usuario Existente" OnServerValidate="customValidacionGeneral_ServerValidate" ValidationGroup="0"></asp:CustomValidator>
<asp:CustomValidator ID="customValidacionGeneral" runat="server" ErrorMessage="Error usuario existente" OnServerValidate="customValidacionGeneral_ServerValidate" ValidationGroup="0"></asp:CustomValidator>
<asp:CustomValidator ID="customValidacionGeneral0" runat="server" ErrorMessage="" OnServerValidate="customValidacionGeneral0_ServerValidate" ValidationGroup="0"></asp:CustomValidator>
</td>
</tr>
Expand All @@ -221,42 +221,8 @@
<anthem:checkbox ID="chkAdministrador" runat="server" Text="SI" AutoCallBack="True" onclick="habilitarListaEfectores();" OnCheckedChanged="chkAdministrador_CheckedChanged" />
</td>
</tr>
<%-- <tr>
<td class="auto-style1">
Efector</td>
<td class="auto-style2" >
<anthem:dropdownlist ID="ddlEfector" runat="server" Width="300px" class="form-control input-sm">
</anthem:dropdownlist>
<anthem:rangevalidator ID="rvEfector" runat="server" ControlToValidate="ddlEfector"
ErrorMessage="Efector" MaximumValue="999999" MinimumValue="1" Type="Integer"
ValidationGroup="0">*</anthem:rangevalidator>
</td>
</tr>--%>
<tr>
<td style="width: 93px">
Area/Laboratorio:</td>
<td style="width: 497px" >
<anthem:dropdownlist ID="ddlArea" runat="server" Width="200px" class="form-control input-sm">
</anthem:dropdownlist>
</td>
</tr>
<tr>
<td style="width: 93px">
Perfil:</td>
<td style="width: 497px" >
<anthem:dropdownlist ID="ddlPerfil" runat="server" CssClass="form-control input-sm" AutoCallBack="True" OnSelectedIndexChanged="ddlPerfil_SelectedIndexChanged" >
</anthem:dropdownlist>
<anthem:rangevalidator ID="rvPerfil" runat="server" ControlToValidate="ddlPerfil"
ErrorMessage="Perfil" MaximumValue="999999" MinimumValue="1" Type="Integer"
ValidationGroup="0">* </anthem:rangevalidator>
<anthem:dropdownlist ID="ddlEfectorDestino" runat="server" Width="200px" class="form-control input-sm" Visible="False">
</anthem:dropdownlist>
<anthem:rangevalidator ID="rvEfectorDestino" runat="server" ControlToValidate="ddlEfectorDestino"
ErrorMessage="Efector Destino - Laboratorio" MaximumValue="999999" MinimumValue="1" Type="Integer"
ValidationGroup="0" Enabled="False">*</anthem:rangevalidator>
</td>
</tr>
<tr>

<tr>
<td style="width: 93px">
Activo:</td>
<td style="width: 497px" >
Expand Down Expand Up @@ -322,30 +288,70 @@
</div>

<div id="tab2" class="tab_content" style="border: 1px solid #C0C0C0">
<div class="panel-body">
<table>
<tr>
<td colspan="2">

<%-- <anthem:dropdownlist ID="ddlEfector2" runat="server" Width="200px" class="form-control input-sm">
</anthem:dropdownlist> --%>

<asp:DropDownList ID="ddlEfector3" runat="server" Width="200px"> </asp:DropDownList>

<anthem:Button ID="btnAgregarEfector" runat="server" Text="Agregar" onclick="btnAgregarEfector_Click" CssClass="btn btn-primary" Width="100px" />
<div class="panel-body">
<table>
<tr>
<td style="width: 93px">Efector:</td>
<td style="width: 497px" >
<asp:DropDownList ID="ddlEfector3" runat="server" ValidationGroup="1" Width="200px"> </asp:DropDownList>
<asp:RequiredFieldValidator
ID="rfvEfector3"
runat="server"
ControlToValidate="ddlEfector3"
InitialValue="0"
ErrorMessage="Seleccione un efector"
ValidationGroup="1">*
</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td style="width: 93px">Area/Laboratorio:</td>
<td style="width: 497px" >
<anthem:dropdownlist ID="ddlArea" runat="server" Width="250px" class="form-control input-sm" ValidationGroup="1">
</anthem:dropdownlist>
</td>
</tr>
<tr>
<td style="width: 93px">
Perfil:</td>
<td style="width: 497px" >
<anthem:dropdownlist ID="ddlPerfil" runat="server" CssClass="form-control input-sm" Width="250px" AutoCallBack="True" OnSelectedIndexChanged="ddlPerfil_SelectedIndexChanged" ValidationGroup="1">
</anthem:dropdownlist>
<anthem:rangevalidator ID="rvPerfil" runat="server" ControlToValidate="ddlPerfil"
ErrorMessage="Perfil" MaximumValue="999999" MinimumValue="1" Type="Integer"
ValidationGroup="1">* </anthem:rangevalidator>

</td>
</tr>
<tr>
<td style="width: 93px"> <anthem:label runat="server" ID="lblEfectorDestino" Text="Efector Destino:" Visible="false"> </anthem:label></td>
<td style="width: 497px">
<anthem:dropdownlist ID="ddlEfectorDestino" runat="server" Width="250px" class="form-control input-sm" Visible="False">
</anthem:dropdownlist>
<anthem:rangevalidator ID="rvEfectorDestino" runat="server" ControlToValidate="ddlEfectorDestino"
ErrorMessage="Efector Destino - Laboratorio" MaximumValue="999999" MinimumValue="1" Type="Integer"
ValidationGroup="1" Enabled="False">*</anthem:rangevalidator>
</td>
</tr>


<tr> <td></td><td></td>
<td >
<anthem:Button ID="btnAgregarEfector" runat="server" Text="Agregar" onclick="btnAgregarEfector_Click" CssClass="btn btn-primary" Width="100px" ValidationGroup="1" />


</td>
</td>

</tr>
<tr>
<td>
<td colspan="2">
<anthem:Label ID="lblMensajeEfector" runat="server" Visible="false" Text="Label" Font-Bold="True" ForeColor="#CC0000"></anthem:Label>
</td>
</tr>

<tr>
<td><hr/></td><td><hr/></td>
</tr>
<tr>
<td >
<td colspan="3">
<anthem:GridView ID="gvListaEfector" runat="server" AutoGenerateColumns="False"
DataKeyNames="idEfector" Font-Size="12pt" Width="100%"
ForeColor="#333333" EmptyDataText="Agregue al menos un efector"
Expand All @@ -354,19 +360,25 @@
GridLines="Horizontal" OnRowCommand="gvListaEfector_RowCommand" OnRowDataBound="gvListaEfector_RowDataBound">
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<Columns>
<asp:BoundField DataField="nombre"
HeaderText="Efector" >
<ItemStyle Width="90%" />
</asp:BoundField>
<asp:BoundField DataField="nombre" HeaderText="Efector" >
<ItemStyle Width="30%" />
</asp:BoundField>
<asp:BoundField DataField="Area" HeaderText="Area" >
<ItemStyle Width="25%" />
</asp:BoundField>
<asp:BoundField DataField="Perfil" HeaderText="Perfil" >
<ItemStyle Width="20%" />
</asp:BoundField>
<asp:BoundField DataField="EfectorDestino" HeaderText="Laboratorio Destino" >
<ItemStyle Width="50%" />
</asp:BoundField>
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:ImageButton ID="Eliminar" runat="server" ImageUrl="~/App_Themes/default/images/eliminar.jpg"
CommandName="Eliminar" />
</ItemTemplate>

<ItemStyle Width="5%" HorizontalAlign="Center" />

</asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="Eliminar" runat="server" ImageUrl="~/App_Themes/default/images/eliminar.jpg"
CommandName="Eliminar" />
</ItemTemplate>
<ItemStyle Width="5%" HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
Expand Down
Loading
Loading