Completo update editing / creazione...
This commit is contained in:
@@ -1,137 +1,187 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_attivitaIns.ascx.cs" Inherits="GPW.WebUserControls.mod_attivitaIns" %>
|
||||
<%@ Register Src="mod_dateTime.ascx" TagName="mod_dateTime" TagPrefix="uc1" %>
|
||||
|
||||
<div class="card my-1">
|
||||
<div class="card-header">
|
||||
<b>Edit / Nuova Attività</b>
|
||||
</div>
|
||||
<div class="card-body px-1 py-2">
|
||||
<asp:FormView ID="frViewRA" runat="server" DataKeyNames="idxRA" DataSourceID="odsRA" OnItemCommand="frViewRA_ItemCommand" CssClass="form-group px-1 w-100 mb-0">
|
||||
<EditItemTemplate>
|
||||
<div>
|
||||
<label for="ddlProgetto">
|
||||
Progetto
|
||||
</label>
|
||||
<asp:DropDownList ID="ddlProgetto" name="ddlProgetto" runat="server" DataSourceID="odsProgetto" DataTextField="label" DataValueField="value"
|
||||
AutoPostBack="True" OnSelectedIndexChanged="ddlProgetto_SelectedIndexChanged" CssClass="form-control">
|
||||
</asp:DropDownList>
|
||||
<label for="ddlFase">
|
||||
Fase
|
||||
</label>
|
||||
<asp:DropDownList ID="ddlFase" name="ddlFase" runat="server" DataSourceID="odsFase" DataTextField="label" DataValueField="value"
|
||||
data-mini="true" OnDataBound="ddlFase_DataBound" CssClass="form-control">
|
||||
</asp:DropDownList>
|
||||
<label for="dtInizio">
|
||||
Inizio attività
|
||||
</label>
|
||||
<uc1:mod_dateTime ID="dtInizio" runat="server" valoreDateTime='<%# Bind("inizio") %>' labelData="Inizio" labelOra="Ora" />
|
||||
<label for="dtFine">
|
||||
Fine attività
|
||||
</label>
|
||||
<uc1:mod_dateTime ID="dtFine" runat="server" valoreDateTime='<%# Bind("fine") %>' labelData="Fine" labelOra="Ora" />
|
||||
<hr />
|
||||
<label for="descrizioneTextBox">
|
||||
descrizione:
|
||||
</label>
|
||||
<asp:TextBox ID="descrizioneTextBox" runat="server" Text='<%# Bind("descrizione") %>' TextMode="MultiLine" Height="5em" CssClass="form-control" />
|
||||
<div class="row mt-2">
|
||||
<div class="col pr-0">
|
||||
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Update" CssClass="btn btn-block btn-success" />
|
||||
</div>
|
||||
<div class="col px-1">
|
||||
<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" CssClass="btn btn-block btn-warning" />
|
||||
</div>
|
||||
<div class="col pl-0">
|
||||
<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete" Text="Delete" CssClass="btn btn-block btn-danger" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</EditItemTemplate>
|
||||
<InsertItemTemplate>
|
||||
|
||||
<div>
|
||||
<label for="ddlProgetto">
|
||||
Progetto
|
||||
</label>
|
||||
<asp:DropDownList ID="ddlProgetto" name="ddlProgetto" runat="server" DataSourceID="odsProgetto" DataTextField="label" DataValueField="value"
|
||||
AutoPostBack="True" OnSelectedIndexChanged="ddlProgetto_SelectedIndexChanged" CssClass="form-control">
|
||||
</asp:DropDownList>
|
||||
<label for="ddlFase">
|
||||
Fase
|
||||
</label>
|
||||
<asp:DropDownList ID="ddlFase" name="ddlFase" runat="server" DataSourceID="odsFase" DataTextField="label" DataValueField="value"
|
||||
data-mini="true" OnDataBound="ddlFase_DataBound" CssClass="form-control">
|
||||
</asp:DropDownList>
|
||||
<label for="dtInizio">
|
||||
Inizio attività
|
||||
</label>
|
||||
<uc1:mod_dateTime ID="dtInizio" runat="server" valoreDateTime='<%# Bind("inizio") %>' labelData="Inizio" labelOra="Ora" />
|
||||
<label for="dtFine">
|
||||
Fine attività
|
||||
</label>
|
||||
<uc1:mod_dateTime ID="dtFine" runat="server" valoreDateTime='<%# Bind("fine") %>' labelData="Fine" labelOra="Ora" />
|
||||
<hr />
|
||||
<label for="descrizioneTextBox">
|
||||
descrizione:
|
||||
</label>
|
||||
<asp:TextBox ID="descrizioneTextBox" runat="server" Text='<%# Bind("descrizione") %>' TextMode="MultiLine" Height="5em" CssClass="form-control" />
|
||||
<div class="row mt-2">
|
||||
<div class="col pr-1">
|
||||
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="Insert" CssClass="btn btn-block btn-success" />
|
||||
</div>
|
||||
<div class="col pl-1">
|
||||
<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" CssClass="btn btn-block btn-warning" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%--
|
||||
|
||||
<div data-role="header" data-position="fixed">
|
||||
<h3>Edit / Nuova Attività</h3>
|
||||
</div>
|
||||
<div data-role="content" style="margin: -10px;">
|
||||
<asp:FormView ID="frViewRA" runat="server" DataKeyNames="idxRA" DataSourceID="odsRA" OnItemCommand="frViewRA_ItemCommand"
|
||||
Width="100%">
|
||||
<EditItemTemplate>
|
||||
<label for="ddlProgetto" style="font-size: xx-small;">
|
||||
Progetto
|
||||
</label>
|
||||
<asp:DropDownList ID="ddlProgetto" name="ddlProgetto" runat="server" DataSourceID="odsProgetto" DataTextField="label" DataValueField="value"
|
||||
AutoPostBack="True" OnSelectedIndexChanged="ddlProgetto_SelectedIndexChanged" data-mini="true">
|
||||
</asp:DropDownList>
|
||||
<label for="ddlFase" style="font-size: xx-small;">
|
||||
Fase
|
||||
</label>
|
||||
<asp:DropDownList ID="ddlFase" name="ddlFase" runat="server" DataSourceID="odsFase" DataTextField="label" DataValueField="value"
|
||||
data-mini="true" OnDataBound="ddlFase_DataBound">
|
||||
</asp:DropDownList>
|
||||
<uc1:mod_dateTime ID="mod_dateTime1" runat="server" valoreDateTime='<%# Bind("inizio") %>' labelData="Inizio" labelOra="Ora" />
|
||||
<uc1:mod_dateTime ID="dtjFine" runat="server" valoreDateTime='<%# Bind("fine") %>' labelData="Fine" labelOra="Ora" />
|
||||
<br />
|
||||
descrizione:
|
||||
<asp:TextBox ID="descrizioneTextBox" runat="server" Text='<%# Bind("descrizione") %>' TextMode="MultiLine" Height="3em" />
|
||||
<div class="ui-grid-b">
|
||||
<div class="ui-block-a">
|
||||
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Update" data-icon="check" data-role="button" CssClass="ui-btn clr-btn-green" />
|
||||
</div>
|
||||
<div class="ui-block-b">
|
||||
<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" data-icon="refresh" data-role="button" CssClass="ui-btn clr-btn-orange" />
|
||||
</div>
|
||||
<div class="ui-block-c">
|
||||
<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete" Text="Delete" data-role="button" CssClass="ui-btn clr-btn-red" data-icon="alert" />
|
||||
</div>
|
||||
</div>
|
||||
</EditItemTemplate>
|
||||
<InsertItemTemplate>
|
||||
<label for="ddlProgetto" style="font-size: xx-small;">
|
||||
Progetto
|
||||
</label>
|
||||
<asp:DropDownList ID="ddlProgetto" name="ddlProgetto" runat="server" DataSourceID="odsProgetto" DataTextField="label" DataValueField="value"
|
||||
AutoPostBack="True" OnSelectedIndexChanged="ddlProgetto_SelectedIndexChanged" data-mini="true">
|
||||
</asp:DropDownList>
|
||||
<label for="ddlFase" style="font-size: xx-small;">
|
||||
Fase
|
||||
</label>
|
||||
<asp:DropDownList ID="ddlFase" name="ddlFase" runat="server" DataSourceID="odsFase" DataTextField="label" DataValueField="value"
|
||||
data-mini="true" OnDataBound="ddlFase_DataBound">
|
||||
</asp:DropDownList>
|
||||
<uc1:mod_dateTime ID="dtjInizio" runat="server" valoreDateTime='<%# Bind("inizio") %>' labelData="Inizio" labelOra="Ora" />
|
||||
<uc1:mod_dateTime ID="dtjFine" runat="server" valoreDateTime='<%# Bind("fine") %>' labelData="Fine" labelOra="Ora" />
|
||||
<br />
|
||||
descrizione:
|
||||
<asp:TextBox ID="descrizioneTextBox" runat="server" Text='<%# Bind("descrizione") %>' TextMode="MultiLine" Height="3em" />
|
||||
<div class="ui-grid-a">
|
||||
<div class="ui-block-a">
|
||||
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="Insert" CssClass="ui-btn clr-btn-green" />
|
||||
</div>
|
||||
<div class="ui-block-b">
|
||||
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" CssClass="ui-btn clr-btn-orange" />
|
||||
</div>
|
||||
</div>
|
||||
</InsertItemTemplate>
|
||||
<ItemTemplate>
|
||||
<label for="ddlProgetto" style="font-size: xx-small;">
|
||||
Progetto
|
||||
</label>
|
||||
<asp:DropDownList ID="ddlProgetto" name="ddlProgetto" runat="server" DataSourceID="odsProgetto" DataTextField="label" DataValueField="value"
|
||||
AutoPostBack="True" OnSelectedIndexChanged="ddlProgetto_SelectedIndexChanged" data-mini="true">
|
||||
</asp:DropDownList>
|
||||
<label for="ddlFase" style="font-size: xx-small;">
|
||||
Fase
|
||||
</label>
|
||||
<asp:DropDownList ID="ddlFase" name="ddlFase" runat="server" DataSourceID="odsFase" DataTextField="label" DataValueField="value"
|
||||
data-mini="true" OnDataBound="ddlFase_DataBound">
|
||||
</asp:DropDownList>
|
||||
<uc1:mod_dateTime ID="dtjInizio" runat="server" valoreDateTime='<%# Bind("inizio") %>' labelData="Inizio" labelOra="Ora" />
|
||||
<uc1:mod_dateTime ID="dtjFine" runat="server" valoreDateTime='<%# Bind("fine") %>' labelData="Fine" labelOra="Ora" />
|
||||
<br />
|
||||
descrizione:
|
||||
<asp:TextBox ID="descrizioneTextBox" runat="server" Text='<%# Bind("descrizione") %>' TextMode="MultiLine" Height="3em" />
|
||||
<div class="ui-grid-a">
|
||||
<div class="ui-block-a">
|
||||
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit" Text="Edit" />
|
||||
</div>
|
||||
<div class="ui-block-b">
|
||||
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New" Text="New" />
|
||||
</div>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:FormView>
|
||||
<asp:ObjectDataSource ID="odsRA" runat="server" DeleteMethod="deleteQuery" InsertMethod="Insert" OldValuesParameterFormatString="Original_{0}"
|
||||
SelectMethod="getByKey" TypeName="GPW_data.DS_ApplicazioneTableAdapters.RegAttivitaTableAdapter" UpdateMethod="updateQuery"
|
||||
OnUpdating="odsRA_Updating" OnInserted="odsRA_Inserted" OnInserting="odsRA_Inserting" OnUpdated="odsRA_Updated" OnDeleted="odsRA_Deleted">
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="Original_idxRA" Type="Int32" />
|
||||
</DeleteParameters>
|
||||
<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>
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter DefaultValue="0" Name="idxRA" SessionField="idxRASel" Type="Int32" />
|
||||
</SelectParameters>
|
||||
<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="getGrouped" TypeName="GPW_data.DS_UtilityTableAdapters.v_selProgettiTableAdapter"
|
||||
OldValuesParameterFormatString="original_{0}">
|
||||
<SelectParameters>
|
||||
<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>
|
||||
<label for="ddlProgetto" style="font-size: xx-small;">
|
||||
Progetto
|
||||
</label>
|
||||
<asp:DropDownList ID="ddlProgetto" name="ddlProgetto" runat="server" DataSourceID="odsProgetto" DataTextField="label" DataValueField="value"
|
||||
AutoPostBack="True" OnSelectedIndexChanged="ddlProgetto_SelectedIndexChanged" data-mini="true">
|
||||
</asp:DropDownList>
|
||||
<label for="ddlFase" style="font-size: xx-small;">
|
||||
Fase
|
||||
</label>
|
||||
<asp:DropDownList ID="ddlFase" name="ddlFase" runat="server" DataSourceID="odsFase" DataTextField="label" DataValueField="value"
|
||||
data-mini="true" OnDataBound="ddlFase_DataBound">
|
||||
</asp:DropDownList>
|
||||
<uc1:mod_dateTime ID="dtjInizio" runat="server" valoreDateTime='<%# Bind("inizio") %>' labelData="Inizio" labelOra="Ora" />
|
||||
<uc1:mod_dateTime ID="dtFine" runat="server" valoreDateTime='<%# Bind("fine") %>' labelData="Fine" labelOra="Ora" />
|
||||
<br />
|
||||
descrizione:
|
||||
<asp:TextBox ID="descrizioneTextBox" runat="server" Text='<%# Bind("descrizione") %>' TextMode="MultiLine" Height="3em" />
|
||||
<div class="ui-grid-a">
|
||||
<div class="ui-block-a">
|
||||
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="Insert" CssClass="ui-btn clr-btn-green" />
|
||||
</div>
|
||||
<div class="ui-block-b">
|
||||
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" CssClass="ui-btn clr-btn-orange" />
|
||||
</div>
|
||||
</div>--%>
|
||||
</InsertItemTemplate>
|
||||
<ItemTemplate>
|
||||
<label for="ddlProgetto" style="font-size: xx-small;">
|
||||
Progetto
|
||||
</label>
|
||||
<asp:DropDownList ID="ddlProgetto" name="ddlProgetto" runat="server" DataSourceID="odsProgetto" DataTextField="label" DataValueField="value"
|
||||
AutoPostBack="True" OnSelectedIndexChanged="ddlProgetto_SelectedIndexChanged" data-mini="true">
|
||||
</asp:DropDownList>
|
||||
<label for="ddlFase" style="font-size: xx-small;">
|
||||
Fase
|
||||
</label>
|
||||
<asp:DropDownList ID="ddlFase" name="ddlFase" runat="server" DataSourceID="odsFase" DataTextField="label" DataValueField="value"
|
||||
data-mini="true" OnDataBound="ddlFase_DataBound">
|
||||
</asp:DropDownList>
|
||||
<uc1:mod_dateTime ID="dtjInizio" runat="server" valoreDateTime='<%# Bind("inizio") %>' labelData="Inizio" labelOra="Ora" />
|
||||
<uc1:mod_dateTime ID="dtFine" runat="server" valoreDateTime='<%# Bind("fine") %>' labelData="Fine" labelOra="Ora" />
|
||||
<br />
|
||||
descrizione:
|
||||
<asp:TextBox ID="descrizioneTextBox" runat="server" Text='<%# Bind("descrizione") %>' TextMode="MultiLine" Height="3em" />
|
||||
<div class="ui-grid-a">
|
||||
<div class="ui-block-a">
|
||||
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit" Text="Edit" />
|
||||
</div>
|
||||
<div class="ui-block-b">
|
||||
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New" Text="New" />
|
||||
</div>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:FormView>
|
||||
<asp:ObjectDataSource ID="odsRA" runat="server" DeleteMethod="deleteQuery" InsertMethod="Insert" OldValuesParameterFormatString="Original_{0}"
|
||||
SelectMethod="getByKey" TypeName="GPW_data.DS_ApplicazioneTableAdapters.RegAttivitaTableAdapter" UpdateMethod="updateQuery"
|
||||
OnUpdating="odsRA_Updating" OnInserted="odsRA_Inserted" OnInserting="odsRA_Inserting" OnUpdated="odsRA_Updated" OnDeleted="odsRA_Deleted">
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="Original_idxRA" Type="Int32" />
|
||||
</DeleteParameters>
|
||||
<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>
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter DefaultValue="0" Name="idxRA" SessionField="idxRASel" Type="Int32" />
|
||||
</SelectParameters>
|
||||
<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="getGrouped" TypeName="GPW_data.DS_UtilityTableAdapters.v_selProgettiTableAdapter"
|
||||
OldValuesParameterFormatString="original_{0}">
|
||||
<SelectParameters>
|
||||
<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 class="card-footer">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,235 +1,232 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using GPW_data;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
using GPW_data;
|
||||
|
||||
namespace GPW.WebUserControls
|
||||
{
|
||||
public partial class mod_attivitaIns : System.Web.UI.UserControl
|
||||
public partial class mod_attivitaIns : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// pagina di return a fine editing
|
||||
/// </summary>
|
||||
protected string returnPage
|
||||
{
|
||||
/// <summary>
|
||||
/// pagina di return a fine editing
|
||||
/// </summary>
|
||||
protected string returnPage
|
||||
get
|
||||
{
|
||||
string answ = memLayer.ML.confReadString("baseUrl");
|
||||
try
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = memLayer.ML.confReadString("baseUrl");
|
||||
try
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj("returnPage");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("returnPage", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// RA selezionata
|
||||
/// </summary>
|
||||
protected int idxRASel
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("idxRASel");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxRASel", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// data selezionata
|
||||
/// </summary>
|
||||
protected DateTime dataRif
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime answ = DateTime.Now;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToDateTime(memLayer.ML.objSessionObj("dataRif"));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("dataRif", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// progetto selezionato
|
||||
/// </summary>
|
||||
protected int idxProjSel
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("idxProjSel");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxProjSel", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// fase selezionata
|
||||
/// </summary>
|
||||
protected int idxFaseSel
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("idxFaseSel");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxFaseSel", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// al primo load ricarico i dati correnti (se ci sono)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
DropDownList ddlFase_int;
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
// verifico se ci sia una richiesta di editing...
|
||||
if (idxRASel > 0)
|
||||
{
|
||||
frViewRA.ChangeMode(FormViewMode.Edit);
|
||||
// pre-seleziono idx progetto x ods fase...
|
||||
idxFaseSel = DataProxy.DP.taRA.getByKey(idxRASel)[0].idxFase;
|
||||
idxProjSel = idxPrjByFase(idxFaseSel);
|
||||
// imposto valori selezionati
|
||||
DropDownList ddlProj_int = (DropDownList)frViewRA.FindControl("ddlProgetto");
|
||||
ddlProj_int.SelectedValue = idxProjSel.ToString();
|
||||
ddlFase_int = (DropDownList)frViewRA.FindControl("ddlFase");
|
||||
ddlFase_int.SelectedValue = idxFaseSel.ToString();
|
||||
}
|
||||
else // è insert nuova!!!
|
||||
{
|
||||
frViewRA.ChangeMode(FormViewMode.Insert);
|
||||
mod_dateTime dtjInizio = (mod_dateTime)frViewRA.FindControl("dtjInizio");
|
||||
mod_dateTime dtjFine = (mod_dateTime)frViewRA.FindControl("dtjFine");
|
||||
dtjInizio.valoreDateTime = dataRif.AddHours(DateTime.Now.Hour).AddMinutes(DateTime.Now.Minute);
|
||||
dtjFine.valoreDateTime = dtjInizio.valoreDateTime.AddMinutes(memLayer.ML.confReadInt("defRegAttMin"));
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// calcola idxProgetto da idxFase
|
||||
/// </summary>
|
||||
/// <param name="idxFase"></param>
|
||||
/// <returns></returns>
|
||||
public int idxPrjByFase(object idxFase)
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = DataProxy.DP.taAF.getByIdx(Convert.ToInt32(idxFase))[0].idxProgetto;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorno ods fasi...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlProgetto_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// salvo in session idxProjSel!
|
||||
DropDownList ddlProj_int = (DropDownList)sender;
|
||||
idxProjSel = Convert.ToInt32(ddlProj_int.SelectedValue);
|
||||
// ricarico dati fasi
|
||||
odsFase.DataBind();
|
||||
}
|
||||
/// <summary>
|
||||
/// evento richiesta update
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void odsRA_Updating(object sender, ObjectDataSourceMethodEventArgs e)
|
||||
{
|
||||
// recupero valore fase selezionato...
|
||||
DropDownList ddlFase_int = (DropDownList)frViewRA.FindControl("ddlFase");
|
||||
e.InputParameters["idxFase"] = ddlFase_int.SelectedValue;
|
||||
e.InputParameters["idxDipendente"] = DataProxy.idxDipendente;
|
||||
}
|
||||
|
||||
protected void frViewRA_ItemCommand(object sender, FormViewCommandEventArgs e)
|
||||
{
|
||||
// se è cancel ritorno ad altra pagina!
|
||||
if (e.CommandName == "Cancel")
|
||||
{
|
||||
Response.Redirect(returnPage);
|
||||
}
|
||||
}
|
||||
|
||||
protected void odsRA_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
|
||||
{
|
||||
// recupero valori non direttamente linkati...
|
||||
DropDownList ddlFase_int = (DropDownList)frViewRA.FindControl("ddlFase");
|
||||
e.InputParameters["idxFase"] = ddlFase_int.SelectedValue;
|
||||
e.InputParameters["idxDipendente"] = DataProxy.idxDipendente;
|
||||
}
|
||||
|
||||
protected void odsRA_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
Response.Redirect(returnPage);
|
||||
}
|
||||
|
||||
protected void odsRA_Updated(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
Response.Redirect(returnPage);
|
||||
}
|
||||
|
||||
protected void odsRA_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
Response.Redirect(returnPage);
|
||||
}
|
||||
/// <summary>
|
||||
/// sistemo eventuali "headers"
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlFase_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
// cerco eventuali controlli tipo "ancestor" e li disattivo!
|
||||
DropDownList ddlFase_int = (DropDownList)sender;
|
||||
ListItem li = new ListItem();
|
||||
while (li != null)
|
||||
{
|
||||
li = ddlFase_int.Items.FindByValue("0");
|
||||
try
|
||||
{
|
||||
li.Attributes.Add("style", "color:gray;");
|
||||
li.Attributes.Add("disabled", "true");
|
||||
li.Value = "-1";
|
||||
li.Text = string.Format("[ {0} ]", li.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
try
|
||||
{
|
||||
ddlFase_int.SelectedIndex = 1;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
answ = memLayer.ML.StringSessionObj("returnPage");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("returnPage", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// RA selezionata
|
||||
/// </summary>
|
||||
protected int idxRASel
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("idxRASel");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxRASel", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// data selezionata
|
||||
/// </summary>
|
||||
protected DateTime dataRif
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime answ = DateTime.Now;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToDateTime(memLayer.ML.objSessionObj("dataRif"));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("dataRif", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// progetto selezionato
|
||||
/// </summary>
|
||||
protected int idxProjSel
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("idxProjSel");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxProjSel", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// fase selezionata
|
||||
/// </summary>
|
||||
protected int idxFaseSel
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("idxFaseSel");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxFaseSel", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// al primo load ricarico i dati correnti (se ci sono)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
DropDownList ddlFase_int;
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
// verifico se ci sia una richiesta di editing...
|
||||
if (idxRASel > 0)
|
||||
{
|
||||
frViewRA.ChangeMode(FormViewMode.Edit);
|
||||
// pre-seleziono idx progetto x ods fase...
|
||||
idxFaseSel = DataProxy.DP.taRA.getByKey(idxRASel)[0].idxFase;
|
||||
idxProjSel = idxPrjByFase(idxFaseSel);
|
||||
// imposto valori selezionati
|
||||
DropDownList ddlProj_int = (DropDownList)frViewRA.FindControl("ddlProgetto");
|
||||
ddlProj_int.SelectedValue = idxProjSel.ToString();
|
||||
ddlFase_int = (DropDownList)frViewRA.FindControl("ddlFase");
|
||||
ddlFase_int.SelectedValue = idxFaseSel.ToString();
|
||||
}
|
||||
else // è insert nuova!!!
|
||||
{
|
||||
frViewRA.ChangeMode(FormViewMode.Insert);
|
||||
mod_dateTime dtInizio = (mod_dateTime)frViewRA.FindControl("dtInizio");
|
||||
mod_dateTime dtFine = (mod_dateTime)frViewRA.FindControl("dtFine");
|
||||
dtInizio.valoreDateTime = dataRif.AddHours(DateTime.Now.Hour).AddMinutes(DateTime.Now.Minute);
|
||||
dtFine.valoreDateTime = dtInizio.valoreDateTime.AddMinutes(memLayer.ML.confReadInt("defRegAttMin"));
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// calcola idxProgetto da idxFase
|
||||
/// </summary>
|
||||
/// <param name="idxFase"></param>
|
||||
/// <returns></returns>
|
||||
public int idxPrjByFase(object idxFase)
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = DataProxy.DP.taAF.getByIdx(Convert.ToInt32(idxFase))[0].idxProgetto;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorno ods fasi...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlProgetto_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// salvo in session idxProjSel!
|
||||
DropDownList ddlProj_int = (DropDownList)sender;
|
||||
idxProjSel = Convert.ToInt32(ddlProj_int.SelectedValue);
|
||||
// ricarico dati fasi
|
||||
odsFase.DataBind();
|
||||
}
|
||||
/// <summary>
|
||||
/// evento richiesta update
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void odsRA_Updating(object sender, ObjectDataSourceMethodEventArgs e)
|
||||
{
|
||||
// recupero valore fase selezionato...
|
||||
DropDownList ddlFase_int = (DropDownList)frViewRA.FindControl("ddlFase");
|
||||
e.InputParameters["idxFase"] = ddlFase_int.SelectedValue;
|
||||
e.InputParameters["idxDipendente"] = DataProxy.idxDipendente;
|
||||
}
|
||||
|
||||
protected void frViewRA_ItemCommand(object sender, FormViewCommandEventArgs e)
|
||||
{
|
||||
// se è cancel ritorno ad altra pagina!
|
||||
if (e.CommandName == "Cancel")
|
||||
{
|
||||
Response.Redirect(returnPage);
|
||||
}
|
||||
}
|
||||
|
||||
protected void odsRA_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
|
||||
{
|
||||
// recupero valori non direttamente linkati...
|
||||
DropDownList ddlFase_int = (DropDownList)frViewRA.FindControl("ddlFase");
|
||||
e.InputParameters["idxFase"] = ddlFase_int.SelectedValue;
|
||||
e.InputParameters["idxDipendente"] = DataProxy.idxDipendente;
|
||||
}
|
||||
|
||||
protected void odsRA_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
Response.Redirect(returnPage);
|
||||
}
|
||||
|
||||
protected void odsRA_Updated(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
Response.Redirect(returnPage);
|
||||
}
|
||||
|
||||
protected void odsRA_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
Response.Redirect(returnPage);
|
||||
}
|
||||
/// <summary>
|
||||
/// sistemo eventuali "headers"
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlFase_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
// cerco eventuali controlli tipo "ancestor" e li disattivo!
|
||||
DropDownList ddlFase_int = (DropDownList)sender;
|
||||
ListItem li = new ListItem();
|
||||
while (li != null)
|
||||
{
|
||||
li = ddlFase_int.Items.FindByValue("0");
|
||||
try
|
||||
{
|
||||
li.Attributes.Add("style", "color:gray;");
|
||||
li.Attributes.Add("disabled", "true");
|
||||
li.Value = "-1";
|
||||
li.Text = string.Format("[ {0} ]", li.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
try
|
||||
{
|
||||
ddlFase_int.SelectedIndex = 1;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,14 +6,16 @@
|
||||
|
||||
<div class="row mt-2 small py-2">
|
||||
<div class="col-4 pr-0">
|
||||
<asp:TextBox runat="server" ID="txtData" TextMode="Date" OnTextChanged="txtData_TextChanged" Width="9em" />
|
||||
<asp:TextBox runat="server" ID="txtData" TextMode="Date" OnTextChanged="txtData_TextChanged" Width="9em" AutoPostBack="true" />
|
||||
</div>
|
||||
<div class="col-4 px-1">
|
||||
<asp:LinkButton runat="server" ID="lnkCreateNew" OnClick="lnkCreateNew_Click" CssClass="btn btn-sm btn-success btn-block"><i class="fa fa-plus" aria-hidden="true"></i> Aggiungi</asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lnkCreateNew" OnClick="lnkCreateNew_Click" CssClass="btn btn-sm btn-success btn-block py-0"><i class="fa fa-plus" aria-hidden="true"></i> Aggiungi</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-4 pl-0 text-right">
|
||||
<asp:Label runat="server" ID="lblTotOreRA" Text="..." CssClass="ui-li-count"
|
||||
ToolTip="Ore caricate a commessa / ore lavorate da timbrature" />
|
||||
<div class="border border-dark rounded text-center ">
|
||||
<asp:Label runat="server" ID="lblTotOreRA" Text="..." CssClass="text-info font-weight-bold"
|
||||
ToolTip="Ore caricate a commessa / ore lavorate da timbrature" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-5">
|
||||
@@ -36,8 +38,8 @@
|
||||
<asp:Label ID="lblFase" runat="server" Text='<%# faseByIdx(Eval("idxFase")) %>' CssClass="text-success font-weight-bold" />
|
||||
</div>
|
||||
<div class="col-4 small text-right">
|
||||
<div class="border border-dark rounded text-center">
|
||||
<asp:Label ID="inizioLabel" runat="server" Text='<%# Eval("inizio","{0:HH:mm}") %>' CssClass="text-dark" /> - <asp:Label ID="fineLabel" runat="server" Text='<%# Eval("fine","{0:HH:mm}") %>' CssClass="text-dark" />
|
||||
<div class="border border-dark rounded text-center">
|
||||
<asp:Label ID="inizioLabel" runat="server" Text='<%# Eval("inizio","{0:HH:mm}") %>' CssClass="text-dark" /> - <asp:Label ID="fineLabel" runat="server" Text='<%# Eval("fine","{0:HH:mm}") %>' CssClass="text-dark" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -81,9 +81,6 @@ namespace GPW.WebUserControls
|
||||
private void setupPage()
|
||||
{
|
||||
// salvo dataFrom/To x visualizzazione attivita
|
||||
#if false
|
||||
lblDataRif.Text = dataRif.ToString("dd.MM.yy");
|
||||
#endif
|
||||
txtData.Text = dataRif.ToString("yyyy-MM-dd");
|
||||
// recupero dati della commessa utente giornaliera...
|
||||
try
|
||||
@@ -91,7 +88,7 @@ namespace GPW.WebUserControls
|
||||
int maxErrMinus = memLayer.ML.confReadInt("maxErrMinus");
|
||||
int maxErrPlus = memLayer.ML.confReadInt("maxErrPlus");
|
||||
DS_Applicazione.v_logCommUtRow rigaLog = DataProxy.DP.taLCU.getByIdxDipDate(memLayer.ML.IntSessionObj("idxDipendente"), dataRif, dataRif.AddDays(1), maxErrMinus, maxErrPlus)[0];
|
||||
lblTotOreRA.Text = string.Format("{0:0.##} h / {1:0.##} h", rigaLog.h_com, rigaLog.h_lav);
|
||||
lblTotOreRA.Text = string.Format("<b>{0:0.##}</b> / <b>{1:0.##}</b> h", rigaLog.h_com, rigaLog.h_lav);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
@@ -15,29 +15,9 @@
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%--<div class="ui-grid-a">
|
||||
<div class="ui-block-a" style="font-size: xx-small; text-align: right;">
|
||||
<asp:Label runat="server" ID="lblData" />
|
||||
<asp:HyperLink ID="hlPUCal" runat="server" NavigateUrl="#popupBasic" data-rel="popup" data-role="button" data-mini="true">
|
||||
<asp:Label runat="server" ID="lblDataRif" Font-Size="11pt" />
|
||||
</asp:HyperLink>
|
||||
<asp:Panel runat="server" data-role="popup" ID="popupBasic">
|
||||
<p>
|
||||
<asp:Calendar runat="server" ID="calDataRif" OnSelectionChanged="calDataRif_SelectionChanged" />
|
||||
</p>
|
||||
</asp:Panel>
|
||||
</div>
|
||||
<div class="ui-block-b" style="font-size: xx-small;">
|
||||
<asp:Label runat="server" ID="lblOra" />
|
||||
<fieldset data-role="controlgroup" data-type="horizontal">
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>--%>
|
||||
<asp:ObjectDataSource ID="odsOra" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="GPW_data.DS_UtilityTableAdapters.stp_getHoursTableAdapter"></asp:ObjectDataSource>
|
||||
<asp:ObjectDataSource ID="odsMin" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="GetData" TypeName="GPW_data.DS_UtilityTableAdapters.stp_getMinTableAdapter">
|
||||
<SelectParameters>
|
||||
<%--<asp:Parameter DefaultValue="5" Name="interv" Type="Int32" />--%>
|
||||
<asp:ControlParameter ControlID="lblSnapMin" DefaultValue="5" Name="interv" Type="Int32" PropertyName="Text" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
|
||||
Vendored
+1
-1
@@ -14,7 +14,7 @@ pipeline {
|
||||
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=4071']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=4073']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '2.5.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '2.5.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.APP_NAME = 'GPW'
|
||||
|
||||
Reference in New Issue
Block a user