This commit is contained in:
2024-01-27 16:56:38 -07:00
14 changed files with 531 additions and 199 deletions

View File

@@ -9,6 +9,7 @@ Imports Extensiones
Imports iText.Barcodes.Dmcode
Imports Microsoft.Reporting.WebForms
Imports Modelos
Imports Stimulsoft.Base.Context
Partial Class PopUpVerFactura
@@ -3372,10 +3373,42 @@ Partial Class PopUpVerFactura
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
CveCliente = DtMovimientos.FiltroPrimeroValor("CveCliente").ToEntero
DTCliente = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}")
Dim CveVentaConsulta As Integer = DtMovimientos.FiltroPrimeroValor("CveVenta").ToEntero
params.Add(New ReportParameter("Documentacion", DTCliente.FiltroPrimeroValor("Documentacion")))
Dim ObjVentas As New ClsVentas()
If ObjVentas.GetVenta(CveVentaConsulta, UsuarioActual.CveEmpresa, False) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
Dim dtVentas As DataTable = ObjVentas.DtResultados
params.Add(New ReportParameter("ClienteCodigo", dtVentas.Rows(0)("ClienteCodigo").ToString))
params.Add(New ReportParameter("ClienteNombre", dtVentas.Rows(0)("ClienteNombre").ToString))
params.Add(New ReportParameter("ClienteSucursal", dtVentas.Rows(0)("SucursalCliente").ToString))
params.Add(New ReportParameter("ClienteRFC", dtVentas.Rows(0)("ClienteRFC").ToString))
params.Add(New ReportParameter("ClienteCalle", dtVentas.Rows(0)("ClienteDireccion").ToString))
params.Add(New ReportParameter("ClienteNoExt", dtVentas.Rows(0)("ClienteNoExt").ToString))
params.Add(New ReportParameter("ClienteColonia", dtVentas.Rows(0)("ColoniaCliente").ToString))
params.Add(New ReportParameter("ClienteCiudad", dtVentas.Rows(0)("ClienteCiudad").ToString))
params.Add(New ReportParameter("ClienteEstado", dtVentas.Rows(0)("ClienteEstado").ToString))
params.Add(New ReportParameter("ClienteMunicipio", dtVentas.Rows(0)("SucClienteCiudad").ToString))
params.Add(New ReportParameter("ClienteCP", dtVentas.Rows(0)("CPCliente").ToString))
End If
ObjVentas.Dispose()
If CveCliente = 819998 Then
RutaFormato = "{0}Formatos\TrasladoAngeles.rdlc"
End If

View File

@@ -793,7 +793,7 @@ CIUDAD DE MEXICO</Value>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Telefono +52 551 563 3271 support@smsmedicalsolutions.com</Value>
<Value>Teléfono: +52 551 563 3271 Correo: support@smsmedicalsolutions.com</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -807,7 +807,7 @@ CIUDAD DE MEXICO</Value>
<Top>0.80781cm</Top>
<Left>4.60107cm</Left>
<Height>1.56146cm</Height>
<Width>10.0923cm</Width>
<Width>11.13886cm</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>

View File

@@ -648,7 +648,7 @@ CIUDAD DE MEXICO</Value>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Telefono +52 551 563 3271 support@smsmedicalsolutions.com</Value>
<Value>Teléfono: +52 551 563 3271 Correo: support@smsmedicalsolutions.com</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -662,7 +662,7 @@ CIUDAD DE MEXICO</Value>
<Top>0.93835cm</Top>
<Left>4.49034cm</Left>
<Height>1.56146cm</Height>
<Width>9.99987cm</Width>
<Width>10.79062cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>

View File

