Riorganizzata funzione dei provider di ricerca (ora x UDC)

git-svn-id: https://keyhammer.ath.cx/svn/GMW/trunk@71 365432ac-a1b5-4ffd-bb28-6d3099d32164
This commit is contained in:
samuele
2010-05-28 11:37:55 +00:00
parent a4abbe9dc6
commit fe56a80d88
15 changed files with 246 additions and 100 deletions
+21 -5
View File
@@ -222,6 +222,13 @@
<Compile Include="WebUserControls\mod_confMag.ascx.designer.cs">
<DependentUpon>mod_confMag.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_detailUDC.ascx.cs">
<DependentUpon>mod_detailUDC.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_detailUDC.ascx.designer.cs">
<DependentUpon>mod_detailUDC.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_execUDC.ascx.cs">
<DependentUpon>mod_execUDC.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -313,6 +320,13 @@
<Compile Include="WebUserControls\mod_searchMag.ascx.designer.cs">
<DependentUpon>mod_searchMag.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_SearchProvUDC.ascx.cs">
<DependentUpon>mod_SearchProvUDC.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_SearchProvUDC.ascx.designer.cs">
<DependentUpon>mod_SearchProvUDC.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_selettore_ajax.ascx.cs">
<DependentUpon>mod_selettore_ajax.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -320,12 +334,12 @@
<Compile Include="WebUserControls\mod_selettore_ajax.ascx.designer.cs">
<DependentUpon>mod_selettore_ajax.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_showUDC.ascx.cs">
<DependentUpon>mod_showUDC.ascx</DependentUpon>
<Compile Include="WebUserControls\mod_searchUDC.ascx.cs">
<DependentUpon>mod_searchUDC.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_showUDC.ascx.designer.cs">
<DependentUpon>mod_showUDC.ascx</DependentUpon>
<Compile Include="WebUserControls\mod_searchUDC.ascx.designer.cs">
<DependentUpon>mod_searchUDC.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_tipoCella.ascx.cs">
<DependentUpon>mod_tipoCella.ascx</DependentUpon>
@@ -498,6 +512,7 @@
<Content Include="WebUserControls\mod_anagMagazzini.ascx" />
<Content Include="WebUserControls\mod_chLang.ascx" />
<Content Include="WebUserControls\mod_confMag.ascx" />
<Content Include="WebUserControls\mod_detailUDC.ascx" />
<Content Include="WebUserControls\mod_execUDC.ascx" />
<Content Include="WebUserControls\mod_filtro.ascx" />
<Content Include="WebUserControls\mod_lemmiVocab.ascx" />
@@ -511,8 +526,9 @@
<Content Include="WebUserControls\mod_pageTitleAndSearch.ascx" />
<Content Include="WebUserControls\mod_ricercaGenerica.ascx" />
<Content Include="WebUserControls\mod_searchMag.ascx" />
<Content Include="WebUserControls\mod_SearchProvUDC.ascx" />
<Content Include="WebUserControls\mod_selettore_ajax.ascx" />
<Content Include="WebUserControls\mod_showUDC.ascx" />
<Content Include="WebUserControls\mod_searchUDC.ascx" />
<Content Include="WebUserControls\mod_tipoCella.ascx" />
<Content Include="WebUserControls\mod_vocabolario.ascx" />
</ItemGroup>
@@ -0,0 +1,18 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_SearchProvUDC.ascx.cs"
Inherits="GMW.WebUserControls.mod_SearchProvUDC" %>
<%@ Register src="mod_searchUDC.ascx" tagname="mod_searchUDC" tagprefix="uc1" %>
<%@ Register src="mod_execUDC.ascx" tagname="mod_execUDC" tagprefix="uc2" %>
<%@ Register src="mod_detailUDC.ascx" tagname="mod_detailUDC" tagprefix="uc3" %>
<table>
<tr>
<td>
<uc1:mod_searchUDC ID="mod_searchUDC1" runat="server" />
</td>
<td>
<uc3:mod_detailUDC ID="mod_detailUDC1" runat="server" />
</td>
<td>
<uc2:mod_execUDC ID="mod_execUDC1" runat="server" />
</td>
</tr>
</table>
@@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SteamWare;
namespace GMW.WebUserControls
{
public partial class mod_SearchProvUDC : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
doTraduci();
mod_detailUDC1.Visible = false;
mod_execUDC1.Visible = false;
}
mod_searchUDC1.eh_selValore += new EventHandler(mod_searchUDC1_eh_selValore);
mod_searchUDC1.eh_resetSelezione += new EventHandler(mod_searchUDC1_eh_resetSelezione);
}
void mod_searchUDC1_eh_resetSelezione(object sender, EventArgs e)
{
mod_detailUDC1.Visible = false;
mod_execUDC1.Visible = false;
}
void mod_searchUDC1_eh_selValore(object sender, EventArgs e)
{
mod_detailUDC1.Visible = true;
mod_execUDC1.Visible = true;
}
private void doTraduci()
{
//chkLikeType.Text = traduci("AbilitaRicercaLike");
//chkLikeType.ToolTip = traduci("AbilitaRicercaLikeExpl");
//btnSearch.Text = traduci("btnSearch");
//TBWE_search.WatermarkText = traduci("insertCod4search");
}
/// <summary>
/// Effettua la ricerca indicata
/// </summary>
public void doSearch()
{
mod_searchUDC1.doUpdate();
mod_detailUDC1.Visible = false;
mod_execUDC1.Visible = false;
}
/// <summary>
/// wrapper metodo traduzione
/// </summary>
/// <param name="lemma"></param>
/// <returns></returns>
public string traduci(string lemma)
{
return user_std.UtSn.Traduci(lemma);
}
}
}
@@ -0,0 +1,43 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4927
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GMW.WebUserControls {
public partial class mod_SearchProvUDC {
/// <summary>
/// mod_searchUDC1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GMW.WebUserControls.mod_searchUDC mod_searchUDC1;
/// <summary>
/// mod_detailUDC1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GMW.WebUserControls.mod_detailUDC mod_detailUDC1;
/// <summary>
/// mod_execUDC1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GMW.WebUserControls.mod_execUDC mod_execUDC1;
}
}
@@ -0,0 +1,2 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_detailUDC.ascx.cs" Inherits="GMW.WebUserControls.mod_detailUDC" %>
dettagli UDC
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GMW.WebUserControls
{
public partial class mod_detailUDC : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
+16
View File
@@ -0,0 +1,16 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4927
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GMW.WebUserControls {
public partial class mod_detailUDC {
}
}
+37 -30
View File
@@ -2,9 +2,8 @@
Inherits="GMW.WebUserControls.mod_searchMag" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="mod_filtro.ascx" TagName="mod_filtro" TagPrefix="uc2" %>
<%@ Register Src="mod_showUDC.ascx" TagName="mod_showUDC" TagPrefix="uc1" %>
<%@ Register Src="mod_metodiNoSearch.ascx" TagName="mod_metodiNoSearch" TagPrefix="uc3" %>
<%@ Register Src="mod_execUDC.ascx" TagName="mod_execUDC" TagPrefix="uc4" %>
<%@ Register Src="mod_SearchProvUDC.ascx" TagName="mod_SearchProvUDC" TagPrefix="uc1" %>
<div style="width: 1024px; margin: 0 auto; background: white; vertical-align: text-top;">
<div style="font-size: 48pt; font-family: 'times New Roman', Times, serif; text-align: center;
width: 100%;">
@@ -12,42 +11,50 @@
style="color: Blue;">m</span><span style="color: green;">a</span><span style="color: Red;">g</span>
</div>
<div style="text-align: center;">
<asp:TextBox runat="server" ID="txtSearch" Width="20em" OnTextChanged="txtSearch_TextChanged" />&nbsp;<asp:Button
runat="server" ID="btnSearch" OnClick="btnSearch_Click" /><cc1:TextBoxWatermarkExtender
ID="TBWE_search" runat="server" TargetControlID="txtSearch" WatermarkCssClass="watermarked" />
<asp:UpdateProgress ID="updtRicerca" runat="server" DisplayAfter="10" DynamicLayout="true">
<ProgressTemplate>
<div id="progress_back">
</div>
<div id="progress_top">
<asp:Image ID="ProgressBar" ImageUrl="~/images/ProgressBar.gif" runat="server" />
</div>
</ProgressTemplate>
</asp:UpdateProgress>
<table>
<tr>
<td>
<asp:UpdateProgress ID="updtRicerca" runat="server" DisplayAfter="10" DynamicLayout="true">
<ProgressTemplate>
<div id="progress_back">
</div>
<div id="progress_top">
<asp:Image ID="ProgressBar" ImageUrl="~/images/ProgressBar.gif" runat="server" Height="20px"
Width="20px" />
</div>
</ProgressTemplate>
</asp:UpdateProgress>
</td>
<td>
<asp:TextBox runat="server" ID="txtSearch" Width="20em" OnTextChanged="txtSearch_TextChanged" />&nbsp;
<asp:Button runat="server" ID="btnSearch" OnClick="btnSearch_Click" />
<cc1:TextBoxWatermarkExtender ID="TBWE_search" runat="server" TargetControlID="txtSearch"
WatermarkCssClass="watermarked" />
</td>
</tr>
</table>
</div>
<div style="text-align: center; font-size: 8pt;">
<table cellspacing="0" cellpadding="4" border="0">
<tr>
<td colspan="2">
<td>
<asp:CheckBox runat="server" ID="chkLikeType" OnCheckedChanged="chkLikeType_CheckedChanged"
AutoPostBack="True" />
</td>
</tr>
<td valign="top">
<asp:Panel runat="server" ID="pnlResults">
<h3>
<asp:Label runat="server" ID="lblTipoSearch" />
</h3>
<uc1:mod_showUDC ID="mod_showUDC1" runat="server" />
</asp:Panel>
<asp:Panel runat="server" ID="pnlEmpty" Height="100px">
</asp:Panel>
</td>
<td valign="top">
<asp:Panel runat="server" ID="pnlMethod">
<uc4:mod_execUDC ID="mod_execUDC1" runat="server" />
</asp:Panel>
</td>
<tr>
<td valign="top">
<asp:Panel runat="server" ID="pnlResults">
<b>
<asp:Label runat="server" ID="lblTipoSearch" />
</b>
<div>
<uc1:mod_SearchProvUDC ID="mod_SearchProvUDC1" runat="server" />
</div>
</asp:Panel>
<asp:Panel runat="server" ID="pnlEmpty" Height="100px">
</asp:Panel>
</td>
</tr>
<tr>
<td colspan="2" align="center">
+12 -32
View File
@@ -17,27 +17,9 @@ namespace GMW.WebUserControls
doTraduci();
pnlEmpty.Visible = true;
pnlResults.Visible = false;
pnlMethod.Visible = false;
}
//mod_elencoObj1.eh_selValore += new EventHandler(mod_elencoObj1_eh_selValore);
//mod_elencoObj1.eh_resetSelezione += new EventHandler(mod_elencoObj1_eh_resetSelezione);
}
void mod_elencoObj1_eh_resetSelezione(object sender, EventArgs e)
{
//mod_dettaglioImpieghiObj1.Visible = false;
//mod_elencoObj1.noBorder();
}
void mod_elencoObj1_eh_selValore(object sender, EventArgs e)
{
//if (!mod_dettaglioImpieghiObj1.Visible)
//{
// mod_dettaglioImpieghiObj1.Visible = true;
//}
//mod_dettaglioImpieghiObj1.doUpdate();
//mod_elencoObj1.addBorder();
}
private void doTraduci()
{
@@ -54,15 +36,17 @@ namespace GMW.WebUserControls
{
doSearch();
}
/// <summary>
/// effettua la ricerca
/// </summary>
private void doSearch()
{
// !!! RI FARE!!! - se è tipo like NON HA senso distinguere nel tipo di ricerca, attiva tutti i "search provider"
string testoCercato = txtSearch.Text.Trim();
memLayer.ML.setSessionVal("FullSearchValue", testoCercato, false);
memLayer.ML.setSessionVal("SearchIsLikeBased", chkLikeType.Checked, false);
// !!! RI FARE!!! - se è tipo like NON HA senso distinguere nel tipo di ricerca, attiva tutti i "search provider"
if (testoCercato != "")
{
memLayer.ML.setSessionVal("FullSearchValue", testoCercato, false);
memLayer.ML.setSessionVal("SearchIsLikeBased", chkLikeType.Checked, false);
pnlEmpty.Visible = false;
pnlResults.Visible = true;
// in base al tipo di richiesta determino che risultati visualizzare...
@@ -70,30 +54,26 @@ namespace GMW.WebUserControls
{
case "I":
lblTipoSearch.Text = traduci("RicercaImballi");
mod_showUDC1.Visible = false;
mod_SearchProvUDC1.Visible = false;
break;
case "M":
lblTipoSearch.Text = traduci("RicercaMagazzino");
mod_showUDC1.Visible = false;
mod_SearchProvUDC1.Visible = false;
break;
case "O":
lblTipoSearch.Text = traduci("RicercaOperatore");
mod_showUDC1.Visible = false;
mod_SearchProvUDC1.Visible = false;
break;
case "U":
lblTipoSearch.Text = traduci("RicercaUDC");
mod_showUDC1.Visible = true;
mod_showUDC1.doUpdate();
mod_SearchProvUDC1.Visible = true;
mod_SearchProvUDC1.doSearch();
break;
default:
lblTipoSearch.Text = traduci("RicercaGenerica");
mod_showUDC1.Visible = false;
mod_SearchProvUDC1.Visible = false;
break;
}
//mod_elencoObj1.testoCercato = testoCercato;
pnlMethod.Visible = false;
//mod_elencoObj1.noBorder();
}
else
{
+11 -29
View File
@@ -13,6 +13,15 @@ namespace GMW.WebUserControls {
public partial class mod_searchMag {
/// <summary>
/// updtRicerca control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdateProgress updtRicerca;
/// <summary>
/// txtSearch control.
/// </summary>
@@ -40,15 +49,6 @@ namespace GMW.WebUserControls {
/// </remarks>
protected global::AjaxControlToolkit.TextBoxWatermarkExtender TBWE_search;
/// <summary>
/// updtRicerca control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdateProgress updtRicerca;
/// <summary>
/// chkLikeType control.
/// </summary>
@@ -77,13 +77,13 @@ namespace GMW.WebUserControls {
protected global::System.Web.UI.WebControls.Label lblTipoSearch;
/// <summary>
/// mod_showUDC1 control.
/// mod_SearchProvUDC1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GMW.WebUserControls.mod_showUDC mod_showUDC1;
protected global::GMW.WebUserControls.mod_SearchProvUDC mod_SearchProvUDC1;
/// <summary>
/// pnlEmpty control.
@@ -94,24 +94,6 @@ namespace GMW.WebUserControls {
/// </remarks>
protected global::System.Web.UI.WebControls.Panel pnlEmpty;
/// <summary>
/// pnlMethod 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.Panel pnlMethod;
/// <summary>
/// mod_execUDC1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GMW.WebUserControls.mod_execUDC mod_execUDC1;
/// <summary>
/// mod_metodiNoSearch1 control.
/// </summary>
@@ -1,5 +1,5 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_showUDC.ascx.cs"
Inherits="GMW.WebUserControls.mod_showUDC" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_searchUDC.ascx.cs"
Inherits="GMW.WebUserControls.mod_searchUDC" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
OnSelectedIndexChanged="grView_SelectedIndexChanged" OnDataBound="grView_DataBound"
@@ -7,7 +7,7 @@ using GMW_data;
namespace GMW.WebUserControls
{
public partial class mod_showUDC : SteamWare.ApplicationUserControl
public partial class mod_searchUDC : SteamWare.ApplicationUserControl
{
#region area da NON modificare
@@ -11,7 +11,7 @@
namespace GMW.WebUserControls {
public partial class mod_showUDC {
public partial class mod_searchUDC {
/// <summary>
/// grView control.
Binary file not shown.
Binary file not shown.