-- mejoras visuales en

This commit is contained in:
2023-07-19 16:01:06 -07:00
parent 2bfbe31128
commit 9e4a48b064
4 changed files with 44 additions and 48 deletions

View File

@@ -106,18 +106,18 @@
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GVRegDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="Listado de Personal" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="margin-top: -10px; text-align: center;" GridLines="None"> <asp:GridView ID="GVRegDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="Listado de Personal" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
<Columns> <Columns>
<asp:BoundField HeaderText ="Proyecto" DataField="Proyecto" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText ="Proyecto" DataField="Proyecto" />
<asp:BoundField HeaderText ="Subproyecto" DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText ="Subproyecto" DataField="SubProyecto" />
<asp:BoundField HeaderText="Turno" DataField="Turno" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Turno" DataField="Turno"/>
<asp:TemplateField HeaderText="Faltas"> <asp:TemplateField HeaderText="Faltas" ItemStyle-HorizontalAlign="right" >
<ItemTemplate> <ItemTemplate>
<asp:Label ID ="lblFaltas" runat ="server" Width="70" Text='<%# If(Eval("Faltas").ToString = "0", "-", Eval("FALTAS")) %>'></asp:Label> <asp:Label ID ="lblFaltas" runat ="server" Width="70" Text='<%# If(Eval("Faltas").ToString = "0.0", "-", Eval("FALTAS", "{0:#,###}")) %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField HeaderText="Días laborales" DataField="DIAS" /> <asp:BoundField HeaderText="Días laborales" DataField="DIAS" ItemStyle-HorizontalAlign="right" DataFormatString="{0:#,###}" />
<asp:TemplateField HeaderText= "AUSENTISMO" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText= "AUSENTISMO">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblAusentismo" runat="server" Width ="70" Text='<%# Eval("AUSENTISMO")%>'> </asp:Label> <asp:Label ID="lblAusentismo" runat="server" Width ="70" Text='<%# Eval("AUSENTISMO")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>

View File

@@ -64,9 +64,8 @@ Partial Class RH_RepAusentismoLaboral
Dim FechaInicio As Date = Date.Now.AddDays(-30) Dim FechaInicio As Date = Date.Now.AddDays(-30)
Dim FechaFin As Date = Date.Now Dim FechaFin As Date = Date.Now
Try
FechaInicio = Date.Parse(txtInicio.Text) FechaInicio = Date.Parse(txtInicio.Text)
FechaFin = Date.Parse(txtFin.Text) FechaFin = Date.Parse(txtFin.Text)
If DdlProyecto.SelectedIndex <> 0 Then If DdlProyecto.SelectedIndex <> 0 Then
@@ -88,9 +87,7 @@ Partial Class RH_RepAusentismoLaboral
GVRegDatos.DataSource = dTable GVRegDatos.DataSource = dTable
GVRegDatos.DataBind() GVRegDatos.DataBind()
Catch ex As Exception
Dim exe As String = ex.Message
End Try
rh.Dispose() rh.Dispose()
UpDatos.Update() UpDatos.Update()
@@ -106,25 +103,28 @@ Partial Class RH_RepAusentismoLaboral
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
Dim sPorcentaje As String = e.Row.DBCampo("AUSENTISMO").Trim Dim porcentaje As Decimal = e.Row.DBCampo("AUSENTISMO").ToDecimal
Dim porcentaje As Double = Convert.ToDouble(sPorcentaje)
e.Row.FCLabel("lblAusentismo").CssClass = "label label-danger" e.Row.FCLabel("lblAusentismo").CssClass = "label label-danger"
e.Row.FCLabel("lblAusentismo").Font.Bold = True e.Row.FCLabel("lblAusentismo").Font.Bold = True
e.Row.FCLabel("lblAusentismo").Attributes.Add("dir", "rtl") e.Row.FCLabel("lblAusentismo").Attributes.Add("dir", "rtl")
e.Row.FCLabel("lblAusentismo").Text = sPorcentaje & "%" e.Row.FCLabel("lblAusentismo").Text = porcentaje.RoundSQL & "%"
If porcentaje <= 15.0 Then If porcentaje <= 15.0 Then
e.Row.FCLabel("lblAusentismo").CssClass = "label label-success" e.Row.FCLabel("lblAusentismo").CssClass = "label label-success"
ElseIf (porcentaje > 15.0 And porcentaje <= 30.0) Then ElseIf (porcentaje > 15.0 And porcentaje <= 30.0) Then
e.Row.FCLabel("lblAusentismo").CssClass = "label label-warning" e.Row.FCLabel("lblAusentismo").CssClass = "label label-warning"
End If End If
End If End If
If e.Row.DBCampo("SubProyecto").ToString.Trim = "" Then
e.Row.CssClass = "SubTotales2"
Else
If e.Row.DBCampo("Turno").ToString.Trim = "" Then
e.Row.CssClass = "SubTotales"
End If
End If
End If End If

