modifiche per ottimizzazione fasi ricerca documenti

This commit is contained in:
Samuele
2012-09-11 16:05:28 +02:00
parent 14b8629a6b
commit e968c144f5
9 changed files with 64 additions and 67 deletions
BIN
View File
Binary file not shown.
+1 -3
View File
@@ -7,10 +7,8 @@
<%@ Register Src="WebUserControls/mod_archivioDocumenti.ascx" TagName="mod_archivioDocumenti"
TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="clearDiv divSx" style="min-width: 220px; width: 15%;">
<div class="divSx fontPiccolo" style="min-width: 780px; width: 100%;">
<uc2:mod_filtroRicerca ID="mod_filtroRicerca1" runat="server" />
</div>
<div class="divSx fontPiccolo" style="min-width: 780px; width: 85%;">
<div style="width: 100%">
<uc1:mod_archivioDocumenti ID="mod_archivioDocumenti1" runat="server" />
</div>
@@ -9,7 +9,7 @@
<link href="../css/Style.css" rel="stylesheet" type="text/css" />
<% } %>
<asp:GridView ID="grView" runat="server" AllowSorting="True" AutoGenerateColumns="False"
DataSourceID="ods" DataKeyNames="idxFile" Width="100%" AllowPaging="True" PageSize="20">
DataSourceID="ods" DataKeyNames="idxFile" Width="100%" AllowPaging="True">
<RowStyle CssClass="ctrRowStyle" />
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
<EditRowStyle CssClass="ctrEditRowStyle" />
@@ -64,8 +64,8 @@
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="getBySearch_paged" TypeName="ETS_Data.DS_WebScipTableAdapters.tbDocumentiTableAdapter"
OldValuesParameterFormatString="original_{0}" EnablePaging="True" SelectCountMethod="getBySearch_count" EnableCaching="true" CacheDuration="30">
<%--EnableCaching="true" CacheDuration="30" SortParameterName="SortExpression"--%>
OldValuesParameterFormatString="original_{0}" EnablePaging="True" SelectCountMethod="getBySearch_count" SortParameterName="SortExpression" EnableCaching="true" CacheDuration="5">
<%--EnableCaching="true" CacheDuration="30" SortParameterName="SortExpression" --%>
<SelectParameters>
<asp:SessionParameter DefaultValue="0" Name="Numero" SessionField="srcNumero" Type="Int32" />
<asp:SessionParameter DefaultValue="0" Name="Anno" SessionField="srcAnno" Type="Int32" />
@@ -4,6 +4,7 @@ using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ETS_Data;
namespace ETS_WS.WebUserControls
{
@@ -114,10 +115,28 @@ namespace ETS_WS.WebUserControls
return answ;
}
/// <summary>
/// dimensione pagina richiesta
/// </summary>
public int pageSize
{
get
{
int answ = 15;
try
{
answ = utils.obj.IntSessionObj("srcPageSize");
}
catch
{ }
return answ;
}
}
/// <summary>
/// aggiornamento controllo
/// </summary>
public void doUpdate()
{
grView.PageSize = pageSize;
grView.DataBind();
}
}
@@ -11,30 +11,30 @@
<link href="../css/Style.css" rel="stylesheet" type="text/css" />
<% } %>
<div>
<div class="divSx" style="width: 100%; text-align: left; margin: auto auto auto auto;
background-color: #ACFFAC; height: 480px; vertical-align: middle;">
<div style="padding: 4px;">
<div class="divSx" style="width: 100%; text-align: left; margin: auto; background-color: #ACFFAC;
height: 50px; vertical-align: bottom;">
<div style="padding: 4px 8px 4px 8px;">
<%--input dati--%>
<div class="clearDiv">
<div class="divSx">
<asp:Label runat="server" ID="lblCerca" Text="Ricerca Libera" CssClass="labelInput" /><br />
<asp:TextBox runat="server" ID="txtSearchAll" OnTextChanged="txtSearchAll_TextChanged"
AutoPostBack="True" Width="15em" />
</div>
<div class="clearDiv">
<div class="divSx">
<asp:CheckBox runat="server" ID="chkCommessa" Text="Filtra per Commessa" CssClass="labelInput"
AutoPostBack="true" OnCheckedChanged="chkCommessa_CheckedChanged" /><br />
<uc1:mod_textAutocomplete ID="tacCommesse" runat="server" ServicePath="~/WS/AutoCompletamento.asmx"
ServiceMethod="elencoCommesseByDoc" minCharAutocomplete="1" showKey="false" toolTip="Digitare per iniziare ricerca, min 1 char"
textEmWidht="15" Visible="false" />
</div>
<div class="clearDiv">
<div class="divSx">
<asp:CheckBox runat="server" ID="chkFase" Text="Filtra per Fase" CssClass="labelInput"
AutoPostBack="true" OnCheckedChanged="chkFase_CheckedChanged" /><br />
<uc1:mod_textAutocomplete ID="tacFasi" runat="server" ServicePath="~/WS/AutoCompletamento.asmx"
ServiceMethod="elencoFasiByDoc" minCharAutocomplete="1" showKey="false" toolTip="Digitare per iniziare ricerca, min 1 char"
textEmWidht="15" Visible="false" />
</div>
<div class="clearDiv">
<div class="divSx">
<asp:CheckBox runat="server" ID="chkFonte" Text="Filtra per Fonte" CssClass="labelInput"
AutoPostBack="true" OnCheckedChanged="chkFonte_CheckedChanged" />
<br />
@@ -42,16 +42,24 @@
ServiceMethod="elencoFontiByDoc" minCharAutocomplete="2" showKey="false" toolTip="Digitare per iniziare ricerca, min 2 char"
textEmWidht="15" Visible="false" />
</div>
<div class="clearDiv">
<div class="divSx">
<asp:CheckBox runat="server" ID="chkOggetto" Text="Filtra per Oggetto" CssClass="labelInput"
AutoPostBack="true" OnCheckedChanged="chkOggetto_CheckedChanged" />
<br />
<uc1:mod_textAutocomplete ID="tacOggetto" runat="server" ServicePath="~/WS/AutoCompletamento.asmx"
ServiceMethod="elencoOggettiByDoc" minCharAutocomplete="1" showKey="false" toolTip="Digitare per iniziare ricerca, min 1 char"
ServiceMethod="elencoOggettiByDoc" minCharAutocomplete="3" showKey="false" toolTip="Digitare per iniziare ricerca, min 3 char"
textEmWidht="15" Visible="false" />
</div>
<div class="clearDiv">
<asp:Label runat="server" ID="lblFullPath" CssClass="labelInput" />
<div class="divDx">
<asp:Label runat="server" ID="LabelblPageSize" Text="Risultati per pagina" CssClass="labelInput" /><br />
<asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="True"
onselectedindexchanged="ddlPageSize_SelectedIndexChanged">
<asp:ListItem Text="10" Value="10" />
<asp:ListItem Text="15" Value="10" />
<asp:ListItem Text="20" Value="10" Selected="True" />
<asp:ListItem Text="30" Value="10" />
<asp:ListItem Text="50" Value="10" />
</asp:DropDownList>
</div>
</div>
</div>
@@ -102,23 +102,7 @@ namespace ETS_WS.WebUserControls
//// verifico attivazione button submin (ovvero ci sono tutti i valori...)
//btnSubmit.Visible = (tacCommesse.valore != "" && tacFasi.valore != "" && tacFonti.label != "" && txtOggetto.Text != "");
}
#if false
/// <summary>
/// fornisce la stringa del path generato dalle selezioni
/// </summary>
protected string pathSel
{
get
{
// pulizia char non ammessi...
string commessa = utils.cleanPathName(tacCommesse.valore);
string fase = utils.cleanPathName(tacFasi.valore);
string fonte = utils.cleanPathName(tacFonti.label);
string oggetto = utils.cleanPathName(txtOggetto.Text);
return string.Format("/{0}/{1}/{2}/{3}/", commessa, fase, fonte, oggetto);
}
}
#endif
/// <summary>
///
@@ -129,37 +113,7 @@ namespace ETS_WS.WebUserControls
{
updateVisual();
}
/// <summary>
/// richiesta update
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnUpdate_Click(object sender, EventArgs e)
{
//saveMetaData();
// aggiorno
updateVisual();
}
#if false
/// <summary>
/// salva in sesione i metadati
/// </summary>
private void saveMetaData()
{
// salvo i valori dei parametri metadati..
string commessa = utils.cleanPathName(tacCommesse.valore);
string fase = utils.cleanPathName(tacFasi.valore);
string fonte = utils.cleanPathName(tacFonti.label);
string oggetto = utils.cleanPathName(txtOggetto.Text);
// salvo in sessione i valori selezionati, compreso path complessivo
utils.obj.setSessionVal("metaCommessa", commessa);
utils.obj.setSessionVal("metaFase", fase);
utils.obj.setSessionVal("metaFonte", fonte);
utils.obj.setSessionVal("metaOggetto", oggetto);
utils.obj.setSessionVal("pathFiles2Arch", pathSel);
}
#endif
/// <summary>
/// salvo la ricerca libera...
/// </summary>
@@ -250,5 +204,14 @@ namespace ETS_WS.WebUserControls
}
tacOggetto.Visible = chkOggetto.Checked;
}
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
utils.obj.setSessionVal("srcPageSize", ddlPageSize.SelectedValue);
if (eh_reqSearch != null)
{
eh_reqSearch(this, new EventArgs());
}
}
}
}
@@ -103,12 +103,21 @@ namespace ETS_WS.WebUserControls {
protected global::ETS_WS.WebUserControls.mod_textAutocomplete tacOggetto;
/// <summary>
/// lblFullPath control.
/// LabelblPageSize control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblFullPath;
protected global::System.Web.UI.WebControls.Label LabelblPageSize;
/// <summary>
/// ddlPageSize control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlPageSize;
}
}
Binary file not shown.
Binary file not shown.