Aggiunto esito ricerca, manca provider risultati celle e rimbalzi

git-svn-id: https://keyhammer.ath.cx/svn/GMW/trunk@230 365432ac-a1b5-4ffd-bb28-6d3099d32164
This commit is contained in:
samuele
2010-09-13 10:44:22 +00:00
parent ea21da2140
commit b8a41572d0
20 changed files with 6412 additions and 223 deletions
+3
View File
@@ -263,6 +263,9 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="images\Cella.png" />
<Content Include="images\Part.png" />
<Content Include="images\Udc.png" />
<Content Include="mazzAppSettings.config" />
<Content Include="mazzConnectionStrings.config" />
<Content Include="WebUserControls\mod_searchResults.ascx" />
+5 -14
View File
@@ -1,11 +1,8 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_search.ascx.cs"
Inherits="GMW_Term.WebUserControls.mod_search" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register src="mod_searchResults.ascx" tagname="mod_searchResults" tagprefix="uc1" %>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<%@ Register Src="mod_searchResults.ascx" TagName="mod_searchResults" TagPrefix="uc1" %>
<div id="contenuto" style="text-align: center;">
<div id="InputTitle" style="padding: 0px 0px 40px 0px;">
<div id="InputTitle" style="padding: 0px 0px 0px 0px;">
<asp:Label ID="lblInput" runat="server" Text="Ricerca Libera" /></div>
<div id="Div1">
<asp:Button ID="btnLoginPage" runat="server" OnClick="btnLoginPage_Click" Width="100px"
@@ -13,14 +10,8 @@
<asp:Button ID="btnButtonsHome" runat="server" OnClick="btnButtonsHome_Click" Width="100px"
Font-Size="Smaller" />
</div>
<asp:UpdatePanel ID="updPanel1" runat="server">
<ContentTemplate>
<div id="Data" style="padding-bottom: 10px;">
<asp:TextBox ID="txtRicerca" runat="server" OnTextChanged="txtRicerca_TextChanged" />
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div id="Data" style="padding-bottom: 4px;">
<asp:TextBox ID="txtRicerca" runat="server" OnTextChanged="txtRicerca_TextChanged" />
</div>
</div>
<uc1:mod_searchResults ID="mod_searchResults1" runat="server" />
-18
View File
@@ -13,15 +13,6 @@ namespace GMW_Term.WebUserControls {
public partial class mod_search {
/// <summary>
/// ScriptManager1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.ScriptManager ScriptManager1;
/// <summary>
/// lblInput control.
/// </summary>
@@ -49,15 +40,6 @@ namespace GMW_Term.WebUserControls {
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnButtonsHome;
/// <summary>
/// updPanel1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel updPanel1;
/// <summary>
/// txtRicerca control.
/// </summary>
@@ -4,7 +4,7 @@
<div id="smallGrid">
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
OnSelectedIndexChanged="grView_SelectedIndexChanged" OnDataBound="grView_DataBound"
Width="100%" DataKeyNames="valore" DataSourceID="ods" OnRowUpdating="grView_RowUpdating">
Width="100%" DataKeyNames="tipo,valore" DataSourceID="ods" OnRowUpdating="grView_RowUpdating">
<RowStyle CssClass="ctrRowStyle" />
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
<EditRowStyle CssClass="ctrEditRowStyle" />
@@ -17,30 +17,26 @@
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
</EmptyDataTemplate>
<Columns>
<%--<asp:TemplateField HeaderText="TipoLista" SortExpression="CodTipoLista" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:ImageButton runat="server" ID="imgCodTipoLista" ImageUrl='<%# pathImgTipo(Eval("CodTipoLista")) %>'
CausesValidation="False" CommandArgument="ShowDetail" OnClick="imgAzioneLista_Click"
CommandName="Update" ToolTip='<%# tooltipTipo(Eval("CodTipoLista")) %>' />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>--%>
<asp:TemplateField HeaderText="Tipo" SortExpression="Tipo">
<ItemTemplate>
<asp:Label ID="lblTipo" runat="server" Text='<%# Eval("Tipo") %>' />
<asp:ImageButton runat="server" ID="imgCodTipo" ImageUrl='<%# pathImgTipo(Eval("Tipo")) %>'
CausesValidation="False" CommandArgument="ShowDetail" OnClick="imgAzioneLista_Click"
CommandName="Update" ToolTip='<%# tooltipTipo(Eval("Tipo")) %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="label" SortExpression="label">
<ItemTemplate>
<asp:Label ID="lbllabel" runat="server" Text='<%# Eval("label") %>' />
<b><asp:Label ID="lbllabel" runat="server" Text='<%# Eval("label") %>' /></b>
<div style="font-size: x-small;">
<asp:Label ID="lblDesc" runat="server" Text='<%# descOggetto(Eval("tipo"),Eval("valore")) %>' />
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="valore" SortExpression="valore">
<%-- <asp:TemplateField HeaderText="valore" SortExpression="valore">
<ItemTemplate>
<asp:Label ID="lblvalore" runat="server" Text='<%# Eval("valore") %>' />
</ItemTemplate>
</asp:TemplateField>
</asp:TemplateField>--%>
<%-- <asp:TemplateField HeaderText="Part/qta" SortExpression="Particolare">
<ItemTemplate>
<div>
@@ -73,10 +69,8 @@
</asp:GridView>
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini" />&nbsp;&nbsp;
<asp:Label ID="lblWarning" runat="server" Visible="false" CssClass="erroreMid" />
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="GetData" TypeName="GMW_data.DS_UtilityTableAdapters.stp_ricercaFullTerminalinoTableAdapter"
OnInserting="recuperaFooter" OnInserted="ods_Updated" OnUpdated="ods_Updated"
OnDeleted="ods_Updated">
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="Original_{0}"
SelectMethod="GetData" TypeName="GMW_data.DS_UtilityTableAdapters.stp_ricercaFullTerminalinoTableAdapter">
<SelectParameters>
<asp:SessionParameter Name="txtSearch" SessionField="searchTerm" Type="String" DefaultValue="*" />
</SelectParameters>
@@ -28,49 +28,6 @@ namespace GMW_Term.WebUserControls
return user_std.UtSn.Traduci(lemma);
}
/// <summary>
/// imposta errore non cancellabilità per record correlati
/// </summary>
protected void setNoDeletableErrorMessage()
{
// mostro avviso di non cancellabilità...
lblWarning.Text = traduci("notDeletable_hasChild");
lblWarning.Visible = true;
grView.DataBind();
}
/// <summary>
/// esegue cancellazioen record
/// </summary>
protected void doDelete()
{
// posso cancellare...
lblWarning.Visible = false;
ods.Delete();
}
/// <summary>
/// Valida la cancellazione per i dati mostrati dal gridView
/// richiede sia preventivamentedichiarato _idxGridView
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected virtual void validaDelete(object sender, ObjectDataSourceMethodEventArgs e)
{
int idx = Convert.ToInt32(e.InputParameters[string.Format("Original_{0}", _idxGridView)]);
if (objIsNotRelated(idx))
{
// annullo cancellazione...
e.Cancel = true;
// seleziono record... metto in session valore idx e poi ridisegno...
SteamWare.memLayer.ML.setSessionVal(_idxGridView, idx);
setNoDeletableErrorMessage();
}
else
{
doDelete();
}
}
/// <summary>
/// recupera i dati di un nuovo record contenuti nel footer di un gridView;
/// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...)
@@ -242,7 +199,7 @@ namespace GMW_Term.WebUserControls
#endregion
/// <summary>
/// metodi al caricamento della pagina
/// </summary>
@@ -278,7 +235,7 @@ namespace GMW_Term.WebUserControls
{
base.OnInit(e);
_idxGridView = "TipoSearch";
aggiornaControlliDataGL();
}
/// <summary>
@@ -286,10 +243,10 @@ namespace GMW_Term.WebUserControls
/// </summary>
protected void aggiornaControlliDataGL()
{
grView.PageSize = 5;
grView.PageSize = 4;
}
/// <summary>
/// gestione cambio selezione valore
@@ -339,6 +296,7 @@ namespace GMW_Term.WebUserControls
string CodSoggetto = MagClass.magazzino.CodSoggCurrUser;
switch (_comando)
{
#if false
case "IniziaListaPrelievo":
GMW_data.MagClass.magazzino.iniziaListaPrelievo(memLayer.ML.StringSessionObj("CodCS"), codLista, CodSoggetto);
updateOds();
@@ -366,13 +324,14 @@ namespace GMW_Term.WebUserControls
memLayer.ML.emptySessionVal("CodLista_sel");
// blocco update!
e.Cancel = true;
break;
default:
break;
#endif
default:
// faccio update!
break;
}
}
/// <summary>
/// chiamato post modifica valore check/selezione nel selettore filtro stato
/// </summary>
@@ -387,22 +346,18 @@ namespace GMW_Term.WebUserControls
/// </summary>
private void checkFixOds()
{
#if false
ods.FilterParameters.Clear();
ods.FilterExpression = "(CodLista LIKE '%{0}%' OR Particolare LIKE '%{0}%' OR DescParticolare LIKE '%{0}%')";
// parametro ricerca attuale
SessionParameter parametroFiltro = new SessionParameter();
parametroFiltro.SessionField = "valoreCercato";
parametroFiltro.Name = "ricerca";
parametroFiltro.DefaultValue = "*";
ods.FilterParameters.Add(parametroFiltro);
#endif
// chiamo procedura che aggiorna ods principale
grView.SelectedIndex = -1;
updateOds();
}
/// <summary>
/// aggiorno il gridview
/// </summary>
protected void updateOds()
{
grView.DataBind();
}
/// <summary>
/// chiamato post modifica valore check/selezione nel selettore filtro tipo
/// </summary>
/// <param name="sender"></param>
@@ -473,116 +428,6 @@ namespace GMW_Term.WebUserControls
return answ;
}
/// <summary>
/// determina se sia abilitato il pulsante x iniziare una lista di prelievo
/// </summary>
/// <param name="statoIniziata"></param>
/// <returns></returns>
public bool iniziaEnabled(object codStato)
{
bool answ = false;
try
{
answ = ((int)codStato == (int)statoLista.generata);
}
catch
{ }
return answ;
}
/// <summary>
/// determina se sia abilitato il pulsante x completare una lista di prelievo
/// </summary>
/// <param name="statoIniziata"></param>
/// <returns></returns>
public bool completaEnabled(object codStato)
{
bool answ = false;
try
{
answ = ((int)codStato == (int)statoLista.iniziata);
}
catch
{ }
return answ;
}
/// <summary>
/// verifica se sia prelevabile
/// </summary>
/// <param name="statoPrelevata"></param>
/// <param name="udc"></param>
/// <returns></returns>
public bool prelevaEnabled(object statoPrelevata, object udc)
{
bool answ = prelievoEnabled;
if (prelievoEnabled)
{
// controllo se non risulti prelevato l'UDC in un altra lista...
if (udcPrelevato(udc))
{
answ = false;
}
else
{
try
{
answ = !Convert.ToBoolean(statoPrelevata);
}
catch
{ }
}
}
return answ;
}
/// <summary>
/// verifica se sia annullabile il prelievo
/// </summary>
/// <param name="annullaPrelevata"></param>
/// <returns></returns>
public bool annullaEnabled(object annullaPrelevata)
{
bool answ = prelievoEnabled;
if (prelievoEnabled)
{
try
{
answ = Convert.ToBoolean(annullaPrelevata);
}
catch
{ }
}
return answ;
}
/// <summary>
/// determina se le righe di prelievo siano confermabili per prelievo (durante pick-up) - se c'è lista prelievo attiva ed è quella corrente!!!
/// </summary>
public bool prelievoEnabled
{
get
{
bool ListaInPrelievo = memLayer.ML.isInSessionObject("CodListaAttiva");
bool ListaSelOk = (memLayer.ML.StringSessionObj("CodListaAttiva") == memLayer.ML.StringSessionObj("CodLista_sel"));
return (ListaInPrelievo && ListaSelOk);
}
}
/// <summary>
/// fornisce verifica se l'udc sia già stato prelevato altrove...
/// </summary>
/// <param name="udc"></param>
/// <returns></returns>
public bool udcPrelevato(object udc)
{
return GMW_data.MagClass.magazzino.taRigheListePrelievo.getPrelevateByUdc(udc.ToString()).Rows.Count > 0;
}
/// <summary>
/// restituisce tooltip da mostrare x STATO lista
/// </summary>
/// <param name="codStato"></param>
/// <returns></returns>
public string tooltipStato(object codice)
{
return traduci(string.Format("StatoLista_{0}", codice));
}
/// <summary>
/// restituisce URL immagine del codice da mostrare x TIPO lista
/// </summary>
@@ -590,7 +435,23 @@ namespace GMW_Term.WebUserControls
/// <returns></returns>
public string pathImgTipo(object codice)
{
return string.Format("~/images/lista_{0}_m.png", codice);
string answ = "";
string tipo = codice.ToString();
switch (tipo)
{
case "UDC":
answ = string.Format("~/images/UDC.png", codice);
break;
case "Particolare":
answ = string.Format("~/images/Part.png", codice);
break;
case "Cella":
answ = string.Format("~/images/Cella.png", codice);
break;
default:
break;
}
return answ;
}
/// <summary>
/// restituisce tooltip da mostrare x TIPO lista
@@ -661,5 +522,51 @@ namespace GMW_Term.WebUserControls
SteamWare.memLayer.ML.setSessionVal("nextObjCommand", "annullaPrelievo");
}
/// <summary>
/// formatta una stringa di descrizione a aprtire dal tipo oggetto
/// </summary>
/// <param name="_tipo"></param>
/// <param name="_valore"></param>
/// <returns></returns>
public string descOggetto(object _tipo, object _valore)
{
string tipo = _tipo.ToString();
string valore = _valore.ToString();
string answ = "";
switch (tipo)
{
case "UDC":
try
{
DS_magazzino.v_UdcDetailRow rigaUdc = MagClass.magazzino.taDettUDC.getByFullUdc(valore, memLayer.ML.StringSessionObj("CodCS"))[0];
answ = string.Format("<b>{0}</b> {1:##} pz (cella {2})", rigaUdc.Particolare, rigaUdc.Qta, rigaUdc.CodCella);
}
catch (Exception e)
{
logger.lg.scriviLog(string.Format("Eccezione {0}", e), tipoLog.EXCEPTION);
answ = string.Format("{0} - {1}", tipo, valore);
}
break;
case "Particolare":
try
{
DS_magazzino.V_ParticolariOverviewRow rigaPart = MagClass.magazzino.taVParticolariOverwiew.getByParticolareFull(valore, memLayer.ML.StringSessionObj("CodCS"))[0];
answ = string.Format("UDC: <b>{0}</b> (<b>{2}</b> a mag.) - <b>{1:##}</b> pz", rigaPart.NumUDC, rigaPart.TotQta, rigaPart.NumInMag);
}
catch (Exception e)
{
logger.lg.scriviLog(string.Format("Eccezione {0}", e), tipoLog.EXCEPTION);
answ = string.Format("{0} - {1}", tipo, valore);
}
break;
case "Cella":
answ = string.Format("{0} - {1}", tipo, valore);
break;
default:
break;
}
return answ;
}
}
}
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

