completata gestioen filtraggio 2 livelli da etichette...
This commit is contained in:
@@ -162,7 +162,7 @@
|
||||
</site>
|
||||
<site name="ScheMe" id="2">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele\Documents\VisualStudioProjects\ScheMe\ScheMe\ScheMe" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele.STEAMWAREWIN\Documents\VisualStudioProjects\ScheMe\ScheMe\ScheMe" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:64430:localhost" />
|
||||
|
||||
@@ -5,20 +5,29 @@
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||
<div class="ui-grid-a">
|
||||
<div class="ui-block-a">
|
||||
<asp:DropDownList runat="server" ID="ddlFiltroUno">
|
||||
<asp:DropDownList runat="server" ID="ddlFiltUno" DataSourceID="odsFiltUno" DataTextField="label" DataValueField="value" AutoPostBack="True" OnSelectedIndexChanged="ddlFiltUno_SelectedIndexChanged">
|
||||
</asp:DropDownList>
|
||||
<asp:ObjectDataSource runat="server" ID="odsFiltUno"></asp:ObjectDataSource>
|
||||
<asp:ObjectDataSource runat="server" ID="odsFiltUno" OldValuesParameterFormatString="original_{0}" SelectMethod="getByConditio" TypeName="ScheMe_Data.DS_UtilityTableAdapters.v_selLabelTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="hfMainLblCond" DefaultValue="*" Name="conditio" PropertyName="Value" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:HiddenField runat="server" ID="hfMainLblCond" />
|
||||
</div>
|
||||
<div class="ui-block-b">
|
||||
<asp:DropDownList runat="server" ID="ddlFiltroDue">
|
||||
<asp:DropDownList runat="server" ID="ddlFiltDue" DataSourceID="odsFiltDue" DataTextField="label" DataValueField="value" AutoPostBack="True" OnSelectedIndexChanged="ddlFiltDue_SelectedIndexChanged">
|
||||
</asp:DropDownList>
|
||||
<asp:ObjectDataSource runat="server" ID="odsFiltDue"></asp:ObjectDataSource>
|
||||
<asp:ObjectDataSource runat="server" ID="odsFiltDue" OldValuesParameterFormatString="original_{0}" SelectMethod="getByConditio" TypeName="ScheMe_Data.DS_UtilityTableAdapters.v_selLabelTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="ddlFiltUno" DefaultValue="*" Name="conditio" PropertyName="SelectedValue" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-grid-a" style="font-size: 0.8em;">
|
||||
<asp:Button runat="server" ID="btnNew" Text="Nuovo" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-plus" OnClick="btnNew_Click" />
|
||||
<asp:TextBox runat="server" type="search" name="password" ID="txtSearch" value="" placeholder="Ricerca Nominativo" AutoPostBack="true" />
|
||||
<asp:GridView ID="grView" runat="server" DataSourceID="ods" AutoGenerateColumns="False" DataKeyNames="IdxPaziente" CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%" AllowPaging="True" OnSelectedIndexChanged="grView_SelectedIndexChanged" OnRowCommand="grView_RowCommand">
|
||||
<asp:GridView ID="grView" runat="server" DataSourceID="ods" AutoGenerateColumns="False" DataKeyNames="IdxPaziente" CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%" AllowPaging="True" OnSelectedIndexChanged="grView_SelectedIndexChanged" OnRowCommand="grView_RowCommand" PageSize="20">
|
||||
<EditRowStyle BackColor="#2461BF" />
|
||||
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
|
||||
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
|
||||
@@ -99,9 +108,11 @@
|
||||
</Columns>
|
||||
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="getByGruppo" TypeName="ScheMe_Data.DS_ApplicazioneTableAdapters.AnagPazientiTableAdapter" FilterExpression="Cognome LIKE '%{0}%' OR Nome LIKE '%{0}%' OR CodF LIKE '%{0}%' OR Indirizzo LIKE '%{0}%' OR LuogoNascita LIKE '%{0}%' OR RecTel LIKE '%{0}%' OR Medico LIKE '%{0}%' OR Note LIKE '%{0}%' ">
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="getByGruppoFiltri" TypeName="ScheMe_Data.DS_ApplicazioneTableAdapters.AnagPazientiTableAdapter" FilterExpression="Cognome LIKE '%{0}%' OR Nome LIKE '%{0}%' OR CodF LIKE '%{0}%' OR Indirizzo LIKE '%{0}%' OR LuogoNascita LIKE '%{0}%' OR RecTel LIKE '%{0}%' OR Medico LIKE '%{0}%' OR Note LIKE '%{0}%' ">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter Name="Gruppo" SessionField="Gruppo" Type="String" DefaultValue="BG" />
|
||||
<asp:ControlParameter ControlID="ddlFiltUno" DefaultValue="*" Name="FiltroUno" PropertyName="SelectedValue" Type="String" />
|
||||
<asp:ControlParameter ControlID="ddlFiltDue" DefaultValue="*" Name="FiltroDue" PropertyName="SelectedValue" Type="String" />
|
||||
</SelectParameters>
|
||||
<FilterParameters>
|
||||
<asp:ControlParameter ControlID="txtSearch" DefaultValue="*" Type="string" />
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace ScheMe
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
memLayer.ML.emptySessionVal("Paziente");
|
||||
hfMainLblCond.Value = memLayer.ML.AppConf["BaseLabel"];
|
||||
ddlFiltDue.Enabled = false;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -40,13 +42,13 @@ namespace ScheMe
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// recupero dati paziente...
|
||||
int IdxPaziente=0;
|
||||
int IdxPaziente = 0;
|
||||
try
|
||||
{
|
||||
IdxPaziente = Convert.ToInt32(grView.SelectedDataKey["IdxPaziente"]);
|
||||
memLayer.ML.setSessionVal("IdxPaziente", IdxPaziente);
|
||||
DS_Applicazione.AnagPazientiRow riga = DtProxy.man.taAP.getByKey(IdxPaziente)[0];
|
||||
memLayer.ML.setSessionVal("Paziente", string.Format("{0} {1} ({2:dd/MM/yyyy})", riga.Cognome, riga.Nome,riga.DataNasc));
|
||||
memLayer.ML.setSessionVal("Paziente", string.Format("{0} {1} ({2:dd/MM/yyyy})", riga.Cognome, riga.Nome, riga.DataNasc));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
@@ -84,5 +86,24 @@ namespace ScheMe
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected void ddlFiltUno_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// aggiorna seconda DDL DUE --SE valore !="*"
|
||||
ddlFiltDue.Enabled = (ddlFiltUno.SelectedValue != "*");
|
||||
ddlFiltDue.DataBind();
|
||||
updateElencoPazienti();
|
||||
}
|
||||
/// <summary>
|
||||
/// Aggiornamento elenco pazienti
|
||||
/// </summary>
|
||||
private void updateElencoPazienti()
|
||||
{
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
protected void ddlFiltDue_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
updateElencoPazienti();
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+13
-4
@@ -13,13 +13,13 @@ namespace ScheMe {
|
||||
public partial class Accettazione {
|
||||
|
||||
/// <summary>
|
||||
/// ddlFiltroUno control.
|
||||
/// ddlFiltUno 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 ddlFiltroUno;
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddlFiltUno;
|
||||
|
||||
/// <summary>
|
||||
/// odsFiltUno control.
|
||||
@@ -31,13 +31,22 @@ namespace ScheMe {
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource odsFiltUno;
|
||||
|
||||
/// <summary>
|
||||
/// ddlFiltroDue control.
|
||||
/// hfMainLblCond 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 ddlFiltroDue;
|
||||
protected global::System.Web.UI.WebControls.HiddenField hfMainLblCond;
|
||||
|
||||
/// <summary>
|
||||
/// ddlFiltDue 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 ddlFiltDue;
|
||||
|
||||
/// <summary>
|
||||
/// odsFiltDue control.
|
||||
|
||||
Reference in New Issue
Block a user