ADS - Cargar imágenes de productos
This commit is contained in:
@@ -647,6 +647,27 @@ Public Class ClsProductosServicios
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdatePSImagen(CvePS As Integer, Imagen As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Vta_PSImagenUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@Imagen", SqlDbType.VarChar).Value = Imagen
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar la imagen del producto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdatePS(CveClasificacion As Integer, CveClasificacionCosto As Integer, CveUnidadMedida As Integer, Codigo As String, NumeroParte As String, CodigoBarras As String, PS As String, Precio As Double, IVA As Double, RetIVA As Double, Inventariable As Boolean, CveProveedorCompra As Integer,
|
||||
AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, Estado As Boolean, CveUsuario As Integer, CvePS As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, CveSATPS As Integer, CveEmpresa As Integer, Optional CveTipoPS As Integer = -1, Optional TipoServicio As Integer = -1,
|
||||
Optional CveClasificacion2 As Integer = -1, Optional CveMarca As Integer = -1, Optional AlmacenSeccion As String = "", Optional AplicaIEPS As Boolean = False, Optional IEPSPorcentaje As Decimal = -1,
|
||||
|
||||
@@ -113,7 +113,8 @@
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-4">
|
||||
<asp:TextBox ID="TxtNumeroParte" CssClass="form-control " runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label class="truncate" style="padding-left: 16px;" for="<%= TxtNumeroParte.ClientID.ToString()%>"><asp:Literal ID="LtlNumberParte" runat="server" Text="Código CPK"></asp:Literal>:</label>
|
||||
<label class="truncate" style="padding-left: 16px;" for="<%= TxtNumeroParte.ClientID.ToString()%>">
|
||||
<asp:Literal ID="LtlNumberParte" runat="server" Text="Código CPK"></asp:Literal>:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-4">
|
||||
@@ -230,7 +231,9 @@
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" id="DivPSAdicionalVigencia" visible="false">
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPSAdicionalVigencia" CssStyle="width: 46%;" CssClass="form-control input-sm select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
<label for="<%= DdlPSAdicionalVigencia.ClientID.ToString()%>"><asp:Literal runat="server" Text="Producto de vigencia:" ID="LtlPSAdicionalVigencia"></asp:Literal> </label>
|
||||
<label for="<%= DdlPSAdicionalVigencia.ClientID.ToString()%>">
|
||||
<asp:Literal runat="server" Text="Producto de vigencia:" ID="LtlPSAdicionalVigencia"></asp:Literal>
|
||||
</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
@@ -567,7 +570,6 @@
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -617,7 +619,6 @@
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input col-md-6">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -627,6 +628,84 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" id="DivImagen" runat="server" visible="false">
|
||||
<div class="portlet xspadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-briefcase font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Imagen del producto </span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:LinkButton ID="HyperLink1" CssClass="btn btn-success" data-toggle="modal" data-target="#Modalupfotos" runat="server" Style="cursor: pointer; float: right;height: 25px !important;" ToolTip="Observaciones"><i class="fa fa-upload"></i> Cargar Archivo</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<asp:Button ID="BtnCargarArchivo" runat="server" ClientIDMode="Static" Style="display: none;" />
|
||||
<asp:Button ID="BtnEliminarImagen" runat="server" ClientIDMode="Static" Style="display: none;" />
|
||||
<asp:HiddenField ID="HdnCveImagen" runat="server" Value="-1" ClientIDMode="Static" />
|
||||
<asp:HiddenField ID="HdnURL" runat="server" Value="-1" ClientIDMode="Static" />
|
||||
<div id="Modalupfotos" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Imagen</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel ID="UpUpFotos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div>
|
||||
<asp:TextBox ID="TxtUpFotos" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnUpFotos" Text="Subir Foto" runat="server" ClientIDMode="Static" CssClass="btn btn-primary" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="upGaleria" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="portfolio-content portfolio-1">
|
||||
<div id="js-filters-juicy-projects" class="cbp-l-filters-button">
|
||||
</div>
|
||||
<div id="js-grid-juicy-projects" class="cbp">
|
||||
<div class="cbp-item graphic">
|
||||
<div class="cbp-caption">
|
||||
<div class="cbp-caption-defaultWrap">
|
||||
<img runat="server" id="imgImagen">
|
||||
</div>
|
||||
<div class="cbp-caption-activeWrap">
|
||||
<div class="cbp-l-caption-alignCenter">
|
||||
<div class="cbp-l-caption-body">
|
||||
<asp:Button ID="BtnEliminarFoto" OnClick="BtnEliminarFoto_Click" data-toggle="confirmation" data-original-title="¿Estás Seguro?" data-btn-ok-label="Si" runat="server" Text="Borrar" CssClass=" btn red uppercase" />
|
||||
<a runat="server" id="hplImagen" class="cbp-lightbox cbp-l-caption-buttonRight btn success uppercase">Ver</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -716,6 +795,7 @@
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RFVRetISR" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="RFVRetISR" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
%
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -892,6 +972,7 @@
|
||||
<input id="ChkSeleccionarTodos" type="checkbox" title="Seleccionar Todos" onclick="SeleccionarTodosChkGvSucursa()" />Seleccionar Todos
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-6" style="text-align: right">
|
||||
<label>Aplicar precio minimo</label>
|
||||
@@ -1180,7 +1261,8 @@
|
||||
<label class="col-md-4 truncate">Clave Sector COFEPRIS:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlClaveSectorCOFEPRIS" runat="server" CssStyle="width: 100%;" Width="200px" DataTextField="SectorCOFEPRISClave" DataValueField="CveSectorCOFEPRIS"
|
||||
CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlClaveSectorCOFEPRIS_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
|
||||
CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlClaveSectorCOFEPRIS_SelectedIndexChanged" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1249,7 +1331,8 @@
|
||||
<label class="col-md-4 truncate">Condiciones Transporte:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlCondicionesEspTransporte" runat="server" CssStyle="width: 100%;" Width="200px" DataTextField="CondicionesEspecialesClave" DataValueField="CveCondicionesEspeciales"
|
||||
CssClass="form-control input-sm select2me" ></asp:DropDownList>
|
||||
CssClass="form-control input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtCondicionesTransporte" runat="server" ControlToValidate="DdlCondicionesEspTransporte" CssClass="help-block errorimput" Display="Dynamic"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Condiciones Transporte''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
@@ -1362,7 +1445,8 @@
|
||||
<label class="col-md-4 truncate">Tipo Materia:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlTipoMateria" runat="server" CssStyle="width: 100%;" Width="200px" DataTextField="TipoMateriaClave" DataValueField="CveTipoMateria"
|
||||
CssClass="form-control input-sm select2me" ></asp:DropDownList>
|
||||
CssClass="form-control input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1489,6 +1573,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:Literal ID="ImgCaracteristica1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
@@ -1498,6 +1586,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:Literal ID="ImgOpcion1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
@@ -1507,6 +1599,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:Literal ID="ImgFechaIng1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
@@ -1516,6 +1612,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:Literal ID="ImgUsuario1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
@@ -1810,237 +1910,6 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel HeaderText="Ecommerce" ID="TabEcommerce" runat="server" Visible="false" OnClientClick="clickgaleria">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UpEcommerce" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
|
||||
<%--IZQUIERDA--%>
|
||||
<div class="col-md-12 col-lg-6">
|
||||
<div class="row">
|
||||
|
||||
<%--GENERAL--%>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light smmallpadding bordered" id="PorletEcommerceGeneral">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Información General</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="form-check">
|
||||
<label for="<%=ChkEcommerceDisponible.ClientID.ToString()%>" class="form-check-label">Disponible para Ecommerce:</label>
|
||||
<asp:CheckBox ID="ChkEcommerceDisponible" Text="" CssClass="form-check-input input-sm" runat="server" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="<%=TxtEcommerceDescripcion.ClientID.ToString()%>">Descripción:</label>
|
||||
<asp:TextBox ID="TxtEcommerceDescripcion" Text="" MaxLength="255" Rows="3" CssClass="form-control input-sm" CausesValidation="true" runat="server" />
|
||||
<%--<asp:RequiredFieldValidator ID="RFVEcommerceDescripcion" ControlToValidate="TxtEcommerceDescripcion" ValidationGroup="GrpGuardar" ErrorMessage="El campo <b>''EcommerceDescripcion''</b> es necesario, por favor ingréselo." CssClass="help-block text-danger" runat="server"></asp:RequiredFieldValidator>--%>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="<%=TxtEcommercePrecioBase.ClientID.ToString()%>">Precio:</label>
|
||||
<asp:TextBox ID="TxtEcommercePrecioBase" Text="" MaxLength="20" CssClass="form-control input-sm" runat="server" />
|
||||
<%--<asp:RequiredFieldValidator ID="RFVEcommercePrecioBase" ControlToValidate="TxtEcommercePrecioBase" ValidationGroup="GrpGuardar" ErrorMessage="El campo <b>''EcommercePrecioBase''</b> es necesario, por favor ingréselo." CssClass="help-block text-danger" runat="server"></asp:RequiredFieldValidator>--%>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumerosEcommercePrecioBase" runat="server" TargetControlID="TxtEcommercePrecioBase" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="<%=TxtEcommercePrecioPromocion.ClientID.ToString()%>">Precio Promoción:</label>
|
||||
<asp:TextBox ID="TxtEcommercePrecioPromocion" Text="" MaxLength="20" CssClass="form-control input-sm" runat="server" />
|
||||
<%--<asp:RequiredFieldValidator ID="RFVEcommercePrecioPromocion" ControlToValidate="TxtEcommercePrecioPromocion" ValidationGroup="GrpGuardar" ErrorMessage="El campo <b>''EcommercePrecioPromocion''</b> es necesario, por favor ingréselo." CssClass="help-block text-danger" runat="server"></asp:RequiredFieldValidator>--%>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumerosEcommercePrecioPromocion" runat="server" TargetControlID="TxtEcommercePrecioPromocion" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%--INSIGNIAS--%>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light smmallpadding bordered" id="PorletEcommerceInsignias">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Insignias del producto</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body ">
|
||||
<asp:UpdatePanel ID="UpEcommerceInsignias" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<label class="col-md-2" for="<%=DdlEcommerceInsignia.ClientID.ToString()%>">Destacados:</label>
|
||||
<div class="col-md-7">
|
||||
<asp:DropDownList ID="DdlEcommerceInsignia" DataTextField="Insignia" DataValueField="CveInsignia" CssClass="select2me" Width="100%" ValidationGroup="GrpEcommerce" runat="server" AppendDataBoundItems="true">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVEcommerceInsignia" ControlToValidate="DdlEcommerceInsignia" ValidationGroup="GrpEcommerceInsignias" InitialValue="-1" ErrorMessage="El campo <b>''Insignia''</b> es necesario, por favor ingréselo." CssClass="help-block text-danger" runat="server"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:Button Text="Agregar" ID="BtnEcommerceInsignias" OnClick="BtnEcommerceInsignias_Click" CssClass="btn btn-primary btn-block" ValidationGroup="GrpEcommerceInsignias" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvEcommercePSInsignias" DataKeyNames="CvePS,CveInsignia" CssClass="table table-hover table-striped ScrollAD mysmallbtn" EmptyDataText="No se encontraron registros..." ShowHeaderWhenEmpty="true" data-sort="true" Width="100%" runat="server" GridLines="None" AutoGenerateColumns="False">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Insignia" DataField="Insignia" ItemStyle-Width="80%" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20%" HeaderText="Comandos">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBEliminar" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" ToolTip="¿Está seguro que desea eliminar el registro?" data-btn-ok-label="si" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%--DERECHA--%>
|
||||
<div class="col-md-12 col-lg-6">
|
||||
<div class="row">
|
||||
|
||||
<%--IMAGENES--%>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light smmallpadding bordered" id="PorletEcommerceImagenes">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Imagenes</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal" data-toggle="modal" data-target="#ModalEcommerceImagenes"><i class="fa fa-upload"></i>Cargar imagenes</button>
|
||||
<%--<asp:HyperLink ID="HLModalEcommerceImagenes" NavigateUrl="#" runat="server" Visible="true" data-toggle="modal" data-target="#ModalEcommerceImagenes" CssClass="btn btn-primary"><i class="fa fa-upload"></i> EcommerceImagenes</asp:HyperLink>--%>
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body ">
|
||||
<div id="ModalEcommerceImagenes" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpEcommerceImagenes" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">EcommerceImagenes</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel ID="UpUpFotos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div>
|
||||
<asp:TextBox ID="TxtEcommerceImagenes" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
<asp:Button Text="Cargar Imagenes" ID="BtnEcommerceImagenes" OnClick="BtnEcommerceImagenes_Click" CssClass="btn btn-primary" ValidationGroup="GrpModalEcommerceImagenes" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpEcommerceGaleriaImagenes" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="portfolio-content portfolio-1">
|
||||
<div id="js-filters-juicy-projects" class="cbp-l-filters-button">
|
||||
</div>
|
||||
<div id="js-grid-juicy-projects" class="cbp">
|
||||
<asp:Repeater ID="RptFotos" runat="server">
|
||||
<ItemTemplate>
|
||||
<div class="cbp-item graphic">
|
||||
<div class="cbp-caption">
|
||||
<div class="cbp-caption-defaultWrap">
|
||||
<img src='<%# String.Format("/ashx/SIGWeb.ashx?Metodo=GetImg&r={0}", Extensiones.Encripta(Eval("URL").ToString)) %>'>
|
||||
</div>
|
||||
<div class="cbp-caption-activeWrap">
|
||||
<div class="cbp-l-caption-alignCenter">
|
||||
<div class="cbp-l-caption-body">
|
||||
<asp:Button ID="BtnEcommerceEliminarImagenes" OnClick="BtnEcommerceEliminarImagenes_Click" data-toggle="confirmation" data-popout="true" data-original-title="¿Está Seguro de eliminar la imagen?" data-btn-ok-label="Si" CommandArgument='<%# Eval("CvePSImagen").ToString %>' runat="server" Text="Borrar" CssClass=" btn red uppercase" />
|
||||
<a href='<%# String.Format("/ashx/SIGWeb.ashx?Metodo=GetImg&r={0}", Extensiones.Encripta(Eval("URL").ToString)) %>' class="cbp-lightbox cbp-l-caption-buttonRight btn btn-success uppercase">Ver</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbp-l-grid-projects-title uppercase text-center">IMAGEN</div>
|
||||
<div class="cbp-l-grid-projects-desc uppercase text-center"><%# Container.ItemIndex + 1 %></div>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%--RELACIONADOS--%>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light smmallpadding bordered" id="PorletEcommercePSRelacionados">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Relación de Productos</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body ">
|
||||
<asp:UpdatePanel ID="UpEcommercePSRelacionados" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<label class="col-md-2" for="<%=DdlEcommercePSRelacionado.ClientID.ToString()%>">Producto:</label>
|
||||
<div class="col-md-7">
|
||||
<ADS:Dropdownlost ID="DdlEcommercePSRelacionado" DataTextField="PSCodigo" DataValueField="CvePS" CssStyle="width: 100%;" CssClassDdl="select2me" runat="server" />
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:Button Text="Agregar" ID="BtnEcommercePSRelacionados" OnClick="BtnEcommercePSRelacionados_Click" CssClass="btn btn-primary btn-block" ValidationGroup="GrpEcommercePSRelacionados" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvEcommercePSRealacionados" DataKeyNames="CvePS,CvePS1,CvePS2" CssClass="table table-hover table-striped ScrollAD mysmallbtn" EmptyDataText="No se encontraron registros..." ShowHeaderWhenEmpty="true" data-sort="true" Width="100%" runat="server" GridLines="None" AutoGenerateColumns="False">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="80%" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20%" HeaderText="Comandos">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBEliminar" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" ToolTip="¿Está seguro que desea eliminar el registro?" data-btn-ok-label="si" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel HeaderText="Sistema" ID="TabSistemas" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="portlet xspadding light bordered">
|
||||
@@ -2163,6 +2032,7 @@
|
||||
<div>
|
||||
<p>
|
||||
El producto seleccionado en el recuadro de arriba sera unificado en el producto actual
|
||||
|
||||
<b>
|
||||
<asp:Literal Text="" ID="LtProductoUnificar" runat="server" /></b>
|
||||
</p>
|
||||
@@ -2396,6 +2266,7 @@
|
||||
Tipo de Clasificación:
|
||||
|
||||
|
||||
|
||||
</p>
|
||||
<asp:RadioButtonList ID="RblTipoClasificación" runat="server" CssClass="rbl" RepeatDirection="Vertical" RepeatLayout="Table">
|
||||
<asp:ListItem Text="Todas" Value="-1" Selected="True"></asp:ListItem>
|
||||
@@ -2407,6 +2278,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -2653,7 +2525,6 @@
|
||||
//COMINEZA: ECOMMERCE
|
||||
|
||||
function clickgaleria() {
|
||||
$("#C_Tab_TabGaleria").css({ "display": "block", "visibility": "auto" });
|
||||
initcarusel();
|
||||
initcarusel2 = function () { };
|
||||
}
|
||||
|
||||
@@ -132,6 +132,15 @@ Partial Class ProductosyServicios
|
||||
ViewState("GeneraServicioAF") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Imagen As String
|
||||
Get
|
||||
Return IfNull(ViewState("Imagen"), "", ViewState("Imagen")).ToString()
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Imagen") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Private ReadOnly Property PermiteClasificacion2 As Boolean
|
||||
@@ -952,6 +961,17 @@ Partial Class ProductosyServicios
|
||||
|
||||
DdlTipoFactor.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTipoFactor").ToString)
|
||||
|
||||
Me.Imagen = ObjProductosServicios.DtResultados.Rows(0)("Imagen").ToString
|
||||
|
||||
If Not String.IsNullOrEmpty(Me.Imagen) Then
|
||||
imgImagen.Attributes.Add("src", String.Format("/ashx/SIGWeb.ashx?Metodo=GetImg&r={0}", Extensiones.Encripta(Me.Imagen)))
|
||||
hplImagen.Attributes.Add("href", String.Format("/ashx/SIGWeb.ashx?Metodo=GetImg&r={0}", Extensiones.Encripta(Me.Imagen)))
|
||||
End If
|
||||
|
||||
DivImagen.Visible = True
|
||||
upGaleria.Update()
|
||||
RegistraScript("clickgaleria();", "CG")
|
||||
|
||||
If ObjProductosServicios.DtResultados.Rows(0)("CveTipoFactor").ToString.Contiene("1", "2") Then
|
||||
LIva.Visible = True
|
||||
DdlIVA.Visible = True
|
||||
@@ -2482,83 +2502,83 @@ Partial Class ProductosyServicios
|
||||
|
||||
#Region " ECOMMERCE "
|
||||
Private Sub InicializaEcommerce()
|
||||
AplicaEcommerce = False
|
||||
'AplicaEcommerce = False
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(700).ToEntero = 1 And CvePS > 0 Then
|
||||
'If UsuarioActual.Empresa.Funcionalidad(700).ToEntero = 1 And CvePS > 0 Then
|
||||
|
||||
TabEcommerce.Visible = True
|
||||
LBBitacoraEcommerce.Visible = True
|
||||
' TabEcommerce.Visible = True
|
||||
' LBBitacoraEcommerce.Visible = True
|
||||
|
||||
'INICIALIZA PRODUCTOS ECOMMERCE
|
||||
Dim ObjEcommerce As New ClsECommerce
|
||||
If ObjEcommerce.InsigniasGet(-1, "", UsuarioActual.CveEmpresa) Then
|
||||
DdlEcommerceInsignia.DataSource = ObjEcommerce.DtResultados
|
||||
End If
|
||||
ObjEcommerce.Dispose()
|
||||
DdlEcommerceInsignia.DataBind()
|
||||
CargaEcommerce()
|
||||
' 'INICIALIZA PRODUCTOS ECOMMERCE
|
||||
' Dim ObjEcommerce As New ClsECommerce
|
||||
' If ObjEcommerce.InsigniasGet(-1, "", UsuarioActual.CveEmpresa) Then
|
||||
' DdlEcommerceInsignia.DataSource = ObjEcommerce.DtResultados
|
||||
' End If
|
||||
' ObjEcommerce.Dispose()
|
||||
' DdlEcommerceInsignia.DataBind()
|
||||
' CargaEcommerce()
|
||||
|
||||
'INICIALIZA PRODUCTOS INSIGNIAS
|
||||
CargaPSInsigniasEcommerce()
|
||||
' 'INICIALIZA PRODUCTOS INSIGNIAS
|
||||
' CargaPSInsigniasEcommerce()
|
||||
|
||||
'INICIALIZA PRODUCTOS IMAGENES
|
||||
CargarGaleriaImagenesEcommerce()
|
||||
' 'INICIALIZA PRODUCTOS IMAGENES
|
||||
' CargarGaleriaImagenesEcommerce()
|
||||
|
||||
'INICIALIZA PRODUCTOS RELACIONADOS
|
||||
DdlEcommercePSRelacionado.setEsWebService(True)
|
||||
CargaPSRelacionadosEcommerce()
|
||||
' 'INICIALIZA PRODUCTOS RELACIONADOS
|
||||
' DdlEcommercePSRelacionado.setEsWebService(True)
|
||||
' CargaPSRelacionadosEcommerce()
|
||||
|
||||
UpEcommerce.Update()
|
||||
' UpEcommerce.Update()
|
||||
|
||||
End If
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
#Region " PRODUCTOS ECOMMERCE "
|
||||
Private Sub CargaEcommerce()
|
||||
Dim DrEcommerce As DataRow = Nothing
|
||||
Dim ObjEcommerce As New ClsECommerce
|
||||
If ObjEcommerce.ProductosGet(CvePS, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
DrEcommerce = ObjEcommerce.DtResultados.FiltroPrimero("")
|
||||
End If
|
||||
ObjEcommerce.Dispose()
|
||||
'Dim DrEcommerce As DataRow = Nothing
|
||||
'Dim ObjEcommerce As New ClsECommerce
|
||||
'If ObjEcommerce.ProductosGet(CvePS, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
' DrEcommerce = ObjEcommerce.DtResultados.FiltroPrimero("")
|
||||
'End If
|
||||
'ObjEcommerce.Dispose()
|
||||
|
||||
If DrEcommerce IsNot Nothing Then
|
||||
AplicaEcommerce = True
|
||||
'If DrEcommerce IsNot Nothing Then
|
||||
' AplicaEcommerce = True
|
||||
|
||||
TxtEcommerceDescripcion.Text = DrEcommerce("Descripcion").ToString
|
||||
TxtEcommercePrecioBase.Text = DrEcommerce("PrecioBase").ToString.FormatoNumero
|
||||
TxtEcommercePrecioPromocion.Text = DrEcommerce("PrecioPromocion").ToString.FormatoNumero
|
||||
ChkEcommerceDisponible.Checked = CBool(DrEcommerce("Disponible").ToString)
|
||||
End If
|
||||
GvEcommercePSRealacionados.DataBind()
|
||||
UpEcommercePSRelacionados.Update()
|
||||
' TxtEcommerceDescripcion.Text = DrEcommerce("Descripcion").ToString
|
||||
' TxtEcommercePrecioBase.Text = DrEcommerce("PrecioBase").ToString.FormatoNumero
|
||||
' TxtEcommercePrecioPromocion.Text = DrEcommerce("PrecioPromocion").ToString.FormatoNumero
|
||||
' ChkEcommerceDisponible.Checked = CBool(DrEcommerce("Disponible").ToString)
|
||||
'End If
|
||||
'GvEcommercePSRealacionados.DataBind()
|
||||
'UpEcommercePSRelacionados.Update()
|
||||
End Sub
|
||||
Private Function GuardaEcommerce() As Boolean
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(700) = "1" Then
|
||||
|
||||
'SI NO SE HA GUARDADO EN ECOMMERCE Y NO TIENE NINGUN VALOR OMITE
|
||||
If Not AplicaEcommerce And Not ChkEcommerceDisponible.Checked And TxtEcommerceDescripcion.Text.Length = 0 And TxtEcommercePrecioBase.Text.Length = 0 And TxtEcommercePrecioPromocion.Text.Length = 0 Then
|
||||
Return False
|
||||
End If
|
||||
''SI NO SE HA GUARDADO EN ECOMMERCE Y NO TIENE NINGUN VALOR OMITE
|
||||
'If Not AplicaEcommerce And Not ChkEcommerceDisponible.Checked And TxtEcommerceDescripcion.Text.Length = 0 And TxtEcommercePrecioBase.Text.Length = 0 And TxtEcommercePrecioPromocion.Text.Length = 0 Then
|
||||
' Return False
|
||||
'End If
|
||||
|
||||
If ChkEcommerceDisponible.Checked Then
|
||||
If Not ValidaGuardarEcommerce() Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
'If ChkEcommerceDisponible.Checked Then
|
||||
' If Not ValidaGuardarEcommerce() Then
|
||||
' Return True
|
||||
' End If
|
||||
'End If
|
||||
|
||||
Dim Descripcion As String = TxtEcommerceDescripcion.Text.Trim
|
||||
Dim PrecioBase As Double = TxtEcommercePrecioBase.Text.Trim.ToDouble
|
||||
Dim PrecioPromocion As Double = TxtEcommercePrecioPromocion.Text.Trim.ToDouble
|
||||
Dim Disponible As Boolean = ChkEcommerceDisponible.Checked
|
||||
'Dim Descripcion As String = TxtEcommerceDescripcion.Text.Trim
|
||||
'Dim PrecioBase As Double = TxtEcommercePrecioBase.Text.Trim.ToDouble
|
||||
'Dim PrecioPromocion As Double = TxtEcommercePrecioPromocion.Text.Trim.ToDouble
|
||||
'Dim Disponible As Boolean = ChkEcommerceDisponible.Checked
|
||||
|
||||
Dim ObjEcommerce As New ClsECommerce
|
||||
If Not ObjEcommerce.ProductosAddUpdate(CvePS, Descripcion, PrecioBase, PrecioPromocion, Disponible, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TieneError = True
|
||||
End If
|
||||
ObjEcommerce.Dispose()
|
||||
'Dim ObjEcommerce As New ClsECommerce
|
||||
'If Not ObjEcommerce.ProductosAddUpdate(CvePS, Descripcion, PrecioBase, PrecioPromocion, Disponible, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
' TieneError = True
|
||||
'End If
|
||||
'ObjEcommerce.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
@@ -2569,28 +2589,28 @@ Partial Class ProductosyServicios
|
||||
Dim Mensaje As New StringBuilder
|
||||
|
||||
'DESCRIPCION
|
||||
Dim Descripcion As String = TxtEcommerceDescripcion.Text.Trim
|
||||
If Descripcion.Length = 0 Then
|
||||
Mensaje.Append("- El campo <b>Descripción</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>")
|
||||
End If
|
||||
If Descripcion.Length > 255 Then
|
||||
Mensaje.Append("- El campo <b>Descripción</b> admite maximo 255 caracteres. Por favor verifique y vuelva a intentar. <br>")
|
||||
End If
|
||||
'Dim Descripcion As String = TxtEcommerceDescripcion.Text.Trim
|
||||
'If Descripcion.Length = 0 Then
|
||||
' Mensaje.Append("- El campo <b>Descripción</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>")
|
||||
'End If
|
||||
'If Descripcion.Length > 255 Then
|
||||
' Mensaje.Append("- El campo <b>Descripción</b> admite maximo 255 caracteres. Por favor verifique y vuelva a intentar. <br>")
|
||||
'End If
|
||||
|
||||
'PRECIO BASE
|
||||
Dim PrecioBase As Double = TxtEcommercePrecioBase.Text.Trim.ToDouble
|
||||
If PrecioBase = 0 Then
|
||||
Mensaje.Append("- El campo <b>Precio</b> es obligatorio. Por favor verifique y vuelva a intentar. <br>")
|
||||
End If
|
||||
If PrecioBase < 0 Then
|
||||
Mensaje.Append("- El campo <b>Precio</b> no puede ser negativo. Por favor verifique y vuelva a intentar. <br>")
|
||||
End If
|
||||
''PRECIO BASE
|
||||
'Dim PrecioBase As Double = TxtEcommercePrecioBase.Text.Trim.ToDouble
|
||||
'If PrecioBase = 0 Then
|
||||
' Mensaje.Append("- El campo <b>Precio</b> es obligatorio. Por favor verifique y vuelva a intentar. <br>")
|
||||
'End If
|
||||
'If PrecioBase < 0 Then
|
||||
' Mensaje.Append("- El campo <b>Precio</b> no puede ser negativo. Por favor verifique y vuelva a intentar. <br>")
|
||||
'End If
|
||||
|
||||
'PRECIO FINAL
|
||||
Dim PrecioPromocion As Double = TxtEcommercePrecioPromocion.Text.Trim.ToDouble
|
||||
If PrecioPromocion < 0 Then
|
||||
Mensaje.Append("- El campo <b>Precio Final</b> no puede ser negativo. Por favor verifique y vuelva a intentar. <br>")
|
||||
End If
|
||||
''PRECIO FINAL
|
||||
'Dim PrecioPromocion As Double = TxtEcommercePrecioPromocion.Text.Trim.ToDouble
|
||||
'If PrecioPromocion < 0 Then
|
||||
' Mensaje.Append("- El campo <b>Precio Final</b> no puede ser negativo. Por favor verifique y vuelva a intentar. <br>")
|
||||
'End If
|
||||
|
||||
|
||||
'VALIDACION
|
||||
@@ -2606,225 +2626,225 @@ Partial Class ProductosyServicios
|
||||
#Region " PRODUCTOS INSIGNIAS "
|
||||
|
||||
Private Sub CargaPSInsigniasEcommerce()
|
||||
Dim ObjEcommerce As New ClsECommerce
|
||||
If ObjEcommerce.ProductosInsigniasGet(CvePS, -1, UsuarioActual.CveEmpresa) Then
|
||||
GvEcommercePSInsignias.DataSource = ObjEcommerce.DtResultados
|
||||
Else
|
||||
GvEcommercePSInsignias.DataSource = Nothing
|
||||
End If
|
||||
ObjEcommerce.Dispose()
|
||||
'Dim ObjEcommerce As New ClsECommerce
|
||||
'If ObjEcommerce.ProductosInsigniasGet(CvePS, -1, UsuarioActual.CveEmpresa) Then
|
||||
' GvEcommercePSInsignias.DataSource = ObjEcommerce.DtResultados
|
||||
'Else
|
||||
' GvEcommercePSInsignias.DataSource = Nothing
|
||||
'End If
|
||||
'ObjEcommerce.Dispose()
|
||||
|
||||
GvEcommercePSInsignias.DataBind()
|
||||
UpEcommerceInsignias.Update()
|
||||
'GvEcommercePSInsignias.DataBind()
|
||||
'UpEcommerceInsignias.Update()
|
||||
End Sub
|
||||
Protected Sub BtnEcommerceInsignias_Click(sender As Object, e As EventArgs)
|
||||
If Not ValidaAgregarProductosInsigniasEcommerce() Then
|
||||
Exit Sub
|
||||
End If
|
||||
'If Not ValidaAgregarProductosInsigniasEcommerce() Then
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
Dim TieneError As Boolean = False
|
||||
Dim CveInsignia As Integer = DdlEcommerceInsignia.SelectedValue.ToEntero
|
||||
'Dim TieneError As Boolean = False
|
||||
'Dim CveInsignia As Integer = DdlEcommerceInsignia.SelectedValue.ToEntero
|
||||
|
||||
'AGREGAR
|
||||
Dim ObjEcommerce As New ClsECommerce
|
||||
If ObjEcommerce.ProductosInsigniasAdd(Me.CvePS, CveInsignia, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Alert("La Insignia se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
ObjEcommerce.Dispose()
|
||||
''AGREGAR
|
||||
'Dim ObjEcommerce As New ClsECommerce
|
||||
'If ObjEcommerce.ProductosInsigniasAdd(Me.CvePS, CveInsignia, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
' Alert("La Insignia se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||
'Else
|
||||
' TieneError = True
|
||||
'End If
|
||||
'ObjEcommerce.Dispose()
|
||||
|
||||
If Not TieneError Then
|
||||
DdlEcommerceInsignia.SelectedValueExist(-1)
|
||||
CargaPSInsigniasEcommerce()
|
||||
End If
|
||||
'If Not TieneError Then
|
||||
' DdlEcommerceInsignia.SelectedValueExist(-1)
|
||||
' CargaPSInsigniasEcommerce()
|
||||
'End If
|
||||
End Sub
|
||||
Private Function ValidaAgregarProductosInsigniasEcommerce() As Boolean
|
||||
Dim Retorno As Boolean = True
|
||||
Dim Mensaje As New StringBuilder
|
||||
'Dim Mensaje As New StringBuilder
|
||||
|
||||
'INSIGNIA
|
||||
Dim CveInsignia As Integer = DdlEcommerceInsignia.SelectedValue.ToEntero
|
||||
If CveInsignia = 0 Then
|
||||
Mensaje.Append("- El campo <b>Insignia</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>")
|
||||
End If
|
||||
For Each GvRow As GridViewRow In GvEcommercePSInsignias.Rows
|
||||
If GvRow.DataKey("CveInsignia").ToString.ToEntero = CveInsignia Then
|
||||
Mensaje.Append($"- La Insignia <b>{DdlEcommerceInsignia.SelectedItem.Text}</b> ya es parte del producto y no se puede duplicar. Por favor verifique y vuelva a intentar. <br>")
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
''INSIGNIA
|
||||
'Dim CveInsignia As Integer = DdlEcommerceInsignia.SelectedValue.ToEntero
|
||||
'If CveInsignia = 0 Then
|
||||
' Mensaje.Append("- El campo <b>Insignia</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>")
|
||||
'End If
|
||||
'For Each GvRow As GridViewRow In GvEcommercePSInsignias.Rows
|
||||
' If GvRow.DataKey("CveInsignia").ToString.ToEntero = CveInsignia Then
|
||||
' Mensaje.Append($"- La Insignia <b>{DdlEcommerceInsignia.SelectedItem.Text}</b> ya es parte del producto y no se puede duplicar. Por favor verifique y vuelva a intentar. <br>")
|
||||
' Exit For
|
||||
' End If
|
||||
'Next
|
||||
|
||||
'VALIDACION
|
||||
If Mensaje.ToString.Length > 0 Then
|
||||
Retorno = False
|
||||
Alert(Mensaje.ToString, TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
''VALIDACION
|
||||
'If Mensaje.ToString.Length > 0 Then
|
||||
' Retorno = False
|
||||
' Alert(Mensaje.ToString, TipoMensaje.MsgAdvertencia)
|
||||
'End If
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Protected Sub GvEcommercePSInsignias_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvEcommercePSInsignias.RowDeleting
|
||||
Dim TieneError As Boolean = False
|
||||
Dim GvRow As GridViewRow = GvEcommercePSInsignias.Rows(e.RowIndex)
|
||||
'Protected Sub GvEcommercePSInsignias_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvEcommercePSInsignias.RowDeleting
|
||||
' Dim TieneError As Boolean = False
|
||||
' Dim GvRow As GridViewRow = GvEcommercePSInsignias.Rows(e.RowIndex)
|
||||
|
||||
Dim ObjEcommerce As New ClsECommerce
|
||||
If ObjEcommerce.ProductosInsigniasRemove(GvRow.DataKey("CvePS").ToString.ToEntero, GvRow.DataKey("CveInsignia").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Alert("La Insignia se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
ObjEcommerce.Dispose()
|
||||
' Dim ObjEcommerce As New ClsECommerce
|
||||
' If ObjEcommerce.ProductosInsigniasRemove(GvRow.DataKey("CvePS").ToString.ToEntero, GvRow.DataKey("CveInsignia").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
' Alert("La Insignia se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
' Else
|
||||
' TieneError = True
|
||||
' End If
|
||||
' ObjEcommerce.Dispose()
|
||||
|
||||
If Not TieneError Then
|
||||
CargaPSInsigniasEcommerce()
|
||||
End If
|
||||
End Sub
|
||||
' If Not TieneError Then
|
||||
' CargaPSInsigniasEcommerce()
|
||||
' End If
|
||||
'End Sub
|
||||
#End Region
|
||||
|
||||
#Region " PRODUCTOS IMAGENES "
|
||||
Private Sub CargarGaleriaImagenesEcommerce()
|
||||
Dim TmpDT As DataTable = Nothing
|
||||
'Private Sub CargarGaleriaImagenesEcommerce()
|
||||
' Dim TmpDT As DataTable = Nothing
|
||||
|
||||
Dim ObjEcommerce As New ClsECommerce
|
||||
If ObjEcommerce.ProductosImagenesGet(CvePS, UsuarioActual.CveEmpresa) Then
|
||||
TmpDT = ObjEcommerce.DtResultados
|
||||
Else
|
||||
TmpDT = Nothing
|
||||
End If
|
||||
ObjEcommerce.Dispose()
|
||||
' Dim ObjEcommerce As New ClsECommerce
|
||||
' If ObjEcommerce.ProductosImagenesGet(CvePS, UsuarioActual.CveEmpresa) Then
|
||||
' TmpDT = ObjEcommerce.DtResultados
|
||||
' Else
|
||||
' TmpDT = Nothing
|
||||
' End If
|
||||
' ObjEcommerce.Dispose()
|
||||
|
||||
RptFotos.DataSource = TmpDT
|
||||
RptFotos.DataBind()
|
||||
UpEcommerceGaleriaImagenes.Update()
|
||||
End Sub
|
||||
' RptFotos.DataSource = TmpDT
|
||||
' RptFotos.DataBind()
|
||||
' UpEcommerceGaleriaImagenes.Update()
|
||||
'End Sub
|
||||
Protected Sub BtnEcommerceImagenes_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim FilesGral As List(Of Archivo) = TxtEcommerceImagenes.getfiles().Archivos
|
||||
Dim FileMove As String = ""
|
||||
Dim Archivo As String = ""
|
||||
Dim DirectorioTemporal As String = ""
|
||||
'Dim FilesGral As List(Of Archivo) = TxtEcommerceImagenes.getfiles().Archivos
|
||||
'Dim FileMove As String = ""
|
||||
'Dim Archivo As String = ""
|
||||
'Dim DirectorioTemporal As String = ""
|
||||
|
||||
Dim DirectorioDestino As String = $"{UsuarioActual.Empresa.Ruta}\Ecommerce\Productos\Imagenes\"
|
||||
If Not Directory.Exists(DirectorioDestino) Then
|
||||
Directory.CreateDirectory(DirectorioDestino)
|
||||
End If
|
||||
'Dim DirectorioDestino As String = $"{UsuarioActual.Empresa.Ruta}\Ecommerce\Productos\Imagenes\"
|
||||
'If Not Directory.Exists(DirectorioDestino) Then
|
||||
' Directory.CreateDirectory(DirectorioDestino)
|
||||
'End If
|
||||
|
||||
Dim ObjEcommerce As New ClsECommerce
|
||||
For Each FileItem As Archivo In FilesGral
|
||||
Archivo = NowADS().Ticks.ToString
|
||||
Try
|
||||
FileMove = FileItem.filename
|
||||
DirectorioTemporal = $"{AppDomain.CurrentDomain.BaseDirectory}Temp\{FileMove}"
|
||||
'Dim ObjEcommerce As New ClsECommerce
|
||||
'For Each FileItem As Archivo In FilesGral
|
||||
' Archivo = NowADS().Ticks.ToString
|
||||
' Try
|
||||
' FileMove = FileItem.filename
|
||||
' DirectorioTemporal = $"{AppDomain.CurrentDomain.BaseDirectory}Temp\{FileMove}"
|
||||
|
||||
Archivo = $"{Archivo}{IO.Path.GetExtension(DirectorioTemporal)}"
|
||||
DirectorioDestino += Archivo
|
||||
If ObjEcommerce.ProductosImagenesAdd(CvePS, $"Ecommerce\Productos\Imagenes\{Archivo}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
CargarGaleriaImagenesEcommerce()
|
||||
My.Computer.FileSystem.MoveFile(DirectorioTemporal, DirectorioDestino)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
Next
|
||||
ObjEcommerce.Dispose()
|
||||
' Archivo = $"{Archivo}{IO.Path.GetExtension(DirectorioTemporal)}"
|
||||
' DirectorioDestino += Archivo
|
||||
' If ObjEcommerce.ProductosImagenesAdd(CvePS, $"Ecommerce\Productos\Imagenes\{Archivo}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
' CargarGaleriaImagenesEcommerce()
|
||||
' My.Computer.FileSystem.MoveFile(DirectorioTemporal, DirectorioDestino)
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' End Try
|
||||
'Next
|
||||
'ObjEcommerce.Dispose()
|
||||
|
||||
RegistraScript("$(""#Modalupfotos"").modal(""hide"");initcarusel();")
|
||||
TxtEcommerceImagenes.Text = "[]"
|
||||
UpUpFotos.Update()
|
||||
'RegistraScript("$(""#Modalupfotos"").modal(""hide"");initcarusel();")
|
||||
'TxtEcommerceImagenes.Text = "[]"
|
||||
'UpUpFotos.Update()
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnEcommerceEliminarImagenes_Click(sender As Object, e As System.EventArgs)
|
||||
Dim CveImagenActivoFijo As Integer = 0
|
||||
CveImagenActivoFijo = Integer.Parse(DirectCast(sender, Button).CommandArgument)
|
||||
'Dim CveImagenActivoFijo As Integer = 0
|
||||
'CveImagenActivoFijo = Integer.Parse(DirectCast(sender, Button).CommandArgument)
|
||||
|
||||
If (CveImagenActivoFijo > 0) Then
|
||||
Dim ObjEcommerce As New ClsECommerce
|
||||
If ObjEcommerce.ProductosImagenesRemove(CveImagenActivoFijo, UsuarioActual.CveEmpresa) Then
|
||||
File.Delete(String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, ObjEcommerce.DtResultados.Rows(0)("URL")))
|
||||
CargarGaleriaImagenesEcommerce()
|
||||
RegistraScript("initcarusel();")
|
||||
End If
|
||||
ObjEcommerce.Dispose()
|
||||
End If
|
||||
'If (CveImagenActivoFijo > 0) Then
|
||||
' Dim ObjEcommerce As New ClsECommerce
|
||||
' If ObjEcommerce.ProductosImagenesRemove(CveImagenActivoFijo, UsuarioActual.CveEmpresa) Then
|
||||
' File.Delete(String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, ObjEcommerce.DtResultados.Rows(0)("URL")))
|
||||
' CargarGaleriaImagenesEcommerce()
|
||||
' RegistraScript("initcarusel();")
|
||||
' End If
|
||||
' ObjEcommerce.Dispose()
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " PRODUCTOS RELACIONADOS "
|
||||
Private Sub CargaPSRelacionadosEcommerce()
|
||||
Dim ObjEcommerce As New ClsECommerce
|
||||
If ObjEcommerce.ProductosRelacionadosGet(CvePS, UsuarioActual.CveEmpresa) Then
|
||||
GvEcommercePSRealacionados.DataSource = ObjEcommerce.DtResultados
|
||||
Else
|
||||
GvEcommercePSRealacionados.DataSource = Nothing
|
||||
End If
|
||||
ObjEcommerce.Dispose()
|
||||
'Dim ObjEcommerce As New ClsECommerce
|
||||
'If ObjEcommerce.ProductosRelacionadosGet(CvePS, UsuarioActual.CveEmpresa) Then
|
||||
' GvEcommercePSRealacionados.DataSource = ObjEcommerce.DtResultados
|
||||
'Else
|
||||
' GvEcommercePSRealacionados.DataSource = Nothing
|
||||
'End If
|
||||
'ObjEcommerce.Dispose()
|
||||
|
||||
GvEcommercePSRealacionados.DataBind()
|
||||
UpEcommercePSRelacionados.Update()
|
||||
'GvEcommercePSRealacionados.DataBind()
|
||||
'UpEcommercePSRelacionados.Update()
|
||||
End Sub
|
||||
Protected Sub BtnEcommercePSRelacionados_Click(sender As Object, e As EventArgs)
|
||||
If Not ValidaAgregarProductosRelacionadosEcommerce() Then
|
||||
Exit Sub
|
||||
End If
|
||||
'If Not ValidaAgregarProductosRelacionadosEcommerce() Then
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
Dim TieneError As Boolean = False
|
||||
Dim CvePS As Integer = DdlEcommercePSRelacionado.SelectedValue.ToEntero
|
||||
'Dim TieneError As Boolean = False
|
||||
'Dim CvePS As Integer = DdlEcommercePSRelacionado.SelectedValue.ToEntero
|
||||
|
||||
'AGREGAR
|
||||
Dim ObjEcommerce As New ClsECommerce
|
||||
If ObjEcommerce.ProductosRelacionadosAdd(Me.CvePS, CvePS, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Alert("La relación se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
ObjEcommerce.Dispose()
|
||||
''AGREGAR
|
||||
'Dim ObjEcommerce As New ClsECommerce
|
||||
'If ObjEcommerce.ProductosRelacionadosAdd(Me.CvePS, CvePS, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
' Alert("La relación se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||
'Else
|
||||
' TieneError = True
|
||||
'End If
|
||||
'ObjEcommerce.Dispose()
|
||||
|
||||
If Not TieneError Then
|
||||
DdlEcommercePSRelacionado.SelectedValue = "-1"
|
||||
DdlEcommercePSRelacionado.SelectedText = ""
|
||||
CargaPSRelacionadosEcommerce()
|
||||
End If
|
||||
'If Not TieneError Then
|
||||
' DdlEcommercePSRelacionado.SelectedValue = "-1"
|
||||
' DdlEcommercePSRelacionado.SelectedText = ""
|
||||
' CargaPSRelacionadosEcommerce()
|
||||
'End If
|
||||
End Sub
|
||||
Private Function ValidaAgregarProductosRelacionadosEcommerce() As Boolean
|
||||
Dim Retorno As Boolean = True
|
||||
Dim Mensaje As New StringBuilder
|
||||
'Dim Retorno As Boolean = True
|
||||
'Dim Mensaje As New StringBuilder
|
||||
|
||||
'PS
|
||||
Dim CvePS As Integer = DdlEcommercePSRelacionado.SelectedValue.ToEntero
|
||||
If CvePS = 0 Then
|
||||
Mensaje.Append("- El campo <b>Producto</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>")
|
||||
End If
|
||||
For Each GvRow As GridViewRow In GvEcommercePSRealacionados.Rows
|
||||
If GvRow.DataKey("CvePS").ToString.ToEntero = CvePS Then
|
||||
Mensaje.Append($"- El producto <b>{DdlEcommercePSRelacionado.SelectedText}</b> ya esta relacionado y no se puede duplicar. Por favor verifique y vuelva a intentar. <br>")
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
''PS
|
||||
'Dim CvePS As Integer = DdlEcommercePSRelacionado.SelectedValue.ToEntero
|
||||
'If CvePS = 0 Then
|
||||
' Mensaje.Append("- El campo <b>Producto</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>")
|
||||
'End If
|
||||
'For Each GvRow As GridViewRow In GvEcommercePSRealacionados.Rows
|
||||
' If GvRow.DataKey("CvePS").ToString.ToEntero = CvePS Then
|
||||
' Mensaje.Append($"- El producto <b>{DdlEcommercePSRelacionado.SelectedText}</b> ya esta relacionado y no se puede duplicar. Por favor verifique y vuelva a intentar. <br>")
|
||||
' Exit For
|
||||
' End If
|
||||
'Next
|
||||
|
||||
'VALIDACION
|
||||
If Mensaje.ToString.Length > 0 Then
|
||||
Retorno = False
|
||||
Alert(Mensaje.ToString, TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
''VALIDACION
|
||||
'If Mensaje.ToString.Length > 0 Then
|
||||
' Retorno = False
|
||||
' Alert(Mensaje.ToString, TipoMensaje.MsgAdvertencia)
|
||||
'End If
|
||||
|
||||
Return Retorno
|
||||
'Return Retorno
|
||||
End Function
|
||||
Protected Sub GvEcommercePSRealacionados_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvEcommercePSRealacionados.RowDeleting
|
||||
Dim TieneError As Boolean = False
|
||||
Dim GvRow As GridViewRow = GvEcommercePSRealacionados.Rows(e.RowIndex)
|
||||
'Protected Sub GvEcommercePSRealacionados_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvEcommercePSRealacionados.RowDeleting
|
||||
' 'Dim TieneError As Boolean = False
|
||||
' 'Dim GvRow As GridViewRow = GvEcommercePSRealacionados.Rows(e.RowIndex)
|
||||
|
||||
Dim ObjEcommerce As New ClsECommerce
|
||||
If ObjEcommerce.ProductosRelacionadosRemove(GvRow.DataKey("CvePS1").ToString.ToEntero, GvRow.DataKey("CvePS2").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Alert("La relación se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
ObjEcommerce.Dispose()
|
||||
' 'Dim ObjEcommerce As New ClsECommerce
|
||||
' 'If ObjEcommerce.ProductosRelacionadosRemove(GvRow.DataKey("CvePS1").ToString.ToEntero, GvRow.DataKey("CvePS2").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
' ' Alert("La relación se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
' 'Else
|
||||
' ' TieneError = True
|
||||
' 'End If
|
||||
' 'ObjEcommerce.Dispose()
|
||||
|
||||
If Not TieneError Then
|
||||
CargaPSRelacionadosEcommerce()
|
||||
End If
|
||||
End Sub
|
||||
' 'If Not TieneError Then
|
||||
' ' CargaPSRelacionadosEcommerce()
|
||||
' 'End If
|
||||
'End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -3599,4 +3619,64 @@ Partial Class ProductosyServicios
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BtnUpFotos_Click(sender As Object, e As EventArgs) Handles BtnUpFotos.Click
|
||||
|
||||
Dim FilesGral As List(Of Archivo) = TxtUpFotos.getfiles().Archivos
|
||||
Dim FileMove As String = ""
|
||||
Dim NewName As String
|
||||
For Each FileItem As Archivo In FilesGral
|
||||
|
||||
NewName = NowADS().Ticks.ToString
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
Try
|
||||
FileMove = FileItem.filename
|
||||
Dim DirectorioOld As New StringBuilder
|
||||
Dim DirectorioNew As New StringBuilder
|
||||
DirectorioOld.AppendFormat("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, FileMove)
|
||||
DirectorioNew.AppendFormat("{0}PS\", UsuarioActual.Empresa.Ruta)
|
||||
If Not Directory.Exists(DirectorioNew.ToString) Then
|
||||
Directory.CreateDirectory(DirectorioNew.ToString)
|
||||
End If
|
||||
NewName = String.Format("{0}{1}", NewName, IO.Path.GetExtension(DirectorioOld.ToString()))
|
||||
DirectorioNew.Append(NewName)
|
||||
|
||||
Me.Imagen = String.Format("PS/{0}", NewName)
|
||||
If ObjPS.UpdatePSImagen(Me.CvePS, Me.Imagen) Then
|
||||
My.Computer.FileSystem.MoveFile(DirectorioOld.ToString, DirectorioNew.ToString)
|
||||
End If
|
||||
|
||||
imgImagen.Attributes.Add("src", String.Format("/ashx/SIGWeb.ashx?Metodo=GetImg&r={0}", Extensiones.Encripta(Me.Imagen)))
|
||||
hplImagen.Attributes.Add("href", String.Format("/ashx/SIGWeb.ashx?Metodo=GetImg&r={0}", Extensiones.Encripta(Me.Imagen)))
|
||||
upGaleria.Update()
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar la imagen", ex)
|
||||
End Try
|
||||
|
||||
ObjPS.Dispose()
|
||||
RegistraScript("$(""#Modalupfotos"").modal(""hide"");initcarusel();")
|
||||
TxtUpFotos.Text = "[]"
|
||||
UpUpFotos.Update()
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnEliminarFoto_Click(sender As Object, e As System.EventArgs)
|
||||
|
||||
If (Me.CvePS > 0) Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.UpdatePSImagen(Me.CvePS, "") Then
|
||||
File.Delete(String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, Me.Imagen))
|
||||
Me.Imagen = ""
|
||||
imgImagen.Attributes.Add("src", "")
|
||||
hplImagen.Attributes.Add("href", "")
|
||||
RegistraScript("initcarusel();")
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
|
||||
upGaleria.Update()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -979,6 +979,41 @@
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpImagen" runat="server" UpdateMode="Conditional" class="portlet light xspadding bordered whitoutcol" style="margin-left: auto" Visible="false">
|
||||
<ContentTemplate>
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Imagen del producto</span>
|
||||
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="padding-top: 0px; margin-top: -5px;">
|
||||
<div class="portfolio-content portfolio-1">
|
||||
<div id="js-filters-juicy-projects" class="cbp-l-filters-button">
|
||||
</div>
|
||||
<div id="js-grid-juicy-projects" class="cbp">
|
||||
<div class="cbp-item graphic">
|
||||
<div class="cbp-caption">
|
||||
<div class="cbp-caption-defaultWrap">
|
||||
<img runat="server" id="imgImagen" style="max-height:250px !important; max-width:250px !important;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel ID="Updatetabs" runat="server" UpdateMode="Conditional">
|
||||
@@ -10825,6 +10860,78 @@
|
||||
$('#BtnRecargaProcedimientos').click();
|
||||
}
|
||||
|
||||
function clickgaleria() {
|
||||
initcarusel();
|
||||
initcarusel2 = function () { };
|
||||
}
|
||||
var initcarusel = function () {
|
||||
'use strict';
|
||||
if ($('#js-grid-juicy-projects').data('hascube') != '1') {
|
||||
$('#js-grid-juicy-projects').cubeportfolio({
|
||||
filters: '#js-filters-juicy-projects',
|
||||
loadMore: '#js-loadMore-juicy-projects',
|
||||
loadMoreAction: 'click',
|
||||
layoutMode: 'grid',
|
||||
defaultFilter: '*',
|
||||
animationType: 'quicksand',
|
||||
gapHorizontal: 35,
|
||||
gapVertical: 30,
|
||||
gridAdjustment: 'responsive',
|
||||
mediaQueries: [{
|
||||
width: 1500,
|
||||
cols: 5
|
||||
}, {
|
||||
width: 1100,
|
||||
cols: 4
|
||||
}, {
|
||||
width: 800,
|
||||
cols: 3
|
||||
}, {
|
||||
width: 480,
|
||||
cols: 2
|
||||
}, {
|
||||
width: 320,
|
||||
cols: 1
|
||||
}],
|
||||
caption: 'overlayBottomReveal',
|
||||
displayType: 'sequentially',
|
||||
displayTypeSpeed: 80,
|
||||
|
||||
// lightbox
|
||||
lightboxDelegate: '.cbp-lightbox',
|
||||
lightboxGallery: true,
|
||||
lightboxTitleSrc: 'data-title',
|
||||
lightboxCounter: '<div class="cbp-popup-lightbox-counter">{{current}} of {{total}}</div>',
|
||||
|
||||
// singlePage popup
|
||||
singlePageDelegate: '.cbp-singlePage',
|
||||
singlePageDeeplinking: true,
|
||||
singlePageStickyNavigation: true,
|
||||
singlePageCounter: '<div class="cbp-popup-singlePage-counter">{{current}} of {{total}}</div>',
|
||||
singlePageCallback: function (url, element) {
|
||||
// to update singlePage content use the following method: this.updateSinglePage(yourContent)
|
||||
var t = this;
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'GET',
|
||||
dataType: 'html',
|
||||
timeout: 10000
|
||||
})
|
||||
.done(function (result) {
|
||||
t.updateSinglePage(result);
|
||||
})
|
||||
.fail(function () {
|
||||
t.updateSinglePage('AJAX Error! Please refresh the page!');
|
||||
});
|
||||
},
|
||||
});
|
||||
$('#js-grid-juicy-projects').data('hascube', '1')
|
||||
}
|
||||
}
|
||||
|
||||
var initcarusel2 = initcarusel;
|
||||
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -3171,6 +3171,11 @@ Partial Class Ventas
|
||||
DivNumTurnos.Visible = True
|
||||
End If
|
||||
|
||||
If CveVenta <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(716) = "1" Then
|
||||
UpImagen.Visible = True
|
||||
UpImagen.Update()
|
||||
End If
|
||||
|
||||
'SELECCIONA VENDEDOR DEL USUARIO CUANDO SEA VENTA NUEVA Y SIN CLIENTE
|
||||
'If UsuarioActual.CveVendedor > 0 Then
|
||||
' If CveVenta = -1 AndAlso Not DdlVendedor.SelectedValue.ToEntero() > 0 Then DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
|
||||
@@ -17347,6 +17352,29 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(716) = "1" Then
|
||||
Dim Imagen = drPS("Imagen").ToString
|
||||
|
||||
Dim URLImagen As String = ""
|
||||
|
||||
If Not String.IsNullOrEmpty(Imagen) Then
|
||||
URLImagen = String.Format("/ashx/SIGWeb.ashx?Metodo=GetImg&r={0}", Extensiones.Encripta(Imagen))
|
||||
End If
|
||||
|
||||
If imgImagen.Attributes.Item("src") Is Nothing Then
|
||||
imgImagen.Attributes.Add("src", URLImagen)
|
||||
Else
|
||||
imgImagen.Attributes.Item("src") = URLImagen
|
||||
End If
|
||||
|
||||
UpImagen.Update()
|
||||
|
||||
If Not String.IsNullOrEmpty(Imagen) Then
|
||||
RegistraScript("initcarusel();", "I1")
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
AgregarPS()
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user