@@ -1,3 +1,4 @@
c:\Users\samuele.STEAMWAREWIN\Documents\Visual Studio 2008\Projects\GMW\GMW_Term\obj\Debug\ResolveAssemblyReference.cache
c:\Users\samuele.STEAMWAREWIN\Documents\Visual Studio 2008\Projects\GMW\GMW_Term\bin\GMW_Term.dll
c:\Users\samuele.STEAMWAREWIN\Documents\Visual Studio 2008\Projects\GMW\GMW_Term\bin\GMW_Term.pdb
c:\Users\samuele.STEAMWAREWIN\Documents\Visual Studio 2008\Projects\GMW\GMW_Term\bin\AjaxControlToolkit.dll
@@ -24,6 +25,5 @@ c:\Users\samuele.STEAMWAREWIN\Documents\Visual Studio 2008\Projects\GMW\GMW_Term
c:\Users\samuele.STEAMWAREWIN\Documents\Visual Studio 2008\Projects\GMW\GMW_Term\bin\tr-TR\AjaxControlToolkit.resources.dll
c:\Users\samuele.STEAMWAREWIN\Documents\Visual Studio 2008\Projects\GMW\GMW_Term\bin\zh-CHS\AjaxControlToolkit.resources.dll
c:\Users\samuele.STEAMWAREWIN\Documents\Visual Studio 2008\Projects\GMW\GMW_Term\bin\zh-CHT\AjaxControlToolkit.resources.dll
c:\Users\samuele.STEAMWAREWIN\Documents\Visual Studio 2008\Projects\GMW\GMW_Term\obj\Debug\ResolveAssemblyReference.cache
c:\Users\samuele.STEAMWAREWIN\Documents\Visual Studio 2008\Projects\GMW\GMW_Term\obj\Debug\GMW_Term.dll
c:\Users\samuele.STEAMWAREWIN\Documents\Visual Studio 2008\Projects\GMW\GMW_Term\obj\Debug\GMW_Term.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.