@@ -1446,14 +1446,76 @@
</Border>
</Style>
</Tablix>
<Textbox Name="Textbox36">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!Observaciones.Value</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Proveedor: </Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!Documentacion.Value</Value>
<Style>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox31</rd:DefaultName>
<Top>2.16703cm</Top>
<Left>0.13678cm</Left>
<Height>1.27434cm</Height>
<Width>13.15003cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Height>0.88788in</Height>
<Height>1.35487in</Height>
<Style />
</Body>
<Width>10.19535in</Width>
<Page>
<PageHeader>
<Height>5.15937cm</Height>
<Height>4.53319cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
<ReportItems>
@@ -1532,7 +1594,7 @@ CIUDAD DE MEXICO</Value>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Telefono +52 551 563 3271 support@smsmedicalsolutions.com</Value>
<Value>Teléfono: +52 551 563 3271 Correo:support@smsmedicalsolutions.com</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -1546,7 +1608,7 @@ CIUDAD DE MEXICO</Value>
<Top>0.63635cm</Top>
<Left>7.67902cm</Left>
<Height>1.52889cm</Height>
<Width>10.41731cm</Width>
<Width>11.02585cm</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>
@@ -1770,57 +1832,163 @@ CIUDAD DE MEXICO</Value>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox36">
<Textbox Name="Textbox9">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!Observaciones.Value</Value>
<Value>Cliente: </Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Proveedor: </Value>
<Style>
<FontWeight>Bold</FontWeight>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!Documentacion.Value</Value>
<Value>=Parameters!ClienteCodigo.Value</Value>
<Style>
<FontWeight>Normal</FontWeight>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value> - </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteNombre.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>.
Sucursal: .</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteSucursal.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value> RFC: </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteRFC.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>
Calle: </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteCalle.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value xml:space="preserve"> </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteNoExt.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>. Colonia: </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteColonia.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value> Ciudad: </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteCiudad.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>.
Estado: </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteEstado.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>.
Municipio y/o Delegación: </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteMunicipio.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>. CP: </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteCP.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>.</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox31</rd:DefaultName>
<Top>2.27107cm</Top>
<Left>0.13678cm</Left>
<Height>2.8883cm</Height>
<Width>13.15003cm</Width>
<rd:DefaultName>Textbox7</rd:DefaultName>
<Top>2.32101cm</Top>
<Left>0.10068cm</Left>
<Height>2.12398cm</Height>
<Width>20.93288cm</Width>
<ZIndex>9</ZIndex>
<Style>
<Border>
@@ -2300,7 +2468,6 @@ CIUDAD DE MEXICO</Value>
</Style>
</Textbox>
<Line Name="Line5">
<Top>0cm</Top>
<Left>0.13678cm</Left>
<Height>0cm</Height>
<Width>20.28859cm</Width>
@@ -2312,7 +2479,6 @@ CIUDAD DE MEXICO</Value>
</Style>
</Line>
<Line Name="Line4">
<Top>0cm</Top>
<Left>0.13678cm</Left>
<Height>0cm</Height>
<Width>25.72414cm</Width>
@@ -2532,6 +2698,72 @@ CIUDAD DE MEXICO</Value>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteCodigo">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteNombre">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteSucursal">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteRFC">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteCalle">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteNoExt">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteColonia">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteCiudad">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteEstado">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteMunicipio">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteCP">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<EmbeddedImages>
<EmbeddedImage Name="Logo">

View File