View File

@@ -124,7 +124,7 @@
<asp:TemplateField HeaderText= "Inicio" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText= "Inicio" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblInicio" runat="server" Width ="70" Text='<%# If(Eval("PINICIO").ToString = "0", "-", Eval("PINICIO"))%>'> </asp:Label> <asp:Label ID="lblInicio" runat="server" Width ="70" Text='<%# If(Eval("PerINICIO").ToString = "0", "-", Eval("PerINICIO"))%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
@@ -142,13 +142,13 @@
<asp:TemplateField HeaderText="Fin" ItemStyle-HorizontalAlign="Center" > <asp:TemplateField HeaderText="Fin" ItemStyle-HorizontalAlign="Center" >
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblFin" runat="server" Width="70" Text='<%# If(Eval("PFIN").ToString = "0", "-", Eval("PFIN")) %>'></asp:Label> <asp:Label ID="lblFin" runat="server" Width="70" Text='<%# If(Eval("PerFIN").ToString = "0", "-", Eval("PerFIN")) %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText= "IRP" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText= "IRP" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblIrp" runat="server" Width ="70" Text='<%# Eval("IRP")%>'> </asp:Label> <asp:Label ID="lblIrp" runat="server" Width ="70" Text='<%# Eval("IRP", "###.00%")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
</Columns> </Columns>

View File

@@ -76,11 +76,10 @@ Partial Class Ventas_RepIndiceRotacionPersonal
Dim CveTurno As Integer = -1 Dim CveTurno As Integer = -1
Dim FechaInicio As Date = Date.Now.AddDays(-30) Dim FechaInicio As Date = Date.Now.AddDays(-30)
Dim FechaFin As Date = Date.Now Dim FechaFin As Date = Date.Now
Try
FechaInicio = Date.Parse(txtInicio.Text)
FechaInicio = Date.Parse(txtInicio.Text)
FechaFin = Date.Parse(txtFin.Text) FechaFin = Date.Parse(txtFin.Text)
If DdlProyecto.SelectedIndex <> 0 Then If DdlProyecto.SelectedIndex <> 0 Then
@@ -100,16 +99,9 @@ Partial Class Ventas_RepIndiceRotacionPersonal
End If End If
DTGvDatos = dTable DTGvDatos = dTable
GVRegDatos.DataSource = dTable GVRegDatos.DataSource = dTable
GVRegDatos.DataBind() GVRegDatos.DataBind()
Catch ex As Exception
Dim exe As String = ex.Message
End Try
rh.Dispose() rh.Dispose()
UpDatos.Update() UpDatos.Update()
@@ -124,28 +116,32 @@ Partial Class Ventas_RepIndiceRotacionPersonal
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
Dim sPorcentaje As String = e.Row.DBCampo("IRP").Trim Dim porcentaje As Decimal = e.Row.DBCampo("IRP").ToDecimal
Dim porcentaje As Double = Convert.ToDouble(sPorcentaje)
e.Row.FCLabel("LblIrp").CssClass = "label label-danger" e.Row.FCLabel("LblIrp").CssClass = "label label-danger"
e.Row.FCLabel("LblIrp").Font.Bold = True e.Row.FCLabel("LblIrp").Font.Bold = True
e.Row.FCLabel("lblIrp").Attributes.Add("dir", "rtl") e.Row.FCLabel("lblIrp").Attributes.Add("dir", "rtl")
e.Row.FCLabel("LblIrp").Text = porcentaje.ToString("0.00") & "%"
e.Row.FCLabel("LblIrp").Text = sPorcentaje & "%"
If porcentaje <= 15.0 Then If porcentaje <= 15.0 Then
e.Row.FCLabel("LblIrp").CssClass = "label label-success" e.Row.FCLabel("LblIrp").CssClass = "label label-success"
ElseIf (porcentaje > 15.0 And porcentaje <= 30.0) Then ElseIf (porcentaje > 15.0 And porcentaje <= 30.0) Then
e.Row.FCLabel("LblIrp").CssClass = "label label-warning" e.Row.FCLabel("LblIrp").CssClass = "label label-warning"
End If End If
End If End If
If e.Row.DataKey("SubProyecto").ToString.Trim = "" Then If e.Row.DBCampo("SubProyecto").ToString.Trim = "" Then
e.Row.CssClass = "SubTotales" e.Row.CssClass = "SubTotales2"
' e.Row.Attributes.Add("class", "SubTotales") Else
If e.Row.DBCampo("Turno").ToString.Trim = "" Then
e.Row.CssClass = "SubTotales"
Else
If e.Row.DBCampo("Turno").ToString.Trim = "" Then
e.Row.CssClass = "SubTotales3"
End If
End If
End If End If
End If End If