This commit is contained in:
2024-03-22 00:53:42 -07:00
15 changed files with 479 additions and 153 deletions

View File

@@ -10609,7 +10609,7 @@ Public Class ClsPaginas
PaginaDict.Add("/RH/RepDocumentacionVencida.aspx".ToUpper(), 412) PaginaDict.Add("/RH/RepDocumentacionVencida.aspx".ToUpper(), 412)
PaginaDict.Add("/RH/CatSubProyectosZonas.aspx".ToUpper(), 421) PaginaDict.Add("/RH/CatSubProyectosZonas.aspx".ToUpper(), 421)
PaginaDict.Add("/RH/RepVacaciones.aspx".ToUpper(), 422) PaginaDict.Add("/RH/RepVacaciones.aspx".ToUpper(), 422)
PaginaDict.Add("/RH/CatChecadorTipo.aspx".ToUpper(), 427) 'PaginaDict.Add("/RH/CatChecadorTipo.aspx".ToUpper(), 427)
PaginaDict.Add("/RH/CatChecadorHorarios.aspx".ToUpper(), 428) PaginaDict.Add("/RH/CatChecadorHorarios.aspx".ToUpper(), 428)
PaginaDict.Add("/RH/RepChecadorPreAsistencia.aspx".ToUpper(), 628) PaginaDict.Add("/RH/RepChecadorPreAsistencia.aspx".ToUpper(), 628)
PaginaDict.Add("/RH/CatCaptaciones.aspx".ToUpper(), 629) PaginaDict.Add("/RH/CatCaptaciones.aspx".ToUpper(), 629)

View File

@@ -7442,44 +7442,6 @@ Public Class ClsRH
Return Retorno Return Retorno
End Function End Function
Public Function AddRemoveChecadoresSubProyectos(CveChecador As Integer, CveSubProyecto As Integer, CveUsuario As Integer, Agreagar As Boolean) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_RH_ChecadorSubProyectosAddRemove")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveChecador", SqlDbType.Int).Value = CveChecador
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Agreagar", SqlDbType.Bit).Value = Agreagar
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al agregar el sub proyecto", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function GetChecadoresSubProyectos(CveChecador As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_RH_ChecadorSubProyectosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveChecador", SqlDbType.Int).Value = CveChecador
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obteger los sub proyecto", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#End Region #End Region
#Region " A C T I V I D A D E S" #Region " A C T I V I D A D E S"

View File

@@ -1202,7 +1202,8 @@
<asp:UpdatePanel ID="UpInv" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpInv" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvInv" runat="server" DataKeyNames="Total,PU,Cantidad,CvePS" AutoGenerateColumns="false" GridLines="None" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall mysmallbtn" Visible="false"> <asp:GridView ID="GvInv" runat="server" DataKeyNames="Total,PU,Cantidad,CvePS,PUProntoPago,TotalProntoPago" AutoGenerateColumns="false" GridLines="None" EmptyDataText="Aun no hay registros."
ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall mysmallbtn" Visible="false">
<Columns> <Columns>
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
<HeaderTemplate> <HeaderTemplate>

View File