@@ -117,6 +117,19 @@ Partial Class Inventarios_EntregaAlmacen
End Set
End Property
Private Property CveTipoVenta As Integer
Get
If ViewState("CveTipoVenta") Is Nothing Then
ViewState("CveTipoVenta") = -1
End If
Return CType(ViewState("CveTipoVenta"), Integer)
End Get
Set(value As Integer)
ViewState("CveTipoVenta") = value
End Set
End Property
Private Property TipoEstatus As Integer
Get
@@ -320,15 +333,15 @@ Partial Class Inventarios_EntregaAlmacen
End Property
Private Property PedidoBloqueCantidad As Boolean
Private Property BloqueCantidad As Boolean
Get
If ViewState("PedidoBloqueCantidad") Is Nothing Then
ViewState("PedidoBloqueCantidad") = False
If ViewState("BloqueCantidad") Is Nothing Then
ViewState("BloqueCantidad") = False
End If
Return Boolean.Parse(ViewState("PedidoBloqueCantidad").ToString)
Return Boolean.Parse(ViewState("BloqueCantidad").ToString)
End Get
Set(value As Boolean)
ViewState("PedidoBloqueCantidad") = value
ViewState("BloqueCantidad") = value
End Set
End Property
@@ -675,6 +688,7 @@ Partial Class Inventarios_EntregaAlmacen
LbObservacionesAlmacen.Text = drE("ObservacionesAlmacen").ToString()
CveVentaSurtir = CveVenta
CveOSSurtir = CveOS
CveTipoVenta = drE("CveTipoVenta").ToString().ToEntero
CveAlmacenTraspasoDestino = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem" And TipoDocto <> "Ped", "CveAlmacenTraspasoOrigen", "CveAlmacenTraspasoDestino")).ToString().ToEntero()
CveAlmacenTraspasoOrigen = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem" And TipoDocto <> "Ped", "CveAlmacenTraspasoDestino", "CveAlmacenTraspasoOrigen")).ToString().ToEntero()
CveContrato = drE("CveContrato").ToString().ToEntero()
@@ -842,14 +856,19 @@ Partial Class Inventarios_EntregaAlmacen
End If
ObjInventario.Dispose()
UpGenerales.Update()
If CveAlmacen <= 0 Then CargaGvDatos()
UpGenerales.Update()
If (EsDevolucionVenta = 1 AndAlso CveOSSurtir > 0 AndAlso TipoMovimiento = 2 AndAlso TipoDocto = "Ped") Or (UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 AndAlso CveTipoVenta <> 3) Then
BloqueCantidad = True
Else
BloqueCantidad = False
End If
If EsDevolucionVenta = 1 AndAlso CveOSSurtir > 0 AndAlso TipoMovimiento = 2 AndAlso TipoDocto = "Ped" Then
PedidoBloqueCantidad = True
End If
If CveAlmacen <= 0 Then CargaGvDatos()
@@ -1106,7 +1125,7 @@ Partial Class Inventarios_EntregaAlmacen
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
If (e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha) OrElse UsuarioActual.TienePermisoProceso(364) Then
If (e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha) OrElse UsuarioActual.TienePermisoProceso(364) OrElse UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
e.Row.FCTextBox("TxtCaducidad").ReadOnly = False
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True
e.Row.FCTextBox("TxtCaducidad").Enabled = True
@@ -1120,7 +1139,7 @@ Partial Class Inventarios_EntregaAlmacen
If CBool(e.Row.DBCampo("AplicaLote")) Then
e.Row.FCTextBox("TxtLote").Visible = True
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
If e.Row.FCTextBox("TxtLote").Text = "" OrElse UsuarioActual.TienePermisoProceso(364) Then
If e.Row.FCTextBox("TxtLote").Text = "" OrElse UsuarioActual.TienePermisoProceso(364) OrElse UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
e.Row.FCTextBox("TxtLote").ReadOnly = False
e.Row.FCTextBox("TxtLote").Enabled = True
Else
@@ -1165,7 +1184,7 @@ Partial Class Inventarios_EntregaAlmacen
e.Row.FCCheckBox("cbInv").Enabled = False
End If
If PedidoBloqueCantidad Then
If BloqueCantidad Then
e.Row.FCTextBox("TbCantidadF").Enabled = False
End If

View File

@@ -190,7 +190,8 @@
<div class="portlet-body">
<asp:GridView ID="GvNA" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Órdenes de Servicio No Asignadas" ClientIDMode="Static"
DataKeyNames="CveOSDetalle, CveOS,CveUsuarioAtendio,TipoEstatus,EstatusOrdenServicio,CveSubProyecto,Folio,FechaCita,FechaCitaOS"
CssClass="table table-striped table-hover Widthall table-advance" GridLines="None">
data-sort="true"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="">
<ItemTemplate>

View File

@@ -498,10 +498,13 @@ Partial Class OS_Asignaciones
Dim TMSelector = DirectCast(e.Row.FindControl("TimeSelector"), TimeSelector)
TMSelector.Date = FechaCita
e.Row.Cells(7).Attributes.Add("data-order", e.Row.DBCampo("FechaCitaOS").ToDate.Ticks.ToString)
e.Row.Cells(8).Attributes.Add("data-order", e.Row.DBCampo("FechaCitaOS").ToDate.ToString("HHmm"))
End If
End If
UpOS.Update()

