Fix gestioen delete (solo ULTIMO valore)
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -56,7 +56,7 @@
|
||||
<asp:LinkButton ID="lbCancel2" runat="server" CausesValidation="False" CommandName="Cancel" ToolTip="Cancel" CssClass="fa fa-undo fa-2x" />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbDelete" runat="server" CausesValidation="False" CommandName="Delete" ToolTip="Delete" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>' CssClass="fa fa-trash fa-2x" />
|
||||
<asp:LinkButton ID="lbDelete" runat="server" CausesValidation="False" CommandName="Delete" ToolTip="Delete" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>' CssClass="fa fa-trash fa-2x" Visible='<%# delEnabled(Eval("CodMisura")) %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
|
||||
@@ -163,7 +163,7 @@ namespace CMS_SC.WebUserControls
|
||||
SteamWare.memLayer.ML.emptySessionVal("nextObjCommand");
|
||||
}
|
||||
// SE c'era comando eseguo move...
|
||||
if(_comando!="")
|
||||
if (_comando != "")
|
||||
{
|
||||
DtProxy.man.taDS.moveUpDown(_comando, CodSchedaSel, VersSel, CodMisuraSel);
|
||||
grView.DataBind();
|
||||
@@ -208,5 +208,26 @@ namespace CMS_SC.WebUserControls
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// determina visibilità delete (solo se è ultima misura)
|
||||
/// </summary>
|
||||
/// <param name="direction">direzione: UP / DOWN</param>
|
||||
/// <param name="CodMisura">CodMisura da verificare</param>
|
||||
/// <returns></returns>
|
||||
public bool delEnabled(object _CodMisura)
|
||||
{
|
||||
bool answ = false;
|
||||
string CodMisura = _CodMisura.ToString();
|
||||
if (memLayer.ML.QSS("CodSchedaVers") != "")
|
||||
{
|
||||
// recupero TUTTE le righe della scheda dett corrente
|
||||
DS_Applicazione.DettSchedaDataTable tab = DtProxy.man.taDS.getByScheda(memLayer.ML.QSS("CodSchedaVers"));
|
||||
// a seconda della direzione CERCO se ci siano misure prima/dopo...
|
||||
string where = string.Format("CodMisura > '{0}'", CodMisura);
|
||||
answ = tab.Select(where).Length == 0;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user