cambios para que tome los datos de sistema

This commit is contained in:
2021-07-14 12:46:17 -07:00
parent 02715fc408
commit 93564dab72
2 changed files with 162 additions and 79 deletions

View File

@@ -21,29 +21,58 @@
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" class="btn btn-primary" />
<a href="javascript:;" class="expand"></a>
</div>
<div class="titlefiltros caption">
<div class="row">
<label runat="server" id="LblTipo" class="col-md-1 truncate">Opción:</label>
<div runat="server" id="DivTipo" class="col-md-2">
<asp:DropDownList ID="DdlTipo" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
<asp:ListItem Text="Unicas" Value="1"></asp:ListItem>
<asp:ListItem Text="Clasificaciones" Value="2"></asp:ListItem>
<asp:ListItem Text="Bancos" Value="3"></asp:ListItem>
<asp:ListItem Text="Almacenes" Value="4"></asp:ListItem>
<asp:ListItem Text="Personales" Value="5"></asp:ListItem>
<asp:ListItem Text="Proveedores" Value="6"></asp:ListItem>
<asp:ListItem Text="Clientes" Value="7"></asp:ListItem>
<asp:ListItem Text="Activos Fijos" Value="9"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView runat="server" ID="GvDatos" EmptyDataText="No se encontraron Motivo de Baja Registrados" ToolTip="Listado de Motivo de Baja" CssClass="table table-striped table-advance table-hover ScrollAD"
<asp:GridView runat="server" ID="GvDatos" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover ScrollAD"
DataKeyNames="CveCuentaAsignacion,CveConceptoContable,CveCuenta,IdCuenta,CveProveedor,CveCliente,CvePersonal,CveClasificacion,CveAlmacen,PorcentajeIVA,CveConceptoNomina,CveBancoCuenta" AutoGenerateColumns="False"
Style=" text-align: center;width:100%" GridLines="None">
Style=" width:100%" GridLines="None">
<Columns>
<asp:BoundField DataField="ConceptoContable" HeaderText="Concepto Contable" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="ConceptoContable" ItemStyle-Width="150px" HeaderText="Concepto Contable" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="Referencia" HeaderText="Referencia" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="CuentaCodigo" ItemStyle-Width="100px" HeaderText="Código Cuenta" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="CuentaNombre" HeaderText="Nombre Cuenta" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="IdCuenta" HeaderText="Id Cuenta" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="ProveedorNombre" HeaderText="Nombre Proveedor" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="ClienteNombre" HeaderText="Nombre Cliente" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="PersonalNombre" HeaderText="Nombre Personal" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificación" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="Almacen" HeaderText="Almacén" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="PorcentajeIVA" HeaderText="Porcentaje IVA" ItemStyle-HorizontalAlign="Left"/>
<asp:TemplateField ItemStyle-Width="99px">
<asp:TemplateField ItemStyle-Width="49px">
<ItemTemplate>
<asp:LinkButton ID="ImgE" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="ActualizaModulo" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
<asp:LinkButton ID="ImgE" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="ActualizaModulo" CssClass="btn btn-circle btn-xs green" Text="<i class='fa fa-pencil'></i>" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="83px">
<asp:TemplateField ItemStyle-Width="49px">
<ItemTemplate>
<asp:LinkButton ID="ImgEE" runat="server" AlternateText="Eliminar" CausesValidation="False" OnClick="EliminarRow" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
<asp:LinkButton ID="ImgEliminar" runat="server" AlternateText="Eliminar" Visible='<%# Eval("CveCuentaAsignacion").ToString <> "" %>' CausesValidation="False" OnClick="EliminarRow" CommandName="Delete" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
@@ -67,53 +96,58 @@
<div class="col-md-1" style="width:50%;text-align:left">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlCconceptosContables" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="240px" ValidationGroup="GrpModulo"></asp:DropDownList>
<asp:HiddenField ID="HdnCveCuentaAsignacion" runat="server" />
<asp:DropDownList ID="DdlCconceptosContables" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
<label for="<%= DdlCconceptosContables.ClientID.ToString()%>">Concepto Contable: </label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlCuenta" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpModulo"></asp:DropDownList>
<label for="<%= DdlCuenta.ClientID.ToString()%>">Cuenta Contable: </label>
</div>
<div class="form-group form-md-line-input input-iconright">
<div class="form-group form-md-line-input input-iconright" id="divIdCuenta" runat="server" visible="false">
<asp:TextBox ID="TxtIdCuentaContable" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true" style="width:100%"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVClave" runat="server" ControlToValidate="TxtIdCuentaContable" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>'¨IdCuentaContable''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModulo"></asp:RequiredFieldValidator>
<label for="<%= TxtIdCuentaContable.ClientID.ToString()%>">IdCuentaContable:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlProveedor" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="240px" ValidationGroup="GrpModulo"></asp:DropDownList>
<div class="form-group form-md-line-input input-iconright" id="divProveedor" runat="server" visible="false">
<asp:DropDownList ID="DdlProveedor" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
<label for="<%= DdlProveedor.ClientID.ToString()%>">Proveedor: </label>
</div>
<div class="form-group form-md-line-input input-iconright">
<div class="form-group form-md-line-input input-iconright" id="divCliente" runat="server" visible="false">
<label for="<%= DdlClientes.ClientID.ToString()%>">Cliente: </label><br />
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="90%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlCuentaBancaria" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpModulo"></asp:DropDownList>
<div class="form-group form-md-line-input input-iconright" id="divBancos" runat="server" visible="false">
<asp:DropDownList ID="DdlCuentaBancaria" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
<label for="<%= DdlCuentaBancaria.ClientID.ToString()%>">Cuenta Bancaria: </label>
</div>
</div>
<div class="col-md-1" style="width:50%;text-align:left">
<div class="form-group form-md-line-input input-iconright">
<div class="form-group form-md-line-input input-iconright" id="divPersonal" runat="server" visible="false">
<label for="<%= DdlPersonal.ClientID.ToString()%>">Personal: </label><br />
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlPersonal" Width="90%" data-metodo="getpersonal" runat="server" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssStyle="width: 100%;"></ADS:Dropdownlost>
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlPersonal" Width="90%" data-metodo="getpersonal" runat="server" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssStyle="width: 100%;" Enabled="false"></ADS:Dropdownlost>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="240px" ValidationGroup="GrpModulo"></asp:DropDownList>
<div class="form-group form-md-line-input input-iconright" id="divClasificacion" runat="server" visible="false">
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Clasificación: </label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlAlmacen" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="Almacen" DataValueField="CveAlmacen" Width="240px" ValidationGroup="GrpModulo"></asp:DropDownList>
<div class="form-group form-md-line-input input-iconright" id="divAlmacen" runat="server" visible="false">
<asp:DropDownList ID="DdlAlmacen" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="Almacen" DataValueField="CveAlmacen" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
<label for="<%= DdlAlmacen.ClientID.ToString()%>">Almacén: </label>
</div>
<div class="form-group form-md-line-input input-iconright">
<div class="form-group form-md-line-input input-iconright" id="divPorcentajeIVA" runat="server" visible="false">
<asp:TextBox ID="TxtPorcentajeIVA" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true" style="width:100%"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtPorcentajeIVA" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>'¨PorcentajeIVA''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModulo"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtPorcentajeIVA" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>'¨PorcentajeIVA''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModulo" Enabled="false"></asp:RequiredFieldValidator>
<label for="<%= TxtPorcentajeIVA.ClientID.ToString()%>">PorcentajeIVA:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlConceptoNomina" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Width="240px" ValidationGroup="GrpModulo"></asp:DropDownList>
<div class="form-group form-md-line-input input-iconright" id="divConceptoNomina" runat="server" visible="false">
<asp:DropDownList ID="DdlConceptoNomina" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
<label for="<%= DdlConceptoNomina.ClientID.ToString()%>">Concepto nómina: </label>
</div>
<div class="form-group form-md-line-input input-iconright" id="divActivoFijo" runat="server" visible="false">
<asp:DropDownList ID="DdlActivoFijo" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="Descripcion" DataValueField="CveActivoFijo" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
<label for="<%= DdlActivoFijo.ClientID.ToString()%>">Activo Fijo: </label>
</div>
</div>
</div>
</div>

