ordenes de trabajo update
This commit is contained in:
@@ -241,6 +241,7 @@
|
||||
|
||||
<asp:BoundField DataField="Cantidad" ItemStyle-Width="15%" HeaderText="Cantidad" />
|
||||
<asp:BoundField DataField="Abreviatura" ItemStyle-Width="15%" HeaderText="U.M." />
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="45%" HeaderText="Producto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblPS" runat="server" Text='<%# Eval("PS") %>' Width="220px"></asp:Label>
|
||||
@@ -253,6 +254,17 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="150px" HeaderText="Faltante" Visible="false" ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>
|
||||
|
||||
<asp:HyperLink ID="HLOC" runat="server" Text="" Target="_blank" CssClass="Texto" data-toggle="tooltip" data-placement="top" title="Crear orden de compra" >Faltante <i class="fa fa-shopping-cart" aria-hidden="true"></i></asp:HyperLink>
|
||||
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlFaltante" runat="server" Text='<%# Eval("Faltante") %>' Width="220px"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
+
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
@@ -25,6 +25,18 @@ Partial Class AF_OrdenTrabajo
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property CveOrdenCompra As Integer
|
||||
Get
|
||||
If ViewState("CveOrdenCompra") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveOrdenCompra").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveOrdenCompra") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
@@ -101,12 +113,8 @@ Partial Class AF_OrdenTrabajo
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " GV DATOS "
|
||||
|
||||
Private Sub CargaDatos()
|
||||
@@ -128,17 +136,16 @@ Partial Class AF_OrdenTrabajo
|
||||
DdlPrioridad.SelectedValueExist(ObjAF.DtResultados(0)("Prioridad").ToString)
|
||||
txtFechaI.Text = ObjAF.DtResultados(0)("FechaInicio").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
|
||||
CveOrdenCompra = ObjAF.DtResultados(0)("CveOrdenCompra").ToString.ToEntero
|
||||
|
||||
If ObjAF.DtResultados(0)("FechaFin").ToString.Length > 0 Then
|
||||
txtFechaF.Text = ObjAF.DtResultados(0)("FechaFin").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
End If
|
||||
|
||||
'txtFechaFinReal.Text ""
|
||||
DdlOrdenesTrabajoEstatus.SelectedValueExist(ObjAF.DtResultados(0)("CveEstatusOT").ToString)
|
||||
|
||||
|
||||
|
||||
Else
|
||||
Alert("No se encontro la orden de rtabajo", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Alert("No se encontro la orden de trabajo", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -321,16 +328,27 @@ Partial Class AF_OrdenTrabajo
|
||||
Private Sub CargaMaterial()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
Dim MaterialFaltante As Decimal = 0
|
||||
|
||||
If ObjAF.GetOrdenesTrabajoMateriales(CveOrdenTrabajo, UsuarioActual.CveEmpresa) Then
|
||||
GvMaterial.DataSource = ObjAF.DtResultados
|
||||
MaterialFaltante = ObjAF.DtResultados.SUMD("Faltante")
|
||||
Else
|
||||
GvMaterial.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
|
||||
|
||||
|
||||
If MaterialFaltante > 0 AndAlso CveOrdenCompra <= 0 Then
|
||||
|
||||
GvMaterial.Columns(4).Visible = True
|
||||
End If
|
||||
|
||||
GvMaterial.DataBind()
|
||||
|
||||
UpGvMaterial.Update()
|
||||
|
||||
End Sub
|
||||
@@ -376,6 +394,17 @@ Partial Class AF_OrdenTrabajo
|
||||
|
||||
Protected Sub GvMaterial_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
|
||||
If GvMaterial.Columns(4).Visible Then
|
||||
|
||||
Dim HLOC As HyperLink = e.Row.FCHyperLink("HLOC")
|
||||
HLOC.NavigateUrl = $"../OC/OC.aspx?CveOrdenTrabajo={CveOrdenTrabajo}"
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub GvActividades_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user