@@ -1117,6 +1117,49 @@ Partial Class Compras_Compras
End Set End Set
End Property End Property
''' <summary>
''' Descuento por pronto pago proveedor
''' </summary>
''' <returns>Porcentaje de descuento de proveedor</returns>
Private Property PorcentajeProntoPago As Decimal
Get
If ViewState("PorcentajeProntoPago") Is Nothing Then
ViewState("PorcentajeProntoPago") = 0D
End If
Return ViewState("PorcentajeProntoPago").ToString.ToDecimal
End Get
Set(value As Decimal)
ViewState("PorcentajeProntoPago") = value
End Set
End Property
Private Property ImporteRemNC As Decimal
Get
If ViewState("ImporteRemNC") Is Nothing Then
ViewState("ImporteRemNC") = 0D
End If
Return ViewState("ImporteRemNC").ToString.ToDecimal
End Get
Set(value As Decimal)
ViewState("ImporteRemNC") = value
End Set
End Property
Private Property ImporteRemNCProntoPago As Decimal
Get
If ViewState("ImporteRemNCProntoPago") Is Nothing Then
ViewState("ImporteRemNCProntoPago") = 0D
End If
Return ViewState("ImporteRemNCProntoPago").ToString.ToDecimal
End Get
Set(value As Decimal)
ViewState("ImporteRemNCProntoPago") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
'ImgBtnBuscarOC.Attributes.Add("data-toggle", "tooltip") 'ImgBtnBuscarOC.Attributes.Add("data-toggle", "tooltip")
@@ -3280,6 +3323,8 @@ Partial Class Compras_Compras
Private Sub CargaProveedor(CveProveedor As Integer, RFC As String, Optional RecargaCombo As Boolean = True) Private Sub CargaProveedor(CveProveedor As Integer, RFC As String, Optional RecargaCombo As Boolean = True)
PorcentajeProntoPago = 0D
Dim ObjProveedor As New ClsCompProveedores() Dim ObjProveedor As New ClsCompProveedores()
If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, CveProveedor, "-1", "-1", "-1", "-1", RFC, "-1", "-1", -1, UsuarioActual.CveEmpresa) Then If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, CveProveedor, "-1", "-1", "-1", "-1", RFC, "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
@@ -3435,6 +3480,10 @@ Partial Class Compras_Compras
End If End If
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
PorcentajeProntoPago = ObjProveedor.PorcentajeProntoPago
End If
Else Else
Alert("El Proveedor solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgAdvertencia) Alert("El Proveedor solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgAdvertencia)
End If End If
@@ -9999,6 +10048,8 @@ Partial Class Compras_Compras
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer)) TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
TmpDT.Columns.Add("CveCultivoCuadroDetalle", GetType(Integer)) TmpDT.Columns.Add("CveCultivoCuadroDetalle", GetType(Integer))
TmpDT.Columns.Add("TemporadaCuadro", GetType(String)) TmpDT.Columns.Add("TemporadaCuadro", GetType(String))
TmpDT.Columns.Add("PUProntoPago", GetType(Decimal))
TmpDT.Columns.Add("TotalProntoPago", GetType(Decimal))
TmpDTOriginal = New DataTable TmpDTOriginal = New DataTable
TmpDTOriginal.Columns.Add("Consec", GetType(Integer)) TmpDTOriginal.Columns.Add("Consec", GetType(Integer))
@@ -10108,6 +10159,8 @@ Partial Class Compras_Compras
TmpDTOriginal.Columns.Add("CveContratoDetalle", GetType(Double)) TmpDTOriginal.Columns.Add("CveContratoDetalle", GetType(Double))
TmpDTOriginal.Columns.Add("CveCultivoCuadroDetalle", GetType(Double)) TmpDTOriginal.Columns.Add("CveCultivoCuadroDetalle", GetType(Double))
TmpDTOriginal.Columns.Add("TemporadaCuadro", GetType(String)) TmpDTOriginal.Columns.Add("TemporadaCuadro", GetType(String))
TmpDTOriginal.Columns.Add("PUProntoPago", GetType(Decimal))
TmpDTOriginal.Columns.Add("TotalProntoPago", GetType(Decimal))
End Sub End Sub
@@ -10437,6 +10490,17 @@ Partial Class Compras_Compras
e.Row.FCTextBox("TxtDividir").Visible = False e.Row.FCTextBox("TxtDividir").Visible = False
End If End If
End If End If
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
e.Row.Cells(4).Text = e.Row.DataKey("PUProtoPago").ToDecimal.ToString("###,###,###.00")
'If PorcentajeProntoPago > 0 Then
' e.Row.Cells(4).Text = e.Row.DataKey("PUProtoPago").ToDecimal - ()
'End If
End If
End If End If
'HEADER GvInv 'HEADER GvInv
@@ -14293,10 +14357,22 @@ Partial Class Compras_Compras
LbSubTotalDif.Visible = False LbSubTotalDif.Visible = False
Vinculacion() Vinculacion()
Else Else
LbSubTotalDif.Visible = True
LbSubTotalDif.Text = (SubTotalCompra - SubTotalGV).FormatoNumero If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
Alert("Los SubTotales de la vinculación no coinciden. Rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia,,)
RegistraScript("CalculaTotalesOC();") ImporteRemNC = (SubTotalCompra - SubTotalGV).RoundSQL(2)
ImporteRemNCProntoPago = (SubTotalCompra * PorcentajeProntoPago).RoundSQL(2)
Vinculacion()
Else
LbSubTotalDif.Visible = True
LbSubTotalDif.Text = (SubTotalCompra - SubTotalGV).FormatoNumero
Alert("Los SubTotales de la vinculación no coinciden. Rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia,,)
RegistraScript("CalculaTotalesOC();")
End If
End If End If
UpEstatus.Update() UpEstatus.Update()
@@ -16866,6 +16942,13 @@ Partial Class Compras_Compras
Dim Row As DataRow = Nothing Dim Row As DataRow = Nothing
If Not TmpDT.Columns.Contains("PUProntoPago") Then
TmpDT.Columns.Add("PUProntoPago", GetType(Decimal))
End If
If Not TmpDT.Columns.Contains("TotalProntoPago") Then
TmpDT.Columns.Add("TotalProntoPago", GetType(Decimal))
End If
Row = TmpDT.NewRow() Row = TmpDT.NewRow()
Dim Retorno As Integer = 0 Dim Retorno As Integer = 0
Dim CveContrato As Integer = -1 Dim CveContrato As Integer = -1

View File

@@ -232,7 +232,7 @@
<ajax:ValidatorCalloutExtender ID="VCOPrio" runat="server" TargetControlID="RFVPrioridad" HighlightCssClass="vco" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCOPrio" runat="server" TargetControlID="RFVPrioridad" HighlightCssClass="vco" Width="300px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-4">
<div class="form-group form-md-line-input"> <div class="form-group form-md-line-input">
<asp:DropDownList ID="DdlTema" runat="server" CssClass="form-control select2me input-sm" DataValueField="CveRevision" DataTextField="Revision" Width="100%"> <asp:DropDownList ID="DdlTema" runat="server" CssClass="form-control select2me input-sm" DataValueField="CveRevision" DataTextField="Revision" Width="100%">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
@@ -242,6 +242,9 @@
<ajax:ValidatorCalloutExtender ID="VCERFVDdlTema" runat="server" TargetControlID="RFVDdlTema" HighlightCssClass="vco" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCERFVDdlTema" runat="server" TargetControlID="RFVDdlTema" HighlightCssClass="vco" Width="300px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<div class="col-sm-2">
<asp:LinkButton ID="LnkAddTtemaB" OnClick="LnkAddTtemaB_Click" runat="server" CssClass="btn btn-default" Style="margin-top: 15px;"><i class="fa fa-plus"></i></asp:LinkButton>
</div>
</div> </div>
</div> </div>
</asp:Panel> </asp:Panel>
@@ -258,11 +261,40 @@
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<script src="/Metronic/assets/global/plugins/dhtmlxgantt/dhtmlxgantt.js"></script>
<%--<script src="/Metronic/assets/global/plugins/GantJS/jsgantt.js" type="text/javascript"></script>--%>
<div id='<%= iddivAgregarTema %>' class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<asp:UpdatePanel ID="UpModalTema" class="modal-content " tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header">
<button type="button" class="close" onclick="closeModal()" aria-label="Close"><span aria-hidden="true">&times;</span> </button>
<h4 class="modal-title" style="text-align: left">
<asp:Literal ID="Literal2" runat="server">Agregar Tema</asp:Literal></h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtTema" runat="server" CssClass="form-control" CausesValidation="true" TextMode="MultiLine" Rows="1"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtTema" runat="server" ControlToValidate="TxtTema" Display="None" ErrorMessage="El campo <b>''Tema''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="VGMAddTemaTN"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Tema" AssociatedControlID="TxtTema"></asp:Label>
</div>
</div>
<div class="modal-footer">
<asp:LinkButton ID="BtnAgregarTema" OnClick="BtnAgregarTema_Click" CssClass="btn btn-primary" ValidationGroup="VGMAddTemaTN" runat="server">Agregar</asp:LinkButton>
<button id="BtnCerrarModalTema" onclick="closeModal()" class="btn btn-default">Cerrar</button>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</asp:Content> </asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<script src="/Metronic/assets/global/plugins/dhtmlxgantt/dhtmlxgantt.js"></script>
<script> <script>
let RCveEvento =<%= RCveEvento %>; let RCveEvento =<%= RCveEvento %>;
@@ -576,5 +608,12 @@
CargaPickers(); CargaPickers();
} }
</script> </script>
<script type="text/javascript">
function closeModal() {
$('#divModalAgregartema').modal('hide');
}
</script>
</asp:Content> </asp:Content>