View File

@@ -2913,8 +2913,46 @@ Partial Class OS_OrdenesServicios
DdlUsuarioAtendio.DataBind()
DdlUsuarioAtendio.Items.Insert(0, New ListItem("Sin Asignar", "-1"))
CargaTecnicoDdlUsuarioAtendio()
End Sub
Private Sub CargaTecnicoDdlUsuarioAtendio()
Dim ObjOS As New ClsOS
Dim DtOSSubProyectos As New DataTable
Dim TecnicosSubProyectos As New DataTable
Dim TecnicosResultado As New DataTable
If ObjOS.GetOrdenesServiciosNoAsignadas(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, "-1", "-1") Then
DtOSSubProyectos = ObjOS.DtResultados.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"})
End If
If DtOSSubProyectos IsNot Nothing Then
If ObjOS.GetSubProyectosEstatusInicial(-1, 3, UsuarioActual.CveEmpresa) Then
TecnicosSubProyectos = ObjOS.DtResultados
End If
For Each SubProyecto As DataRow In DtOSSubProyectos.Rows
Dim TecnicosSubProyectoAux As DataTable = TecnicosSubProyectos.FiltraParametros(String.Format("SubProyecto = '{0}'", SubProyecto.Item("SubProyecto")))
If TecnicosSubProyectoAux.Rows.Count > 0 Then
Dim EstatusDeTipoProcesoMenor As Integer = TecnicosSubProyectoAux.Rows(0).Item("CveEstatusOrdenServicio").ToString.ToEntero
Dim dtAuxiliar As New DataTable
dtAuxiliar = TecnicosSubProyectos.FiltraParametros(String.Format("SubProyecto = '{0}' AND CveEstatusOrdenServicio = {1}", SubProyecto.Item("SubProyecto"), EstatusDeTipoProcesoMenor), "", {"CveUsuario", "Nombre"})
TecnicosResultado.Merge(dtAuxiliar)
End If
Next
End If
ObjOS.Dispose()
DdlUsuarioAtendio.DataSource = TecnicosResultado
DdlUsuarioAtendio.DataBind()
DdlUsuarioAtendio.Items.Insert(0, New ListItem("Sin Asignar", "-1"))
End Sub
Private Sub LnkTecnico_Click(sender As Object, e As EventArgs) Handles LnkTecnico.Click
RegistraScript(String.Format("$('#{0}').modal('show');", "DivCambiarTecnico"))
End Sub

View File

@@ -155,6 +155,13 @@
</ContentTemplate>
</asp:UpdatePanel>
<div class="row">
<div class="col-md-12" style="text-align:right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%" EmptyDataText="No se encontraron ordenes de servicio con los filtros especificados"

View File

@@ -175,7 +175,7 @@ Partial Class UserControl_AddMedico
ClsPaginas.Alert($"Medico {If(CveMedico > 0, "Actualizado", "Guardado")} Correctamente.")
Dim AppNombre As String = $"GlobalDTAgentes-{UsuarioActual.CveEmpresa}"
Application(AppNombre) = Nothing
RegistraScript($"fncRegargaMedicos({CveMedicoNuevo});")
RegistraScript($"fncRegargaMedicos({If(CveMedicoNuevo > 0, CveMedicoNuevo, CveMedico) });")
RegistraScript("$('#BtnCancelarMedico').click();")
End If

View File

@@ -17,7 +17,7 @@
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>'Nombre del Procedimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarProcedimiento"></asp:RequiredFieldValidator>
<label for="<%= TxtProcedimiento.ClientID.ToString()%>">Nombre Procedimiento:</label>
</div>
<div class="form-group form-md-line-input input-iconright" id="Div1" runat="server">
<div class="form-group form-md-line-input input-iconright" id="Div1" runat="server" visible="false">
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control make-switchsd" data-size="small"></asp:CheckBox>
</div>

View File

