completata modifica x gestione da dropdownlist del ritiro usato (non permesso "ND")
This commit is contained in:
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_impegno.ascx.cs" Inherits="WebSCR.WebUserControls.mod_impegno" %>
|
||||
|
||||
|
||||
<asp:FormView ID="frmViewImpegni" runat="server" DataKeyNames="IdxImpegno" DataSourceID="odsImpegni" Width="100%">
|
||||
<asp:FormView ID="frmViewImpegni" runat="server" DataKeyNames="IdxImpegno" DataSourceID="odsImpegni" Width="100%" OnItemUpdating="frmViewImpegni_ItemUpdating">
|
||||
<EditItemTemplate>
|
||||
<div>
|
||||
<div class="ui-grid-b">
|
||||
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
<div class="ui-grid-b">
|
||||
<div class="ui-block-a">
|
||||
<div class="ui-grid-a">
|
||||
<div class="ui-grid-b">
|
||||
<div class="ui-block-a">
|
||||
<label for="txtNumPers">num pers</label>
|
||||
<asp:TextBox runat="server" ID="txtNumPers" placeholder="Num Op" Text='<%# Bind("NumOp") %>' />
|
||||
@@ -26,24 +26,29 @@
|
||||
<label for="txtPiano">piano cons.</label>
|
||||
<asp:TextBox runat="server" ID="txtPiano" placeholder="piano cons." Text='<%# Bind("PianoCons") %>' />
|
||||
</div>
|
||||
<div class="ui-block-c">
|
||||
<label for="chkAscensore">ascensore</label>
|
||||
<br />
|
||||
<asp:CheckBox ID="chkAscensore" runat="server" Checked='<%# Bind("Ascensore") %>' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-block-b">
|
||||
<div class="ui-grid-b ui-mini" style="padding-top: 0.5em;">
|
||||
<div class="ui-grid-a">
|
||||
<div class="ui-block-a">
|
||||
<asp:CheckBox ID="chkRitUsato" runat="server" Checked='<%# Bind("RitUsato") %>' />
|
||||
<label for="chkIntAperto">aperto</label>
|
||||
<br />
|
||||
<label for="chkRitUsato">rit. usato</label>
|
||||
<asp:CheckBox ID="chkIntAperto" runat="server" Checked='<%# Bind("IntAperto") %>' />
|
||||
</div>
|
||||
<div class="ui-block-b">
|
||||
<asp:CheckBox ID="chkAscensore" runat="server" Checked='<%# Bind("Ascensore") %>' />
|
||||
<br />
|
||||
<label for="chkAscensore">ascensore</label>
|
||||
</div>
|
||||
<div class="ui-block-c">
|
||||
<asp:CheckBox ID="chkIntAperto" runat="server" Checked='<%# Bind("IntAperto") %>' />
|
||||
<br />
|
||||
<label for="chkIntAperto">aperto</label>
|
||||
<label for="ddlRitUs">rit. usato</label>
|
||||
<asp:DropDownList runat="server" ID="ddlRitUs" DataSourceID="odsRitUs" DataTextField="label" DataValueField="value" SelectedValue='<%# Bind("RitUsato") %>'></asp:DropDownList>
|
||||
<asp:ObjectDataSource ID="odsRitUs" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getValid" TypeName="WebSCR_data.DS_UtilityTableAdapters.ListValuesTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:Parameter DefaultValue="Impegni" Name="TableName" Type="String" />
|
||||
<asp:Parameter DefaultValue="RitUsato" Name="FieldName" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -133,7 +138,7 @@
|
||||
</div>
|
||||
<div class="ui-grid-b">
|
||||
<div class="ui-block-a">
|
||||
<div class="ui-grid-a">
|
||||
<div class="ui-grid-b">
|
||||
<div class="ui-block-a">
|
||||
<label for="txtNumPers">num pers</label>
|
||||
<asp:TextBox runat="server" ID="txtNumPers" placeholder="Num Op" Text='<%# Eval("NumOp") %>' />
|
||||
@@ -142,24 +147,29 @@
|
||||
<label for="txtPiano">piano cons.</label>
|
||||
<asp:TextBox runat="server" ID="txtPiano" placeholder="piano cons." Text='<%# Eval("PianoCons") %>' />
|
||||
</div>
|
||||
<div class="ui-block-c">
|
||||
<label for="chkAscensore">ascensore</label>
|
||||
<br />
|
||||
<asp:CheckBox ID="chkAscensore" runat="server" Checked='<%# Eval("Ascensore") %>' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-block-b">
|
||||
<div class="ui-grid-b ui-mini" style="padding-top: 0.5em;">
|
||||
<div class="ui-grid-a">
|
||||
<div class="ui-block-a">
|
||||
<asp:CheckBox ID="chkRitUsato" runat="server" Checked='<%# Eval("RitUsato") %>' />
|
||||
<label for="chkIntAperto">aperto</label>
|
||||
<br />
|
||||
<label for="chkRitUsato">rit. usato</label>
|
||||
<asp:CheckBox ID="chkIntAperto" runat="server" Checked='<%# Eval("IntAperto") %>' />
|
||||
</div>
|
||||
<div class="ui-block-b">
|
||||
<asp:CheckBox ID="chkAscensore" runat="server" Checked='<%# Eval("Ascensore") %>' />
|
||||
<br />
|
||||
<label for="chkAscensore">ascensore</label>
|
||||
</div>
|
||||
<div class="ui-block-c">
|
||||
<asp:CheckBox ID="chkIntAperto" runat="server" Checked='<%# Eval("IntAperto") %>' />
|
||||
<br />
|
||||
<label for="chkIntAperto">aperto</label>
|
||||
<label for="ddlRitUs">rit. usato</label>
|
||||
<asp:DropDownList runat="server" ID="ddlRitUs" DataSourceID="odsRitUs" DataTextField="label" DataValueField="value" SelectedValue='<%# Bind("RitUsato") %>'></asp:DropDownList>
|
||||
<asp:ObjectDataSource ID="odsRitUs" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getValid" TypeName="WebSCR_data.DS_UtilityTableAdapters.ListValuesTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:Parameter DefaultValue="Impegni" Name="TableName" Type="String" />
|
||||
<asp:Parameter DefaultValue="RitUsato" Name="FieldName" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -230,7 +240,7 @@
|
||||
</div>
|
||||
<div style="text-align: center; margin: auto;">
|
||||
<asp:LinkButton ID="lbEdit" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-edit ui-btn-icon-right ui-btn-inline" runat="server" CausesValidation="False" CommandArgument="edit" CommandName="Edit" Text="Modifica" Width="20em" Visible='<%# !disableEdit %>' />
|
||||
<asp:LinkButton ID="lbDelete" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-delete ui-btn-icon-right ui-btn-inline" runat="server" CausesValidation="False" CommandArgument="delete" CommandName="Delete" Text="ELIMINA" Width="20em" Visible='<%# !disableEdit %>' OnClientClick="return confirm('Sei sicuro di voler eliminare il record?')"/>
|
||||
<asp:LinkButton ID="lbDelete" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-delete ui-btn-icon-right ui-btn-inline" runat="server" CausesValidation="False" CommandArgument="delete" CommandName="Delete" Text="ELIMINA" Width="20em" Visible='<%# !disableEdit %>' OnClientClick="return confirm('Sei sicuro di voler eliminare il record?')" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:FormView>
|
||||
|
||||
@@ -11,6 +11,20 @@ namespace WebSCR.WebUserControls
|
||||
{
|
||||
public partial class mod_impegno : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// evento errore in update
|
||||
/// </summary>
|
||||
public event EventHandler eh_errUpd;
|
||||
/// <summary>
|
||||
/// sollevo evento selezione /deselezione
|
||||
/// </summary>
|
||||
protected void raiseEventErrUpd()
|
||||
{
|
||||
if (eh_errUpd != null)
|
||||
{
|
||||
eh_errUpd(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
@@ -79,5 +93,16 @@ namespace WebSCR.WebUserControls
|
||||
memLayer.ML.setSessionVal("errorMess", "Record Eliminato");
|
||||
Response.Redirect(SteamWare.devicesAuthProxy.pagCorrente);
|
||||
}
|
||||
|
||||
protected void frmViewImpegni_ItemUpdating(object sender, FormViewUpdateEventArgs e)
|
||||
{
|
||||
// controllo, SE avesse selezionato ND NON permetto salvataggio e blocco
|
||||
if (e.NewValues["RitUsato"].ToString() == "-1")
|
||||
{
|
||||
e.Cancel = true;
|
||||
memLayer.ML.setSessionVal("errorMess", "ERRORE: va specificato Si/no per ritiro usato");
|
||||
raiseEventErrUpd();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,6 +35,12 @@ namespace WebSCR.WebUserControls
|
||||
mod_filtroZona.eh_selIndir += mod_filtroZona_eh_selIndir;
|
||||
mod_filtroPeriodo.eh_selData += mod_filtroPeriodo_eh_selData;
|
||||
mod_dettInt.eh_update += mod_dettInt_eh_update;
|
||||
mod_impegno.eh_errUpd += Mod_impegno_eh_errUpd;
|
||||
}
|
||||
|
||||
private void Mod_impegno_eh_errUpd(object sender, EventArgs e)
|
||||
{
|
||||
lblWarning.Text = errorMess;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Generated
+4
-4
@@ -2753,7 +2753,7 @@ namespace WebSCR_data {
|
||||
string RifOC,
|
||||
string UrlDoc,
|
||||
int NumOp,
|
||||
bool RitUsato,
|
||||
int RitUsato,
|
||||
bool Ascensore,
|
||||
int PianoCons,
|
||||
string UserMod,
|
||||
@@ -2938,7 +2938,7 @@ namespace WebSCR_data {
|
||||
base.Columns.Add(this.columnUrlDoc);
|
||||
this.columnNumOp = new global::System.Data.DataColumn("NumOp", typeof(int), null, global::System.Data.MappingType.Element);
|
||||
base.Columns.Add(this.columnNumOp);
|
||||
this.columnRitUsato = new global::System.Data.DataColumn("RitUsato", typeof(bool), null, global::System.Data.MappingType.Element);
|
||||
this.columnRitUsato = new global::System.Data.DataColumn("RitUsato", typeof(int), null, global::System.Data.MappingType.Element);
|
||||
base.Columns.Add(this.columnRitUsato);
|
||||
this.columnAscensore = new global::System.Data.DataColumn("Ascensore", typeof(bool), null, global::System.Data.MappingType.Element);
|
||||
base.Columns.Add(this.columnAscensore);
|
||||
@@ -7255,9 +7255,9 @@ namespace WebSCR_data {
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
||||
public bool RitUsato {
|
||||
public int RitUsato {
|
||||
get {
|
||||
return ((bool)(this[this.tableImpegni.RitUsatoColumn]));
|
||||
return ((int)(this[this.tableImpegni.RitUsatoColumn]));
|
||||
}
|
||||
set {
|
||||
this[this.tableImpegni.RitUsatoColumn] = value;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace WebSCR_data
|
||||
{
|
||||
}
|
||||
|
||||
namespace WebSCR_data {
|
||||
|
||||
|
||||
public partial class DS_Applicazione {
|
||||
}
|
||||
}
|
||||
namespace WebSCR_data {
|
||||
|
||||
|
||||
public partial class DS_Applicazione {
|
||||
}
|
||||
}
|
||||
@@ -1586,7 +1586,7 @@ SELECT Matr, Cognome, Nome, CognomeNome FROM Dipendenti WHERE (Matr = @Matr)</Co
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="NumOp" msprop:Generator_ColumnVarNameInTable="columnNumOp" msprop:Generator_ColumnPropNameInRow="NumOp" msprop:Generator_ColumnPropNameInTable="NumOpColumn" msprop:Generator_UserColumnName="NumOp" type="xs:int" />
|
||||
<xs:element name="RitUsato" msprop:Generator_ColumnVarNameInTable="columnRitUsato" msprop:Generator_ColumnPropNameInRow="RitUsato" msprop:Generator_ColumnPropNameInTable="RitUsatoColumn" msprop:Generator_UserColumnName="RitUsato" type="xs:boolean" />
|
||||
<xs:element name="RitUsato" msprop:Generator_ColumnVarNameInTable="columnRitUsato" msprop:Generator_ColumnPropNameInRow="RitUsato" msprop:Generator_ColumnPropNameInTable="RitUsatoColumn" msprop:Generator_UserColumnName="RitUsato" type="xs:int" />
|
||||
<xs:element name="Ascensore" msprop:Generator_ColumnVarNameInTable="columnAscensore" msprop:Generator_ColumnPropNameInRow="Ascensore" msprop:Generator_ColumnPropNameInTable="AscensoreColumn" msprop:Generator_UserColumnName="Ascensore" type="xs:boolean" />
|
||||
<xs:element name="PianoCons" msprop:Generator_ColumnVarNameInTable="columnPianoCons" msprop:Generator_ColumnPropNameInRow="PianoCons" msprop:Generator_ColumnPropNameInTable="PianoConsColumn" msprop:Generator_UserColumnName="PianoCons" type="xs:int" />
|
||||
<xs:element name="UserMod" msprop:Generator_ColumnVarNameInTable="columnUserMod" msprop:Generator_ColumnPropNameInRow="UserMod" msprop:Generator_ColumnPropNameInTable="UserModColumn" msprop:Generator_UserColumnName="UserMod">
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="-47" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="159" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:AnagSquadre" ZOrder="9" X="579" Y="415" Height="305" Width="261" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="178" />
|
||||
<Shape ID="DesignTable:AnagZone" ZOrder="17" X="556" Y="160" Height="229" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:AnagTipoConsegne" ZOrder="16" X="919" Y="164" Height="267" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
|
||||
<Shape ID="DesignTable:AnagClienti" ZOrder="11" X="330" Y="139" Height="362" Width="212" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:Impegni" ZOrder="1" X="13" Y="159" Height="438" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:Impegni" ZOrder="1" X="13" Y="159" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:DispImpTot" ZOrder="14" X="890" Y="469" Height="172" Width="293" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:DispImpSquadre" ZOrder="15" X="931" Y="666" Height="153" Width="241" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:v_ImpegniCal" ZOrder="5" X="393" Y="937" Height="210" Width="222" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DS_Applicazione.cs">
|
||||
<DependentUpon>DS_Applicazione.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DS_Applicazione.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user