View File

@@ -21,6 +21,7 @@ public partial class OI_Proyecto : ClsPaginas
public List<int> LCveUsuarioCCP { get { if (ViewState["LCveUsuarioCCP"] == null) { ViewState["LCveUsuarioCCP"] = new List<int>(); } return (List<int>)ViewState["LCveUsuarioCCP"]; } set { ViewState["LCveUsuarioCCP"] = value; } } public List<int> LCveUsuarioCCP { get { if (ViewState["LCveUsuarioCCP"] == null) { ViewState["LCveUsuarioCCP"] = new List<int>(); } return (List<int>)ViewState["LCveUsuarioCCP"]; } set { ViewState["LCveUsuarioCCP"] = value; } }
public List<int> LcveuserVisto { get { if (ViewState["LcveuserVisto"] == null) { ViewState["LcveuserVisto"] = new List<int>(); } return (List<int>)ViewState["LcveuserVisto"]; } set { ViewState["LcveuserVisto"] = value; } } public List<int> LcveuserVisto { get { if (ViewState["LcveuserVisto"] == null) { ViewState["LcveuserVisto"] = new List<int>(); } return (List<int>)ViewState["LcveuserVisto"]; } set { ViewState["LcveuserVisto"] = value; } }
public const string iddivAgregarTema = "divModalAgregartema";
#endregion #endregion
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
@@ -355,4 +356,48 @@ public partial class OI_Proyecto : ClsPaginas
UpModalProyecto.Update(); UpModalProyecto.Update();
} }
#region TEMAS
protected void LnkAddTtemaB_Click(object sender, EventArgs e)
{
RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarTema));
}
protected void BtnAgregarTema_Click(object sender, EventArgs e)
{
using (ClsOIEventos objoi = new ClsOIEventos())
{
if (objoi.AddRevisionesEventos(TxtTema.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
{
Alert(string.Format("El Tema \"{0}\" fue agregado con éxito.", TxtTema.Text.Trim()), ModExtensiones.TipoMensaje.MsgInformacion);
RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregarTema));
TxtTema.Text = "";
set_GlobalDTOIRevision(UsuarioActual.CveEmpresa, objoi.DtResultados);
CargaTemas();
UpModalTema.Update();
UpModalProyecto.Update();
}
else { Alert("Ocurrió un error al agregar la revisión. Por favor vuelva a intentar.", ModExtensiones.TipoMensaje.MsgError); }
}
}
private void CargaTemas()
{
DdlTema.ClearSelection();
DdlTema.SelectedValue = null;
DdlTema.Items.Clear();
DdlTema.DataSource = get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario));
DdlTema.DataBind();
DdlTema.Items.Insert(0, new ListItem("Seleccione", "-1"));
}
#endregion
} }

View File

