fix comportamento selezione x
- lettura barcode - selezione P/C
This commit is contained in:
@@ -125,12 +125,13 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:RadioButtonList ID="rbl" runat="server" RepeatDirection="Horizontal" ToolTip='<%# Eval("UDC") %>' OnDataBinding="rbl_DataBinding" OnDataBound="rbl_DataBound">
|
||||
<asp:ListItem Text="P" Value="P" />
|
||||
<asp:ListItem Text="C" Value="C" />
|
||||
<asp:RadioButtonList ID="rbl" runat="server" RepeatDirection="Horizontal" ToolTip='<%# Eval("UDC") %>' OnDataBinding="rbl_DataBinding" OnDataBound="rbl_DataBound" AutoPostBack="True" OnSelectedIndexChanged="rbl_SelectedIndexChanged">
|
||||
<asp:ListItem Value="P" Text="" />
|
||||
<asp:ListItem Value="C" Text="" />
|
||||
</asp:RadioButtonList>
|
||||
</ItemTemplate>
|
||||
<HeaderTemplate>
|
||||
P | C
|
||||
<%--<asp:CheckBox ID="btnSelAll" runat="server" Checked="false" ToolTip='<%# traduci("btnSelAll") %>'
|
||||
OnCheckedChanged="btnSelAll_Click" CssClass="ctrHeaderPager" AutoPostBack="true"></asp:CheckBox>--%>
|
||||
</HeaderTemplate>
|
||||
|
||||
@@ -21,17 +21,31 @@ namespace GMW.WebUserControls
|
||||
/// </summary>
|
||||
protected string statoUDC = "Sterrati";
|
||||
/// <summary>
|
||||
/// stringa degli UDC selezionati (nel formato #UDC1##UDC2#
|
||||
/// stringa degli UDC selezionati per consumo COMPLETO (nel formato #UDC1##UDC2#)
|
||||
/// </summary>
|
||||
protected string udcSelected
|
||||
protected string udcSelC
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(string.Format("UdcSel_{0}", uid));
|
||||
return memLayer.ML.StringSessionObj(string.Format("UdcSelC_{0}", uid));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("UdcSel_{0}", uid), value);
|
||||
memLayer.ML.setSessionVal(string.Format("UdcSelC_{0}", uid), value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// stringa degli UDC selezionati per consumo PARZIALE (nel formato #UDC1##UDC2#)
|
||||
/// </summary>
|
||||
protected string udcSelP
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(string.Format("UdcSelP_{0}", uid));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("UdcSelP_{0}", uid), value);
|
||||
}
|
||||
}
|
||||
public event EventHandler eh_nuovaRicerca;
|
||||
@@ -419,18 +433,16 @@ namespace GMW.WebUserControls
|
||||
string newPart = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].Particolare;
|
||||
if (testoRicerca != newPart)
|
||||
{
|
||||
// imposto filtraggio x particoalre nell'elenco degli UDC della linea...
|
||||
testoRicerca = newPart;
|
||||
// resetto precedente ricerca e deseleziono TUTTI gli UDC elencati SE è cambiato il particolare
|
||||
udcSelected = string.Format("#{0}#", barcodeIn);
|
||||
// salvo UDC da selezionare come consumo COMPLETO
|
||||
salvaCerca();
|
||||
udcSelC = string.Format("#{0}#", barcodeIn);
|
||||
}
|
||||
else
|
||||
{
|
||||
udcSelected = string.Format("{0}#{1}#", udcSelected, barcodeIn);
|
||||
doUpdate();
|
||||
udcSelC = string.Format("{0}#{1}#", udcSelC, barcodeIn);
|
||||
// se era presente in elenco "P" lo elimino
|
||||
udcSelP = udcSelP.Replace(string.Format("#{0}#", barcodeIn), "");
|
||||
}
|
||||
updFiltroPart(newPart);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -449,6 +461,24 @@ namespace GMW.WebUserControls
|
||||
txtBarcode.Focus();
|
||||
}
|
||||
/// <summary>
|
||||
/// update del filtro su particolare x grview UDC caricati in linea
|
||||
/// </summary>
|
||||
/// <param name="newPart"></param>
|
||||
private void updFiltroPart(string newPart)
|
||||
{
|
||||
if (testoRicerca != newPart)
|
||||
{
|
||||
// imposto filtraggio x particoalre nell'elenco degli UDC della linea...
|
||||
testoRicerca = newPart;
|
||||
// salvo UDC da selezionare come consumo COMPLETO
|
||||
salvaCerca();
|
||||
}
|
||||
else
|
||||
{
|
||||
doUpdate();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna tabella + focus a barcode
|
||||
/// </summary>
|
||||
private void doUpdate()
|
||||
@@ -714,6 +744,9 @@ namespace GMW.WebUserControls
|
||||
if (doSave)
|
||||
{
|
||||
currCodLinea = codLinea;
|
||||
testoRicerca = "";
|
||||
grView.DataBind();
|
||||
salvaCerca();
|
||||
}
|
||||
// salvo codice cella!
|
||||
try
|
||||
@@ -820,6 +853,8 @@ namespace GMW.WebUserControls
|
||||
if (testoRicerca == "")
|
||||
{
|
||||
SteamWare.memLayer.ML.emptySessionVal("valoreCercatoCella");
|
||||
udcSelC = "";
|
||||
udcSelP = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -891,16 +926,41 @@ namespace GMW.WebUserControls
|
||||
protected void rbl_DataBinding(object sender, EventArgs e)
|
||||
{
|
||||
RadioButtonList rbl = (RadioButtonList)sender;
|
||||
if (udcSelected.IndexOf(rbl.ToolTip) >= 0)
|
||||
if (udcSelC.IndexOf(rbl.ToolTip) >= 0)
|
||||
{
|
||||
rbl.SelectedValue = "C";
|
||||
}
|
||||
else if (udcSelP.IndexOf(rbl.ToolTip) >= 0)
|
||||
{
|
||||
rbl.SelectedValue = "P";
|
||||
}
|
||||
}
|
||||
|
||||
protected void rbl_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void rbl_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
RadioButtonList rbl = (RadioButtonList)sender;
|
||||
if (rbl.SelectedValue == "C")
|
||||
{
|
||||
udcSelC = string.Format("{0}#{1}#", udcSelC, rbl.ToolTip);
|
||||
// se era presente in elenco "P" lo elimino
|
||||
udcSelP = udcSelP.Replace(string.Format("#{0}#", rbl.ToolTip), "");
|
||||
}
|
||||
else
|
||||
{
|
||||
udcSelP = string.Format("{0}#{1}#", udcSelP, rbl.ToolTip);
|
||||
// se era presente in elenco "C" lo elimino
|
||||
udcSelC = udcSelC.Replace(string.Format("#{0}#", rbl.ToolTip), "");
|
||||
}
|
||||
// calcolo il particolare da selezionare...
|
||||
string newPart = DataProxy.obj.taCartellini.stp_getByUdc(rbl.ToolTip)[0].Particolare;
|
||||
//testoRicerca = newPart;
|
||||
updFiltroPart(newPart);
|
||||
}
|
||||
#if false
|
||||
/// <summary>
|
||||
/// seleziona/deseleziona le righe indicate...
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user