@@ -1,5 +1,7 @@
<%@ Page Title="Catálogo de Médicos" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatMedicos.aspx.vb" Inherits="Ventas_CatMedicos" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="~/UserControl/AddMedico.ascx" TagPrefix="UserControl" TagName="AddMedico" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
<link href="/Metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css" rel="stylesheet" />
</asp:Content>
@@ -380,9 +382,25 @@
<div id="DvModalAddMedico" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAddMedico" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content" style="max-width:600px!important;max-height:505px!important">
<%--<UserControl:AddMedico runat="server" ID="AddMedicoControl" />--%>
<UserControl:AddMedico runat="server" ID="AddMedicoControl" />
</div>
<asp:Button ID="BtnRecargaMedicos" Style="display: none;" ClientIDMode="Static" runat="server" OnClick="BtnRecargaMedicos_Click" />
<asp:HiddenField ID="HdnCveMedicoNuevo" runat="server" ClientIDMode="Static" Value="-1" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div id="DVAgregarMedico" class="modal ADS fade" role="dialog">
<%--<div id="DVAgregarMedico" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="min-width: 450px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional">
<ContentTemplate>
@@ -406,9 +424,7 @@
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCedulaProfecional" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RfvTxtCedulaProfecional" runat="server" ControlToValidate="TxtCedulaProfecional" CssClass="help-block errorimput"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cédula Profecional''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>--%>
<asp:TextBox ID="TxtCedulaProfecional" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<label for="<%= TxtCedulaProfecional.ClientID.ToString()%>">Cédula Profesional:</label>
</div>
</div>
@@ -563,8 +579,6 @@
</div>
</div>
</div>
</div>
</div>
@@ -576,7 +590,7 @@
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>--%>
<div id="DVAgregarEspecialidad" class="modal ADS fade" role="dialog">
@@ -698,6 +712,12 @@
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script>
function fncRegargaMedicos(CveNuevoMedico) {
$("#HdnCveMedicoNuevo").val(CveNuevoMedico)
$('#BtnRecargaMedicos').click();
}
</script>
</asp:Content>

View File