@@ -178,7 +178,7 @@
<ajax:ValidatorCalloutExtender ID="VCOPrio" runat="server" TargetControlID="RFVPrioridad" HighlightCssClass="vco" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCOPrio" runat="server" TargetControlID="RFVPrioridad" HighlightCssClass="vco" Width="300px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-4">
<div class="form-group form-md-line-input"> <div class="form-group form-md-line-input">
<asp:DropDownList ID="DdlTema" runat="server" CssClass="form-control select2me input-sm" DataValueField="CveRevision" DataTextField="Revision" Width="100%"> <asp:DropDownList ID="DdlTema" runat="server" CssClass="form-control select2me input-sm" DataValueField="CveRevision" DataTextField="Revision" Width="100%">
@@ -193,6 +193,9 @@
</div> </div>
</div> </div>
<div class="col-sm-2">
<asp:LinkButton ID="LnkAddTtemaB" OnClick="LnkAddTtemaB_Click" runat="server" CssClass="btn btn-default" Style="margin-top: 15px;"><i class="fa fa-plus"></i></asp:LinkButton>
</div>
</div> </div>
</div> </div>
</asp:Panel> </asp:Panel>
@@ -208,6 +211,32 @@
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<div id='<%= iddivAgregarTema %>' class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<asp:UpdatePanel ID="UpModalTema" class="modal-content " tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header">
<button type="button" class="close" onclick="closeModal()" aria-label="Close"><span aria-hidden="true">&times;</span> </button>
<h4 class="modal-title" style="text-align: left">
<asp:Literal ID="Literal2" runat="server">Agregar Tema</asp:Literal></h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtTema" runat="server" CssClass="form-control" CausesValidation="true" TextMode="MultiLine" Rows="1"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtTema" runat="server" ControlToValidate="TxtTema" Display="None" ErrorMessage="El campo <b>''Tema''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="VGMAddTemaTN"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Tema" AssociatedControlID="TxtTema"></asp:Label>
</div>
</div>
<div class="modal-footer">
<asp:LinkButton ID="BtnAgregarTema" OnClick="BtnAgregarTema_Click" CssClass="btn btn-primary" ValidationGroup="VGMAddTemaTN" runat="server">Agregar</asp:LinkButton>
<button id="BtnCerrarModalTema" onclick="closeModal()" class="btn btn-default">Cerrar</button>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</asp:Content> </asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<script> <script>
@@ -256,5 +285,10 @@
CargaPickers(); CargaPickers();
} }
</script> </script>
<script type="text/javascript">
function closeModal() {
$('#divModalAgregartema').modal('hide');
}
</script>
</asp:Content> </asp:Content>

View File

@@ -10,6 +10,7 @@ public partial class OI_RepProyectos : ClsPaginas
{ {
#region Propiedades #region Propiedades
public const string iddivAgregarProyecto = "iddivAgregarProyecto"; public const string iddivAgregarProyecto = "iddivAgregarProyecto";
public const string iddivAgregarTema = "divModalAgregartema";
#endregion #endregion
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
@@ -21,9 +22,11 @@ public partial class OI_RepProyectos : ClsPaginas
DdlPara.Items.Insert(0, new ListItem("Seleccione uno", "-1")); DdlPara.Items.Insert(0, new ListItem("Seleccione uno", "-1"));
DdlTema.DataSource = get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario));
DdlTema.DataBind(); CargaTemas();
DdlTema.Items.Insert(0, new ListItem("Seleccione", "-1")); //DdlTema.DataSource = get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario));
//DdlTema.DataBind();
//DdlTema.Items.Insert(0, new ListItem("Seleccione", "-1"));
cargar(); cargar();
} }
} }
@@ -196,4 +199,50 @@ public partial class OI_RepProyectos : ClsPaginas
} }
} }
#region TEMAS
protected void LnkAddTtemaB_Click(object sender, EventArgs e)
{
RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarTema));
}
protected void BtnAgregarTema_Click(object sender, EventArgs e)
{
using (ClsOIEventos objoi = new ClsOIEventos())
{
if (objoi.AddRevisionesEventos(TxtTema.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
{
Alert(string.Format("El Tema \"{0}\" fue agregado con éxito.", TxtTema.Text.Trim()), ModExtensiones.TipoMensaje.MsgInformacion);
RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregarTema));
TxtTema.Text = "";
set_GlobalDTOIRevision(UsuarioActual.CveEmpresa, objoi.DtResultados);
CargaTemas();
UpModalTema.Update();
UpModalProyecto.Update();
}
else { Alert("Ocurrió un error al agregar la revisión. Por favor vuelva a intentar.", ModExtensiones.TipoMensaje.MsgError); }
}
}
private void CargaTemas()
{
DdlTema.ClearSelection();
DdlTema.SelectedValue = null;
DdlTema.Items.Clear();
DdlTema.DataSource = get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario));
DdlTema.DataBind();
DdlTema.Items.Insert(0, new ListItem("Seleccione", "-1"));
}
#endregion
} }

View File

@@ -655,6 +655,7 @@
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
</div> </div>
<div id='<%= iddivAgregarTema %>' class="modal ADS fade" role="dialog"> <div id='<%= iddivAgregarTema %>' class="modal ADS fade" role="dialog">
<div class="modal-dialog"> <div class="modal-dialog">
<asp:UpdatePanel ID="UpdatePanel1" class="modal-content " tabindex="-1" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpdatePanel1" class="modal-content " tabindex="-1" runat="server" UpdateMode="Conditional">

