Se agrego SubProyecto

This commit is contained in:
janeth arvizu
2019-11-04 14:07:53 -07:00
parent aba8cf8caa
commit e7bbe66b8c
3 changed files with 37 additions and 9 deletions

View File

@@ -82,7 +82,7 @@
<ContentTemplate>
<asp:GridView ID="GvFolioGarantia" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveFolioGarantia,FolioGarantia,Estatus,CveUsuario,Usuario,FechaIng"
DataKeyNames="CveFolioGarantia,FolioGarantia,Estatus,CveUsuario,Usuario,FechaIng,SubProyecto,CveSubProyecto"
EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
data-sort="true"
@@ -94,6 +94,12 @@
&nbsp;<asp:Literal ID="LblFolioGarantia" runat="server" Text='<%# Eval("FolioGarantia") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SubProyecto" ItemStyle-Width="150px">
<ItemTemplate>
&nbsp;<asp:Literal ID="LblSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="150px">
<ItemTemplate>
@@ -195,7 +201,18 @@
<label for="<%= TxtFolioGarantia.ClientID.ToString()%>">Folio:</label>
<i></i>
</div>
<br />
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
<asp:DropDownList ID="DdlSubProyectos" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Width="200px" AutoPostBack="true"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVProducto2" InitialValue="-1" runat="server" ControlToValidate="DdlSubProyectos" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubProyecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEProducto2" runat="server" HighlightCssClass="vco" TargetControlID="RFVProducto2" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= DdlSubProyectos.ClientID.ToString()%>">SubProyecto:</label>
<i></i>
</div>
<br />
<div class="form-group form-md-line-input input-iconright">
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>&nbsp;

View File

@@ -37,6 +37,7 @@ Partial Class Acumuladores_CatFoliosGarantia
Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaSubProyectos()
CargadatosGvFolioGarantia()
End If
@@ -45,6 +46,12 @@ Partial Class Acumuladores_CatFoliosGarantia
#Region "Folios Garantía"
Private Sub CargaSubProyectos()
DdlSubProyectos.Items.Clear()
DdlSubProyectos.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyectos.DataBind()
DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
Private Sub CargadatosGvFolioGarantia()
@@ -88,6 +95,7 @@ Partial Class Acumuladores_CatFoliosGarantia
TxtFolioGarantia.Text = ""
ChkEstatus.Checked = True
DdlSubProyectos.SelectedValueExist("-1")
Actualizar = False
UpGral.Update()
@@ -108,7 +116,7 @@ Partial Class Acumuladores_CatFoliosGarantia
If Not Actualizar Then
If ObjAcum.FoliosGarantiaAdd(TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
If ObjAcum.FoliosGarantiaAdd(TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero) Then
TxtFolioGarantia.Text = ""
ChkEstatus.Checked = True
@@ -127,7 +135,7 @@ Partial Class Acumuladores_CatFoliosGarantia
Alert("Ocurrió un error al guardar el Folio de Garantía", TipoMensaje.MsgError)
End If
Else
If ObjAcum.FoliosGarantiaUpdate(CveFolioGarantia, TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario) Then
If ObjAcum.FoliosGarantiaUpdate(CveFolioGarantia, TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, DdlSubProyectos.SelectedValue.ToEntero) Then
TxtFolioGarantia.Text = ""
ChkEstatus.Checked = True
@@ -195,10 +203,11 @@ Partial Class Acumuladores_CatFoliosGarantia
'TxtCompra.Text = GvRow.DataKey("Compra").ToDecimal.ToString("###,###,###.00")
'TxtPuntos.Text = GvRow.DataKey("Puntos").ToDecimal.ToString("###,###,###.00")
'DdlPS.Items.Clear()
'DdlPS.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
'DdlPS.DataBind()
'DdlPS.SelectedValueExist(GvRow.DataKey("CvePSCargo").ToEntero)
DdlSubProyectos.Items.Clear()
DdlSubProyectos.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyectos.DataBind()
DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
DdlSubProyectos.SelectedValueExist(GvRow.DataKey("CveSubProyecto").ToEntero)
BtnAgregarFolioGarantiaModal.Text = "Actualizar"