Aggiunto annulla prelievoEnabled
resta errore x cui NON è corretto (post conferma/annulla) la visualizzazione... git-svn-id: https://keyhammer.ath.cx/svn/GMW/trunk@115 365432ac-a1b5-4ffd-bb28-6d3099d32164
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
|
||||
OnSelectedIndexChanged="grView_SelectedIndexChanged" OnDataBound="grView_DataBound"
|
||||
DataKeyNames="CodLista,UDC" DataSourceID="ods" OnPageIndexChanged="grView_PageIndexChanged"
|
||||
OnSorted="grView_Sorted" onrowupdating="grView_RowUpdating">
|
||||
OnSorted="grView_Sorted" OnRowUpdating="grView_RowUpdating">
|
||||
<RowStyle CssClass="ctrRowStyle" />
|
||||
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
|
||||
<EditRowStyle CssClass="ctrEditRowStyle" />
|
||||
@@ -24,30 +24,36 @@
|
||||
ToolTip='<%# traduci("Select") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.seleziona, SteamWare.dimImg.small) %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="CodLista" HeaderText="CodLista" ReadOnly="True"
|
||||
SortExpression="CodLista" Visible="False" />
|
||||
<asp:BoundField DataField="CodLista" HeaderText="CodLista" ReadOnly="True" SortExpression="CodLista"
|
||||
Visible="False" />
|
||||
<asp:BoundField DataField="UDC" HeaderText="UDC" ReadOnly="True" SortExpression="UDC" />
|
||||
<asp:BoundField DataField="Qta" HeaderText="Qta" SortExpression="Qta" />
|
||||
<asp:CheckBoxField DataField="Proposto" HeaderText="Prop" SortExpression="Proposto" />
|
||||
<asp:CheckBoxField DataField="Prelevato" HeaderText="Prel" SortExpression="Prelevato" />
|
||||
<asp:TemplateField ShowHeader="False">
|
||||
<HeaderTemplate>
|
||||
<asp:Button ID="btnNew" runat="server" OnClick="btnNew_Click" Text='<%# traduci("New") %>'
|
||||
Visible="false" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgPrelevato" runat="server" CausesValidation="False"
|
||||
CommandName="Update" CommandArgument="ConfermaPrelevato" ToolTip='<%# traduci("EffettuaPrelievo") %>'
|
||||
Visible='<%# prelevaEnabled(Eval("Prelevato")) %>' ImageUrl="~/images/apply_m.png" OnClick="imgPrelevato_Click" />
|
||||
<cc1:ConfirmButtonExtender ID="cbePreleva" runat="server" ConfirmText='<%# traduci("confermaPrelievo")%>'
|
||||
TargetControlID="imgPrelevato" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Button ID="btnNew" runat="server" OnClick="btnNew_Click" Text='<%# traduci("New") %>'
|
||||
Visible="false" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgPrelevato" runat="server" CausesValidation="False" CommandName="Update"
|
||||
CommandArgument="ConfermaPrelevato" ToolTip='<%# traduci("EffettuaPrelievo") %>'
|
||||
Visible='<%# prelevaEnabled(Eval("Prelevato")) %>' ImageUrl="~/images/apply_s.png"
|
||||
OnClick="imgPrelevato_Click" />
|
||||
<cc1:ConfirmButtonExtender ID="cbePreleva" runat="server" ConfirmText='<%# traduci("confermaPrelievo")%>'
|
||||
TargetControlID="imgPrelevato" />
|
||||
<asp:ImageButton ID="imgAnnullaPrelevato" runat="server" CausesValidation="False" CommandName="Update"
|
||||
CommandArgument="AnnullaPrelevato" ToolTip='<%# traduci("AnnullaPrelievo") %>'
|
||||
Visible='<%# annullaEnabled(Eval("Prelevato")) %>' ImageUrl="~/images/cancel_s.png"
|
||||
OnClick="imgAnnullato_Click" />
|
||||
<cc1:ConfirmButtonExtender ID="cbeAnnulla" runat="server" ConfirmText='<%# traduci("confermaAnnullaPrelievo")%>'
|
||||
TargetControlID="imgAnnullaPrelevato" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}"
|
||||
SelectMethod="getByCodLista"
|
||||
TypeName="GMW_data.DS_magazzinoTableAdapters.RigheListePrelievoTableAdapter">
|
||||
SelectMethod="getByCodLista" TypeName="GMW_data.DS_magazzinoTableAdapters.RigheListePrelievoTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter DefaultValue="*" Name="CodLista" SessionField="CodLista_sel"
|
||||
Type="String" />
|
||||
|
||||
@@ -217,7 +217,26 @@ namespace GMW.WebUserControls
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// salvo in session che il prox comando è iniziare lista prelievo...
|
||||
/// verifica se sia annullabile il prelievo
|
||||
/// </summary>
|
||||
/// <param name="statoIniziata"></param>
|
||||
/// <returns></returns>
|
||||
public bool annullaEnabled(object annullaPrelevata)
|
||||
{
|
||||
bool answ = prelievoEnabled;
|
||||
if (prelievoEnabled)
|
||||
{
|
||||
try
|
||||
{
|
||||
answ = Convert.ToBoolean(annullaPrelevata);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// salvo in session che il prox comando è confermare prelievo...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
@@ -226,6 +245,15 @@ namespace GMW.WebUserControls
|
||||
SteamWare.memLayer.ML.setSessionVal("nextObjCommand", "confermaPrelievo");
|
||||
}
|
||||
/// <summary>
|
||||
/// salvo in session che il prox comando è annullare prelievo...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void imgAnnullato_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
SteamWare.memLayer.ML.setSessionVal("nextObjCommand", "annullaPrelievo");
|
||||
}
|
||||
/// <summary>
|
||||
/// in caso di aggiornamento verifico se sia salvato un comando inizia o completa lista prelievo...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
@@ -258,6 +286,19 @@ namespace GMW.WebUserControls
|
||||
// blocco update!
|
||||
e.Cancel = true;
|
||||
break;
|
||||
case "annullaPrelievo":
|
||||
GMW_data.MagClass.magazzino.annullaUdcPrelevatoPerLista(memLayer.ML.StringSessionObj("CodCS"), codLista, UDC);
|
||||
updateOdsDaFiltro();
|
||||
grView.EditIndex = -1;
|
||||
grView.DataBind();
|
||||
// sollevo evento nuovo valore...
|
||||
if (eh_nuovoValore != null)
|
||||
{
|
||||
eh_nuovoValore(this, new EventArgs());
|
||||
}
|
||||
// blocco update!
|
||||
e.Cancel = true;
|
||||
break;
|
||||
default:
|
||||
// faccio update!
|
||||
break;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user