@@ -51,20 +51,16 @@ Partial Class Ventas_CatMedicos
If Not Page.IsPostBack Then
If Request("EsFrame") IsNot Nothing AndAlso Request("EsFrame").ToEntero = 1 Then
EsFrame = True
End If
CargaCombos()
CargaEspecialidad()
CargaSubEspecialidad(-1)
'CargaEspecialidad()
'CargaSubEspecialidad(-1)
CargaDatos()
BtnConsultar_Click(Nothing, Nothing)
If EsFrame Then
LnkAgregarMedico_Click(Nothing, Nothing)
Else
CargaDatos()
BtnConsultar_Click(Nothing, Nothing)
End If
End If
@@ -95,41 +91,41 @@ Partial Class Ventas_CatMedicos
End Sub
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
'Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
Dim ProcesoOK = False
Dim ObjVentas As New ClsVentas
' Dim ProcesoOK = False
' Dim ObjVentas As New ClsVentas
Dim Telefono As String = If(TxtTelefono.Text = "(___) ___-____", "", TxtTelefono.Text)
Dim Celular As String = If(TxtCelular.Text = "(___) ___-____", "", TxtCelular.Text)
' Dim Telefono As String = If(TxtTelefono.Text = "(___) ___-____", "", TxtTelefono.Text)
' Dim Celular As String = If(TxtCelular.Text = "(___) ___-____", "", TxtCelular.Text)
If CveMedico > 0 Then
If ObjVentas.UpdateMedico(CveMedico, TxtMedico.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, TxtDiasAtencion.Text.Trim, TxtHorario.Text.Trim, TxtLugar.Text.Trim, ChkEstatus.Checked,
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, TxtConsultorio.Text.Trim, DdlSubEspecialidad.SelectedValue.ToEntero, TxtTorre.Text.Trim) Then
ProcesoOK = True
End If
Else
If ObjVentas.AddMedico(TxtMedico.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, TxtDiasAtencion.Text.Trim, TxtHorario.Text.Trim, TxtLugar.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario,
UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, TxtConsultorio.Text.Trim, DdlSubEspecialidad.SelectedValue.ToEntero, TxtTorre.Text.Trim) > 0 Then
ProcesoOK = True
End If
End If
' If CveMedico > 0 Then
' If ObjVentas.UpdateMedico(CveMedico, TxtMedico.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, TxtDiasAtencion.Text.Trim, TxtHorario.Text.Trim, TxtLugar.Text.Trim, ChkEstatus.Checked,
' UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, TxtConsultorio.Text.Trim, DdlSubEspecialidad.SelectedValue.ToEntero, TxtTorre.Text.Trim) Then
' ProcesoOK = True
' End If
' Else
' If ObjVentas.AddMedico(TxtMedico.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, TxtDiasAtencion.Text.Trim, TxtHorario.Text.Trim, TxtLugar.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario,
' UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, TxtConsultorio.Text.Trim, DdlSubEspecialidad.SelectedValue.ToEntero, TxtTorre.Text.Trim) > 0 Then
' ProcesoOK = True
' End If
' End If
ObjVentas.Dispose()
' ObjVentas.Dispose()
If ProcesoOK Then
Alert($"Medico {If(CveMedico > 0, "Actualizado", "Guardado")} Correctamente.")
RegistraScript("$('#DVAgregarMedico').modal('hide');")
CargaDatos()
CargaGlobal()
UpDatos.Update()
End If
' If ProcesoOK Then
' Alert($"Medico {If(CveMedico > 0, "Actualizado", "Guardado")} Correctamente.")
' RegistraScript("$('#DVAgregarMedico').modal('hide');")
' CargaDatos()
' CargaGlobal()
' UpDatos.Update()
' End If
End Sub
'End Sub
#Region "G V D A T O S"
@@ -171,36 +167,10 @@ Partial Class Ventas_CatMedicos
Public Sub LnkAgregarMedico_Click(sender As Object, e As EventArgs)
LbAgregar.Text = "Agregar"
LtlTituloModal.Text = "Agregar Médico"
TxtMedico.Text = ""
TxtCedulaProfecional.Text = ""
TxtFechaNacimiento.Text = ""
TxtNotas.Text = ""
TxtDiasAtencion.Text = ""
TxtHorario.Text = ""
TxtLugar.Text = ""
TxtConsultorio.Text = ""
TxtMail.Text = ""
TxtTelefono.Text = ""
TxtCelular.Text = ""
DdlEspecialidad.SelectedValueExist(-1)
DdlSubEspecialidad.SelectedValueExist(-1)
TxtTorre.Text = ""
DVUsuarioFechaIng.Visible = False
TxtFechaIng.Text = ""
TxtUsuario.Text = ""
DVEstatus.Visible = False
ChkEstatus.Checked = True
UpModal.Update()
CveMedico = -1
RegistraScript("$('#DVAgregarMedico').modal();")
AddMedicoControl.CveMedico = -1
AddMedicoControl.LimpiarControles()
UpModalAddMedico.Update()
RegistraScript("$('#DvModalAddMedico').modal();")
End Sub
Public Sub Edit_Click(sender As Object, e As EventArgs)
@@ -209,34 +179,41 @@ Partial Class Ventas_CatMedicos
CveMedico = GvRow.DataKey("CveMedico").ToEntero
TxtMedico.Text = GvRow.DataKey("Medico")
TxtCedulaProfecional.Text = GvRow.DataKey("CedulaProfesional")
TxtFechaNacimiento.Text = GvRow.DataKey("FechaNacimiento").ToDate().ToString("dd/MM/yyyy")
TxtNotas.Text = GvRow.DataKey("Notas")
TxtDiasAtencion.Text = GvRow.DataKey("DiasAtencion")
TxtHorario.Text = GvRow.DataKey("Horario")
TxtLugar.Text = GvRow.DataKey("Lugar")
TxtConsultorio.Text = GvRow.DataKey("Consultorio")
ChkEstatus.Checked = Boolean.Parse(GvRow.DataKey("Estatus"))
TxtMail.Text = GvRow.DataKey("Mail")
TxtTelefono.Text = GvRow.DataKey("Telefono")
TxtCelular.Text = GvRow.DataKey("Celular")
DdlEspecialidad.SelectedValueExist(-1)
DdlEspecialidad.SelectedValueExist(GvRow.DataKey("CveMedicoEspecialidad").ToEntero)
CargaSubEspecialidad(GvRow.DataKey("CveMedicoEspecialidad").ToEntero)
DdlSubEspecialidad.SelectedValueExist(GvRow.DataKey("CveMedicoSubEspecialidad").ToEntero)
TxtTorre.Text = GvRow.DataKey("Torre")
AddMedicoControl.PreparaEdicion(CveMedico, GvRow.DataKey("Medico"), GvRow.DataKey("CedulaProfesional"), GvRow.DataKey("FechaNacimiento").ToDate(), GvRow.DataKey("Notas"), GvRow.DataKey("DiasAtencion"),
GvRow.DataKey("Horario"), GvRow.DataKey("Lugar"), GvRow.DataKey("Consultorio"), Boolean.Parse(GvRow.DataKey("Estatus")), GvRow.DataKey("Mail"), GvRow.DataKey("Telefono"),
GvRow.DataKey("Celular"), GvRow.DataKey("CveMedicoEspecialidad").ToEntero, GvRow.DataKey("CveMedicoSubEspecialidad").ToEntero, GvRow.DataKey("Torre"),
GvRow.DataKey("FechaIng").ToDateTime, GvRow.DataKey("Usuario"))
DVUsuarioFechaIng.Visible = True
TxtFechaIng.Text = GvRow.DataKey("FechaIng").ToDateTime.ToString("dd/MM/yyyy hh:mm:ss tt")
TxtUsuario.Text = GvRow.DataKey("Usuario")
DVEstatus.Visible = True
LbAgregar.Text = "Actualizar"
LtlTituloModal.Text = $"Actualizar Médico {TxtCedulaProfecional.Text}"
'TxtMedico.Text = GvRow.DataKey("Medico")
'TxtCedulaProfecional.Text = GvRow.DataKey("CedulaProfesional")
'TxtFechaNacimiento.Text = GvRow.DataKey("FechaNacimiento").ToDate().ToString("dd/MM/yyyy")
'TxtNotas.Text = GvRow.DataKey("Notas")
'TxtDiasAtencion.Text = GvRow.DataKey("DiasAtencion")
'TxtHorario.Text = GvRow.DataKey("Horario")
'TxtLugar.Text = GvRow.DataKey("Lugar")
'TxtConsultorio.Text = GvRow.DataKey("Consultorio")
'ChkEstatus.Checked = Boolean.Parse(GvRow.DataKey("Estatus"))
'TxtMail.Text = GvRow.DataKey("Mail")
'TxtTelefono.Text = GvRow.DataKey("Telefono")
'TxtCelular.Text = GvRow.DataKey("Celular")
'DdlEspecialidad.SelectedValueExist(-1)
'DdlEspecialidad.SelectedValueExist(GvRow.DataKey("CveMedicoEspecialidad").ToEntero)
'CargaSubEspecialidad(GvRow.DataKey("CveMedicoEspecialidad").ToEntero)
'DdlSubEspecialidad.SelectedValueExist(GvRow.DataKey("CveMedicoSubEspecialidad").ToEntero)
'TxtTorre.Text = GvRow.DataKey("Torre")
UpModal.Update()
RegistraScript("$('#DVAgregarMedico').modal();")
'DVUsuarioFechaIng.Visible = True
'TxtFechaIng.Text = GvRow.DataKey("FechaIng").ToDateTime.ToString("dd/MM/yyyy hh:mm:ss tt")
'TxtUsuario.Text = GvRow.DataKey("Usuario")
'DVEstatus.Visible = True
'LbAgregar.Text = "Actualizar"
'LtlTituloModal.Text = $"Actualizar Médico {TxtCedulaProfecional.Text}"
'UpModal.Update()
UpModalAddMedico.Update()
RegistraScript("$('#DvModalAddMedico').modal();")
End Sub
@@ -402,7 +379,7 @@ Partial Class Ventas_CatMedicos
ObjVentas.Dispose()
If ProcesoOK Then
CargaEspecialidad()
'CargaEspecialidad()
Alert($"Especialidad {If(CveMedicoEspecialidad > 0, "actualizada", "agregada")} correctamente.")
RegistraScript("$('#DVAgregarEspecialidad').modal('hide');")
End If
@@ -415,47 +392,47 @@ Partial Class Ventas_CatMedicos
UpModalEspecialidad.Update()
End Sub
Sub CargaEspecialidad()
Dim ObjVentas As New ClsVentas
'Sub CargaEspecialidad()
' Dim ObjVentas As New ClsVentas
If ObjVentas.GetMedicosEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
'GvEspecialidad.DataSource = ObjVentas.DtResultados
DdlEspecialidad.DataSource = ObjVentas.DtResultados
Else
'GvEspecialidad.DataSource = Nothing
End If
' If ObjVentas.GetMedicosEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
' 'GvEspecialidad.DataSource = ObjVentas.DtResultados
' DdlEspecialidad.DataSource = ObjVentas.DtResultados
' Else
' 'GvEspecialidad.DataSource = Nothing
' End If
ObjVentas.Dispose()
' ObjVentas.Dispose()
'GvEspecialidad.DataBind()
' 'GvEspecialidad.DataBind()
DdlEspecialidad.DataBind()
DdlEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
' DdlEspecialidad.DataBind()
' DdlEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
UpModal.Update()
'UpEspecialidad.Update()
' UpModal.Update()
' 'UpEspecialidad.Update()
End Sub
'End Sub
Sub CargaSubEspecialidad(CveMedicoEspecialidad As Integer)
Dim ObjVentas As New ClsVentas
'Sub CargaSubEspecialidad(CveMedicoEspecialidad As Integer)
' Dim ObjVentas As New ClsVentas
If ObjVentas.GetMedicosSubEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
If CveMedicoEspecialidad > 0 Then
DdlSubEspecialidad.DataSource = ObjVentas.DtResultados.FiltraParametros($"CveMedicoEspecialidad = {CveMedicoEspecialidad}")
Else
DdlSubEspecialidad.DataSource = ObjVentas.DtResultados
End If
End If
' If ObjVentas.GetMedicosSubEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
' If CveMedicoEspecialidad > 0 Then
' DdlSubEspecialidad.DataSource = ObjVentas.DtResultados.FiltraParametros($"CveMedicoEspecialidad = {CveMedicoEspecialidad}")
' Else
' DdlSubEspecialidad.DataSource = ObjVentas.DtResultados
' End If
' End If
ObjVentas.Dispose()
' ObjVentas.Dispose()
DdlSubEspecialidad.DataBind()
DdlSubEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
UpModal.Update()
' DdlSubEspecialidad.DataBind()
' DdlSubEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
' UpModal.Update()
End Sub
'End Sub
Protected Sub LnkEditarEspecialidad_Click(sender As Object, e As EventArgs)
@@ -491,7 +468,7 @@ Partial Class Ventas_CatMedicos
ObjVentas.Dispose()
If ProcesoOK Then
CargaEspecialidad()
'CargaEspecialidad()
Alert("Especialidad eliminada correctamente")
End If
@@ -502,14 +479,14 @@ Partial Class Ventas_CatMedicos
Protected Sub DdlEspecialidad_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaSubEspecialidad(DdlEspecialidad.SelectedValue.ToEntero)
'Protected Sub DdlEspecialidad_SelectedIndexChanged(sender As Object, e As EventArgs)
' CargaSubEspecialidad(DdlEspecialidad.SelectedValue.ToEntero)
'End Sub
Protected Sub BtnRecargaMedicos_Click(sender As Object, e As EventArgs)
CargaDatos()
End Sub
End Class

View File

@@ -36112,6 +36112,8 @@ Partial Class Ventas
Dim dRow As DataRow = objVenta.DtResultados.Rows(0)
DdlMedico.SelectedValueExist(dRow("CveMedico").ToString.ToEntero)
DdlProcedimiento.SelectedValueExist(dRow("CveProcedimiento").ToString.ToEntero)
TxtPaciente.Text = dRow("Paciente").ToString
TxtEpisodio.Text = dRow("Episodio").ToString
SeEstaFActurandoVentaMedica = True
CveTipoVenta = dRow("CveTipoVenta").ToString.ToEntero
ChkRequiereTecnico_CheckedChanged(Nothing, Nothing)