- comisiones sms
This commit is contained in:
@@ -2,10 +2,7 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Data.Entity
|
||||
Imports Extensiones
|
||||
Imports Microsoft.EntityFrameworkCore
|
||||
|
||||
|
||||
Partial Class Ventas_RepComisionesSMS
|
||||
Inherits ClsPaginas
|
||||
@@ -62,10 +59,12 @@ Partial Class Ventas_RepComisionesSMS
|
||||
Public Sub CargaDatos()
|
||||
|
||||
LnkExportar.Visible = False
|
||||
Dim FechaIPago As Date = If(TxtFechaIPago.Text.ToDate < MinFecha, MinFecha, TxtFechaIPago.Text.ToDate)
|
||||
Dim FechaFPago As Date = If(TxtFechaFPago.Text.ToDate < MinFecha, MaxFecha, TxtFechaFPago.Text.ToDate)
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.GetComisionesMedicasRep(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, -1, -1, DdlMedico.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, -1, 1) Then
|
||||
If ObjVentas.GetComisionesMedicasRep(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, -1, -1, DdlMedico.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, -1, FechaIPago, FechaFPago) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
|
||||
If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
@@ -76,9 +75,10 @@ Partial Class Ventas_RepComisionesSMS
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
|
||||
If UsuarioActual.CveVendedor = 0 Then GvDatos.Columns(15).Visible = True 'columna de comisiones de gerente
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
@@ -270,7 +270,7 @@ Partial Class Ventas_RepComisionesSMS
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
GvComisionesEspeciales.DataSource = Nothing
|
||||
If ObjVentas.GetComisionesMedicasEsPeciales(-1, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetComisionesMedicasEspeciales(-1, -1, UsuarioActual.CveEmpresa) Then
|
||||
GvComisionesEspeciales.DataSource = ObjVentas.DtResultados
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
@@ -345,7 +345,12 @@ Partial Class Ventas_RepComisionesSMS
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.AddComisionesMedicasEspeciales(DdlModalMedico.SelectedValue.ToEntero, DdlModalPS.SelectedValue.ToEntero, DdlModalTipoComision.SelectedValue.ToEntero, Comision, UsuarioActual.CveUsuario) Then
|
||||
Alert("Comisión agregada correctamente")
|
||||
Alert("Comisión agregada correctamente", TipoMensaje.ToastInformacion)
|
||||
DdlModalPS.SelectedValue = "-1"
|
||||
DdlModalPS.SelectedValue = ""
|
||||
DdlModalPS.SelectedText = ""
|
||||
TxtModalComision.Text = ""
|
||||
DdlModalPS.Focus()
|
||||
Else
|
||||
errorProceso = True
|
||||
End If
|
||||
@@ -354,7 +359,16 @@ Partial Class Ventas_RepComisionesSMS
|
||||
|
||||
If Not errorProceso Then
|
||||
CargaComisionesEspeciales()
|
||||
ReiniciaModalComisionesEspeciales()
|
||||
'ReiniciaModalComisionesEspeciales()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("SerieFolio") = "" Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user