From edf312e6a5a1c3b7762863744e0f94223ab50ba3 Mon Sep 17 00:00:00 2001 From: janeth arvizu Date: Wed, 21 Aug 2019 12:07:59 -0700 Subject: [PATCH] =?UTF-8?q?Cacha=20error=20de=20p=C3=B3liza=20en=20ejercic?= =?UTF-8?q?io=20cerrado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsContabilidad.vb | 9 ++++++-- SIGGIT.sln | 45 +++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 SIGGIT.sln diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 31a25e690..16d5a2652 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -154,7 +154,7 @@ Public Class ClsContabilidad Retorno = SqlAdapter.SelectCommand.Parameters("@CvePrePoliza").Value.ToString.ToEntero Catch ex As Exception - If ex.Message.Contains("50005;") Then + If ex.Message.Contains("50015;") Then OnError("No se puede registrar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) Else OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) @@ -500,7 +500,12 @@ Public Class ClsContabilidad SqlAdapter.Fill(Data) Retorno = True Catch ex As Exception - OnError("Ocurrió un error al eliminar el movimiento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + + If ex.Message.Contains("50015;") Then + OnError("No se puede eliminar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + Else + OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End If End Try Return Retorno diff --git a/SIGGIT.sln b/SIGGIT.sln new file mode 100644 index 000000000..7b578f8a4 --- /dev/null +++ b/SIGGIT.sln @@ -0,0 +1,45 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "http://localhost", "http://localhost", "{82D0C8D1-3CF5-471D-92AF-71A9AE4B4335}" + ProjectSection(WebsiteProperties) = preProject + SccProjectName = ""$/localhost", CAAAAAAA" + SccAuxPath = "" + SccLocalPath = "." + SccProvider = "MSSCCI:Microsoft Visual SourceSafe" + UseIISExpress = "false" + TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0" + Debug.AspNetCompiler.VirtualPath = "/localhost" + Debug.AspNetCompiler.PhysicalPath = "..\wwwSIG\" + Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost\" + Debug.AspNetCompiler.Updateable = "true" + Debug.AspNetCompiler.ForceOverwrite = "true" + Debug.AspNetCompiler.FixedNames = "false" + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.VirtualPath = "/localhost" + Release.AspNetCompiler.PhysicalPath = "..\wwwSIG\" + Release.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost\" + Release.AspNetCompiler.Updateable = "true" + Release.AspNetCompiler.ForceOverwrite = "true" + Release.AspNetCompiler.FixedNames = "false" + Release.AspNetCompiler.Debug = "False" + SlnRelativePath = "..\wwwSIG\" + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {82D0C8D1-3CF5-471D-92AF-71A9AE4B4335}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {82D0C8D1-3CF5-471D-92AF-71A9AE4B4335}.Debug|Any CPU.Build.0 = Debug|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {332C883B-3BAC-495B-9E95-82357599CF89} + EndGlobalSection +EndGlobal