diff --git a/App_Code/ClsGPS.vb b/App_Code/ClsGPS.vb index f1f307ee8..51915e47c 100644 --- a/App_Code/ClsGPS.vb +++ b/App_Code/ClsGPS.vb @@ -531,10 +531,27 @@ Public Class ClsGPS OnError("Ocurrió un error al obtener las coordenadas del equipo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try + Return Retorno + End Function + + + Public Function DispositivoComentarioupdate(CveDispositivo As Integer, comentario As String, CveUsuario As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_GPS_DispositivoComentarioupdate") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveDispositivo", SqlDbType.Int).Value = CveDispositivo + .Add("@Comentarios", SqlDbType.VarChar).Value = comentario + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener las coordenadas del equipo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno End Function - - Public Function UltimaPosicionEquipoGet(CveDispositivos As String, CveCliente As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_GPS_UltimaPosicionTGet") @@ -3072,7 +3089,7 @@ Public Class ClsGPS #Region "Dispositivos" Public Function DispositivoAdd(TipoDispositivo As Integer, NumTelefono As String, CveModelo As Integer, CveProveedorComunicacionCuenta As Integer, CveCliente As Integer, IMEI As String, Serie As String, CveEstatus As Integer, SerieVehiculo As String, ColorVehiculo As String, NombreVehiculo As String, NoEconomico As String, devID As String, devPort As Integer, ModeloVehiculo As String, AñoVehiculo As String, ClaseVehiculo As String, PlacasVehiculo As String, LimiteVelocidad As Boolean, VelocidadMaxima As Double, - DetallesVehiculo As String, Rendimiento As Double, Icono As String, ColorTrazo As String, CveUsuario As Integer) As Boolean + DetallesVehiculo As String, Rendimiento As Double, Icono As String, ColorTrazo As String, CveUsuario As Integer, AsignadoEn As String) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_GPS_DispositivosAdd") With SqlAdapter.SelectCommand.Parameters @@ -3102,6 +3119,7 @@ Public Class ClsGPS .Add("@Icono", SqlDbType.VarChar).Value = Icono .Add("@ColorTrazo", SqlDbType.VarChar).Value = ColorTrazo .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@AsignadoEn", SqlDbType.VarChar).Value = AsignadoEn End With @@ -3283,7 +3301,7 @@ Public Class ClsGPS Public Function DispositivosUpdate(TipoDispositivo As Integer, NumTelefono As String, CveDispositivo As Integer, CveModelo As Integer, CveProveedorComunicacionCuenta As Integer, CveCliente As Integer, IMEI As String, Serie As String, CveEstatus As Integer, SerieVehiculo As String, ColorVehiculo As String, NombreVehiculo As String, NoEconomico As String, devID As String, devPort As Integer, ModeloVehiculo As String, AñoVehiculo As String, ClaseVehiculo As String, PlacasVehiculo As String, LimiteVelocidad As Boolean, VelocidadMaxima As Double, - DetallesVehiculo As String, Rendimiento As Double, Icono As String, ColorTrazo As String, CveUsuario As Integer) As Boolean + DetallesVehiculo As String, Rendimiento As Double, Icono As String, ColorTrazo As String, CveUsuario As Integer, AsignadoEn As String) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_GPS_DispositivosUpdate") With SqlAdapter.SelectCommand.Parameters @@ -3313,6 +3331,7 @@ Public Class ClsGPS .Add("@Icono", SqlDbType.VarChar).Value = Icono .Add("@ColorTrazo", SqlDbType.VarChar).Value = ColorTrazo .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@AsignadoEn", SqlDbType.VarChar).Value = AsignadoEn End With Try SqlAdapter.Fill(Data) diff --git a/Bancos/FluctuacionCambiaria.aspx b/Bancos/FluctuacionCambiaria.aspx index 9f944d3b2..c7634465c 100644 --- a/Bancos/FluctuacionCambiaria.aspx +++ b/Bancos/FluctuacionCambiaria.aspx @@ -806,6 +806,17 @@ + + + + + + + + diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb index 077ad1d5b..c6ec2a338 100644 --- a/Bancos/FluctuacionCambiaria.aspx.vb +++ b/Bancos/FluctuacionCambiaria.aspx.vb @@ -75,7 +75,7 @@ Partial Class Bancos_FluctuacionCambiaria If T.ActiveTabIndex = 5 Then CargaDatosAcreedoresAnticipos() If T.ActiveTabIndex = 6 Then CargaDatosBancosCuentas() - If T.ActiveTabIndex = 7 Then CargaDatosFiliales() + If T.ActiveTabIndex = 7 Then CargaDatosAcreedoresDiversos() 'CargaDatosFiliales() If T.ActiveTabIndex = 8 Then CargaDatosDeudores() UpTabs.Update() End Sub @@ -366,7 +366,7 @@ Partial Class Bancos_FluctuacionCambiaria Private Sub CargaDatosFiliales() Dim ObjBancos As New ClsBancos LblTotalAcreedores.Text = "0.00" - If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 8, UsuarioActual.CveEmpresa) Then + If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 88, UsuarioActual.CveEmpresa) Then GvFiliales.DataSource = ObjBancos.DtResultados.FiltraParametros("Saldo > 0") LblTotalAcreedores.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero Else @@ -376,6 +376,19 @@ Partial Class Bancos_FluctuacionCambiaria ObjBancos.Dispose() GvFiliales.DataBind() End Sub + Private Sub CargaDatosAcreedoresDiversos() + Dim ObjBancos As New ClsBancos + LblTotalAcreedores.Text = "0.00" + If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 88, UsuarioActual.CveEmpresa) Then + GvAcreedorDiversos.DataSource = ObjBancos.DtResultados.FiltraParametros("Saldo > 0") + LblTotalAcreedores.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero + Else + GvAcreedorDiversos.DataSource = Nothing + Alert("Ocurrio un error al cargar los acreedores", TipoMensaje.MsgAdvertencia) + End If + ObjBancos.Dispose() + GvAcreedorDiversos.DataBind() + End Sub #End Region diff --git a/Bancos/PagoAcreedor.aspx.cs b/Bancos/PagoAcreedor.aspx.cs index ca0559b4b..958844dd5 100644 --- a/Bancos/PagoAcreedor.aspx.cs +++ b/Bancos/PagoAcreedor.aspx.cs @@ -273,10 +273,8 @@ public partial class Bancos_PagoAcreedor : ClsPaginas string MsgError = ""; int CveIE = 0; - int CveConceptoContableBanco = 30; int CveConceptoContablePago = 42; - int CveConceptoContableBancoComplementario = 204; - int CveConceptoContablePrestamoComplementario = 202; + int CveConceptoContablePrestamoComplementario = 351; int CvePlantillaPoliza = 43; int CvePrePoliza = 0; int CveMonedaPago = get_GlobalDTBancosCuentas(-1, CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuenta.SelectedValue.ToEntero()}").ToEntero(); @@ -302,7 +300,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas // DATOS PREPOLIZA if (DdlTipoTransaccion.SelectedValue == "1" && UsuarioActual.CveEmpresa != 119) FolioFijo = TxtFolio.Text.ToEntero(); - CvePrePoliza = ObjMov.AddPrePolizas("PAGO ACRREDORES", CvePlantillaPoliza, TxtImporte.Text.Trim().ToDouble(), TxtImporte.Text.Trim().ToDouble(), CveMonedaPago, TxtFechaDocumento.Text.ToDate(), DdlProveedores.SelectedText.ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, null, UsuarioActual.CveEmpresa), CveTipoPoliza: ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa)); + CvePrePoliza = ObjMov.AddPrePolizas("PAGO ACREEDORES", CvePlantillaPoliza, TxtImporte.Text.Trim().ToDouble(), TxtImporte.Text.Trim().ToDouble(), CveMonedaPago, TxtFechaDocumento.Text.ToDate(), DdlProveedores.SelectedText.ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, null, UsuarioActual.CveEmpresa), CveTipoPoliza: ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa)); if (CvePrePoliza > 0) { @@ -332,6 +330,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas decimal AcumImporteMN = 0; bool TipoMovtoComision = false; int IdCtaContableOtrosGastos = 0; + int CveConceptoDiferenciaCambiaria = 0; //GUARDA PREPOLIZAS DETALLE foreach (GridViewRow gvr in GvMovAcreedor.Rows) @@ -342,7 +341,6 @@ public partial class Bancos_PagoAcreedor : ClsPaginas ImporteComisionMN = ImporteComision; ImporteComplementaria = 0; - if (gvr.FCTextBox("TxtComision").Text.ToDecimal() < 0) { TipoMovtoComision = true; @@ -415,23 +413,23 @@ public partial class Bancos_PagoAcreedor : ClsPaginas if (tCveMoneda != 1) { - - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, Ref, CveConceptoContablePago, Conc, DateTime.Now, IDCtaContableAcreedorExtranjera, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) - { - MsgError = "No se pudo insertar concepto de pago acreedor"; - break; - } - if (UsaComplementaria) - { - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, Ref, CveConceptoContablePrestamoComplementario, Conc, DateTime.Now, IDCtaContableAcreedorComplementaria, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) - { - MsgError = "No se pudo insertar concepto de acreedor complementaria"; - } - } + IDCtaContableAcreedor = IDCtaContableAcreedorExtranjera; + } + + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, Ref, CveConceptoContablePago, Conc, DateTime.Now, IDCtaContableAcreedor, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) + { + MsgError = "No se pudo insertar concepto de pago acreedor"; + break; + } + + if (UsaComplementaria) + { + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, Ref, CveConceptoContablePrestamoComplementario, Conc, DateTime.Now, IDCtaContableAcreedorComplementaria, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) + MsgError = "No se pudo insertar concepto de acreedor complementaria"; + } if (TCPago != TC) - { - int CveConceptoDiferenciaCambiaria = 0; + { bool TipoMovto = false; int IdCtaContableDiferenciaCambiaria = 0; if (TCPago > TC) @@ -451,21 +449,9 @@ public partial class Bancos_PagoAcreedor : ClsPaginas ImporteMN = Importe; if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Ref, CveConceptoDiferenciaCambiaria, Conc, DateTime.Now, IdCtaContableDiferenciaCambiaria, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) - { MsgError = "No se pudo insertar concepto de diferencia cambiaria"; - } } - - } - else - { - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, Ref, CveConceptoContablePago, Conc, DateTime.Now, IDCtaContableAcreedor, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) - { - MsgError = "No se pudo insertar concepto de pago acreedor"; - break; - } - } - + if (ImporteComisionMN > 0) { if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoComision, ImporteComision, Ref, 255, Conc, DateTime.Now, IdCtaContableOtrosGastos, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComisionMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) @@ -474,9 +460,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas break; } } - } - } if (CveMonedaPago != 1) @@ -491,38 +475,33 @@ public partial class Bancos_PagoAcreedor : ClsPaginas ImporteMNBanco = (ImporteBanco * TCPago).RoundSQL(); ImporteComplementaria = 0; } - } - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, ImporteBanco, Ref, CveConceptoContableBanco, Conc, DateTime.Now, IDCtaContableBancos, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMNBanco, ImporteME: ImporteBanco, TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, ImporteBanco, Ref, 30, Conc, DateTime.Now, IDCtaContableBancos, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMNBanco, ImporteME: ImporteBanco, TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) MsgError = "No se pudo insertar concepto de bancos"; + + //movimiento de ajuste por sino se aplicó en el proceso anterior + if (CveMonedaPago != 1 && UsaComplementaria ) { - MsgError = "No se pudo insertar concepto de bancos"; + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, ImporteBanco, Ref, 204, Conc, DateTime.Now, IDCtaContableBancosComplementario, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, ImporteME: ImporteBanco, TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) MsgError = "No se pudo insertar concepto de bancos complementaria"; + } - - if (CveMonedaPago != 1 && UsaComplementaria) + if (AcumImporteMN != (ImporteBanco + ImporteComplementaria) && CveConceptoDiferenciaCambiaria == 0) { - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, ImporteBanco, Ref, CveConceptoContableBancoComplementario, Conc, DateTime.Now, IDCtaContableBancosComplementario, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, ImporteME: ImporteBanco, TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) + int tCveConceptoOtIngresos = 0; + bool TipoMovtoOt = false; + decimal Dif = AcumImporteMN - (ImporteBanco + ImporteComplementaria); + if (Dif < 0) { - MsgError = "No se pudo insertar concepto de bancos complementaria"; + tCveConceptoOtIngresos = 65; TipoMovtoOt = false; } - if (AcumImporteMN != (ImporteBanco + ImporteComplementaria)) + else { - int tCveConceptoOtIngresos = 0; - bool TipoMovtoOt = false; - decimal Dif = AcumImporteMN - (ImporteBanco + ImporteComplementaria); - if (Dif < 0) - { - tCveConceptoOtIngresos = 65; TipoMovtoOt = false; - } - else - { - tCveConceptoOtIngresos = 64; TipoMovtoOt = true; - } + tCveConceptoOtIngresos = 64; TipoMovtoOt = true; + } - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOt, Dif.Abs(), Ref, tCveConceptoOtIngresos, Conc, DateTime.Now, 0, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: Dif.Abs(), ImporteME: Dif.Abs(), TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) - { - MsgError = "No se pudo insertar concepto de ajuste en redondeo"; - } + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOt, Dif.Abs(), Ref, tCveConceptoOtIngresos, Conc, DateTime.Now, 0, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: Dif.Abs(), ImporteME: Dif.Abs(), TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) + { + MsgError = "No se pudo insertar concepto de ajuste en redondeo"; } } @@ -703,7 +682,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas int CveConceptoContableBanco = 30; int CveConceptoContablePrestamo = 41; int CveConceptoContableBancoComplementario = 204; - int CveConceptoContablePrestamoComplementario = 202; + int CveConceptoContablePrestamoComplementario = 351; int CvePlantillaPoliza = 44; int CvePrePoliza = 0; int CveMoneda = get_GlobalDTBancosCuentas(-1, CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuentaPrestamo.SelectedValue.ToEntero()}").ToEntero(); diff --git a/CGame/CatEmpaque.aspx b/CGame/CatEmpaque.aspx index 01faedc2d..f7d514f31 100644 --- a/CGame/CatEmpaque.aspx +++ b/CGame/CatEmpaque.aspx @@ -3,9 +3,30 @@ + - Catalogo de Empaques + Catalogo de Empaque Destino @@ -15,67 +36,87 @@
  • - Agregar Empaque
  • + Agregar
    - -
    + +
    +
    +
    + + Información + +
    + +
    + + <%----%> +
    +
    +
    +
    +
    +
    " style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - +
    +
    + - + - + - + - + - + - + - + - - + + - - + + - + @@ -83,6 +124,8 @@ + +
    -
    +
    -<%-- + <%-- --%>
    -
    +
    -<%-- + <%-- --%>
    -
    +
    -<%-- + <%-- --%>
    -
    +
    -<%-- + <%-- --%>
    -
    +
    - <%-- + <%-- --%>
    -
    +
    - <%-- + <%-- --%> diff --git a/CGame/CatEmpaque.aspx.VB b/CGame/CatEmpaque.aspx.VB index b137fac8d..ef251b0c9 100644 --- a/CGame/CatEmpaque.aspx.VB +++ b/CGame/CatEmpaque.aspx.VB @@ -1,12 +1,6 @@ Option Strict On Imports System.Data Imports System.Collections.Generic Imports System.Linq Imports System.Web Imports System.Web.UI.WebControls Imports Extensiones Partial Class CATTiposEtiqueta Inherits ClsPaginas - - - - - - #Region "Propiedades" Private Property CveEmpaque() As Integer Get Return If(IsNothing(ViewState("CveEmpaque")), 0, CInt(ViewState("CveEmpaque"))) @@ -28,9 +22,9 @@ GvEmpaque.DataBind() End If ObjTipo.Dispose() upDatosTipo.Update() End Sub Protected Sub LimpiaEmpaque() TxtEmpaque.Text = "" TxtCostoXTonelada.Text = "" TxtCostoPreEnfriado.Text = "" TxtFull.Text = "" TxtSencillo.Text = "" TxtTermoFull.Text = "" TxtTermoSencillo.Text = "" UPModalTipo.Update() End Sub Protected Sub LnkEditarTipo_Click(sender As Object, e As EventArgs) LimpiaEmpaque() Dim gvRow As GridViewRow= DirectCast((DirectCast(sender,LinkButton)).NamingContainer,GridViewRow) - CveEmpaque = gvRow.DataKey("CveEmpaque").ToEntero() TxtEmpaque.Text = gvRow.DataKey("Empaque") TxtCostoXTonelada.Text = gvRow.DataKey("CostoXTonelada") TxtCostoPreEnfriado.Text = gvRow.DataKey("CostoPreEnfriado") TxtFull.Text = gvRow.DataKey("Lleno") TxtSencillo.Text = gvRow.DataKey("Sencillo") TxtTermoFull.Text = gvRow.DataKey("TermoLleno") TxtTermoSencillo.Text = gvRow.DataKey("TermoSencillo") ChkTipoestatus.Checked = CBool(gvRow.DataKey("Estatus")) RegistraScript("$('#DModalTiposEtiqueta').modal()") BtnTipoADD.Visible=False BtnTipoEdit.Visible = True DivEstatus.Visible = True UPModalTipo.Update() End Sub Protected Sub LnkAgregarTipo_Click(sender As Object, e As EventArgs) RegistraScript("$('#DModalTiposEtiqueta').modal()") LimpiaEmpaque() BtnTipoADD.Visible=True BtnTipoEdit.Visible = False DivEstatus.Visible = False UPModalTipo.Update() End Sub Protected Sub BtnTipoADD_Click(sender As Object, e As EventArgs) Dim ObjTipo As New ClsCGame() Dim Continuar As Boolean = ObjTipo.AddEmpaque(TxtEmpaque.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtCostoXTonelada.Text.ToDouble, TxtCostoPreEnfriado.Text.ToDouble, TxtFull.Text.ToDouble, TxtSencillo.Text.ToDouble, TxtTermoFull.Text.ToDouble, TxtTermoSencillo.Text.ToDouble) ObjTipo.Dispose() If (Continuar) Then RegistraScript("$('#DModalTiposEtiqueta').modal('hide')") LimpiaEmpaque() UPModalTipo.Update() Alert("El empaquese ha agregado") CargaEmpaque() End If End Sub Protected Sub BtnTipoEdit_Click(sender As Object, e As EventArgs) Dim ObjTipo As New ClsCGame() Dim Continuar As Boolean = ObjTipo.UpdateEmpaque(CveEmpaque, ChkTipoestatus.Checked, TxtEmpaque.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtCostoXTonelada.Text.ToDouble, TxtCostoPreEnfriado.Text.ToDouble, TxtFull.Text.ToDouble, TxtSencillo.Text.ToDouble, TxtTermoFull.Text.ToDouble, TxtTermoSencillo.Text.ToDouble) ObjTipo.Dispose() If (Continuar) Then RegistraScript("$('#DModalTiposEtiqueta').modal('hide')") LimpiaEmpaque() UPModalTipo.Update() Alert("El empaque se ha actualizado") + CveEmpaque = gvRow.DataKey("CveEmpaque").ToEntero() TxtEmpaque.Text = gvRow.DataKey("Empaque") TxtCostoXTonelada.Text = gvRow.DataKey("CostoXTonelada") TxtCostoPreEnfriado.Text = gvRow.DataKey("CostoPreEnfriado") TxtFull.Text = gvRow.DataKey("Lleno") TxtSencillo.Text = gvRow.DataKey("Sencillo") TxtTermoFull.Text = gvRow.DataKey("TermoLleno") TxtTermoSencillo.Text = gvRow.DataKey("TermoSencillo") ChkTipoestatus.Checked = CBool(gvRow.DataKey("Estatus")) RegistraScript("$('#DModalTiposEtiqueta').modal()") BtnTipoADD.Visible=False BtnTipoEdit.Visible = True DivEstatus.Visible = True UPModalTipo.Update() End Sub Protected Sub LnkAgregarTipo_Click(sender As Object, e As EventArgs) RegistraScript("$('#DModalTiposEtiqueta').modal()") LimpiaEmpaque() BtnTipoADD.Visible=True BtnTipoEdit.Visible = False DivEstatus.Visible = False UPModalTipo.Update() End Sub Protected Sub BtnTipoADD_Click(sender As Object, e As EventArgs) Dim ObjTipo As New ClsCGame() Dim Continuar As Boolean = ObjTipo.AddEmpaque(TxtEmpaque.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtCostoXTonelada.Text.ToDouble, TxtCostoPreEnfriado.Text.ToDouble, TxtFull.Text.ToDouble, TxtSencillo.Text.ToDouble, TxtTermoFull.Text.ToDouble, TxtTermoSencillo.Text.ToDouble) ObjTipo.Dispose() If (Continuar) Then RegistraScript("$('#DModalTiposEtiqueta').modal('hide')") LimpiaEmpaque() UPModalTipo.Update() Alert("El empaque destino se ha agregado") CargaEmpaque() End If End Sub Protected Sub BtnTipoEdit_Click(sender As Object, e As EventArgs) Dim ObjTipo As New ClsCGame() Dim Continuar As Boolean = ObjTipo.UpdateEmpaque(CveEmpaque, ChkTipoestatus.Checked, TxtEmpaque.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtCostoXTonelada.Text.ToDouble, TxtCostoPreEnfriado.Text.ToDouble, TxtFull.Text.ToDouble, TxtSencillo.Text.ToDouble, TxtTermoFull.Text.ToDouble, TxtTermoSencillo.Text.ToDouble) ObjTipo.Dispose() If (Continuar) Then RegistraScript("$('#DModalTiposEtiqueta').modal('hide')") LimpiaEmpaque() UPModalTipo.Update() Alert("El empaque destino se ha actualizado") CargaEmpaque() End If End Sub Protected Sub LnkEliminarTipo_Click(sender As Object, e As EventArgs) Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) - CveEmpaque = gvRow.DataKey("CveEmpaque").ToEntero() Dim ObjTipo As New ClsCGame() Dim Continuar As Boolean = ObjTipo.RemoveEmpaque(CveEmpaque) ObjTipo.Dispose() If (Continuar) Then Alert("El empaque se ha eliminado") + CveEmpaque = gvRow.DataKey("CveEmpaque").ToEntero() Dim ObjTipo As New ClsCGame() Dim Continuar As Boolean = ObjTipo.RemoveEmpaque(CveEmpaque) ObjTipo.Dispose() If (Continuar) Then Alert("El empaque destino se ha eliminado") CargaEmpaque() End If End Sub Private Sub GVTiposEtiqueta_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEmpaque.RowDataBound diff --git a/CGame/CatHuerta.aspx b/CGame/CatHuerta.aspx index 9f64fea71..94b10ec1a 100644 --- a/CGame/CatHuerta.aspx +++ b/CGame/CatHuerta.aspx @@ -3,9 +3,18 @@ + - Catalogo de Huerta + Catalogo de Productor @@ -15,17 +24,37 @@
  • - Agregar Huerta
  • + Agregar
    -
    + +
    +
    +
    + + Información + +
    + +
    + + <%----%> +
    +
    +
    +
    +
    +
    " style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    + +
    +
    +
    @@ -34,27 +63,27 @@ - + - + - + - + - + @@ -72,7 +101,7 @@ - +