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 iText.Barcodes.Dmcode
Imports Microsoft.Reporting.WebForms Imports Microsoft.Reporting.WebForms
Imports Modelos Imports Modelos
Imports Stimulsoft.Base.Context
Partial Class PopUpVerFactura Partial Class PopUpVerFactura
@@ -3372,10 +3373,42 @@ Partial Class PopUpVerFactura
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
CveCliente = DtMovimientos.FiltroPrimeroValor("CveCliente").ToEntero CveCliente = DtMovimientos.FiltroPrimeroValor("CveCliente").ToEntero
DTCliente = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}") DTCliente = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}")
Dim CveVentaConsulta As Integer = DtMovimientos.FiltroPrimeroValor("CveVenta").ToEntero
params.Add(New ReportParameter("Documentacion", DTCliente.FiltroPrimeroValor("Documentacion"))) 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 If CveCliente = 819998 Then
RutaFormato = "{0}Formatos\TrasladoAngeles.rdlc" RutaFormato = "{0}Formatos\TrasladoAngeles.rdlc"
End If End If

View File

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

View File

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

View File

@@ -1446,14 +1446,76 @@
</Border> </Border>
</Style> </Style>
</Tablix> </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> </ReportItems>
<Height>0.88788in</Height> <Height>1.35487in</Height>
<Style /> <Style />
</Body> </Body>
<Width>10.19535in</Width> <Width>10.19535in</Width>
<Page> <Page>
<PageHeader> <PageHeader>
<Height>5.15937cm</Height> <Height>4.53319cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage> <PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage> <PrintOnLastPage>true</PrintOnLastPage>
<ReportItems> <ReportItems>
@@ -1532,7 +1594,7 @@ CIUDAD DE MEXICO</Value>
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>Telefono +52 551 563 3271 support@smsmedicalsolutions.com</Value> <Value>Teléfono: +52 551 563 3271 Correo:support@smsmedicalsolutions.com</Value>
<Style> <Style>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
@@ -1546,7 +1608,7 @@ CIUDAD DE MEXICO</Value>
<Top>0.63635cm</Top> <Top>0.63635cm</Top>
<Left>7.67902cm</Left> <Left>7.67902cm</Left>
<Height>1.52889cm</Height> <Height>1.52889cm</Height>
<Width>10.41731cm</Width> <Width>11.02585cm</Width>
<ZIndex>2</ZIndex> <ZIndex>2</ZIndex>
<Style> <Style>
<Border> <Border>
@@ -1770,57 +1832,163 @@ CIUDAD DE MEXICO</Value>
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<Textbox Name="Textbox36"> <Textbox Name="Textbox9">
<CanGrow>true</CanGrow> <CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether> <KeepTogether>true</KeepTogether>
<Paragraphs> <Paragraphs>
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>=Parameters!Observaciones.Value</Value> <Value>Cliente: </Value>
<Style> <Style>
<FontSize>8pt</FontSize> <FontSize>7pt</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> </Style>
</TextRun> </TextRun>
<TextRun> <TextRun>
<Value>=Parameters!Documentacion.Value</Value> <Value>=Parameters!ClienteCodigo.Value</Value>
<Style> <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> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style />
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox31</rd:DefaultName> <rd:DefaultName>Textbox7</rd:DefaultName>
<Top>2.27107cm</Top> <Top>2.32101cm</Top>
<Left>0.13678cm</Left> <Left>0.10068cm</Left>
<Height>2.8883cm</Height> <Height>2.12398cm</Height>
<Width>13.15003cm</Width> <Width>20.93288cm</Width>
<ZIndex>9</ZIndex> <ZIndex>9</ZIndex>
<Style> <Style>
<Border> <Border>
@@ -2300,7 +2468,6 @@ CIUDAD DE MEXICO</Value>
</Style> </Style>
</Textbox> </Textbox>
<Line Name="Line5"> <Line Name="Line5">
<Top>0cm</Top>
<Left>0.13678cm</Left> <Left>0.13678cm</Left>
<Height>0cm</Height> <Height>0cm</Height>
<Width>20.28859cm</Width> <Width>20.28859cm</Width>
@@ -2312,7 +2479,6 @@ CIUDAD DE MEXICO</Value>
</Style> </Style>
</Line> </Line>
<Line Name="Line4"> <Line Name="Line4">
<Top>0cm</Top>
<Left>0.13678cm</Left> <Left>0.13678cm</Left>
<Height>0cm</Height> <Height>0cm</Height>
<Width>25.72414cm</Width> <Width>25.72414cm</Width>
@@ -2532,6 +2698,72 @@ CIUDAD DE MEXICO</Value>
<AllowBlank>true</AllowBlank> <AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </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> </ReportParameters>
<EmbeddedImages> <EmbeddedImages>
<EmbeddedImage Name="Logo"> <EmbeddedImage Name="Logo">