View File

@@ -23,7 +23,8 @@
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveChecador,Checador,CveModelo,CveSubProyecto,SubProyecto,CveUsuario,Estatus,FechaIng,IPLocal,Puerto" EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%" GridLines="None"> <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveChecador,Checador,CveModelo,CveSubProyecto,SubProyecto,CveUsuario,Estatus,FechaIng,IPLocal,Puerto"
EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%" GridLines="None">
<Columns> <Columns>
<asp:BoundField HeaderText="Checador" DataField="Checador" /> <asp:BoundField HeaderText="Checador" DataField="Checador" />
<asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" /> <asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" />
@@ -53,28 +54,34 @@
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Checadores</asp:Literal></h4> <asp:Literal ID="LtlTituloModalTiposD" runat="server">Checadores</asp:Literal></h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtChecador" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox> <asp:TextBox ID="TxtChecador" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtChecador" runat="server" ControlToValidate="TxtChecador" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Checador''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RfvTxtChecador" runat="server" ControlToValidate="TxtChecador" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Checador''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
<label for="TxtChecador">Checador:</label> <label for="TxtChecador">Checador:</label>
<i></i> <i></i>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<label for="DdlSubProyecto">Subproyecto:</label>
<asp:DropDownList ID="DdlSubProyecto" Width="100%" runat="server" AppendDataBoundItems="true" DataValueField="CveSubProyecto" DataTextField="SubProyecto" ValidationGroup="GrpGuardar" CssClass="select2me">
<asp:DropDownList ID="DdlSubProyecto" Width="100%" runat="server" AppendDataBoundItems="true" DataValueField="CveSubProyecto" DataTextField="SubProyecto" ValidationGroup="GrpGuardar" CssClass="form-control select2me">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVDdlSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sub Proyecto''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVDdlSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sub Proyecto''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCODdlSubProyecto" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlSubProyecto" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCODdlSubProyecto" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlSubProyecto" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="DdlSubProyecto"><asp:label runat="server" ID="LblSubProyecto" for="DdlSubProyecto">Subproyecto:</asp:label>:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<label for="DdlModelo">Modelo:</label> <asp:DropDownList ID="DdlModelo" Width="100%" runat="server" AppendDataBoundItems="true" ValidationGroup="GrpGuardar" CssClass="form-control select2me">
<asp:DropDownList ID="DdlModelo" Width="100%" runat="server" AppendDataBoundItems="true" ValidationGroup="GrpGuardar" CssClass="select2me">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Text="zkteco" Value="1"></asp:ListItem> <asp:ListItem Text="zkteco" Value="1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlModelo" runat="server" ControlToValidate="DdlModelo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Modelo''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RfvDdlModelo" runat="server" ControlToValidate="DdlModelo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Modelo''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceDdlModelo" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModelo" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VceDdlModelo" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModelo" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="DdlModelo">Modelo:</label>
<i></i> <i></i>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
@@ -97,31 +104,7 @@
<asp:CheckBox runat="server" ID="ChkEstatus" CssClass="make-switchsd" data-size="small" Text=" " /> <asp:CheckBox runat="server" ID="ChkEstatus" CssClass="make-switchsd" data-size="small" Text=" " />
</div> </div>
</br>
</br>
<div class="row">
<div class="row">
<div class="col-md-12">
<asp:GridView ID="GvChecadorSubProyectos" runat="server" AutoGenerateColumns="False" OnRowDataBound="GvChecadorSubProyectos_RowDataBound" Width="90%"
DataKeyNames="CveSubProyecto,CveChecador"
EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%" GridLines="None">
<Columns>
<asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" />
<asp:BoundField HeaderText="Usuario" DataField="Usuario" />
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0:d}" />
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="Chk" runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</div>
</div> </div>
</br> </br>

View File

