Abbozzata gestione fascia oraria: inserito campo, inserita prima visualizzazione + controllo editing, manca logica x vero update + check degli orari...

This commit is contained in:
Samuele E. Locatelli
2016-01-28 18:20:19 +01:00
parent a7b83b7f4f
commit a175c8e7ce
24 changed files with 218 additions and 16 deletions
Binary file not shown.
+2 -2
View File
@@ -5,7 +5,7 @@
using System.Reflection;
[assembly: AssemblyVersion("2.0.077.294")]
[assembly: AssemblyFileVersion("2.0.077.294")]
[assembly: AssemblyVersion("2.0.079.302")]
[assembly: AssemblyFileVersion("2.0.079.302")]
[assembly: AssemblyCopyright("Steamware © 2015-2016")]
[assembly: AssemblyCompany("Steamware")]
+2 -2
View File
@@ -6,8 +6,8 @@
using System.Reflection;
[assembly: AssemblyVersion("2.0.077.<#= this.RevisionNumber #>")]
[assembly: AssemblyFileVersion("2.0.077.<#= this.RevisionNumber #>")]
[assembly: AssemblyVersion("2.0.079.<#= this.RevisionNumber #>")]
[assembly: AssemblyFileVersion("2.0.079.<#= this.RevisionNumber #>")]
[assembly: AssemblyCopyright("Steamware © 2015-<#= DateTime.Now.Year #>")]
[assembly: AssemblyCompany("Steamware")]
<#+
Binary file not shown.
Binary file not shown.
Binary file not shown.
+8
View File
@@ -422,6 +422,7 @@
<Content Include="WebUserControls\mod_listValues.ascx" />
<Content Include="WebUserControls\mod_pianificazione.ascx" />
<Content Include="WebUserControls\mod_selData.ascx" />
<Content Include="WebUserControls\mod_selDataOra.ascx" />
<Content Include="WebUserControls\mod_selSquadre.ascx" />
<Content Include="WebUserControls\mod_squadre.ascx" />
<None Include="Properties\PublishProfiles\IIS02.pubxml" />
@@ -798,6 +799,13 @@
<Compile Include="WebUserControls\mod_selData.ascx.designer.cs">
<DependentUpon>mod_selData.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_selDataOra.ascx.cs">
<DependentUpon>mod_selDataOra.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_selDataOra.ascx.designer.cs">
<DependentUpon>mod_selDataOra.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_selSquadre.ascx.cs">
<DependentUpon>mod_selSquadre.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
+11 -2
View File
@@ -35,7 +35,7 @@ namespace WebSCR.WebUserControls
DayPilotCalendar1.EventMove += DayPilotCalendar1_EventMove;
#endif
}
public int day2show
{
@@ -187,6 +187,15 @@ namespace WebSCR.WebUserControls
{
// this assumes your event object in Events collection has "color" field or property
e.BackgroundColor = (string)e.DataItem["CssColor"];
#if false
string tUser = "<i class=\"fa fa-user\"></i>";
e.Html = e.Html.Replace("6P", string.Format("{0}{0}{0}{0}{0}{0}", tUser));
e.Html = e.Html.Replace("5P", string.Format("{0}{0}{0}{0}{0}", tUser));
e.Html = e.Html.Replace("4P", string.Format("{0}{0}{0}{0}", tUser));
e.Html = e.Html.Replace("3P", string.Format("{0}{0}{0}", tUser));
e.Html = e.Html.Replace("2P", string.Format("{0}{0}", tUser));
e.Html = e.Html.Replace("1P", string.Format("{0}", tUser));
#endif
}
catch
{ }
@@ -213,6 +222,6 @@ namespace WebSCR.WebUserControls
return memLayer.ML.StringSessionObj("elencoSquadre").Split(',')[0].ToString();
}
}
}
}
+26 -6
View File
@@ -1,4 +1,6 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_impegno.ascx.cs" Inherits="WebSCR.WebUserControls.mod_impegno" %>
<%@ Register Src="~/WebUserControls/mod_selDataOra.ascx" TagPrefix="uc1" TagName="mod_selDataOra" %>
<asp:FormView ID="frmViewImpegni" runat="server" DataKeyNames="IdxImpegno" DataSourceID="odsImpegni" Width="100%" OnItemUpdating="frmViewImpegni_ItemUpdating">
@@ -9,10 +11,19 @@
<asp:DropDownList runat="server" ID="ddlSquadra" DataSourceID="odsSquadre" DataTextField="DescrSquadra" DataValueField="CodSquadra" SelectedValue='<%# Bind("CodSquadra") %>'></asp:DropDownList>
</div>
<div class="ui-block-b" style="text-align: right;">
<asp:TextBox runat="server" ID="lblDataFrom" type="date" Text='<%# Eval("DataOra","{0:yyyyy-MM-dd}") %>' Enabled="false" />
<div class="ui-grid-a">
<div class="ui-block-a">
<asp:TextBox runat="server" ID="lblDataFrom" type="date" Text='<%# Eval("DataOra","{0:yyyy-MM-dd}") %>' Enabled="false" />
</div>
<div class="ui-block-b">
<asp:DropDownList runat="server" ID="ddlOrario" DataSourceID="odsOrario" DataTextField="Orario" DataValueField="Orario" SelectedValue='<%# Eval("DataOra","{0:HH:mm:00}") %>' Enabled="false"></asp:DropDownList>
</div>
</div>
</div>
<div class="ui-block-c">
<asp:DropDownList runat="server" ID="ddlOrario" DataSourceID="odsOrario" DataTextField="Orario" DataValueField="Orario" SelectedValue='<%# Eval("DataOra","{0:HH:mm:00}") %>' Enabled="false"></asp:DropDownList>
<div class="ui-block-c text-center">
<label for="lblOrarioCom">ORARIO COMUNICATO</label>
<%--<asp:Label runat="server" ID="lblOrarioCom" CssClass="tStrong"><%# string.Format("{0: dddd dd/MM/yy HH:mm} --> {1:HH:mm}", Eval("DataOraCom"),Convert.ToDateTime(Eval("DataOraCom")).AddHours(1)) %></asp:Label>--%>
<uc1:mod_selDataOra runat="server" ID="mod_selDataOra" dataOraSel='<%# Bind("DataOraCom") %>' /> --> +1h
</div>
</div>
<div class="ui-grid-b">
@@ -130,10 +141,19 @@
<asp:DropDownList runat="server" ID="ddlSquadra" DataSourceID="odsSquadre" DataTextField="DescrSquadra" DataValueField="CodSquadra" SelectedValue='<%# Eval("CodSquadra") %>'></asp:DropDownList>
</div>
<div class="ui-block-b" style="text-align: right;">
<asp:TextBox runat="server" ID="txtDataFrom" type="date" Text='<%# Eval("DataOra","{0:yyyyy-MM-dd}") %>' />
<div class="ui-grid-a">
<div class="ui-block-a">
<asp:TextBox runat="server" ID="txtDataFrom" type="date" Text='<%# Eval("DataOra","{0:yyyy-MM-dd}") %>' />
</div>
<div class="ui-block-b">
<asp:DropDownList runat="server" ID="ddlOrario" DataSourceID="odsOrario" DataTextField="Orario" DataValueField="Orario" SelectedValue='<%# Eval("DataOra","{0:HH:mm:00}") %>'></asp:DropDownList>
</div>
</div>
</div>
<div class="ui-block-c">
<asp:DropDownList runat="server" ID="ddlOrario" DataSourceID="odsOrario" DataTextField="Orario" DataValueField="Orario" SelectedValue='<%# Eval("DataOra","{0:HH:mm:00}") %>'></asp:DropDownList>
<div class="ui-block-c text-center">
<label for="lblOrarioCom">ORARIO COMUNICATO</label>
<asp:Label runat="server" ID="lblOrarioCom" CssClass="tStrong"><%# string.Format("{0: dddd dd/MM/yy HH:mm} --> {1:HH:mm}", Eval("DataOraCom"),Convert.ToDateTime(Eval("DataOraCom")).AddHours(1)) %></asp:Label>
<%--<uc1:mod_selDataOra runat="server" ID="mod_selDataOra" dataOraSel='<%# Eval("DataOraCom") %>' />--%>
</div>
</div>
<div class="ui-grid-b">
+1 -1
View File
@@ -1,6 +1,6 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_selData.ascx.cs" Inherits="WebSCR.WebUserControls.mod_selData" %>
<div style="text-align: center; margin: auto; padding: 0em 5em;">
<div style="text-align: center; margin: auto; padding: 0 5em;">
<asp:TextBox runat="server" ID="txtDataRif" type="date" AutoPostBack="True" OnTextChanged="txtDataRif_TextChanged" />
</div>
@@ -0,0 +1,13 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_selDataOra.ascx.cs" Inherits="WebSCR.WebUserControls.mod_selDataOra" %>
<div class="ui-grid-a">
<div class="ui-block-a">
<asp:TextBox runat="server" ID="txtDataSel" type="date" TextMode="Date" />
</div>
<div class="ui-block-b">
<asp:DropDownList runat="server" ID="ddlOrario" DataSourceID="odsOrario" DataTextField="Orario" DataValueField="Orario"></asp:DropDownList>
</div>
</div>
<asp:ObjectDataSource ID="odsOrario" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="WebSCR_data.DS_UtilityTableAdapters.GiornoTipoTableAdapter"></asp:ObjectDataSource>
@@ -0,0 +1,81 @@
using SteamWare;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebSCR.WebUserControls
{
public partial class mod_selDataOra : System.Web.UI.UserControl
{
/// <summary>
/// selezionata NUOVA data
/// </summary>
public event EventHandler eh_update;
/// <summary>
/// solleva evento selezione data
/// </summary>
protected void reportEvent()
{
// evento!
if (eh_update != null)
{
eh_update(this, new EventArgs());
}
}
/// <summary>
/// stringa UID univoca
/// </summary>
public string uid
{
get
{
return this.UniqueID.Replace("$", "_").Replace("-", "_");
}
}
protected void Page_Load(object sender, EventArgs e)
{
#if false
if (!Page.IsPostBack)
{
txtDataSel.Text = dataSel.ToString("yyyy-MM-dd");
}
#endif
}
/// <summary>
/// data-ora selezionata
/// </summary>
public DateTime dataOraSel
{
get
{
DateTime answ = DateTime.Now;
try
{
answ = Convert.ToDateTime(txtDataSel.Text.Trim());
// aggiungo ora
DateTime oraSel = Convert.ToDateTime(ddlOrario.SelectedValue);
double ore = oraSel.Hour + Convert.ToDouble(oraSel.Minute) / 60;
answ = answ.AddHours(ore);
}
catch
{ }
return answ;
}
set
{
ddlOrario.DataBind();
try
{
txtDataSel.Text = string.Format("{0:yyyy-MM-dd}", value);
ddlOrario.SelectedValue = string.Format("{0:HH:mm:00}", value);
}
catch
{ }
}
}
}
}
+42
View File
@@ -0,0 +1,42 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebSCR.WebUserControls {
public partial class mod_selDataOra {
/// <summary>
/// txtDataSel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtDataSel;
/// <summary>
/// ddlOrario control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlOrario;
/// <summary>
/// odsOrario control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource odsOrario;
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
+28
View File
@@ -2276,6 +2276,8 @@ namespace WebSCR_data {
private global::System.Data.DataColumn columnIdxImpegno;
private global::System.Data.DataColumn columnDataOraCom;
private global::System.Data.DataColumn columnDataOra;
private global::System.Data.DataColumn columnTipoOrario;
@@ -2399,6 +2401,14 @@ namespace WebSCR_data {
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public global::System.Data.DataColumn DataOraComColumn {
get {
return this.columnDataOraCom;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public global::System.Data.DataColumn DataOraColumn {
@@ -2766,6 +2776,7 @@ namespace WebSCR_data {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public ImpegniRow AddImpegniRow(
int IdxImpegno,
System.DateTime DataOraCom,
System.DateTime DataOra,
string TipoOrario,
string CodCliente,
@@ -2810,6 +2821,7 @@ namespace WebSCR_data {
ImpegniRow rowImpegniRow = ((ImpegniRow)(this.NewRow()));
object[] columnValuesArray = new object[] {
IdxImpegno,
DataOraCom,
DataOra,
TipoOrario,
CodCliente,
@@ -2881,6 +2893,7 @@ namespace WebSCR_data {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal void InitVars() {
this.columnIdxImpegno = base.Columns["IdxImpegno"];
this.columnDataOraCom = base.Columns["DataOraCom"];
this.columnDataOra = base.Columns["DataOra"];
this.columnTipoOrario = base.Columns["TipoOrario"];
this.columnCodCliente = base.Columns["CodCliente"];
@@ -2929,6 +2942,8 @@ namespace WebSCR_data {
private void InitClass() {
this.columnIdxImpegno = new global::System.Data.DataColumn("IdxImpegno", typeof(int), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnIdxImpegno);
this.columnDataOraCom = new global::System.Data.DataColumn("DataOraCom", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnDataOraCom);
this.columnDataOra = new global::System.Data.DataColumn("DataOra", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnDataOra);
this.columnTipoOrario = new global::System.Data.DataColumn("TipoOrario", typeof(string), null, global::System.Data.MappingType.Element);
@@ -3015,6 +3030,8 @@ namespace WebSCR_data {
this.columnIdxImpegno}, true));
this.columnIdxImpegno.AllowDBNull = false;
this.columnIdxImpegno.Unique = true;
this.columnDataOraCom.AllowDBNull = false;
this.columnDataOraCom.Caption = "DataOra";
this.columnDataOra.AllowDBNull = false;
this.columnTipoOrario.AllowDBNull = false;
this.columnTipoOrario.MaxLength = 10;
@@ -7298,6 +7315,17 @@ namespace WebSCR_data {
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public System.DateTime DataOraCom {
get {
return ((global::System.DateTime)(this[this.tableImpegni.DataOraComColumn]));
}
set {
this[this.tableImpegni.DataOraComColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public System.DateTime DataOra {
+1
View File
@@ -1526,6 +1526,7 @@ SELECT Matr, Cognome, Nome, CognomeNome FROM Dipendenti WHERE (Matr = @Matr)</Co
<xs:complexType>
<xs:sequence>
<xs:element name="IdxImpegno" msprop:Generator_ColumnVarNameInTable="columnIdxImpegno" msprop:Generator_ColumnPropNameInRow="IdxImpegno" msprop:Generator_ColumnPropNameInTable="IdxImpegnoColumn" msprop:Generator_UserColumnName="IdxImpegno" type="xs:int" />
<xs:element name="DataOraCom" msdata:Caption="DataOra" msprop:Generator_ColumnVarNameInTable="columnDataOraCom" msprop:Generator_ColumnPropNameInRow="DataOraCom" msprop:Generator_ColumnPropNameInTable="DataOraComColumn" msprop:Generator_UserColumnName="DataOraCom" type="xs:dateTime" />
<xs:element name="DataOra" msprop:Generator_ColumnVarNameInTable="columnDataOra" msprop:Generator_ColumnPropNameInRow="DataOra" msprop:Generator_ColumnPropNameInTable="DataOraColumn" msprop:Generator_UserColumnName="DataOra" type="xs:dateTime" />
<xs:element name="TipoOrario" msprop:Generator_ColumnVarNameInTable="columnTipoOrario" msprop:Generator_ColumnPropNameInRow="TipoOrario" msprop:Generator_ColumnPropNameInTable="TipoOrarioColumn" msprop:Generator_UserColumnName="TipoOrario">
<xs:simpleType>
+3 -3
View File
@@ -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="136" 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="129" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:AnagSquadre" ZOrder="10" X="579" Y="415" Height="305" Width="261" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="178" />
<Shape ID="DesignTable:AnagZone" ZOrder="18" X="556" Y="160" Height="229" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignTable:AnagTipoConsegne" ZOrder="17" X="919" Y="164" Height="286" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
<Shape ID="DesignTable:AnagClienti" ZOrder="12" X="330" Y="139" Height="362" Width="212" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:Impegni" ZOrder="2" X="13" Y="159" Height="381" 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="197" />
<Shape ID="DesignTable:DispImpTot" ZOrder="15" X="890" Y="469" Height="172" Width="293" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:DispImpSquadre" ZOrder="16" X="931" Y="666" Height="153" Width="241" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:v_ImpegniCal" ZOrder="6" X="393" Y="937" Height="210" Width="222" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
@@ -20,7 +20,7 @@
<Shape ID="DesignTable:DB2_DOCS" ZOrder="8" X="1244" Y="171" Height="516" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="408" />
<Shape ID="DesignTable:AssegnSquadre" ZOrder="5" X="333" Y="730" Height="191" Width="276" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:Dipendenti" ZOrder="4" X="339" Y="514" Height="153" Width="209" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:v_resImp" ZOrder="1" X="51" Y="922" Height="134" Width="196" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
<Shape ID="DesignTable:v_resImp" ZOrder="2" X="51" Y="922" Height="134" Width="196" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
</Shapes>
<Connectors>
<Connector ID="DesignRelation:FK_Disponibilita_AnagSquadre" ZOrder="14" LineWidth="11">
Binary file not shown.
Binary file not shown.
Binary file not shown.