View File

@@ -16,11 +16,16 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaDatos()
CargaDatosModal()
End If
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
CargaDatosSistema()
End Sub
Private Sub CargaDatos()
Dim ObjConta As New ClsContabilidad
If ObjConta.GetCuentasAsignaciones(UsuarioActual.CveEmpresa) Then
@@ -30,6 +35,17 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
GvDatos.DataBind()
End Sub
Private Sub CargaDatosSistema()
Dim ObjConta As New ClsContabilidad
If ObjConta.GetCuentasAsignacionesSistema(UsuarioActual.CveEmpresa, DdlTipo.selectedvalue.toentero) Then
GvDatos.DataSource = ObjConta.DtResultados
End If
ObjConta.Dispose()
GvDatos.DataBind()
UpDatos.Update()
End Sub
Private Sub CargaDatosModal()
DdlConceptoNomina.DataSource = GlobalDTNomConceptos(UsuarioActual.CveEmpresa)
DdlConceptoNomina.DataBind()
@@ -53,7 +69,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
DdlAlmacen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
Dim ObjBancos As New ClsBancos
If ObjBancos.GetBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa) Then
@@ -80,45 +96,78 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
Protected Sub ActualizaModulo(sender As Object, e As EventArgs)
LimpiarDatos()
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
CveConceptoAsignacion = GvRow.DataKey("CveCuentaAsignacion").ToEntero
DdlCconceptosContables.SelectedValue = GvRow.DataKey("CveConceptoContable").ToEntero
DdlCuenta.SelectedValue = GvRow.DataKey("CveCuenta").ToEntero
DdlConceptoNomina.SelectedValueExist(GvRow.DataKey("CveConceptoNomina").ToEntero)
DdlProveedor.SelectedValue = GvRow.DataKey("CveProveedor").ToEntero
DdlClasificacion.SelectedValue = GvRow.DataKey("CveClasificacion").ToEntero
DdlAlmacen.SelectedValue = GvRow.DataKey("CveAlmacen").ToEntero
TxtIdCuentaContable.Text = GvRow.DataKey("IdCuenta")
TxtPorcentajeIVA.Text = GvRow.DataKey("PorcentajeIVA")
DdlCuentaBancaria.SelectedValueExist(GvRow.DataKey("CveBancoCuenta"))
Dim Dr As DataRow = GlobalDTContaConceptosContables(GvRow.DataKey("CveConceptoContable").ToEntero).FiltroPrimero("")
Dim CveConceptoContable As Integer = GvRow.DataKey("CveConceptoContable").ToString.ToEntero
HdnCveCuentaAsignacion.Value = GvRow.DataKey("CveCuentaAsignacion").ToString
Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
If Dr IsNot Nothing Then
CveConceptoAsignacion = GvRow.DataKey("CveCuentaAsignacion").ToEntero
DdlCconceptosContables.SelectedValueExist(GvRow.DataKey("CveConceptoContable"))
DdlCuenta.SelectedValueExist(GvRow.DataKey("CveCuenta"))
DdlConceptoNomina.SelectedValueExist(GvRow.DataKey("CveConceptoNomina").ToEntero)
DdlProveedor.SelectedValueExist(GvRow.DataKey("CveProveedor"))
DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion"))
DdlAlmacen.SelectedValueExist(GvRow.DataKey("CveAlmacen"))
TxtIdCuentaContable.Text = GvRow.DataKey("IdCuenta")
TxtPorcentajeIVA.Text = GvRow.DataKey("PorcentajeIVA")
DdlCuentaBancaria.SelectedValueExist(GvRow.DataKey("CveBancoCuenta"))
If CveCliente > 0 Then
DdlClientes.setEsWebService(False)
Dim ObjCliente As New ClsClientes
If ObjCliente.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
DdlClientes.ddl.DataSource = ObjCliente.DtResultados
Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
If Dr("AplicaCliente").ToString = "True" Then
divCliente.Visible = True
If CveCliente > 0 Then
DdlClientes.setEsWebService(False)
Dim ObjCliente As New ClsClientes
If ObjCliente.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
DdlClientes.ddl.DataSource = ObjCliente.DtResultados
End If
DdlClientes.ddl.DataBind()
DdlClientes.ddl.SelectedValue = CveCliente
End If
End If
DdlClientes.ddl.DataBind()
DdlClientes.ddl.SelectedValue = CveCliente
If Dr("AplicaProveedor").ToString = "True" Then
divProveedor.Visible = True
End If
If Dr("AplicaPersonal").ToString = "True" Then
divPersonal.Visible = True
If CvePersonal > 0 Then
DdlPersonal.setEsWebService(False)
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
DdlPersonal.ddl.DataSource = ObjPersonal.DtResultados
End If
DdlPersonal.ddl.DataBind()
DdlPersonal.ddl.SelectedValueExist(CvePersonal)
End If
End If
If Dr("AplicaClasificacion").ToString = "True" Then
divClasificacion.Visible = True
End If
If Dr("AplicaBancos").ToString = "True" Then
divBancos.Visible = True
End If
If Dr("AplicaAlmacen").ToString = "True" Then
divAlmacen.Visible = True
End If
If Dr("AplicaActivoFijo").ToString = "True" Then
divActivoFijo.Visible = True
End If
LbAgregar.Text = "Actualizar"
UpModalModulos.Update()
RegistraScript("$('#ModalCat').modal();")
End If
If CvePersonal > 0 Then
DdlPersonal.setEsWebService(False)
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
DdlPersonal.ddl.DataSource = ObjPersonal.DtResultados
End If
DdlPersonal.ddl.DataBind()
DdlPersonal.ddl.SelectedValue = CvePersonal
End If
LbAgregar.Text = "Actualizar"
UpModalModulos.Update()
RegistraScript("$('#ModalCat').modal();")
End Sub
Protected Sub EliminarRow(sender As Object, e As EventArgs)
@@ -127,7 +176,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
If ObjConta.RemoveCuentasAsignaciones(GvRow.DataKey("CveCuentaAsignacion").ToEntero) Then
Alert("se elimino correctamente")
End If
CargaDatos()
CargaDatosSistema()
UpDatos.Update()
ObjConta.Dispose()
End Sub
@@ -162,13 +211,13 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
Dim ObjConta As New ClsContabilidad
Dim ErrorString As String = ""
If LbAgregar.Text = "Agregar" Then
If HdnCveCuentaAsignacion.Value.ToEntero <= 0 Then
If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero()) Then
ErrorString = "Error al agregar"
End If
ElseIf LbAgregar.Text = "Actualizar" Then
ElseIf HdnCveCuentaAsignacion.Value.ToEntero > 0 Then
If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero()) Then
@@ -183,7 +232,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
Else
Alert("Agregado correctamente")
End If
CargaDatos()
CargaDatosSistema()
UpDatos.Update()
End Sub
End Class