@@ -26,8 +26,9 @@ public partial class RH_CatChecadores : ClsPaginas
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
CargaDatos();
CargaSubProyectos(); CargaSubProyectos();
CargaDatos();
} }
} }
@@ -38,14 +39,19 @@ public partial class RH_CatChecadores : ClsPaginas
{ {
GvDatos.DataSource = ObjRH.DtResultados; GvDatos.DataSource = ObjRH.DtResultados;
} }
ObjRH.Dispose(); ObjRH.Dispose();
GvDatos.DataBind(); GvDatos.DataBind();
GvDatos.HeaderRow.Cells[1].Text = LblSubProyecto.Text;
} }
private void CargaSubProyectos() private void CargaSubProyectos()
{ {
DdlSubProyecto.DataSource = get_GlobalDTSubProyectos(-1, CveEmpresa: UsuarioActual.CveEmpresa); DdlSubProyecto.DataSource = get_GlobalDTSubProyectos(-1, CveEmpresa: UsuarioActual.CveEmpresa);
DdlSubProyecto.DataBind(); DdlSubProyecto.DataBind();
CargarCentrosDeCosto(null, DdlSubProyecto,null, LblSubProyecto);
} }
protected void BtnAgregarChecador_Click(object sender, EventArgs e) protected void BtnAgregarChecador_Click(object sender, EventArgs e)
@@ -56,11 +62,7 @@ public partial class RH_CatChecadores : ClsPaginas
TxtIPLocal.Text = ""; TxtIPLocal.Text = "";
TxtPuerto.Text = ""; TxtPuerto.Text = "";
BtnChecadorAgregar.Text = "Agregar"; BtnChecadorAgregar.Text = "Agregar";
divChkEstatus.Visible = false; divChkEstatus.Visible = false;
GvChecadorSubProyectos.DataSource = null;
GvChecadorSubProyectos.DataBind();
GvChecadorSubProyectos.Visible = false;
UpModalTiposD.Update(); UpModalTiposD.Update();
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD")); RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"));
@@ -78,39 +80,12 @@ public partial class RH_CatChecadores : ClsPaginas
} }
} }
else else
{ {
// bool errorProceso = false;
//ObjRH.IniciaTransacSQL();
if (ObjRH.UpdateChecadores(CveChecador,TxtChecador.Text,DdlSubProyecto.SelectedValue.ToEntero(),TxtIPLocal.Text,TxtPuerto.Text,Estatus: ChkEstatus.Checked, CveModelo: DdlModelo.SelectedValue.ToEntero())) if (ObjRH.UpdateChecadores(CveChecador,TxtChecador.Text,DdlSubProyecto.SelectedValue.ToEntero(),TxtIPLocal.Text,TxtPuerto.Text,Estatus: ChkEstatus.Checked, CveModelo: DdlModelo.SelectedValue.ToEntero()))
{ {
Alert("Checador actualizado correctamente"); Alert("Checador actualizado correctamente");
} }
foreach(GridViewRow GvRow in GvChecadorSubProyectos.Rows)
{
if(GvRow.RowType == DataControlRowType.DataRow)
{
CheckBox Chk = GvRow.FCCheckBox("Chk");
if (!ObjRH.AddRemoveChecadoresSubProyectos(CveChecador, GvRow.DataKey("CveSubProyecto").ToEntero(), UsuarioActual.CveUsuario, Chk.Checked))
{
//errorProceso = true;
Alert("Ocurrió un error.",ModExtensiones.TipoMensaje.MsgError);
break;
}
}
}
//if (errorProceso)
//{
// ObjRH.RollBack();
//}
//else
//{
// ObjRH.Commit();
//}
} }
ObjRH.Dispose(); ObjRH.Dispose();
CargaDatos(); CargaDatos();
@@ -133,21 +108,6 @@ public partial class RH_CatChecadores : ClsPaginas
ChkEstatus.Checked = GvRow.DataKey("Estatus") == "Activo"; ChkEstatus.Checked = GvRow.DataKey("Estatus") == "Activo";
divChkEstatus.Visible = true; divChkEstatus.Visible = true;
GvChecadorSubProyectos.Visible = true;
ClsRH objRH = new ClsRH();
if (objRH.GetChecadoresSubProyectos(CveChecador, UsuarioActual.CveEmpresa))
{
GvChecadorSubProyectos.DataSource = objRH.DtResultados;
}
GvChecadorSubProyectos.DataBind();
objRH.Dispose();
UpModalTiposD.Update(); UpModalTiposD.Update();
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD")); RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"));
} }

View File

@@ -102,7 +102,7 @@
<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" <asp:GridView ID="GVRegDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" DataKeyNames="CvePersonal,NombreCompleto"
CssClass="ADSCROLLER2 table table-striped table-advance table-hover Widthall" data-rows="1" data-cols="3" data-heightmenos="100" data-heightfijo="600" Style="text-align: center;" GridLines="None"> CssClass="ADSCROLLER2 table table-striped table-advance table-hover Widthall" data-rows="1" data-cols="3" data-heightmenos="100" data-heightfijo="600" Style="text-align: center;" GridLines="None">
<Columns> <Columns>
<asp:TemplateField HeaderText="Codigo" ItemStyle-HorizontalAlign="Left" > <asp:TemplateField HeaderText="Codigo" ItemStyle-HorizontalAlign="Left" >
@@ -309,7 +309,7 @@
<tr> <tr>
<td></td> <td></td>
<td> <td>
<asp:DropDownList ID="DdlAsistenciaInacistencia" Width="150" runat="server" CssClass="select2me" DataTextField="Tipo" DataValueField="CveAsistenciasInasistencias"></asp:DropDownList></td> <asp:DropDownList ID="DdlAsistenciaInacistencia" Width="150" runat="server" CssClass="select2me" DataTextField="Tipo" DataValueField="CveAsistenciasInasistencias" ></asp:DropDownList></td>
</tr> </tr>
</table> </table>
@@ -330,6 +330,8 @@
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</td> </td>
</tr> </tr>
</table> </table>
@@ -337,8 +339,8 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<div class="row"> <div class="row">
<asp:Button ID="BtnGuardar" Visible="true" runat="server" Text="Guardar" class="btn btn-primary" OnClick="BtnGuardar_Click" />
<asp:Button ID="BtnEstusAsistenciaModal" runat="server" class="btn btn-success" Text="Aceptar" ValidationGroup="GrpAsistencia" /> <asp:Button ID="BtnEstusAsistenciaModal" Visible="false" runat="server" class="btn btn-success" Text="Aceptar" />
<button id="Button4" runat="server" type="button" class="btn default" data-dismiss="modal">Cerrar</button> <button id="Button4" runat="server" type="button" class="btn default" data-dismiss="modal">Cerrar</button>
</div> </div>
@@ -383,10 +385,7 @@
<ajax:ValidatorCalloutExtender ID="RfvcRfvTxtFechaModal" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaModal" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="RfvcRfvTxtFechaModal" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaModal" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="CVCCVTxtFechaModal" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaModal" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="CVCCVTxtFechaModal" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaModal" Width="350px"></ajax:ValidatorCalloutExtender>
</td></tr>
</td></tr>
</table> </table>
</ContentTemplate> </ContentTemplate>

