/estylos
This commit is contained in:
@@ -239,7 +239,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UPPMov" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvM" Width="100%" runat="server" data-sort="false" GridLines="None" CssClass="table table-smallpadding table-striped table-hover Widthall ScrollAD"
|
||||
<asp:GridView ID="GvM" Width="100%" runat="server" data-sort="false" GridLines="None" CssClass="table table-smallpadding table-striped table-hover Widthall adssigrid-scroll adssigrid-order" data-cols="1" data-rows="2"
|
||||
DataKeyNames="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Codigo,NumeroParte,PS"
|
||||
ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
<Columns>
|
||||
@@ -436,117 +436,5 @@
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function elementexist(element) {
|
||||
if ($(element)) {
|
||||
if ($(element).html()) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
});
|
||||
|
||||
var dTable;
|
||||
function pageLoad() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 330;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
|
||||
|
||||
var rows = false;
|
||||
var cont = 0;
|
||||
|
||||
$("#<%=GvM.ClientID %> tr").each(function () {
|
||||
|
||||
cont++;
|
||||
subHeaders();
|
||||
});
|
||||
|
||||
<%-- if (cont > 2) {
|
||||
var head = $('<thead></thead>');
|
||||
head.append($('#<%=GvM.ClientID %> tr:nth-child(1)'));
|
||||
$('#<%=GvM.ClientID %>').prepend(head);
|
||||
dTable = $('#<%=GvM.ClientID %>').DataTable({
|
||||
'order': [], 'orderable': true, scrollY: Alto + 'px', scrollCollapse: true, paging: false, searching: false, info: false
|
||||
});
|
||||
|
||||
subHeaders();
|
||||
//$dataTables_scrollHead--%>
|
||||
//}
|
||||
}
|
||||
|
||||
$(window).resize(function () {
|
||||
|
||||
subHeaders();
|
||||
dTable.columns.adjust().draw();
|
||||
});
|
||||
|
||||
function subHeaders() {
|
||||
|
||||
|
||||
|
||||
|
||||
var recco = 0;
|
||||
|
||||
$("#<%=GvM.ClientID %> tr").each(function() {
|
||||
if (!this.rowIndex) return;
|
||||
|
||||
var celdas = [];
|
||||
|
||||
$(this).find('td').each(function (column, td) {
|
||||
|
||||
celdas.push($(td).width());
|
||||
});
|
||||
|
||||
|
||||
|
||||
var ancho = 0
|
||||
ancho += celdas[0];
|
||||
ancho += celdas[1];
|
||||
|
||||
console.log('ancho req ' + ancho);
|
||||
$('#dvArt').width(ancho);
|
||||
ancho = 0;
|
||||
|
||||
ancho += celdas[2];
|
||||
ancho += celdas[3];
|
||||
ancho += celdas[4];
|
||||
ancho += celdas[5];
|
||||
|
||||
console.log('ancho req ' + ancho);
|
||||
$('#dvCan').width(ancho);
|
||||
ancho = 0;
|
||||
|
||||
ancho += celdas[6];
|
||||
ancho += celdas[7];
|
||||
ancho += celdas[8];
|
||||
ancho += celdas[9];
|
||||
|
||||
console.log('ancho req ' + ancho);
|
||||
$('#dvImp').width(ancho);
|
||||
|
||||
$('#dvCa').css('visibility', 'visible');
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -120,7 +120,6 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
GvM.Columns(7).HeaderStyle.Width = 133
|
||||
GvM.Columns(8).HeaderStyle.Width = 133
|
||||
GvM.Columns(10).HeaderStyle.Width = 134
|
||||
GvM.CssClass = "table table-smallpadding table-striped table-hover ScrollAD"
|
||||
GvM.Width = 1074
|
||||
dvArt.Attributes.Add("style", "text-align:center!important; font-size:14px;width:537px;")
|
||||
dvCan.Attributes.Add("style", "text-align:center!important; font-size:14px; border-right-color: white!important;border-left-color: white!important;width:537px;border-style: solid;")
|
||||
|
||||
@@ -10,9 +10,11 @@
|
||||
|
||||
.GVCalculosSBC tr th:nth-child(n+13):not(:nth-child(n+16)) {
|
||||
background-color: #88d6cd !important;
|
||||
}.GVDetalleParteVariable tr > td:nth-child(n+2) {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.GVDetalleParteVariable tr > td:nth-child(n+2) {
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
@@ -248,7 +250,7 @@
|
||||
Modificación
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblsalarioDiarioSSf" runat="server" > </asp:Label>
|
||||
<asp:Label ID="lblsalarioDiarioSSf" runat="server"> </asp:Label>
|
||||
<%--<asp:Label ID="lblsalarioDiarioSSf" runat="server" Text='<%# (Eval("SalarioDiarioSSNuevo", "{0:N2}") == Eval("SalarioDiarioSS", "{0:N2}") ? "NO" : "SI") %>'> </asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
@@ -474,7 +476,8 @@
|
||||
<ajax:TabPanel ID="TabDetalleParteVariable" runat="server" HeaderText="Detalle parte variable">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVDetalleParteVariable" HeaderStyle-CssClass="ADtr" runat="server" GridLines="None" OnRowDataBound="GVDetalleParteVariable_RowDataBound"
|
||||
CssClass="table table-hover table-striped ScrollAD Widthall GVBuscaddor GVDetalleParteVariable"></asp:GridView>
|
||||
CssClass="table table-hover table-striped ScrollAD Widthall GVBuscaddor GVDetalleParteVariable">
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
@@ -619,10 +622,20 @@
|
||||
<asp:Label runat="server" Text='<%# Eval("fecha","{0:dd/MM/yyyy HH}:{0:mm}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Descargar" ItemStyle-Width="80">
|
||||
<ItemTemplate>
|
||||
<asp:Button runat="server" Text="" CssClass="fa fa-download btn btn-primary"
|
||||
CommandArgument='<%# Eval("ruta") %>' OnClick="DescargarArchivobitacora" ToolTip="Descargar" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="GVDoctos" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@@ -883,7 +896,7 @@
|
||||
</div>
|
||||
|
||||
<div class="btn-group ">
|
||||
<a class="btn yellow-gold btn-sm" href="javascript:;" data-toggle="dropdown" data-hover="dropdown" data-close-others="true" aria-expanded="true"><i class="fa fa-ad-excel"></i> Formatos
|
||||
<a class="btn yellow-gold btn-sm" href="javascript:;" data-toggle="dropdown" data-hover="dropdown" data-close-others="true" aria-expanded="true"><i class="fa fa-ad-excel"></i>Formatos
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
@@ -981,7 +994,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding ">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -521,7 +521,7 @@ public partial class RH_CalculoSBC : ClsPaginas
|
||||
SalarioCotizacion = Salariovariable + SDI;
|
||||
if (objpersonal.UpdateSalarios(CvePersonal, txtfechacargamasiva.Text.ToDate().ToString("yyyy/MM/dd"), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
Salariodiario.ToString().ToDouble(), SDI.ToString().ToDouble(), SalarioCotizacion.ToString().ToDouble(), Salariodiario.ToString().ToDouble(),
|
||||
false,true,"True"))
|
||||
false, true, "True"))
|
||||
{
|
||||
|
||||
{
|
||||
@@ -574,7 +574,7 @@ public partial class RH_CalculoSBC : ClsPaginas
|
||||
}
|
||||
if (CvePersonal > 0)
|
||||
{
|
||||
objpersonal.PersonalRPUpdate( CvePersonal, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa , RegistroPatronal);
|
||||
objpersonal.PersonalRPUpdate(CvePersonal, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RegistroPatronal);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -732,6 +732,7 @@ public partial class RH_CalculoSBC : ClsPaginas
|
||||
try { archivoW = new System.IO.StreamWriter(string.Format("{0}{1}.txt", rutarchivos, namearchivo), true, System.Text.Encoding.UTF8); } catch (Exception) { }
|
||||
if (archivoW != null)
|
||||
{
|
||||
Alert(MovtosmodSalario);
|
||||
try { archivoW.WriteLine(MovtosmodSalario); } catch (Exception) { }
|
||||
try
|
||||
{
|
||||
@@ -758,7 +759,7 @@ public partial class RH_CalculoSBC : ClsPaginas
|
||||
double SalarioDiarioSS = Math.Round(item.DataKey("SalarioDiarioSS").ToDouble(), 2);
|
||||
if (continuar && (item.FCCheckBox("chkUpdate").Checked) &&//SalarioDiarioSSNuevo != SalarioDiarioSS &&
|
||||
(continuar = objrh.UpdateSalarios(CvePersonal, fecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, SalarioDiario, SDINuevo, SalarioDiarioSSNuevo, SalarioDiario,
|
||||
false,true,"True"
|
||||
false, true, "True"
|
||||
)))
|
||||
{
|
||||
|
||||
@@ -915,16 +916,19 @@ public partial class RH_CalculoSBC : ClsPaginas
|
||||
|
||||
string rutarchivos = string.Format("{0}\\modificacionsalarios\\", UsuarioActual.Empresa.Ruta);
|
||||
List<archivosD> lisaarchivos = new List<archivosD>();
|
||||
foreach (var urfile in System.IO.Directory.GetFiles(rutarchivos, "*"))
|
||||
if (System.IO.Directory.Exists(rutarchivos))
|
||||
{
|
||||
if (urfile.Replace(rutarchivos, "").Length > 9)
|
||||
foreach (var urfile in System.IO.Directory.GetFiles(rutarchivos, "*"))
|
||||
{
|
||||
string cfecha = urfile.Replace(rutarchivos, "").Substring(0, 10).ToDateTime().ToString("dd/MM/yyyy");
|
||||
if (urfile.Replace(rutarchivos, "").Length > 9)
|
||||
{
|
||||
string cfecha = urfile.Replace(rutarchivos, "").Substring(0, 10).ToDateTime().ToString("dd/MM/yyyy");
|
||||
|
||||
|
||||
archivosD arch = new archivosD() { nombrearchivo = cfecha, ruta = urfile, fecha = System.IO.File.GetCreationTime(urfile) };
|
||||
lisaarchivos.Add(arch);
|
||||
archivosD arch = new archivosD() { nombrearchivo = cfecha, ruta = urfile, fecha = System.IO.File.GetCreationTime(urfile) };
|
||||
lisaarchivos.Add(arch);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
GVDoctos.DataSource = lisaarchivos;
|
||||
@@ -936,7 +940,7 @@ public partial class RH_CalculoSBC : ClsPaginas
|
||||
|
||||
protected void GVDetalleParteVariable_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if(e.Row.RowType == DataControlRowType.DataRow)
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
for (int i = 0; i < e.Row.Cells.Count; i++)
|
||||
{
|
||||
@@ -966,6 +970,28 @@ public partial class RH_CalculoSBC : ClsPaginas
|
||||
{
|
||||
|
||||
}
|
||||
protected void DescargarArchivobitacora(object sender, EventArgs e)
|
||||
{
|
||||
Button btn = (Button)sender;
|
||||
GridViewRow row = (GridViewRow)btn.NamingContainer;
|
||||
|
||||
// Obtener la ruta del archivo desde el DataKeyNames
|
||||
string rutaArchivo = GVDoctos.DataKeys[row.RowIndex]["ruta"].ToString();
|
||||
string nombreArchivo = string.Format("{0}.txt",GVDoctos.DataKeys[row.RowIndex]["nombrearchivo"]);
|
||||
|
||||
if (System.IO.File.Exists(rutaArchivo))
|
||||
{
|
||||
Response.Clear();
|
||||
Response.ContentType = "application/octet-stream";
|
||||
Response.AddHeader("Content-Disposition", "attachment; filename=" + nombreArchivo);
|
||||
Response.WriteFile(rutaArchivo);
|
||||
Response.End();
|
||||
}
|
||||
else
|
||||
{
|
||||
ScriptManager.RegisterStartupScript(this, GetType(), "alert", "alert('El archivo no existe en el servidor');", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
public class archivosD
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user