Ventas Medicas Cambios OS
This commit is contained in:
@@ -117,6 +117,8 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
|||||||
|
|
||||||
Dim ColorIndex As Integer = 0
|
Dim ColorIndex As Integer = 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If DtTempSubproyectos.Rows.Count > 0 Then
|
If DtTempSubproyectos.Rows.Count > 0 Then
|
||||||
For Each drow As DataRow In DtTempSubproyectos.Rows
|
For Each drow As DataRow In DtTempSubproyectos.Rows
|
||||||
|
|
||||||
@@ -140,9 +142,9 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
|||||||
|
|
||||||
Dim EsCoordinador As Boolean = False
|
Dim EsCoordinador As Boolean = False
|
||||||
|
|
||||||
|
Dim usuarioActual_ As Usuario = UsuarioActual(context)
|
||||||
If context IsNot Nothing AndAlso CveOS = -2 Then
|
If context IsNot Nothing AndAlso CveOS = -2 Then
|
||||||
Dim usuario As Usuario = UsuarioActual(context)
|
If usuarioActual_.TienePermisoProceso(348) Then
|
||||||
If usuario.TienePermisoProceso(348) Then
|
|
||||||
EsCoordinador = True
|
EsCoordinador = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -234,6 +236,22 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
|||||||
cevent.backgroundColor = If(cevent.backgroundColor.Trim = "", "#1BBC9B", cevent.backgroundColor.Trim)
|
cevent.backgroundColor = If(cevent.backgroundColor.Trim = "", "#1BBC9B", cevent.backgroundColor.Trim)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If usuarioActual_.Empresa.Funcionalidad(578) = "1" Then
|
||||||
|
|
||||||
|
If dr("TipoEstatusOS").ToString.ToEntero.Contiene(1, 2, 3) Then
|
||||||
|
cevent.backgroundColor = "#006699"
|
||||||
|
ElseIf dr("TipoEstatusOS").ToString.ToEntero.Contiene(4) Then
|
||||||
|
cevent.backgroundColor = "#025716"
|
||||||
|
ElseIf dr("TipoEstatusOS").ToString.ToEntero.Contiene(5) Then
|
||||||
|
cevent.backgroundColor = "#730505"
|
||||||
|
Else
|
||||||
|
cevent.backgroundColor = "#006699"
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
'VERIFICAMOS SI TIENE O NO RECURRENCIA
|
'VERIFICAMOS SI TIENE O NO RECURRENCIA
|
||||||
If Not cevent.recurrenciatipo > 0 Then
|
If Not cevent.recurrenciatipo > 0 Then
|
||||||
|
|
||||||
@@ -407,4 +425,4 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ Partial Class OS_Asignaciones
|
|||||||
Dim CorreoAsignado As String = GlobalDTUsuarios(DdlTecnico.SelectedValue.ToEntero).Rows(0)("Correo").ToString
|
Dim CorreoAsignado As String = GlobalDTUsuarios(DdlTecnico.SelectedValue.ToEntero).Rows(0)("Correo").ToString
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
MandaCorreOS(row.DataKey("CveOS").ToEntero, CorreoAsignado)
|
MandaCorreOS(row.DataKey("CveOS").ToEntero, CorreoAsignado, TrasaccionSql:=ObjOS.IniciaTransacSQL)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -279,11 +279,11 @@ Partial Class OS_Asignaciones
|
|||||||
UpOS.Update()
|
UpOS.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub MandaCorreOS(CveOS As Integer, CorreoUsuarioAsignado As String)
|
Private Sub MandaCorreOS(CveOS As Integer, CorreoUsuarioAsignado As String, ByRef TrasaccionSql As SqlClient.SqlTransaction)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim ObjOS As New ClsOS()
|
Dim ObjOS As New ClsOS(TrasaccionSql)
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
Dim CveFolio = ""
|
Dim CveFolio = ""
|
||||||
|
|
||||||
|
|||||||
@@ -310,8 +310,16 @@ Partial Class OS_RepServicioDomicilio
|
|||||||
DTTecnicos = New DataTable
|
DTTecnicos = New DataTable
|
||||||
|
|
||||||
Dim ObjUsuarios As New ClsSisUsuarios
|
Dim ObjUsuarios As New ClsSisUsuarios
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If ObjUsuarios.GetPermisosPorUsuarioProcesos(-1, -1, -1, -1, 351, UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
If ObjUsuarios.GetPermisosPorUsuarioProcesos(-1, -1, -1, -1, 351, UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
||||||
DTTecnicos = ObjUsuarios.DtResultados.FiltraParametros(" CveProcesoUsuarioAcceso > 0")
|
If UsuarioActual.CveRol = 1 Then
|
||||||
|
DTTecnicos = ObjUsuarios.DtResultados.FiltraParametros(" CveProcesoUsuarioAcceso > 0")
|
||||||
|
Else
|
||||||
|
DTTecnicos = ObjUsuarios.DtResultados.FiltraParametros(" CveProcesoUsuarioAcceso > 0 and CveUsuario <> 100")
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
ObjUsuarios.Dispose()
|
ObjUsuarios.Dispose()
|
||||||
|
|
||||||
|
|||||||
@@ -337,7 +337,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr >
|
<tr >
|
||||||
<td runat="server" id="TdRequiereTecnico1" visible="false">
|
<td runat="server" id="TdRequiereTecnico1" visible="false">
|
||||||
<b>Rquiere Técnico:</b>
|
<b>Requiere Técnico:</b>
|
||||||
</td>
|
</td>
|
||||||
<td runat="server" id="TdRequiereTecnico2" visible="false">
|
<td runat="server" id="TdRequiereTecnico2" visible="false">
|
||||||
<asp:CheckBox ID="ChkRequiereTecnico" runat="server" OnCheckedChanged="ChkRequiereTecnico_CheckedChanged" AutoPostBack="true" />
|
<asp:CheckBox ID="ChkRequiereTecnico" runat="server" OnCheckedChanged="ChkRequiereTecnico_CheckedChanged" AutoPostBack="true" />
|
||||||
|
|||||||
@@ -8244,7 +8244,7 @@ Partial Class VentasMedicas
|
|||||||
|
|
||||||
Private Function GeneraOS(ByRef TransacSQL As SqlTransaction, ByRef errorList As List(Of String)) As Boolean
|
Private Function GeneraOS(ByRef TransacSQL As SqlTransaction, ByRef errorList As List(Of String)) As Boolean
|
||||||
|
|
||||||
Dim Respuesta As Boolean = False
|
|
||||||
Dim Errores As Boolean = False
|
Dim Errores As Boolean = False
|
||||||
|
|
||||||
Dim ObjOrdenServicio As New ClsOS(TransacSQL)
|
Dim ObjOrdenServicio As New ClsOS(TransacSQL)
|
||||||
@@ -8267,38 +8267,33 @@ Partial Class VentasMedicas
|
|||||||
Errores = True
|
Errores = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim CvePSDetalle As Integer = UsuarioActual.Empresa.Funcionalidad(708).ToEntero
|
||||||
|
|
||||||
|
If Not CvePSDetalle > 0 Then
|
||||||
|
errorList.Add("No se tiene asignado un producto para la orden de servicio (FNC 708).")
|
||||||
|
Errores = True
|
||||||
|
End If
|
||||||
|
|
||||||
If Not Errores Then
|
If Not Errores Then
|
||||||
|
|
||||||
For Each Row As DataRow In TmpDT.Rows
|
Dim CveOsDetalle = ObjOrdenServicio.AddOrdenesServiciosDetalle(ObjOrdenServicio.CveOS, CvePSDetalle, 1, -1, -1, $"Venta: {Serie}-{FolioActual}", False, True, False, -1, "-1", "-1", "-1", "", UsuarioActual.CveUsuario, Archivo:="")
|
||||||
|
|
||||||
'Dim Consecutivo As Integer = Row("Consecutivo").ToString.ToEntero
|
If CveOsDetalle > 0 Then
|
||||||
Dim CvePS As Integer = Row("CvePS").ToString.ToEntero
|
'MENSAJE PRINCIPAL
|
||||||
Dim Obs As String = Row("Obs").ToString
|
Dim MensajeAlertOS As New StringBuilder
|
||||||
'Dim SeFacturara As Boolean = CBool(Row("SeFacturara").ToString)
|
MensajeAlertOS.AppendFormat(String.Format("<br/>La Orden de Servicio: <b>{0}</b> se generó correctamente.<br/><br/>", ObjOrdenServicio.Folio))
|
||||||
'Dim CveCuentaEquipo As Integer = Row("CveCuentaEquipo").ToString.ToEntero
|
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=OS&CVEOS={0}", ObjOrdenServicio.CveOS)))
|
||||||
'Dim ComentarioTecnico As String = Row("ComentarioTecnico").ToString
|
Dim Liga = $"document.location.href=""/OS/RepOrdenesServicios.aspx"";"
|
||||||
Dim Cantidad As Integer = Row("Cantidad").ToString.ToEntero
|
Alert(MensajeAlertOS.ToString, TipoMensaje.MsgInformacion, Liga)
|
||||||
'Dim Archivo As New System.IO.FileInfo(String.Format("{0}OS\Temp\{1}", UsuarioActual.Empresa.Ruta, Row("Archivo").ToString))
|
Else
|
||||||
|
errorList.Add("Se presento un error al guardar la el detalle de la orden de servicio.")
|
||||||
|
Errores = True
|
||||||
|
End If
|
||||||
|
|
||||||
Dim CveOsDetalle = ObjOrdenServicio.AddOrdenesServiciosDetalle(ObjOrdenServicio.CveOS, CvePS, Cantidad, -1, -1, Obs, False, True, False, -1, "-1", "-1", "-1", "", UsuarioActual.CveUsuario, Archivo:="")
|
|
||||||
|
|
||||||
If CveOsDetalle > 0 Then
|
|
||||||
'MENSAJE PRINCIPAL
|
|
||||||
Dim MensajeAlertOS As New StringBuilder
|
|
||||||
MensajeAlertOS.AppendFormat(String.Format("<br/>La Orden de Servicio: <b>{0}</b> se generó correctamente.<br/><br/>", ObjOrdenServicio.Folio))
|
|
||||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=OS&CVEOS={0}", ObjOrdenServicio.CveOS)))
|
|
||||||
Dim Liga = $"document.location.href=""/OS/RepOrdenesServicios.aspx"";"
|
|
||||||
Alert(MensajeAlertOS.ToString, TipoMensaje.MsgInformacion, Liga)
|
|
||||||
Else
|
|
||||||
errorList.Add("Se presento un error al guardar la el detalle de la orden de servicio.")
|
|
||||||
Errores = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return Respuesta
|
Return If(Errores, False, True)
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user