View File

@@ -126,6 +126,33 @@ Partial Class RH_RepChecadorPreAsistencia
End Set End Set
End Property End Property
Private Property CvePersonalSeleccionado As Integer
Get
If ViewState("CvePersonalSeleccionado") Is Nothing Then
ViewState("CvePersonalSeleccionado") = -1
End If
Return ViewState("CvePersonalSeleccionado").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CvePersonalSeleccionado") = value
End Set
End Property
Public Property FechaSeleccionada As Date
Get
If ViewState("FechaSeleccionada") Is Nothing Then
ViewState("FechaSeleccionada") = MinFecha
End If
Return ViewState("FechaSeleccionada").ToString.ToDate
End Get
Set(value As Date)
ViewState("FechaSeleccionada") = value
End Set
End Property
#End Region #End Region
Private Sub RH_RepChecadorIncidencias_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub RH_RepChecadorIncidencias_Load(sender As Object, e As EventArgs) Handles Me.Load
@@ -408,20 +435,20 @@ Partial Class RH_RepChecadorPreAsistencia
DTAsistenciasInasistencias = objRH.DtResultados DTAsistenciasInasistencias = objRH.DtResultados
End If End If
If objRH.ChecadorPreAsistenciaRegistrosAsistenciasGet(CveTipoPeriodo, FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.Empresa.CveEmpresa) Then 'If objRH.ChecadorPreAsistenciaRegistrosAsistenciasGet(CveTipoPeriodo, FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.Empresa.CveEmpresa) Then
DTAsistenciasInasistenciasReg = objRH.DtResultados ' DTAsistenciasInasistenciasReg = objRH.DtResultados
If DTAsistenciasInasistenciasReg.Rows.Count > 0 Then ' If DTAsistenciasInasistenciasReg.Rows.Count > 0 Then
BtnAgregar.Visible = False ' BtnAgregar.Visible = False
BtnEstusAsistenciaModal.Visible = False ' BtnEstusAsistenciaModal.Visible = False
DdlAsistenciaInacistencia.Enabled = False ' 'DdlAsistenciaInacistencia.Enabled = False
Else ' Else
BtnAgregar.Visible = True ' BtnAgregar.Visible = True
BtnEstusAsistenciaModal.Visible = True ' BtnEstusAsistenciaModal.Visible = True
DdlAsistenciaInacistencia.Enabled = True ' 'DdlAsistenciaInacistencia.Enabled = True
End If ' End If
UpAgregar.Update() ' UpAgregar.Update()
End If 'End If
objRH.Dispose() objRH.Dispose()
@@ -1499,7 +1526,7 @@ Partial Class RH_RepChecadorPreAsistencia
If arrayComands.Length > 1 Then Filtro = arrayComands(1) Else Filtro = "" If arrayComands.Length > 1 Then Filtro = arrayComands(1) Else Filtro = ""
lnkLink.CommandArgument = lnkLink.Text lnkLink.CommandArgument = $"{lnkLink.Text}|{e.Row.DataKey("CvePersonal")}|{e.Row.DataKey("NombreCompleto")}"
If Instruccion = "-" Then If Instruccion = "-" Then
lnkLink.Text = "<i class='fa fa-check-square' aria-hidden='true'></i>" lnkLink.Text = "<i class='fa fa-check-square' aria-hidden='true'></i>"
@@ -1620,6 +1647,8 @@ Partial Class RH_RepChecadorPreAsistencia
Public Sub DetalleDia_Click(sender As Object, e As EventArgs) Public Sub DetalleDia_Click(sender As Object, e As EventArgs)
CvePersonalSeleccionado = -1
Dim lnkLinkSender As LinkButton = DirectCast(sender, LinkButton) Dim lnkLinkSender As LinkButton = DirectCast(sender, LinkButton)
Dim DTDatos As New DataTable Dim DTDatos As New DataTable
Dim DTTipoAsistenciaInasistencia As DataTable Dim DTTipoAsistenciaInasistencia As DataTable
@@ -1640,6 +1669,10 @@ Partial Class RH_RepChecadorPreAsistencia
objRH.Dispose() objRH.Dispose()
Instruccion = arrayComands(0) Instruccion = arrayComands(0)
CvePersonalSeleccionado = arrayComands(2).ToEntero
LtlAsistenciaHorariosModal.Text = arrayComands(3)
DTTipoAsistenciaInasistencia = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(" TipoCorto = '" & Instruccion & "' ") DTTipoAsistenciaInasistencia = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(" TipoCorto = '" & Instruccion & "' ")
If DTTipoAsistenciaInasistencia.Rows.Count > 0 Then If DTTipoAsistenciaInasistencia.Rows.Count > 0 Then
@@ -1662,6 +1695,7 @@ Partial Class RH_RepChecadorPreAsistencia
DTDatos = DtResultados.FiltraParametros(Filtro) DTDatos = DtResultados.FiltraParametros(Filtro)
lblModalFecha.Text = DTDatos(0)("Fecha").ToString().ToDate.ToString("dd/MM/yyyy") lblModalFecha.Text = DTDatos(0)("Fecha").ToString().ToDate.ToString("dd/MM/yyyy")
FechaSeleccionada = DTDatos(0)("Fecha").ToString().ToDate
lnkModalImg.Text = "" lnkModalImg.Text = ""
@@ -1949,4 +1983,18 @@ Partial Class RH_RepChecadorPreAsistencia
End Sub End Sub
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
If DdlAsistenciaInacistencia.SelectedValue.ToEntero > 0 Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.AddAsistencia(CvePersonalSeleccionado, -1, DdlSubProyecto.SelectedValue.ToEntero, FechaSeleccionada,
DdlAsistenciaInacistencia.SelectedValue.ToEntero, 100, 0, 0, -1, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "C") Then
Alert("Registro Actualziado Correctamente.")
End If
ObjPersonal.Dispose()
End If
End Sub
End Class End Class

