--Cambios en metas de vendedores
This commit is contained in:
@@ -33,13 +33,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="titlefiltros caption">
|
<div class="titlefiltros caption">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-1 truncate">Sucursal:</label>
|
<label class="col-md-1 truncate" id="DivLblSucursal" runat="server">Sucursal:</label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2" id="DivSucursal" runat="server">
|
||||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
<asp:DropDownList ID="DdlSubProyecto" runat="server" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<label class="col-md-1 truncate">Mes/Año:</label>
|
<label class="col-md-1 truncate" id="DivLblMes" runat="server">Mes/Año:</label>
|
||||||
<div class="col-md-1" style="min-width: 115px">
|
<div class="col-md-1" style="min-width: 115px" id="DivMes" runat="server">
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
<asp:TextBox Width="80px" ID="txtMesAnio" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
<asp:TextBox Width="80px" ID="txtMesAnio" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
@@ -54,8 +54,8 @@
|
|||||||
<asp:DropDownList ID="DdlVendedor" runat="server" Width="100%" DataTextField="Vendedor" DataValueField="CveVendedor" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
<asp:DropDownList ID="DdlVendedor" runat="server" Width="100%" DataTextField="Vendedor" DataValueField="CveVendedor" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<label title="Marca" data-toggle="tooltip" class="col-md-1 truncate">Marca:</label>
|
<label title="Marca" data-toggle="tooltip" class="col-md-1 truncate" id="DivLblMarca" runat="server">Marca:</label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2" id="DivMarca" runat="server">
|
||||||
<asp:DropDownList ID="DdlMarca" runat="server" Width="100%" DataTextField="Marca" DataValueField="CveMarca" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
<asp:DropDownList ID="DdlMarca" runat="server" Width="100%" DataTextField="Marca" DataValueField="CveMarca" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<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="CveMeta,CveVendedor,CveMarca,CveClasificacion,CveClasificacionSup,Vendedor,MesAño,Marca,Clasificacion,MetaCantidad,MetaImporte" EmptyDataText="No se encontraron metas registradas" ToolTip="Listado de Metas Vendedor" CssClass="table table-striped table-advance table-hover" Style=" width: 100%" GridLines="None">
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMeta,CveVendedor,CveMarca,CveClasificacion,CveClasificacionSup,Vendedor,MesAño,Marca,Clasificacion,MetaCantidad,MetaImporte" EmptyDataText="No se encontraron metas registradas" ToolTip="Listado de Metas Vendedor" CssClass="table table-striped table-advance table-hover" Style="width: 100%" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Vendedor" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField HeaderText="Vendedor" ItemStyle-HorizontalAlign="Left">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -162,48 +162,54 @@
|
|||||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Metas Vendedores</asp:Literal></h4>
|
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Metas Vendedores</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="row" style="display: flex; align-items: center; margin-bottom: 10px;">
|
||||||
<label for="DdlVendedores">Vendedor:</label>
|
<div class="col-md-2 truncate">Vendedor</div>
|
||||||
<asp:DropDownList ID="DdlVendedores" runat="server" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
<div class="col-md-10">
|
||||||
<i></i>
|
<asp:DropDownList ID="DdlVendedores" runat="server" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
|
||||||
</div>
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<label for="MotivoTxt">Mes y Año:</label>
|
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
|
||||||
<asp:TextBox Style="width: 110px !important;" ID="TxtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
|
||||||
<span class="input-group-btn ">
|
|
||||||
<asp:LinkButton ID="ImgFechaI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
||||||
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;" id="Div3" runat="server" visible="false">
|
||||||
<label for="DdlMarcas">Clasificacion Superior:</label>
|
<div class="col-md-2 truncate">Marca</div>
|
||||||
<asp:DropDownList ID="DdlClasificacionSup" runat="server" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
<div class="col-md-4">
|
||||||
<i></i>
|
<asp:DropDownList ID="DdlMarcas" runat="server" DataTextField="Marca" DataValueField="CveMarca" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2 truncate">Mes y Año</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Style="width: 110px !important;" ID="TxtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="ImgFechaI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;" id="Div2" runat="server" visible="false">
|
||||||
<label for="DdlMarcas">Clasificacion:</label>
|
<div class="col-md-2">Clasificación Superior</div>
|
||||||
<asp:DropDownList ID="DdlClasificacion" runat="server" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
<div class="col-md-10">
|
||||||
<i></i>
|
<asp:DropDownList ID="DdlClasificacionSup" runat="server" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;" id="Div1" runat="server" visible="false">
|
||||||
<label for="DdlMarcas">Marca:</label>
|
<label class="col-md-2 truncate">Clasificación</label>
|
||||||
<asp:DropDownList ID="DdlMarcas" runat="server" DataTextField="Marca" DataValueField="CveMarca" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
<div class="col-md-10">
|
||||||
<i></i>
|
<asp:DropDownList ID="DdlClasificacion" runat="server" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;">
|
||||||
<asp:TextBox ID="TxtMetaCantidad" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
<div class="col-md-2">Cantidad meta</div>
|
||||||
<asp:RequiredFieldValidator ID="RfvTxtTiposD" runat="server" ControlToValidate="TxtMetaCantidad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad meta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
<div class="col-md-4">
|
||||||
<label for="MotivoTxt">Cantidad meta:</label>
|
<asp:TextBox ID="TxtMetaCantidad" CssClass="form-control" runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||||
<i></i>
|
<asp:CompareValidator ID="CVCantidad" runat="server" ControlToValidate="TxtMetaCantidad" Display="None" ErrorMessage="El campo <b>''Cantidad meta''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpTiposD"></asp:CompareValidator>
|
||||||
</div>
|
<asp:RequiredFieldValidator ID="RFVTxtMetaCantidad" runat="server" ControlToValidate="TxtMetaCantidad" Display="None" ErrorMessage="El campo <b>''Cantidad meta''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
</div>
|
||||||
<asp:TextBox ID="TxtMetaImporte" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
<div class="col-md-2">Importe meta</div>
|
||||||
<asp:RequiredFieldValidator ID="RfvTxtMetaImporte" runat="server" ControlToValidate="TxtMetaImporte" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe meta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
<div class="col-md-4">
|
||||||
<label for="MotivoTxt">Importe meta:</label>
|
<asp:TextBox ID="TxtMetaImporte" CssClass="form-control" runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||||
<i></i>
|
<asp:CompareValidator ID="CVImporte" runat="server" ControlToValidate="TxtMetaImporte" Display="None" ErrorMessage="El campo <b>''Cantidad meta''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpTiposD"></asp:CompareValidator>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVTxtMetaImporte" runat="server" ControlToValidate="TxtMetaImporte" Display="None" ErrorMessage="El campo <b>''Importe meta''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|||||||
@@ -33,16 +33,31 @@ Partial Class CatMetasVendedores
|
|||||||
|
|
||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
Dim Mes As Integer = -1, Anio As Integer = -1
|
Dim Mes As Integer = -1, Anio As Integer = -1
|
||||||
If Not String.IsNullOrEmpty(txtMesAnio.Text) Then
|
|
||||||
Dim FechaRef As DateTime = txtMesAnio.Text.ToDate()
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
Mes = FechaRef.Month
|
If Not String.IsNullOrEmpty(txtMesAnio.Text) Then
|
||||||
Anio = FechaRef.Year
|
Dim FechaRef As DateTime = txtMesAnio.Text.ToDate()
|
||||||
|
Mes = FechaRef.Month
|
||||||
|
Anio = FechaRef.Year
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
GvDatos.Columns(1).Visible = False
|
||||||
|
GvDatos.Columns(2).Visible = False
|
||||||
|
GvDatos.Columns(3).Visible = False
|
||||||
|
GvDatos.Columns(4).Visible = False
|
||||||
|
|
||||||
|
DivLblSucursal.Visible = False
|
||||||
|
DivSucursal.Visible = False
|
||||||
|
DivLblMes.Visible = False
|
||||||
|
DivMes.Visible = False
|
||||||
|
DivLblMarca.Visible = False
|
||||||
|
DivMarca.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
If ObjVentas.GetMetasVendedores(UsuarioActual.CveEmpresa, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero(), CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), CveMarca:=DdlMarca.SelectedValue.ToEntero(), Mes:=Mes, Anio:=Anio) Then
|
If ObjVentas.GetMetasVendedores(UsuarioActual.CveEmpresa, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero(), CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), CveMarca:=DdlMarca.SelectedValue.ToEntero(), Mes:=Mes, Anio:=Anio) Then
|
||||||
GvDatos.DataSource = ObjVentas.DtResultados
|
DtDatos = ObjVentas.DtResultados.Copy()
|
||||||
DtDatos = ObjVentas.DtResultados
|
GvDatos.DataSource = DtDatos
|
||||||
End If
|
End If
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
GvDatos.DataBind()
|
GvDatos.DataBind()
|
||||||
@@ -65,6 +80,12 @@ Partial Class CatMetasVendedores
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaDatosModal()
|
Private Sub CargaDatosModal()
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
Div1.Visible = True
|
||||||
|
Div2.Visible = True
|
||||||
|
Div3.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
DdlVendedores.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
DdlVendedores.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||||
DdlVendedores.DataBind()
|
DdlVendedores.DataBind()
|
||||||
DdlVendedores.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
DdlVendedores.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||||
@@ -93,29 +114,50 @@ Partial Class CatMetasVendedores
|
|||||||
|
|
||||||
Protected Sub BtnAgregarMetaVendedor_Click(sender As Object, e As EventArgs) Handles BtnAgregarMetaVendedor.Click
|
Protected Sub BtnAgregarMetaVendedor_Click(sender As Object, e As EventArgs) Handles BtnAgregarMetaVendedor.Click
|
||||||
|
|
||||||
If DdlVendedores.SelectedValue.ToEntero > 0 AndAlso TxtFechaI.Text <> "" AndAlso DdlMarcas.SelectedValue.ToEntero > 0 AndAlso DdlClasificacionSup.SelectedValue.ToEntero > 0 Then
|
Dim CveVendedor As Integer = DdlVendedores.SelectedValue.ToEntero()
|
||||||
|
Dim Fecha As Date = MinFecha
|
||||||
|
Dim CveMarca As Integer = -1
|
||||||
|
Dim CveClasificacionSuperior As Integer = -1
|
||||||
|
Dim CveClasificacion As Integer = -1
|
||||||
|
|
||||||
Dim ObjVentas As New ClsVentas
|
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
|
||||||
|
If Not (DdlVendedores.SelectedValue.ToEntero > 0 AndAlso TxtFechaI.Text <> "" AndAlso DdlMarcas.SelectedValue.ToEntero > 0 AndAlso DdlClasificacionSup.SelectedValue.ToEntero > 0) Then
|
||||||
|
Alert(String.Format("Falta Seleccionar {0}{1}{2}", If(DdlVendedores.SelectedValue.ToEntero > 0, "", "Vendedor, "), If(DdlMarcas.SelectedValue.ToEntero > 0, "", "Marca, "), If(TxtFechaI.Text <> "", "", "Fecha, ")))
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
Fecha = TxtFechaI.Text.ToDate()
|
||||||
|
CveClasificacionSuperior = DdlClasificacionSup.SelectedValue.ToEntero
|
||||||
|
CveClasificacion = DdlClasificacion.SelectedValue.ToEntero
|
||||||
|
CveMarca = DdlMarca.SelectedValue.ToEntero
|
||||||
|
|
||||||
|
Else
|
||||||
|
If Not (DdlVendedores.SelectedValue.ToEntero > 0) Then
|
||||||
|
Alert("Falta Seleccionar el vendedor")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Using ObjVentas As New ClsVentas
|
||||||
If BtnAgregarMetaVendedor.Text = "Agregar" Then
|
If BtnAgregarMetaVendedor.Text = "Agregar" Then
|
||||||
If ObjVentas.AddMetasVendedores(DdlVendedores.SelectedValue.ToEntero, TxtFechaI.Text.ToDate, DdlMarcas.SelectedValue.ToEntero, TxtMetaCantidad.Text.ToEntero,
|
If ObjVentas.AddMetasVendedores(CveVendedor, Fecha, DdlMarcas.SelectedValue.ToEntero, TxtMetaCantidad.Text.ToEntero, TxtMetaImporte.Text.ToDecimal, CveClasificacion, CveClasificacionSuperior, UsuarioActual.CveEmpresa) Then
|
||||||
TxtMetaImporte.Text.ToDecimal, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacionSup.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
|
||||||
Alert("Se agregó la meta al vendedor")
|
Alert("Se agregó la meta al vendedor")
|
||||||
Else
|
Else
|
||||||
Alert("No se pudo agregar la meta al vendedor", TipoMensaje.MsgError)
|
Alert("No se pudo agregar la meta al vendedor", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
ElseIf BtnAgregarMetaVendedor.Text = "Actualizar" Then
|
ElseIf BtnAgregarMetaVendedor.Text = "Actualizar" Then
|
||||||
If ObjVentas.UpdateMetasVendedores(CveMetaVendedor, DdlVendedores.SelectedValue.ToEntero, TxtFechaI.Text, DdlMarcas.SelectedValue.ToEntero,
|
If ObjVentas.UpdateMetasVendedores(CveMetaVendedor, CveVendedor, Fecha.ToString("dd/MM/yyyy"), CveMarca, TxtMetaCantidad.Text.ToEntero, TxtMetaImporte.Text.ToDecimal, CveClasificacion, CveClasificacionSuperior) Then
|
||||||
TxtMetaCantidad.Text.ToEntero, TxtMetaImporte.Text.ToDecimal, DdlClasificacion.SelectedValue.ToEntero,
|
|
||||||
DdlClasificacionSup.SelectedValue.ToEntero) Then
|
|
||||||
Alert("Se actualizó la información de la meta del vendedor")
|
Alert("Se actualizó la información de la meta del vendedor")
|
||||||
Else
|
Else
|
||||||
Alert("No se pudo actualizar la meta del vendedor", TipoMensaje.MsgError)
|
Alert("No se pudo actualizar la meta del vendedor", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
End Using
|
||||||
Alert(String.Format("Falta Seleccionar {0}{1}{2}", If(DdlVendedores.SelectedValue.ToEntero > 0, "", "Vendedor, "), If(DdlMarcas.SelectedValue.ToEntero > 0, "", "Marca, "), If(TxtFechaI.Text <> "", "", "Fecha, ")))
|
|
||||||
End If
|
|
||||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"))
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"))
|
||||||
|
|
||||||
ResetDatosSeleccionadosModal()
|
ResetDatosSeleccionadosModal()
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
@@ -135,12 +177,17 @@ Partial Class CatMetasVendedores
|
|||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
CveMetaVendedor = GvRow.DataKey("CveMeta").ToEntero
|
CveMetaVendedor = GvRow.DataKey("CveMeta").ToEntero
|
||||||
DdlVendedores.SelectedValue = GvRow.DataKey("CveVendedor")
|
DdlVendedores.SelectedValue = GvRow.DataKey("CveVendedor")
|
||||||
TxtFechaI.Text = GvRow.DataKey("MesAño")
|
|
||||||
|
|
||||||
DdlClasificacionSup.SelectedValueExist(GvRow.DataKey("CveClasificacionSup"))
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion"))
|
|
||||||
|
TxtFechaI.Text = GvRow.DataKey("MesAño")
|
||||||
|
|
||||||
|
DdlClasificacionSup.SelectedValueExist(GvRow.DataKey("CveClasificacionSup"))
|
||||||
|
DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion"))
|
||||||
|
|
||||||
|
DdlMarcas.SelectedValue = GvRow.DataKey("CveMarca")
|
||||||
|
End If
|
||||||
|
|
||||||
DdlMarcas.SelectedValue = GvRow.DataKey("CveMarca")
|
|
||||||
TxtMetaCantidad.Text = GvRow.DataKey("MetaCantidad")
|
TxtMetaCantidad.Text = GvRow.DataKey("MetaCantidad")
|
||||||
TxtMetaImporte.Text = GvRow.DataKey("MetaImporte")
|
TxtMetaImporte.Text = GvRow.DataKey("MetaImporte")
|
||||||
UpModalTiposD.Update()
|
UpModalTiposD.Update()
|
||||||
|
|||||||
Reference in New Issue
Block a user