Completata review commesse UT

This commit is contained in:
Samuele E. Locatelli
2021-01-11 17:43:12 +01:00
parent 89aa3b5d99
commit f01de1a389
14 changed files with 950 additions and 647 deletions
@@ -3,39 +3,49 @@
<%@ Register Src="mod_dateTime.ascx" TagName="mod_dateTime" TagPrefix="uc1" %>
<%@ Register Src="mod_autocomplete.ascx" TagPrefix="uc2" TagName="mod_autocomplete" %>
<asp:Panel runat="server" ID="pnlHeader" class="bg-success text-light text-center py-1 px-2" Style="font-size: 1.8em;">
<asp:Label runat="server" ID="lblTitle" />
<div class="divDx" style="display: block;">
<asp:LinkButton runat="server" ID="lnkNew" CausesValidation="False" ToolTip='<%# traduci("AddNew") %>' OnClick="lnkNew_Click" CssClass="text-warning"><i class="fa fa-plus-square" aria-hidden="true"></i></asp:LinkButton>
<asp:Panel runat="server" ID="pnlHeader" class="row bg-success text-light text-center py-1">
<div class="col-4">
<asp:DropDownList runat="server" ID="ddlGruppo" DataSourceID="odsGruppi" DataTextField="label" AutoPostBack="true" OnSelectedIndexChanged="ddlGruppo_SelectedIndexChanged" DataValueField="value" CssClass="btn btn-secondary btn-sm btn-block" />
<asp:ObjectDataSource runat="server" ID="odsGruppi" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
TypeName="GPW_data.DS_UtilityTableAdapters.v_selGruppiTableAdapter"></asp:ObjectDataSource>
</div>
<div class="col-4">
<asp:Label runat="server" ID="lblSubtitle" CssClass="font-weight-bold textBig"><%: valoreDateTime.ToString("dddd dd") %></asp:Label>
<br />
<asp:Label runat="server" ID="lblTitle"><%: valoreDateTime.ToString("MMMM yyyy") %></asp:Label>
</div>
<div class="col-4">
<asp:LinkButton runat="server" ID="lnkNew" CausesValidation="False" ToolTip='<%# traduci("AddNew") %>' OnClick="lnkNew_Click" CssClass="btn btn-sm btn-block btn-warning"><i class="fa fa-plus" aria-hidden="true"></i></asp:LinkButton>
</div>
</asp:Panel>
<div class="dataBlockReset">
<asp:GridView ID="grView" runat="server" DataSourceID="odsRA" AutoGenerateColumns="False" OnRowDeleted="grView_RowDeleted"
OnRowCommand="grView_RowCommand" DataKeyNames="idxRA" OnRowDataBound="grView_RowDataBound" OnRowEditing="grView_RowEditing"
ShowHeader="false" Width="100%" OnRowUpdated="grView_RowUpdated" CssClass="table table-sm table-striped table-borderless">
<EditRowStyle CssClass="bg-primary" />
<FooterStyle CssClass="bg-warning" />
<RowStyle CssClass="text-light" />
<EmptyDataTemplate>
<div style="background-color: #ACACAC;">
Nessun record COMMESSA
</div>
</EmptyDataTemplate>
<Columns>
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:LinkButton runat="server" ID="lnkClona" CausesValidation="False" CommandArgument='<%# Eval("idxRA") %>' CommandName="Update" ToolTip='<%# traduci("Duplica") %>' Visible='<%# enableFull %>' OnClick="lnkClona_Click" CssClass="btn btn-sm btn-primary"><i class="fa fa-magic fa-2x" aria-hidden="true"></i></asp:LinkButton>
</ItemTemplate>
<EditItemTemplate>
</EditItemTemplate>
<FooterTemplate>
</FooterTemplate>
<HeaderTemplate>
</HeaderTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Record Commesse">
<ItemTemplate>
<asp:LinkButton ID="lnkEdit" runat="server" CausesValidation="False" CommandName="Edit" ToolTip='<%# traduci("Edit") %>' CssClass="noLink" Enabled='<%# enableFull %>'>
<div class="row">
<div class="col-12">
<asp:GridView ID="grView" runat="server" DataSourceID="odsRA" AutoGenerateColumns="False" OnRowDeleted="grView_RowDeleted"
OnRowCommand="grView_RowCommand" DataKeyNames="idxRA" OnRowDataBound="grView_RowDataBound" OnRowEditing="grView_RowEditing"
ShowHeader="false" Width="100%" OnRowUpdated="grView_RowUpdated" CssClass="table table-sm table-striped table-borderless" OnRowCancelingEdit="grView_RowCancelingEdit">
<EditRowStyle CssClass="bg-primary" />
<FooterStyle CssClass="bg-warning" />
<RowStyle CssClass="text-light" />
<EmptyDataTemplate>
<div style="background-color: #ACACAC;">
Nessun record COMMESSA
</div>
</EmptyDataTemplate>
<Columns>
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:LinkButton runat="server" ID="lnkClona" CausesValidation="False" CommandArgument='<%# Eval("idxRA") %>' CommandName="Update" ToolTip='<%# traduci("Duplica") %>' Visible='<%# enableFull %>' OnClick="lnkClona_Click" CssClass="btn btn-sm btn-primary"><i class="fa fa-magic fa-2x" aria-hidden="true"></i></asp:LinkButton>
</ItemTemplate>
<EditItemTemplate>
</EditItemTemplate>
<FooterTemplate>
</FooterTemplate>
<HeaderTemplate>
</HeaderTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Record Commesse">
<ItemTemplate>
<asp:LinkButton ID="lnkEdit" runat="server" CausesValidation="False" CommandName="Edit" ToolTip='<%# traduci("Edit") %>' CssClass="noLink" Enabled='<%# enableFull %>'>
<div class="row mx-0">
<div class="col-9 text-left">
<div class="text-dark">
@@ -56,184 +66,178 @@
</div>
<div class="row mx-0">
<div class="col-12">
<div class="text-secondary" style="font-size:0.9em;">
<div class="text-secondary textCondens">
<%# Eval("descrizione").ToString().Replace(Environment.NewLine,"<br />").Replace("\n","<br />") %>
</div>
</div>
</div>
</asp:LinkButton>
</ItemTemplate>
<EditItemTemplate>
<div class="row text-light">
<div class="col-12 text-left">
<label for="ddlGruppo" class="small">
Gruppo
</label>
<asp:DropDownList runat="server" ID="ddlGruppo" DataSourceID="odsGruppi" DataTextField="label" OnSelectedIndexChanged="ddlGruppo_SelectedIndexChanged" DataValueField="value" SelectedValue='<%# Eval("gruppo") %>' CssClass="btn btn-secondary btn-sm btn-block" />
</div>
<div class="col-8 text-left">
</asp:LinkButton>
</ItemTemplate>
<EditItemTemplate>
<div class="row text-light">
<div class="col-12 text-left">
</div>
<div class="col-8 text-left">
<div>
<label for="ddlProgetto" style="font-size: x-small;">
Progetto
</label>
<asp:DropDownList ID="ddlProgetto" runat="server" DataSourceID="odsProgetto" DataTextField="label" DataValueField="value"
AutoPostBack="True" OnSelectedIndexChanged="ddlProgetto_SelectedIndexChanged" Font-Size="8pt" Width="100%" CssClass="btn btn-dark">
</asp:DropDownList>
<div>
<label for="ddlProgetto" style="font-size: x-small;">
Progetto
</label>
<asp:DropDownList ID="ddlProgetto" runat="server" DataSourceID="odsProgetto" DataTextField="label" DataValueField="value" AutoPostBack="True" OnSelectedIndexChanged="ddlProgetto_SelectedIndexChanged" CssClass="btn btn-dark btn-sm btn-block">
</asp:DropDownList>
</div>
<div class="my-1">
<label for="ddlFase" style="font-size: x-small;">
Fase
</label>
<asp:DropDownList ID="ddlFase" runat="server" DataSourceID="odsFase" DataTextField="label" DataValueField="value" OnDataBound="ddlFase_DataBound" CssClass="btn btn-light btn-sm btn-block">
</asp:DropDownList>
</div>
</div>
<div class="my-1">
<label for="ddlFase" style="font-size: x-small;">
Fase
</label>
<asp:DropDownList ID="ddlFase" runat="server" DataSourceID="odsFase" DataTextField="label" DataValueField="value" Font-Size="8pt"
OnDataBound="ddlFase_DataBound" Width="100%" CssClass="btn btn-light">
</asp:DropDownList>
<div class="col-4 text-right">
<label for="txtSearchFase" style="font-size: x-small;">
<-- Search</label>
<br />
<asp:TextBox runat="server" ID="txtSearchFase" AutoPostBack="true" Width="100%" Font-Size="8pt" OnTextChanged="txtSearchFase_TextChanged" TextMode="MultiLine" />
</div>
</div>
<div class="col-4 text-right">
<label for="txtSearchFase" style="font-size: x-small;">
<-- Search</label>
<br />
<asp:TextBox runat="server" ID="txtSearchFase" AutoPostBack="true" Width="100%" Font-Size="8pt" OnTextChanged="txtSearchFase_TextChanged" TextMode="MultiLine" />
</div>
</div>
<div class="row text-light my-2">
<div class="col-12">
Periodo
</div>
<div class="col-6 text-left">
<uc1:mod_dateTime ID="dtInizio" runat="server" valoreDateTime='<%# Bind("inizio") %>' labelData="Inizio" labelOra="Ora" />
</div>
<div class="col-6 text-right">
<uc1:mod_dateTime ID="dtFine" runat="server" valoreDateTime='<%# Bind("fine") %>' labelData="Fine" labelOra="Ora" />
</div>
</div>
<div class="row text-light my-2">
<div class="col-12">
<label for="txtDescrizione" style="font-size: x-small;">
descrizione
</label>
<asp:TextBox ID="txtDescrizione" runat="server" Text='<%# Bind("descrizione") %>' TextMode="MultiLine" Height="6em" Width="100%" />
</div>
</div>
<div class="row my-2">
<div class="col-6 text-center">
<asp:Button runat="server" ID="btnInsert" Text="Aggiorna" CssClass="btn btn-success btn-block ui-corner-all shadowBox btnNew" CommandName="Update"
CausesValidation="true" />
</div>
<div class="col-6 text-center">
<asp:Button runat="server" ID="btnInsertCancel" Text="Annulla" CssClass="btn btn-danger btn-block ui-corner-all shadowBox btnChiudi" CommandName="Cancel" />
</div>
</div>
</EditItemTemplate>
<FooterTemplate>
<div class="row text-light">
<div class="col-8 text-left">
<div>
<label for="ddlProgetto" style="font-size: x-small;">
Progetto
</label>
<asp:DropDownList ID="ddlProgetto" runat="server" DataSourceID="odsProgetto" DataTextField="label" DataValueField="value"
AutoPostBack="True" OnSelectedIndexChanged="ddlProgetto_SelectedIndexChanged" Font-Size="8pt" Width="100%" CssClass="btn btn-dark">
</asp:DropDownList>
<div class="row text-light my-2">
<div class="col-12">
Periodo
</div>
<div class="my-1">
<label for="ddlFase" style="font-size: x-small;">
Fase
</label>
<asp:DropDownList ID="ddlFase" runat="server" DataSourceID="odsFase" DataTextField="label" DataValueField="value" Font-Size="8pt"
OnDataBound="ddlFase_DataBound" Width="100%" CssClass="btn btn-light">
</asp:DropDownList>
<div class="col-6 text-left">
<uc1:mod_dateTime ID="dtInizio" runat="server" valoreDateTime='<%# Bind("inizio") %>' labelData="Inizio" labelOra="Ora" />
</div>
<div class="col-6 text-right">
<uc1:mod_dateTime ID="dtFine" runat="server" valoreDateTime='<%# Bind("fine") %>' labelData="Fine" labelOra="Ora" />
</div>
</div>
<div class="col-4 text-right">
<label for="txtSearchFase" style="font-size: x-small;">
<-- Search</label>
<br />
<asp:TextBox runat="server" ID="txtSearchFase" AutoPostBack="true" Width="100%" Font-Size="8pt" OnTextChanged="txtSearchFase_TextChanged" TextMode="MultiLine" />
<div class="row text-light my-2">
<div class="col-12">
<label for="txtDescrizione" style="font-size: x-small;">
descrizione
</label>
<asp:TextBox ID="txtDescrizione" runat="server" Text='<%# Bind("descrizione") %>' TextMode="MultiLine" Height="6em" Width="100%" />
</div>
</div>
</div>
<div class="row text-light my-2">
<div class="col-12">
Periodo
<div class="row my-2">
<div class="col-6 text-center">
<asp:Button runat="server" ID="btnInsert" Text="Aggiorna" CssClass="btn btn-success btn-block ui-corner-all shadowBox btnNew" CommandName="Update"
CausesValidation="true" />
</div>
<div class="col-6 text-center">
<asp:Button runat="server" ID="btnInsertCancel" Text="Annulla" CssClass="btn btn-danger btn-block ui-corner-all shadowBox btnChiudi" CommandName="Cancel" />
</div>
</div>
<div class="col-6 text-left">
<uc1:mod_dateTime ID="dtInizio" runat="server" valoreDateTime='<%# Bind("inizio") %>' labelData="Inizio" labelOra="Ora" />
</EditItemTemplate>
<FooterTemplate>
<div class="row text-light">
<div class="col-8 text-left">
<div>
<label for="ddlProgetto" style="font-size: x-small;">
Progetto
</label>
<asp:DropDownList ID="ddlProgetto" runat="server" DataSourceID="odsProgetto" DataTextField="label" DataValueField="value"
AutoPostBack="True" OnSelectedIndexChanged="ddlProgetto_SelectedIndexChanged" Font-Size="8pt" Width="100%" CssClass="btn btn-dark">
</asp:DropDownList>
</div>
<div class="my-1">
<label for="ddlFase" style="font-size: x-small;">
Fase
</label>
<asp:DropDownList ID="ddlFase" runat="server" DataSourceID="odsFase" DataTextField="label" DataValueField="value" Font-Size="8pt"
OnDataBound="ddlFase_DataBound" Width="100%" CssClass="btn btn-light">
</asp:DropDownList>
</div>
</div>
<div class="col-4 text-right">
<label for="txtSearchFase" style="font-size: x-small;">
<-- Search</label>
<br />
<asp:TextBox runat="server" ID="txtSearchFase" AutoPostBack="true" Width="100%" Font-Size="8pt" OnTextChanged="txtSearchFase_TextChanged" TextMode="MultiLine" />
</div>
</div>
<div class="col-6 text-right">
<uc1:mod_dateTime ID="dtFine" runat="server" valoreDateTime='<%# Bind("fine") %>' labelData="Fine" labelOra="Ora" />
<div class="row text-light my-2">
<div class="col-12">
Periodo
</div>
<div class="col-6 text-left">
<uc1:mod_dateTime ID="dtInizio" runat="server" valoreDateTime='<%# Bind("inizio") %>' labelData="Inizio" labelOra="Ora" />
</div>
<div class="col-6 text-right">
<uc1:mod_dateTime ID="dtFine" runat="server" valoreDateTime='<%# Bind("fine") %>' labelData="Fine" labelOra="Ora" />
</div>
</div>
</div>
<div class="row text-light my-2">
<div class="col-12">
<label for="txtDescrizione" style="font-size: x-small;">
descrizione
</label>
<asp:TextBox ID="txtDescrizione" runat="server" Text='<%# Bind("descrizione") %>' TextMode="MultiLine" Height="6em" Width="100%" />
<div class="row text-light my-2">
<div class="col-12">
<label for="txtDescrizione" style="font-size: x-small;">
descrizione
</label>
<asp:TextBox ID="txtDescrizione" runat="server" Text='<%# Bind("descrizione") %>' TextMode="MultiLine" Height="6em" Width="100%" />
</div>
</div>
</div>
<div class="row my-2">
<div class="col-6 text-center">
<asp:Button runat="server" ID="btnInsert" Text="Salva" CssClass="btn btn-success btn-block ui-corner-all shadowBox btnNew" CommandName="Insert"
CausesValidation="true" />
<div class="row my-2">
<div class="col-6 text-center">
<asp:Button runat="server" ID="btnInsert" Text="Salva" CssClass="btn btn-success btn-block ui-corner-all shadowBox btnNew" CommandName="Insert"
CausesValidation="true" />
</div>
<div class="col-6 text-center">
<asp:Button runat="server" ID="btnInsertCancel" Text="Annulla" CssClass="btn btn-danger btn-block ui-corner-all shadowBox btnChiudi" CommandName="Cancel" />
</div>
</div>
<div class="col-6 text-center">
<asp:Button runat="server" ID="btnInsertCancel" Text="Annulla" CssClass="btn btn-danger btn-block ui-corner-all shadowBox btnChiudi" CommandName="Cancel" />
</div>
</div>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:LinkButton runat="server" ID="lnkDelete" CausesValidation="False" CommandArgument='<%# Eval("idxRA") %>' CommandName="Delete" ToolTip='<%# traduci("Delete") %>' Visible='<%# enableFull %>' CssClass="btn btn-sm btn-danger"><i class="fa fa-trash fa-2x" aria-hidden="true"></i></asp:LinkButton><asp:ConfirmButtonExtender ID="cbeLnk" runat="server" ConfirmText='<%# traduci("confermaDel")%>' TargetControlID="lnkDelete"></asp:ConfirmButtonExtender>
</ItemTemplate>
<EditItemTemplate>
</EditItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="odsRA" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="GetData" TypeName="GPW_data.DS_ApplicazioneTableAdapters.regAttDayExplTableAdapter"
DeleteMethod="deleteQuery" InsertMethod="insertQuery" OnInserted="odsRA_Inserted" UpdateMethod="updateQuery" OnUpdating="odsRA_Updating">
<DeleteParameters>
<asp:Parameter Name="Original_idxRA" Type="Int32" />
</DeleteParameters>
<SelectParameters>
<asp:SessionParameter Name="idxDipendente" SessionField="idxDipCurr" Type="Int32" />
<asp:SessionParameter Name="dataRif" SessionField="dataRif" Type="DateTime" />
</SelectParameters>
<InsertParameters>
<asp:SessionParameter DefaultValue="0" Name="idxDipendente" SessionField="idxDipendente" Type="Int32" />
<asp:Parameter Name="idxFase" Type="Int32" />
<asp:Parameter Name="inizio" Type="DateTime" />
<asp:Parameter Name="fine" Type="DateTime" />
<asp:Parameter Name="descrizione" Type="String" />
<asp:Parameter Name="importo" Type="Decimal" DefaultValue="0" />
</InsertParameters>
<UpdateParameters>
<asp:SessionParameter DefaultValue="0" Name="idxDipendente" SessionField="idxDipendente" Type="Int32" />
<asp:Parameter Name="idxFase" Type="Int32" />
<asp:Parameter Name="inizio" Type="DateTime" />
<asp:Parameter Name="fine" Type="DateTime" />
<asp:Parameter Name="descrizione" Type="String" />
<asp:Parameter Name="importo" Type="Decimal" DefaultValue="0" />
<asp:Parameter Name="Original_idxRA" Type="Int32" />
</UpdateParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="odsProgetto" runat="server" SelectMethod="getByConditio" TypeName="GPW_data.DS_UtilityTableAdapters.v_selProgettiTableAdapter">
<SelectParameters>
<asp:SessionParameter SessionField="gruppoSel" DefaultValue="" Name="conditio" Type="String" />
<asp:Parameter DefaultValue="true" Name="soloAttivi" Type="Boolean" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="odsFase" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByConditio"
TypeName="GPW_data.DS_UtilityTableAdapters.v_selFasiOptTableAdapter">
<SelectParameters>
<asp:SessionParameter SessionField="idxProjSel" DefaultValue="0" Name="conditio" Type="Int32" />
<asp:Parameter DefaultValue="false" Name="soloAttivi" Type="Boolean" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource runat="server" ID="odsGruppi" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
TypeName="GPW_data.DS_UtilityTableAdapters.v_selGruppiTableAdapter"></asp:ObjectDataSource>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:LinkButton runat="server" ID="lnkDelete" CausesValidation="False" CommandArgument='<%# Eval("idxRA") %>' CommandName="Delete" ToolTip='<%# traduci("Delete") %>' Visible='<%# enableFull %>' CssClass="btn btn-sm btn-danger"><i class="fa fa-trash fa-2x" aria-hidden="true"></i></asp:LinkButton><asp:ConfirmButtonExtender ID="cbeLnk" runat="server" ConfirmText='<%# traduci("confermaDel")%>' TargetControlID="lnkDelete"></asp:ConfirmButtonExtender>
</ItemTemplate>
<EditItemTemplate>
</EditItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="odsRA" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="GetData" TypeName="GPW_data.DS_ApplicazioneTableAdapters.regAttDayExplTableAdapter"
DeleteMethod="deleteQuery" InsertMethod="insertQuery" OnInserted="odsRA_Inserted" UpdateMethod="updateQuery" OnUpdating="odsRA_Updating">
<DeleteParameters>
<asp:Parameter Name="Original_idxRA" Type="Int32" />
</DeleteParameters>
<SelectParameters>
<asp:SessionParameter Name="idxDipendente" SessionField="idxDipCurr" Type="Int32" />
<asp:SessionParameter Name="dataRif" SessionField="dataRif" Type="DateTime" />
</SelectParameters>
<InsertParameters>
<asp:SessionParameter DefaultValue="0" Name="idxDipendente" SessionField="idxDipendente" Type="Int32" />
<asp:Parameter Name="idxFase" Type="Int32" />
<asp:Parameter Name="inizio" Type="DateTime" />
<asp:Parameter Name="fine" Type="DateTime" />
<asp:Parameter Name="descrizione" Type="String" />
<asp:Parameter Name="importo" Type="Decimal" DefaultValue="0" />
</InsertParameters>
<UpdateParameters>
<asp:SessionParameter DefaultValue="0" Name="idxDipendente" SessionField="idxDipendente" Type="Int32" />
<asp:Parameter Name="idxFase" Type="Int32" />
<asp:Parameter Name="inizio" Type="DateTime" />
<asp:Parameter Name="fine" Type="DateTime" />
<asp:Parameter Name="descrizione" Type="String" />
<asp:Parameter Name="importo" Type="Decimal" DefaultValue="0" />
<asp:Parameter Name="Original_idxRA" Type="Int32" />
</UpdateParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="odsProgetto" runat="server" SelectMethod="getByGruppo" TypeName="GPW_data.DS_UtilityTableAdapters.v_selProgettiTableAdapter">
<SelectParameters>
<asp:SessionParameter SessionField="gruppoSel" DefaultValue="" Name="gruppo" Type="String" />
<%--<asp:ControlParameter ControlID="ddlGruppo" DefaultValue="" Name="gruppo" Type="String" />--%>
<asp:Parameter DefaultValue="true" Name="soloAttivi" Type="Boolean" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="odsFase" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByConditio"
TypeName="GPW_data.DS_UtilityTableAdapters.v_selFasiOptTableAdapter">
<SelectParameters>
<asp:SessionParameter SessionField="idxProjSel" DefaultValue="0" Name="conditio" Type="Int32" />
<asp:Parameter DefaultValue="false" Name="soloAttivi" Type="Boolean" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
</div>
@@ -176,7 +176,8 @@ namespace GPW_Commesse.WebUserControls
set
{
memLayer.ML.setSessionVal("dataRif", value);
lblTitle.Text = string.Format("{0:dddd dd/MM/yyyy}", value);
lblTitle.Text = string.Format("{0:dd/MM/yyyy}", value);
lblSubtitle.Text = string.Format("{0:dddd}", value);
}
}
@@ -329,15 +330,18 @@ namespace GPW_Commesse.WebUserControls
while (li != null)
{
li = ddlFase_int.Items.FindByValue("0");
try
if (li != null)
{
li.Attributes.Add("style", "color:gray;");
li.Attributes.Add("disabled", "true");
li.Value = "-1";
li.Text = string.Format("[ {0} ]", li.Text);
try
{
li.Attributes.Add("style", "color:gray;");
li.Attributes.Add("disabled", "true");
li.Value = "-1";
li.Text = string.Format("[ {0} ]", li.Text);
}
catch
{ }
}
catch
{ }
}
try
{
@@ -356,8 +360,6 @@ namespace GPW_Commesse.WebUserControls
// salvo in session idxProjSel!
DropDownList ddlGrp_int = (DropDownList)sender;
gruppoSel = ddlGrp_int.SelectedValue;
// ricarico dati progetto
odsProgetto.DataBind();
// se in insert salvo orari e testo...
DateTime inizio = DateTime.Now;
DateTime fine = DateTime.Now;
@@ -376,7 +378,6 @@ namespace GPW_Commesse.WebUserControls
fine = ((mod_dateTime)grView.Rows[idx].FindControl("dtFine")).valoreDateTime;
descr = ((TextBox)grView.Rows[idx].FindControl("txtDescrizione")).Text;
}
refreshControlli();
// se in insert riporto orari e testo...
if (stato == statoControllo.insert)
{
@@ -385,8 +386,13 @@ namespace GPW_Commesse.WebUserControls
((TextBox)grView.FooterRow.FindControl("txtDescrizione")).Text = descr;
try
{
DropDownList ddlProj_int = (DropDownList)grView.FooterRow.FindControl("ddlProgetto");
ddlProj_int.SelectedIndex = 0;
ddlProj_int.DataBind();
idxProjSel = Convert.ToInt32(ddlProj_int.SelectedValue);
DropDownList ddlFase_int = (DropDownList)grView.FooterRow.FindControl("ddlFase");
ddlFase_int.SelectedIndex = 1;
ddlFase_int.DataBind();
}
catch
{ }
@@ -400,10 +406,15 @@ namespace GPW_Commesse.WebUserControls
((TextBox)grView.Rows[idx].FindControl("txtDescrizione")).Text = descr;
try
{
DropDownList ddlProj_int = (DropDownList)grView.Rows[idx].FindControl("ddlProgetto");
ddlProj_int.SelectedIndex = 0;
ddlProj_int.DataBind();
idxProjSel = Convert.ToInt32(ddlProj_int.SelectedValue);
DropDownList ddlFase_int = (DropDownList)grView.Rows[idx].FindControl("ddlFase");
ddlFase_int.SelectedIndex = 1;
ddlFase_int.DataBind();
}
catch
catch (Exception exc)
{ }
}
}
@@ -496,6 +507,11 @@ namespace GPW_Commesse.WebUserControls
DataProxy.DP.taRA.Insert(idxDip, idxFase, inizio, fine, descr, 0);
}
protected void grView_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
ddlGruppo.Visible = false;
}
/// <summary>
/// generico comando riga
/// </summary>
@@ -530,24 +546,29 @@ namespace GPW_Commesse.WebUserControls
{
// controllo la riga
GridViewRow riga = e.Row;
if (grView.EditIndex >= 0 || grView.ShowFooter)
if ((grView.EditIndex >= 0 && riga.RowIndex == grView.EditIndex) || grView.ShowFooter)
{
try
//pre-seleziono idx progetto x ods fase...
DropDownList ddlProj_int = (DropDownList)riga.FindControl("ddlProgetto");
if (idxProjSel >= 0 && (ddlProj_int != null))
{
//pre-seleziono idx progetto x ods fase...
DropDownList ddlProj_int = (DropDownList)riga.FindControl("ddlProgetto");
if (idxProjSel >= 0 && (ddlProj_int != null))
try
{
ddlProj_int.SelectedValue = idxProjSel.ToString();
}
DropDownList ddlFase_int = (DropDownList)riga.FindControl("ddlFase");
if (idxFaseSel >= 0 && (ddlFase_int != null))
catch
{ }
}
DropDownList ddlFase_int = (DropDownList)riga.FindControl("ddlFase");
if (idxFaseSel >= 0 && (ddlFase_int != null))
{
try
{
ddlFase_int.SelectedValue = idxFaseSel.ToString();
}
catch
{ }
}
catch
{ }
}
}
@@ -559,6 +580,7 @@ namespace GPW_Commesse.WebUserControls
protected void grView_RowDeleted(object sender, GridViewDeletedEventArgs e)
{
updateControl();
ddlGruppo.Visible = false;
}
/// <summary>
@@ -571,8 +593,16 @@ namespace GPW_Commesse.WebUserControls
grView.SelectedIndex = e.NewEditIndex;
int idxRASel = Convert.ToInt32(grView.SelectedDataKey["idxRA"]);
// salvo in sessione valori selezionati
idxFaseSel = DataProxy.DP.taRA.getByKey(idxRASel)[0].idxFase;
idxProjSel = idxPrjByFase(idxFaseSel);
var tabRAD = DataProxy.DP.taRAExpl.getByKey(idxRASel);
if (tabRAD.Rows.Count > 0)
{
idxFaseSel = tabRAD[0].idxFase;
idxProjSel = tabRAD[0].idxProgetto;
// imposto gruppo
ddlGruppo.Visible = true;
ddlGruppo.SelectedValue = tabRAD[0].gruppo;
gruppoSel = tabRAD[0].gruppo;
}
}
/// <summary>
@@ -583,6 +613,7 @@ namespace GPW_Commesse.WebUserControls
protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
{
updateControl();
ddlGruppo.Visible = false;
}
protected void lnkClona_Click(object sender, EventArgs e)
@@ -607,6 +638,7 @@ namespace GPW_Commesse.WebUserControls
/// <param name="e"></param>
protected void lnkNew_Click(object sender, EventArgs e)
{
ddlGruppo.Visible = true;
createNew();
}
@@ -638,7 +670,9 @@ namespace GPW_Commesse.WebUserControls
{
refreshControlli();
pnlHeader.Visible = enableFull;
lblTitle.Text = string.Format("{0:dddd dd/MM/yyyy}", valoreDateTime);
lblTitle.Text = string.Format("{0:dd/MM/yyyy}", valoreDateTime);
lblSubtitle.Text = string.Format("{0:dddd}", valoreDateTime);
ddlGruppo.Visible = false;
}
}
@@ -23,6 +23,33 @@ namespace GPW_Commesse.WebUserControls
/// </remarks>
protected global::System.Web.UI.WebControls.Panel pnlHeader;
/// <summary>
/// Controllo ddlGruppo.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlGruppo;
/// <summary>
/// Controllo odsGruppi.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource odsGruppi;
/// <summary>
/// Controllo lblSubtitle.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblSubtitle;
/// <summary>
/// Controllo lblTitle.
/// </summary>
@@ -76,14 +103,5 @@ namespace GPW_Commesse.WebUserControls
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource odsFase;
/// <summary>
/// Controllo odsGruppi.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource odsGruppi;
}
}
@@ -115,8 +115,8 @@
</div>
</HeaderTemplate>
<ItemTemplate>
<div class="text-right">
<asp:Label ID="Label1" runat="server" Text='<%# Eval("Progetti") %>' CssClass='<%# cssClassProgetti %>' Style="max-width: 20em;" />
<div class="text-right textCondens">
<asp:Label ID="Label1" runat="server" Text='<%# Eval("Progetti") %>' CssClass='<%# cssClassProgetti %>' Style="max-width: 20em;" ToolTip='<%# Eval("Progetti") %>' />
</div>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" />
@@ -10,348 +10,395 @@ using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using SteamWare;
public partial class mod_periodoAnalisi : System.Web.UI.UserControl
{
#region area protected
#region Protected Fields
protected intervalloDate _intervallo;
protected intervalloDate _intervallo;
public string uid
{
get
#endregion Protected Fields
#region Public Events
public event EventHandler eh_doUpdate;
#endregion Public Events
#region Protected Properties
/// <summary>
/// definisce se sia da mostrare il selettore delle ore nel controllo
/// </summary>
protected bool mostraSelOra
{
return this.UniqueID.Replace("$", "_").Replace("-", "_");
get
{
bool answ = false;
if (memLayer.ML.isInSessionObject("mostraSelOra"))
{
answ = memLayer.ML.BoolSessionObj("mostraSelOra");
}
else
{
// leggo da sessione e salvo...
try
{
answ = memLayer.ML.confReadBool("mostraSelOra");
}
catch
{ }
memLayer.ML.setSessionVal("mostraSelOra", answ);
}
return answ;
}
}
}
/// <summary>
/// avvio componente
/// </summary>
/// <param name="e"></param>
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
setIntervallo();
setDurataMin();
}
/// <summary>
/// definisce se sia da mostrare il selettore delle ore nel controllo
/// </summary>
protected bool mostraSelOra
{
get
#endregion Protected Properties
#region Public Properties
public intervalloDate intervalloAnalisi
{
bool answ = false;
if (memLayer.ML.isInSessionObject("mostraSelOra"))
{
answ = memLayer.ML.BoolSessionObj("mostraSelOra");
}
else
{
// leggo da sessione e salvo...
get
{
intervalloDate answ = new intervalloDate();
if (memLayer.ML.isInSessionObject("_intervallo"))
{
answ = (intervalloDate)Session["_intervallo"];
}
return answ;
}
set
{
intervalloDate interv = value;
Session["_intervallo"] = interv;
Session["_inizio"] = interv.inizio;
Session["_fine"] = interv.fine;
aggiornaDateMostrate(false);
}
}
/// <summary>
/// imposta realtime update (non mostra button am fa subito update)
/// </summary>
public bool realtimeUpdate
{
get
{
return memLayer.ML.BoolSessionObj("rltUpdatePeriodo");
}
set
{
memLayer.ML.setSessionVal("rltUpdatePeriodo", value);
}
}
public string uid
{
get
{
return this.UniqueID.Replace("$", "_").Replace("-", "_");
}
}
#endregion Public Properties
#region Private Methods
/// <summary>
/// effettua update delle date mostrate da intervallo analisi (ed eventualmente riporta update...)
/// </summary>
/// <param name="doReportUpdate"></param>
private void aggiornaDateMostrate(bool doReportUpdate)
{
scriviDate();
if (doReportUpdate)
{
reportUpdate();
}
}
private void aggiornaPeriodo()
{
_intervallo = new intervalloDate();
// calcolo tempi arrotondati
int oraInizio = 0;
int oraFine = 0;
if (mostraSelOra)
{
oraInizio = Convert.ToInt32(ddlOraInizio.SelectedValue);
oraFine = Convert.ToInt32(ddlOraFine.SelectedValue);
}
_intervallo.inizio = Convert.ToDateTime(txtInizio.Text).AddHours(oraInizio);
_intervallo.fine = Convert.ToDateTime(txtFine.Text).AddHours(oraFine);
verificaCoerenzaDate();
int _durataMin;
_durataMin = Convert.ToInt32(txtDurataMin.Text);
Session["_durataMin"] = _durataMin;
reportUpdate();
}
/// <summary>
/// controlla se aggiornare subito o mostrare update (a seconda del valore di realtime update...)
/// </summary>
private void checkIfUpdate()
{
// se richiesto realtime
if (realtimeUpdate)
{
aggiornaPeriodo();
// nascondo btn update
btnUpdate.Visible = false;
}
else
{
// altrimenti mostro btn update
btnUpdate.Visible = true;
}
}
/// <summary>
/// scrive nuove date in controllo
/// </summary>
private void scriviDate()
{
// se intervallo non è valorizzato leggo da sessione...
if (!_intervallo.isValid)
{
_intervallo = intervalloAnalisi;
}
txtInizio.Text = _intervallo.inizio.ToShortDateString();
ddlOraInizio.SelectedValue = _intervallo.inizio.Hour.ToString("00");
txtFine.Text = _intervallo.fine.ToShortDateString();
ddlOraFine.SelectedValue = _intervallo.fine.Hour.ToString("00");
if (mostraSelOra)
{
ddlOraInizio.Visible = true;
ddlOraFine.Visible = true;
}
else
{
ddlOraInizio.Visible = false;
ddlOraFine.Visible = false;
}
}
/// <summary>
/// imposta durata minima
/// </summary>
private void setDurataMin()
{
int _durataMin = 0;
try
{
answ = memLayer.ML.confReadBool("mostraSelOra");
if (memLayer.ML.isInSessionObject("_intervallo"))
{
_durataMin = memLayer.ML.IntSessionObj("_durataMin");
}
}
catch
{ }
memLayer.ML.setSessionVal("mostraSelOra", answ);
}
return answ;
{
_durataMin = 0;
Session["_durataMin"] = _durataMin;
}
txtDurataMin.Text = _durataMin.ToString();
}
}
/// <summary>
/// gestione del selettore rapido dell'intervallo temporale...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
// verifico cosa sia cambiato ed imposto date...
datario _datario = new datario();
switch (DropDownList1.SelectedValue)
/// <summary>
/// imposta intervallo da sessione o di default
/// </summary>
private void setIntervallo()
{
case "oggi":
_intervallo = _datario.giornata(DateTime.Now);
break;
case "ieri":
_intervallo = _datario.giornata(DateTime.Now.AddDays(-1));
break;
case "ultimi 7gg":
_intervallo = _datario.ultimiGiorni(DateTime.Now, 7);
break;
case "questa settimana":
_intervallo = _datario.questaSett(DateTime.Now);
break;
case "ultimi 30gg":
_intervallo = _datario.ultimiGiorni(DateTime.Now, 30);
break;
case "questo mese":
_intervallo = _datario.questoMese(DateTime.Now);
break;
case "mese precedente":
_intervallo = _datario.mesePrecedente(DateTime.Now);
break;
case "questo anno":
_intervallo = _datario.estremiAnno(DateTime.Now);
break;
case "1 anno":
_intervallo = _datario.ultimiGiorni(DateTime.Now, 366);
break;
default:
break;
intervalloDate _intervallo;
try
{
if (memLayer.ML.isInSessionObject("_intervallo"))
{
_intervallo = (intervalloDate)Session["_intervallo"];
}
}
catch
{
_intervallo = new intervalloDate();
_intervallo.inizio = DateTime.Now.AddDays(memLayer.ML.confReadInt("defDayFrom"));
_intervallo.fine = DateTime.Now.AddDays(1);
Session["_intervallo"] = _intervallo;
Session["_inizio"] = _intervallo.inizio;
Session["_fine"] = _intervallo.fine;
}
scriviDate();
}
if ((intervalloAnalisi.inizio != _intervallo.inizio) || (intervalloAnalisi.fine != _intervallo.fine))
{
verificaCoerenzaDate();
aggiornaDateMostrate(realtimeUpdate);
// mostro btn update
btnUpdate.Visible = !realtimeUpdate;
}
}
/// <summary>
/// effettua update delle date mostrate da intervallo analisi (ed eventualmente riporta update...)
/// </summary>
/// <param name="doReportUpdate"></param>
private void aggiornaDateMostrate(bool doReportUpdate)
{
scriviDate();
if (doReportUpdate)
{
reportUpdate();
}
}
/// <summary>
/// scrive nuove date in controllo
/// </summary>
private void scriviDate()
{
// se intervallo non è valorizzato leggo da sessione...
if (!_intervallo.isValid)
{
_intervallo = intervalloAnalisi;
}
txtInizio.Text = _intervallo.inizio.ToShortDateString();
ddlOraInizio.SelectedValue = _intervallo.inizio.Hour.ToString("00");
txtFine.Text = _intervallo.fine.ToShortDateString();
ddlOraFine.SelectedValue = _intervallo.fine.Hour.ToString("00");
if (mostraSelOra)
{
ddlOraInizio.Visible = true;
ddlOraFine.Visible = true;
}
else
{
ddlOraInizio.Visible = false;
ddlOraFine.Visible = false;
}
}
/// <summary>
/// imposta intervallo da sessione o di default
/// </summary>
private void setIntervallo()
{
intervalloDate _intervallo;
try
{
_intervallo = (intervalloDate)Session["_intervallo"];
}
catch
{
_intervallo = new intervalloDate();
_intervallo.inizio = DateTime.Now.AddDays(memLayer.ML.confReadInt("defDayFrom"));
_intervallo.fine = DateTime.Now.AddDays(1);
Session["_intervallo"] = _intervallo;
Session["_inizio"] = _intervallo.inizio;
Session["_fine"] = _intervallo.fine;
}
scriviDate();
}
/// <summary>
/// imposta durata minima
/// </summary>
private void setDurataMin()
{
int _durataMin;
try
{
_durataMin = (int)Session["_durataMin"];
}
catch
{
_durataMin = 0;
Session["_durataMin"] = _durataMin;
}
txtDurataMin.Text = _durataMin.ToString();
}
protected void Page_Load(object sender, EventArgs e)
{
lblPeriodo.Text = "Periodo";
txtInizio.ToolTip = "inizio periodo di riferimento per i dati mostrati";
txtFine.ToolTip = "fine periodo di riferimento per i dati mostrati";
lblDurataMin.Text = "Visualizza eventi con durata superiore a";
}
private void aggiornaPeriodo()
{
_intervallo = new intervalloDate();
// calcolo tempi arrotondati
int oraInizio = 0;
int oraFine = 0;
if (mostraSelOra)
/// <summary>
/// verifica che le date dell'intervallo siano coerenti (inizio < fine)
/// </summary>
private void verificaCoerenzaDate()
{
oraInizio = Convert.ToInt32(ddlOraInizio.SelectedValue);
oraFine = Convert.ToInt32(ddlOraFine.SelectedValue);
// controllo date siano coerenti (fine > inizio)...
if (_intervallo.inizio >= _intervallo.fine)
{
// controllo non siano date successive ad oggi...
if (_intervallo.fine > DateTime.Now)
{
_intervallo.fine = DateTime.Now;
}
_intervallo.fine = _intervallo.inizio.AddDays(1);
}
//intervalloAnalisi = _intervallo;
aggiornaDateMostrate(false);
}
_intervallo.inizio = Convert.ToDateTime(txtInizio.Text).AddHours(oraInizio);
_intervallo.fine = Convert.ToDateTime(txtFine.Text).AddHours(oraFine);
verificaCoerenzaDate();
int _durataMin;
_durataMin = Convert.ToInt32(txtDurataMin.Text);
Session["_durataMin"] = _durataMin;
reportUpdate();
}
/// <summary>
/// verifica che le date dell'intervallo siano coerenti (inizio < fine)
/// </summary>
private void verificaCoerenzaDate()
{
// controllo date siano coerenti (fine > inizio)...
if (_intervallo.inizio >= _intervallo.fine)
#endregion Private Methods
#region Protected Methods
/// <summary>
/// in questo caso faccio udpate periodo mostrato
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnUpdate_Click(object sender, EventArgs e)
{
// controllo non siano date successive ad oggi...
if (_intervallo.fine > DateTime.Now)
{
_intervallo.fine = DateTime.Now;
}
_intervallo.fine = _intervallo.inizio.AddDays(1);
aggiornaPeriodo();
// nascondo btn update
btnUpdate.Visible = false;
}
//intervalloAnalisi = _intervallo;
aggiornaDateMostrate(false);
}
/// <summary>
/// evento cambio testo data inizio
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtInizio_TextChanged(object sender, EventArgs e)
{
// imposto il selettore a discesa...
setPeriodoFree();
checkIfUpdate();
}
/// <summary>
/// evento cambio testo data fine
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtFine_TextChanged(object sender, EventArgs e)
{
// imposto il selettore a discesa...
setPeriodoFree();
checkIfUpdate();
}
/// <summary>
/// controlla se aggiornare subito o mostrare update (a seconda del valore di realtime update...)
/// </summary>
private void checkIfUpdate()
{
// se richiesto realtime
if (realtimeUpdate)
/// <summary>
/// gestione del selettore rapido dell'intervallo temporale...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
aggiornaPeriodo();
// nascondo btn update
btnUpdate.Visible = false;
// verifico cosa sia cambiato ed imposto date...
datario _datario = new datario();
switch (DropDownList1.SelectedValue)
{
case "oggi":
_intervallo = _datario.giornata(DateTime.Now);
break;
case "ieri":
_intervallo = _datario.giornata(DateTime.Now.AddDays(-1));
break;
case "ultimi 7gg":
_intervallo = _datario.ultimiGiorni(DateTime.Now, 7);
break;
case "questa settimana":
_intervallo = _datario.questaSett(DateTime.Now);
break;
case "ultimi 30gg":
_intervallo = _datario.ultimiGiorni(DateTime.Now, 30);
break;
case "questo mese":
_intervallo = _datario.questoMese(DateTime.Now);
break;
case "mese precedente":
_intervallo = _datario.mesePrecedente(DateTime.Now);
break;
case "questo anno":
_intervallo = _datario.estremiAnno(DateTime.Now);
break;
case "1 anno":
_intervallo = _datario.ultimiGiorni(DateTime.Now, 366);
break;
default:
break;
}
if ((intervalloAnalisi.inizio != _intervallo.inizio) || (intervalloAnalisi.fine != _intervallo.fine))
{
verificaCoerenzaDate();
aggiornaDateMostrate(realtimeUpdate);
// mostro btn update
btnUpdate.Visible = !realtimeUpdate;
}
}
else
/// <summary>
/// avvio componente
/// </summary>
/// <param name="e"></param>
protected override void OnInit(EventArgs e)
{
// altrimenti mostro btn update
btnUpdate.Visible = true;
base.OnInit(e);
setIntervallo();
setDurataMin();
}
}
/// <summary>
/// in questo caso faccio udpate periodo mostrato
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnUpdate_Click(object sender, EventArgs e)
{
aggiornaPeriodo();
// nascondo btn update
btnUpdate.Visible = false;
}
/// <summary>
/// riporta aggiornamento a controller
/// </summary>
protected void reportUpdate()
{
intervalloAnalisi = _intervallo;
// alzo l'evento d update/inserimento e ricarico cache...
if (eh_doUpdate != null)
protected void Page_Load(object sender, EventArgs e)
{
eh_doUpdate(this, new EventArgs());
lblPeriodo.Text = "Periodo";
txtInizio.ToolTip = "inizio periodo di riferimento per i dati mostrati";
txtFine.ToolTip = "fine periodo di riferimento per i dati mostrati";
lblDurataMin.Text = "Visualizza eventi con durata superiore a";
}
}
#endregion
#region area public
public intervalloDate intervalloAnalisi
{
get
/// <summary>
/// riporta aggiornamento a controller
/// </summary>
protected void reportUpdate()
{
return (intervalloDate)Session["_intervallo"];
intervalloAnalisi = _intervallo;
// alzo l'evento d update/inserimento e ricarico cache...
if (eh_doUpdate != null)
{
eh_doUpdate(this, new EventArgs());
}
}
set
/// <summary>
/// evento cambio testo data fine
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtFine_TextChanged(object sender, EventArgs e)
{
intervalloDate interv = value;
Session["_intervallo"] = interv;
Session["_inizio"] = interv.inizio;
Session["_fine"] = interv.fine;
aggiornaDateMostrate(false);
// imposto il selettore a discesa...
setPeriodoFree();
checkIfUpdate();
}
}
/// <summary>
/// effettua update
/// </summary>
/// <param name="doReportUpdate"></param>
public void doUpdate(bool doReportUpdate)
{
aggiornaDateMostrate(doReportUpdate);
}
/// <summary>
/// imposta periodo libero di selezione
/// </summary>
public void setPeriodoFree()
{
DropDownList1.SelectedIndex = 0;
}
/// <summary>
/// imposta realtime update (non mostra button am fa subito update)
/// </summary>
public bool realtimeUpdate
{
get
/// <summary>
/// evento cambio testo data inizio
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtInizio_TextChanged(object sender, EventArgs e)
{
return memLayer.ML.BoolSessionObj("rltUpdatePeriodo");
// imposto il selettore a discesa...
setPeriodoFree();
checkIfUpdate();
}
set
#endregion Protected Methods
#region Public Methods
/// <summary>
/// effettua update
/// </summary>
/// <param name="doReportUpdate"></param>
public void doUpdate(bool doReportUpdate)
{
memLayer.ML.setSessionVal("rltUpdatePeriodo", value);
aggiornaDateMostrate(doReportUpdate);
}
}
#region gestione eventi
/// <summary>
/// imposta periodo libero di selezione
/// </summary>
public void setPeriodoFree()
{
DropDownList1.SelectedIndex = 0;
}
public event EventHandler eh_doUpdate;
#endregion
#endregion
}
#endregion Public Methods
}