Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions WebLab/Items/ItemEdit2.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -829,9 +829,13 @@
<tr>
<td>Presentación por Defecto:</td>
<td colspan="3"><anthem:DropDownList class="form-control input-sm" ID="ddlPresentacionEfectorDefecto" Width="400px" runat="server"></anthem:DropDownList></td>
<td> <anthem:Button ID="btnPresentacionDefecto" runat="server" CssClass="btn btn-primary" TabIndex="9" Text="Guardar" ValidationGroup="1" Width="150px" OnClick="btnPresentacionDefecto_Click" />
</td>
<td> <anthem:Button ID="btnPresentacionDefecto" runat="server" CssClass="btn btn-primary" TabIndex="9" Text="Guardar" ValidationGroup="1" Width="150px" OnClick="btnPresentacionDefecto_Click" /></td>
</tr>
<tr>
<td> &nbsp;</td>
<td> <anthem:Label ID="lblPresentacionDefecto" runat="server" Font-Bold="True" CssClass="myLabelIzquierdaGde" ForeColor="Red" UpdateAfterCallBack="true" /> </td>
</tr>
</table>
</anthem:Panel>

Expand Down
14 changes: 14 additions & 0 deletions WebLab/Items/ItemEdit2.aspx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,17 @@ private void MostrarDatosEfector(Efector oEfector)

ddlPresentacionEfectorDefecto.SelectedValue = oItem.IdPresentacionDefecto.ToString();

if(oItem.IdPresentacionDefecto == 0)
{
lblPresentacionDefecto.Text = "No se ha determinado una presentación por defecto";
}
else
{
ItemPresentacion itemPres = new ItemPresentacion();
itemPres = (ItemPresentacion) itemPres.Get(typeof(ItemPresentacion), oItem.IdPresentacionDefecto);
lblPresentacionDefecto.Text = "Presentacion: "+ itemPres.Codigo + '-' + itemPres.Presentacion + " se aplicará por defecto.";
}

MostrarDatosValoresReferencia();
}
}
Expand Down Expand Up @@ -3264,6 +3275,9 @@ private void GuardarPresentacionporDefecto(int pres)
oItem.IdPresentacionDefecto = pres;
oItem.Save();

ItemPresentacion itemPres = new ItemPresentacion();
itemPres = (ItemPresentacion)itemPres.Get(typeof(ItemPresentacion), oItem.IdPresentacionDefecto);
lblPresentacionDefecto.Text = "Presentacion: " + itemPres.Codigo + '-' + itemPres.Presentacion + " se aplicará por defecto.";
}
}

Expand Down
Loading