This commit is contained in:
2021-07-26 15:08:40 -07:00
parent 81a730ae55
commit 5b0ebc5eb0
3 changed files with 188 additions and 2 deletions

View File

@@ -40,8 +40,14 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
If ObjConta.GetCuentasAsignacionesSistema(UsuarioActual.CveEmpresa, DdlTipo.SelectedValue.ToEntero, DdlOpcion.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjConta.DtResultados
End If
If ObjConta.GetCuentasGlobales(UsuarioActual.CveEmpresa) Then
GvGlobal.DataSource = ObjConta.DtResultados
End If
ObjConta.Dispose()
GvDatos.DataBind()
GvGlobal.DataBind()
UpDatos.Update()
End Sub
@@ -53,10 +59,12 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
If ObjConta.GetConta_ConceptosContables() Then
DdlCconceptosContables.DataSource = ObjConta.DtResultados
DdlConceptoGlobal.DataSource = ObjConta.DtResultados.FiltraParametros("EsCuentaUnica = false AND EsSistema = True AND EsGlobal = True")
End If
If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
DdlCuenta.DataSource = ObjConta.DtResultados
DdlCuentaGlobal.DataSource = ObjConta.DtResultados
End If
ObjConta.Dispose()
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
@@ -79,7 +87,9 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
DdlCuentaBancaria.DataBind()
DdlCconceptosContables.DataBind()
DdlConceptoGlobal.DataBind()
DdlCuenta.DataBind()
DdlCuentaGlobal.DataBind()
DdlProveedor.DataBind()
'DdlPersonal.DataBind()
DdlClasificacion.DataBind()
@@ -145,6 +155,11 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
End If
End If
If Dr("AplicaImpuesto").ToString = "True" Then
divPorcentajeIVA.Visible = True
End If
If Dr("AplicaClasificacion").ToString = "True" Then
divClasificacion.Visible = True
End If
@@ -184,7 +199,24 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
ObjConta.Dispose()
End Sub
Protected Sub BtnAgregarMotivoD_Click(sender As Object, e As EventArgs) Handles BtnAgregarMotivoD.Click
Protected Sub BtnAgregarGlobal_Click(sender As Object, e As EventArgs) Handles BtnAgregarGlobal.Click
UppModalGlobal.Update()
RegistraScript("$('#ModalGlobal').modal();")
End Sub
Protected Sub EliminarRowGlobal(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim ObjConta As New ClsContabilidad
If ObjConta.RemoveCuentasGlobales(GvRow.DataKey("CveConceptoContable").ToEntero, GvRow.DataKey("CveEmpresa").ToEntero) Then
Alert("se elimino correctamente")
End If
CargaDatosSistema()
UpDatos.Update()
ObjConta.Dispose()
End Sub
Protected Sub BtnAgregarAsignacion_Click(sender As Object, e As EventArgs) Handles BtnAgregarAsignacion.Click
LimpiarDatos()
LbAgregar.Text = "Agregar"
@@ -238,4 +270,22 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
CargaDatosSistema()
UpDatos.Update()
End Sub
Protected Sub LBAgregaGlobal_Click(sender As Object, e As EventArgs)
Dim ErrorString As String = ""
Dim ObjConta As New ClsContabilidad
If Not ObjConta.AddCuentasGlobales(DdlConceptoGlobal.SelectedValue.ToEntero, DdlCuentaGlobal.SelectedValue.ToEntero, DdlTipoGlobal.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
ErrorString = "Error al agregar"
End If
ObjConta.Dispose()
If ErrorString.Length > 0 Then
Alert(ErrorString)
Else
Alert("Agregado correctamente")
End If
CargaDatosSistema()
UpDatos.Update()
End Sub
End Class