CAT AF CveAFPAdre y AF concatenar descripcion a codigo en ddl, Kardes ajuste wish list

This commit is contained in:
rakcsle
2025-03-27 15:21:42 -07:00
parent 7818c56469
commit d960e2c039
5 changed files with 32 additions and 10 deletions

View File

@@ -610,9 +610,9 @@
<label class=" control-label">AF Padre:</label>
</div>
<div class="col-md-7">
<div class="col-md-8">
<div class="form-group">
<asp:DropDownList ID="DdlAFPadres" runat="server" AppendDataBoundItems="true" DataTextField="Codigo" DataValueField="CveActivoFijo" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px"></asp:DropDownList>
<asp:DropDownList ID="DdlAFPadres" runat="server" AppendDataBoundItems="true" DataTextField="CodigoDescripcion" DataValueField="CveActivoFijo" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%"></asp:DropDownList>
</div>
</div>
</div>

View File

@@ -151,6 +151,10 @@
<asp:ListItem Text="Sin Responsable" Value="-3"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1">AF Padre:</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlAFPadres" runat="server" AppendDataBoundItems="true" DataTextField="CodigoDescripcion" DataValueField="CveActivoFijo" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px"></asp:DropDownList>
</div>
</div>
</div>
</div>

View File

@@ -49,7 +49,7 @@ Partial Class AF_CatAF
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
ViewState("CveActivoFijo") = -1
CargaCombos()
CargaCaracteristicas()
@@ -129,7 +129,24 @@ Partial Class AF_CatAF
CargarTipoActivoFijo()
CargaGrupos()
CargaResponsable()
CargaAFPadres()
End Sub
Public Sub CargaAFPadres()
Dim ObjAF As New ClsAF()
If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, 1, "-1", -1, -1, -1) Then
DdlAFPadres.DataSource = ObjAF.DtResultados
DdlAFPadres.DataBind()
DdlAFPadres.Items.Remove(DdlAFPadres.Items.FindByValue(CveActivoFijo.ToString))
DdlAFPadres.Items.Insert(0, New ListItem("Todos", "-1"))
End If
ObjAF.Dispose()
End Sub
Private Sub CargaGrupos()
Dim ObjAF As New ClsAF
@@ -262,7 +279,8 @@ Partial Class AF_CatAF
If intContador > 0 Then strSQL1.AppendFormat(" group by CveActivoFijo having count(*)={0}", intContador)
Dim Cvecliente As Integer = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, Codigo, Descripcion, DdlTipoActivo.SelectedValue.ToEntero, DdlSubTipoActivo.SelectedValue.ToEntero, NoSerie, Año, CvePersonaResponsable, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, strSQL1.ToString, CveCliente:=CveCliente, CveGrupo:=DdlGrupo.SelectedValue.ToEntero) Then
If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, Codigo, Descripcion, DdlTipoActivo.SelectedValue.ToEntero, DdlSubTipoActivo.SelectedValue.ToEntero, NoSerie, Año, CvePersonaResponsable, DdlProyecto.SelectedValue.ToEntero,
DdlSubProyecto.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, strSQL1.ToString, CveCliente:=Cvecliente, CveGrupo:=DdlGrupo.SelectedValue.ToEntero, BuscaPorAFPadre:=DdlAFPadres.SelectedValue.ToEntero) Then
If ObjAF.DtResultados.Rows.Count > 0 Then
DtActivosFijos = ObjAF.DtResultados
'GvDatos.DataSource = ObjAF.DtResultados