columna de cpk, para empresa acumuladores
This commit is contained in:
@@ -153,7 +153,7 @@
|
|||||||
<input type="text" id="TxtBuscar" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscar','{0}')", GVPrecios.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
<input type="text" id="TxtBuscar" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscar','{0}')", GVPrecios.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBuscar','{0}')", GVPrecios.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBuscar','{0}')", GVPrecios.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<asp:GridView ID="GVPrecios" runat="server" GridLines="None" DataKeyNames="CvePS, CvePrecioLista,PrecioLista,PS,Codigo,Porcentaje,CodigoPS"
|
<asp:GridView ID="GVPrecios" runat="server" GridLines="None" DataKeyNames="CvePS, CvePrecioLista,PrecioLista,PS,Codigo,Codigo2,Porcentaje,CodigoPS"
|
||||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" AutoGenerateColumns="False" data-sort="true" EmptyDataText="No se encontraron registros" ToolTip="Listado de Nombres">
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" AutoGenerateColumns="False" data-sort="true" EmptyDataText="No se encontraron registros" ToolTip="Listado de Nombres">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="5%">
|
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="5%">
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
End If
|
End If
|
||||||
objPS.Dispose()
|
objPS.Dispose()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'Empresa Acumuladores
|
||||||
GVPrecios.Columns(2).Visible = True
|
GVPrecios.Columns(2).Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -314,6 +314,7 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
Select New With
|
Select New With
|
||||||
{
|
{
|
||||||
.Codigo = row.DataKey("Codigo"),
|
.Codigo = row.DataKey("Codigo"),
|
||||||
|
.Codigo2 = row.DataKey("Codigo2"),
|
||||||
.PS = row.DataKey("PS"),
|
.PS = row.DataKey("PS"),
|
||||||
.Precio = row.FCTextBox("TxtPrecio").Text.ToDecimal()
|
.Precio = row.FCTextBox("TxtPrecio").Text.ToDecimal()
|
||||||
}).QueryToDataTable(True)
|
}).QueryToDataTable(True)
|
||||||
@@ -344,6 +345,11 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
|
|
||||||
DtExcel.Columns("Codigo").ColumnName = "Código"
|
DtExcel.Columns("Codigo").ColumnName = "Código"
|
||||||
DtExcel.Columns("PS").ColumnName = "Producto / Servicio"
|
DtExcel.Columns("PS").ColumnName = "Producto / Servicio"
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'Empresa Acumuladores
|
||||||
|
DtExcel.Columns("Codigo2").ColumnName = "Código CPK"
|
||||||
|
Else
|
||||||
|
DtExcel.Columns.Remove("Codigo2")
|
||||||
|
End If
|
||||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||||
|
|
||||||
Dim FileExcel As New ExcelFile()
|
Dim FileExcel As New ExcelFile()
|
||||||
@@ -363,31 +369,6 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
|
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
|
||||||
Next
|
Next
|
||||||
|
|
||||||
'worksheet.Cells.Style.Locked = False
|
|
||||||
'worksheet.Cells.Style.FormulaHidden = False
|
|
||||||
|
|
||||||
'worksheet.Columns(0).Cells.Style.Locked = True
|
|
||||||
|
|
||||||
'worksheet.Protected = True
|
|
||||||
|
|
||||||
'Dim protectionSettings = worksheet.ProtectionSettings
|
|
||||||
'protectionSettings.AllowDeletingColumns = False
|
|
||||||
'protectionSettings.AllowDeletingRows = True
|
|
||||||
'protectionSettings.AllowEditingObjects = True
|
|
||||||
'protectionSettings.AllowEditingScenarios = True
|
|
||||||
'protectionSettings.AllowFormattingCells = True
|
|
||||||
'protectionSettings.AllowFormattingColumns = True
|
|
||||||
'protectionSettings.AllowFormattingRows = True
|
|
||||||
'protectionSettings.AllowInsertingColumns = False
|
|
||||||
'protectionSettings.AllowInsertingRows = True
|
|
||||||
'protectionSettings.AllowSelectingLockedCells = True
|
|
||||||
'protectionSettings.AllowSelectingUnlockedCells = True
|
|
||||||
'protectionSettings.AllowSelectingUnlockedCells = True
|
|
||||||
'protectionSettings.AllowSorting = True
|
|
||||||
'protectionSettings.AllowUsingAutoFilter = True
|
|
||||||
'protectionSettings.AllowUsingPivotTableReports = True
|
|
||||||
'protectionSettings.SetPassword(ModExtensiones.IMEI)
|
|
||||||
|
|
||||||
FileExcel.Save(Response, "Precios.xlsx", SaveOptions.XlsxDefault)
|
FileExcel.Save(Response, "Precios.xlsx", SaveOptions.XlsxDefault)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -420,19 +401,29 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
If Not dt.Columns(0).ColumnName = "Código" Then
|
If Not dt.Columns(0).ColumnName = "Código" Then
|
||||||
Alert("El nombre de la tercera columna debe ser 'Codigo'. Favor de corregirlo", TipoMensaje.MsgError)
|
Alert("El nombre de la primera columna debe ser 'Codigo'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
If Not dt.Columns(1).ColumnName = "Producto / Servicio" Then
|
If Not dt.Columns(1).ColumnName = "Producto / Servicio" Then
|
||||||
Alert("El nombre de la cuarta columna debe ser 'Producto / Servicio'. Favor de corregirlo", TipoMensaje.MsgError)
|
Alert("El nombre de la segunda columna debe ser 'Producto / Servicio'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
If Not dt.Columns(2).ColumnName = "Precio" Then
|
|
||||||
Alert("El nombre de la sexta columna debe ser 'Precio'. Favor de corregirlo", TipoMensaje.MsgError)
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'Empresa Acumuladores
|
||||||
Exit Sub
|
If Not dt.Columns(3).ColumnName = "Precio" Then
|
||||||
|
Alert("El nombre de la cuarta columna debe ser 'Precio'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If Not dt.Columns(2).ColumnName = "Precio" Then
|
||||||
|
Alert("El nombre de la tercera columna debe ser 'Precio'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
dt.TableName = "Datos"
|
dt.TableName = "Datos"
|
||||||
Dim ProductosNoCargados As New StringBuilder()
|
Dim ProductosNoCargados As New StringBuilder()
|
||||||
Dim RowsCargados As Integer = 0
|
Dim RowsCargados As Integer = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user