View File

@@ -0,0 +1,26 @@
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="AddTema.ascx.vb" Inherits="UserControl_AddProcedimiento" %>
<div id="DVAgregarTema" style="margin-top:-30px!important">
<div class="modal-dialog">
<asp:UpdatePanel ID="UpModalAddTema" class="modal-content " tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span> </button>
<h4 class="modal-title" style="text-align: left">
<asp:Literal ID="Literal2" runat="server">Agregar Tema</asp:Literal></h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtTema" runat="server" CssClass="form-control" CausesValidation="true" TextMode="MultiLine" Rows="1"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtTema" runat="server" ControlToValidate="TxtTema" Display="None" ErrorMessage="El campo <b>''Tema''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="VGMAddTemaTN"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Tema" AssociatedControlID="TxtTema"></asp:Label>
</div>
</div>
<div class="modal-footer">
<asp:LinkButton ID="BtnAgregarTema" OnClick="BtnAgregarTema_Click" CssClass="btn btn-primary" ValidationGroup="VGMAddTemaTN" runat="server">Agregar</asp:LinkButton>
<button data-dismiss="modal" class="btn btn-danger">Cancelar</button>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>

View File

@@ -0,0 +1,96 @@
Imports Extensiones
Partial Class UserControl_AddProcedimiento
Inherits System.Web.UI.UserControl
Public ReadOnly Property UsuarioActual As Usuario
Get
If Context.Session("UsuarioSIG") Is Nothing Then
Return Nothing
Else
Return DirectCast(Context.Session("UsuarioSIG"), Usuario)
End If
End Get
End Property
Public Property CveProcedimiento As Integer
Get
If ViewState("CveProcedimiento") Is Nothing Then
ViewState("CveProcedimiento") = -1
End If
Return ViewState("CveProcedimiento").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveProcedimiento") = value
End Set
End Property
Private Sub UserControl_AddProcedimiento_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
End If
End Sub
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
Dim ProcesoOK = False
Dim ObjVentas As New ClsVentas
Dim CveProcedimientoNuevo As Integer = -1
If CveProcedimiento > 0 Then
If ObjVentas.UpdateProcedimiento(CveProcedimiento, TxtProcedimiento.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
'Alert($"Procedimiento Actualizado Correctamente.")
ProcesoOK = True
End If
Else
CveProcedimientoNuevo = ObjVentas.AddProcedimiento(TxtProcedimiento.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveProcedimientoNuevo > 0 Then
ProcesoOK = True
'TabProductos.Visible = True
'TabVentas.Visible = True
'LnkAgregarProducto.Visible = True
'UpDatos.Update()
'Alert($"Procedimiento Guardado Correctamente.")
End If
End If
ObjVentas.Dispose()
If ProcesoOK Then
ClsPaginas.Alert($"Procedimiento {If(CveProcedimiento > 0, "Actualizado", "Guardado")} Correctamente.")
Dim AppNombre As String = $"GlobalDTProcedimientos-{UsuarioActual.CveEmpresa}"
Application(AppNombre) = Nothing
RegistraScript($"fncRegargaProcedimientos({CveProcedimientoNuevo});")
RegistraScript("$('#BtnCancelarProcedimiento').click();")
End If
End Sub
Public Sub LimpiarControles()
TxtProcedimiento.Text = ""
ChkEstatus.Checked = True
UpModal.Update()
End Sub
Protected Sub BtnAgregarTema_Click(sender As Object, e As EventArgs)
Using objoi As New ClsOIEventos()
If objoi.AddRevisionesEventos(TxtTema.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
Alert(String.Format("El Tema ""{0}"" fue agregado con éxito.", TxtTema.Text.Trim()), ModExtensiones.TipoMensaje.MsgInformacion)
RegistraScript(String.Format("$('#{0}').modal('hide')", iddivAgregarTema))
TxtTema.Text = ""
GlobalDTOIRevision(UsuarioActual.CveEmpresa, objoi.DtResultados)
CargaTemas()
UpContenido.Update()
Else
Alert("Ocurrió un error al agregar la revisión. Por favor vuelva a intentar.", ModExtensiones.TipoMensaje.MsgError)
End If
End Using
End Sub
End Class