From 66d1af2c0f39cde3b0ba6e969958435f06f715b7 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 13 Nov 2019 14:03:31 -0700 Subject: [PATCH] Agregado de dos campos en el catalogo de CatSubProyectos(hay que actualizar clase) --- App_Code/ClsSubProyectos.vb | 4 +- Planeacion/CatSubProyectos.aspx | 172 ++++++++++++++++------------- Planeacion/CatSubProyectos.aspx.vb | 19 +++- 3 files changed, 115 insertions(+), 80 deletions(-) diff --git a/App_Code/ClsSubProyectos.vb b/App_Code/ClsSubProyectos.vb index 729e1c1f4..b93b363dc 100644 --- a/App_Code/ClsSubProyectos.vb +++ b/App_Code/ClsSubProyectos.vb @@ -387,7 +387,7 @@ Public Class ClsSubProyectos Public Function UpdateCentroCosto(CveSubProyecto As Integer, SubProyecto As String, IdSegNeg As Integer, Estatus As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveProyecto As Integer, Optional Serie As String = "", Optional IVA As Double = 0.0, Optional Calle As String = "", Optional NoExt As String = "", Optional NoInt As String = "", Optional Colonia As String = "", Optional Localidad As String = "", Optional Municipio As String = "", Optional Estado As String = "", Optional Pais As String = "", Optional CP As String = "", Optional TipoSucursal As Integer = 0, Optional EsSucursal As Integer = 0, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional AplicaComercioExterior As Boolean = False, Optional Correo As String = "", Optional CvePrecioLista As Integer = -1, - Optional Telefono As String = "") As Boolean + Optional Telefono As String = "", Optional HorarioVerano As Integer = Nothing, Optional HorarioInvierno As Integer = Nothing) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_CentroCostoUpdate") @@ -421,6 +421,8 @@ Public Class ClsSubProyectos .Add("@Correo", SqlDbType.VarChar).Value = Correo .Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista .Add("@Telefono", SqlDbType.VarChar).Value = Telefono + .Add("@HorarioVerano", SqlDbType.Int).Value = HorarioVerano + .Add("@HorarioInvierno", SqlDbType.Int).Value = HorarioInvierno End With Try diff --git a/Planeacion/CatSubProyectos.aspx b/Planeacion/CatSubProyectos.aspx index 80674a796..839b2b060 100644 --- a/Planeacion/CatSubProyectos.aspx +++ b/Planeacion/CatSubProyectos.aspx @@ -83,7 +83,7 @@
@@ -182,96 +182,120 @@ -
- - - -
+
+ <%--
+
+ + + +
-
- - - -
+
+ + + +
+
--%> +
+ + + +
+
+ + + +
-
- - - -
+
+ + + +
-
-
-
- - - +
+
+
+ + + +
+
+ +
+
+ + <%-- --%> + +
-
-
- - <%-- --%> - -
+
+ + +
-
-
- - - -
+
+ + + +
-
- - - -
+
+ + + +
-
- - - -
+
+ + + +
-
- - - -
+
+ + + +
-
- - - -
+
+ + + +
-
- - - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - +
+ + +
+ +
+ + +
diff --git a/Planeacion/CatSubProyectos.aspx.vb b/Planeacion/CatSubProyectos.aspx.vb index 586249d7d..22121f394 100644 --- a/Planeacion/CatSubProyectos.aspx.vb +++ b/Planeacion/CatSubProyectos.aspx.vb @@ -284,7 +284,8 @@ Partial Class CatSubProyectos DdlPrecioLista.SelectedValueExist(GvRow.DataKey("CvePrecioLista")) TxtCorreo.Text = (GvRow.DataKey("Correo")) TxtTelefono.Text = (GvRow.DataKey("Telefono")) - + TxtHorarioVerano.Text = (GvRow.DataKey("HorarioVerano")) + TxtHorarioInvierno.Text = (GvRow.DataKey("HorarioInvierno")) 'COMERCIO EXTERIOR ChkAplicaComercioExterior.Checked = If(GvRow.DataKey("AplicaComercioExterior").ToString = "True", True, False) DdlPais.SelectedValueExist(GvRow.DataKey("CvePais")) @@ -350,6 +351,8 @@ Partial Class CatSubProyectos Dim TieneError = False Dim TipoSucursal As Integer Dim EsSucursal As Integer + Dim HorarioVerano As Integer = TxtHorarioVerano.Text.ToEntero + Dim HorarioInvierno As Integer = TxtHorarioInvierno.Text.ToEntero If ChkEsMatriz.Checked = True Then TipoSucursal = 1 Else TipoSucursal = 0 If ChkEsSucursal.Checked = True Then EsSucursal = 1 Else EsSucursal = 0 'GlobalDTProyectos(-1) = ObjSubproyectos.DtResultados @@ -368,16 +371,22 @@ Partial Class CatSubProyectos CveSubProyecto = ObjSubproyectos.CveSubProyecto End If Else - If Not ObjSubproyectos.UpdateCentroCosto(CveCentroCosto, TxtCentroCosto.Text.Trim, IdSeg, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, Serie:=TxtSerie.Text.Trim, IVA:=TxtIVA.Text.ToDecimal, Calle:=TxtCalle.Text.Trim, NoExt:=TxtNoExt.Text.Trim, - NoInt:=TxtNoInt.Text.Trim, Colonia:=TxtColonia.Text.Trim, Localidad:=TxtLocalidad.Text.Trim, Municipio:=TxtMunicipio.Text.Trim, Estado:=TxtEstado.Text.Trim, Pais:=TxtPais.Text.Trim, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal, - CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, Correo:=TxtCorreo.Text, CvePrecioLista:=DdlPrecioLista.SelectedValue.ToEntero, - Telefono:=TxtTelefono.Text) Then + If (HorarioVerano > -13 And HorarioVerano < 13) And (HorarioInvierno > -13 And HorarioInvierno < 13) Then + If Not ObjSubproyectos.UpdateCentroCosto(CveCentroCosto, TxtCentroCosto.Text.Trim, IdSeg, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, Serie:=TxtSerie.Text.Trim, IVA:=TxtIVA.Text.ToDecimal, Calle:=TxtCalle.Text.Trim, NoExt:=TxtNoExt.Text.Trim, + NoInt:=TxtNoInt.Text.Trim, Colonia:=TxtColonia.Text.Trim, Localidad:=TxtLocalidad.Text.Trim, Municipio:=TxtMunicipio.Text.Trim, Estado:=TxtEstado.Text.Trim, Pais:=TxtPais.Text.Trim, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal, + CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, Correo:=TxtCorreo.Text, CvePrecioLista:=DdlPrecioLista.SelectedValue.ToEntero, + Telefono:=TxtTelefono.Text, HorarioVerano:=TxtHorarioVerano.Text.ToEntero, HorarioInvierno:=TxtHorarioInvierno.Text.ToEntero) Then + TieneError = True + End If + Else + Alert("Los valores de horario no deben ser superiores a '12' o menor a '-12'", TipoMensaje.MsgAdvertencia) TieneError = True End If End If + If Not TieneError Then ObjSubproyectos.Commit() If HdnModalidad.Value = "I" Then