View File

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

View File

@@ -190,7 +190,8 @@
<div class="portlet-body"> <div class="portlet-body">
<asp:GridView ID="GvNA" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Órdenes de Servicio No Asignadas" ClientIDMode="Static" <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" 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> <Columns>
<asp:TemplateField HeaderText=""> <asp:TemplateField HeaderText="">
<ItemTemplate> <ItemTemplate>

View File

@@ -498,10 +498,13 @@ Partial Class OS_Asignaciones
Dim TMSelector = DirectCast(e.Row.FindControl("TimeSelector"), TimeSelector) Dim TMSelector = DirectCast(e.Row.FindControl("TimeSelector"), TimeSelector)
TMSelector.Date = FechaCita 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
End If End If
UpOS.Update() UpOS.Update()

View File

@@ -2913,8 +2913,46 @@ Partial Class OS_OrdenesServicios
DdlUsuarioAtendio.DataBind() DdlUsuarioAtendio.DataBind()
DdlUsuarioAtendio.Items.Insert(0, New ListItem("Sin Asignar", "-1")) DdlUsuarioAtendio.Items.Insert(0, New ListItem("Sin Asignar", "-1"))
CargaTecnicoDdlUsuarioAtendio()
End Sub 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 Private Sub LnkTecnico_Click(sender As Object, e As EventArgs) Handles LnkTecnico.Click
RegistraScript(String.Format("$('#{0}').modal('show');", "DivCambiarTecnico")) RegistraScript(String.Format("$('#{0}').modal('show');", "DivCambiarTecnico"))
End Sub End Sub

View File

@@ -155,6 +155,13 @@
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </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"> <asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%" EmptyDataText="No se encontraron ordenes de servicio con los filtros especificados" <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.") ClsPaginas.Alert($"Medico {If(CveMedico > 0, "Actualizado", "Guardado")} Correctamente.")
Dim AppNombre As String = $"GlobalDTAgentes-{UsuarioActual.CveEmpresa}" Dim AppNombre As String = $"GlobalDTAgentes-{UsuarioActual.CveEmpresa}"
Application(AppNombre) = Nothing Application(AppNombre) = Nothing
RegistraScript($"fncRegargaMedicos({CveMedicoNuevo});") RegistraScript($"fncRegargaMedicos({If(CveMedicoNuevo > 0, CveMedicoNuevo, CveMedico) });")
RegistraScript("$('#BtnCancelarMedico').click();") RegistraScript("$('#BtnCancelarMedico').click();")
End If 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> 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> <label for="<%= TxtProcedimiento.ClientID.ToString()%>">Nombre Procedimiento:</label>
</div> </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> <label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control make-switchsd" data-size="small"></asp:CheckBox> <asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control make-switchsd" data-size="small"></asp:CheckBox>
</div> </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" %> <%@ 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 Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="~/UserControl/AddMedico.ascx" TagPrefix="UserControl" TagName="AddMedico" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server"> <asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
<link href="/Metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css" rel="stylesheet" /> <link href="/Metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css" rel="stylesheet" />
</asp:Content> </asp:Content>
@@ -381,8 +383,24 @@
<div id="DvModalAddMedico" class="modal ADS fade" role="dialog">
<div id="DVAgregarMedico" 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 class="modal-dialog" style="min-width: 450px;"> <div class="modal-dialog" style="min-width: 450px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
@@ -407,8 +425,6 @@
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group form-md-line-input input-iconright"> <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: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>--%>
<label for="<%= TxtCedulaProfecional.ClientID.ToString()%>">Cédula Profesional:</label> <label for="<%= TxtCedulaProfecional.ClientID.ToString()%>">Cédula Profesional:</label>
</div> </div>
</div> </div>
@@ -563,8 +579,6 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@@ -576,7 +590,7 @@
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
</div> </div>--%>
<div id="DVAgregarEspecialidad" class="modal ADS fade" role="dialog"> <div id="DVAgregarEspecialidad" class="modal ADS fade" role="dialog">
@@ -698,6 +712,12 @@
</asp:Content> </asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script>
function fncRegargaMedicos(CveNuevoMedico) {
$("#HdnCveMedicoNuevo").val(CveNuevoMedico)
$('#BtnRecargaMedicos').click();
}
</script>
</asp:Content> </asp:Content>

View File

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

View File

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