Fix barcode x init classe check quotidiani
This commit is contained in:
@@ -8,14 +8,14 @@ using GPW_data;
|
||||
|
||||
namespace GPW_Barcode
|
||||
{
|
||||
public partial class Barcode : System.Web.UI.Page
|
||||
public partial class Barcode : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
utils.mng.dailyDuties();
|
||||
}
|
||||
}
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
utils.mng.dailyDuties();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,168 +1,137 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_bCodeTimb.ascx.cs" Inherits="GPW.WebUserControls.mod_bCodeTimb" %>
|
||||
<% if (false)
|
||||
{ %>
|
||||
<link href="~/css/Style.css" rel="stylesheet" type="text/css" />
|
||||
<% } %>
|
||||
|
||||
<asp:Panel runat="server" ID="pnlAll" CssClass="stileAttesa" Height="100%">
|
||||
<div style="height: 100%;">
|
||||
<div style="float: none; text-align: center; margin: auto;">
|
||||
<div class="fullPageHeader">
|
||||
<div style="float: left; text-align: left;">
|
||||
<asp:Label runat="server" ID="lblPostazione" />
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<asp:Label runat="server" ID="lblPrinter" />
|
||||
<br />
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblCurrentPage" Text="Postazione Timbrature Barcode" Font-Size="16pt" ForeColor="White" />
|
||||
<br />
|
||||
<asp:HyperLink runat="server" ID="hlMenu" NavigateUrl="~/Default.aspx" Text="Main Menu" />
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 100%;">
|
||||
<div style="float: none; text-align: center; margin: auto;">
|
||||
<div class="fullPageHeader">
|
||||
<div style="float: left; text-align: left;">
|
||||
<asp:Label runat="server" ID="lblPostazione" />
|
||||
</div>
|
||||
<div style="float: none; text-align: center; margin: auto;">
|
||||
<div class="clearDiv">
|
||||
<asp:Label runat="server" ID="lblDipendenteAttivo" Font-Size="36pt" Text="..." />
|
||||
</div>
|
||||
<div class="msgBoxBarcode">
|
||||
<asp:Label runat="server" ID="lblMessaggi" Text="attesa input utente" Font-Size="18pt" />
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<asp:Label runat="server" ID="lblPrinter" />
|
||||
<br />
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<div class="divSx" style="padding: 4px; text-align: left; min-height: 400px; min-width: 200px; width: 19%;">
|
||||
<asp:Panel runat="server" ID="pnlBtnIn">
|
||||
<asp:Button runat="server" ID="btnEntrata" Text="Entrata" Width="200px" Height="300px" CssClass="fontTitolo" OnClick="btnEntrata_Click" />
|
||||
</asp:Panel>
|
||||
</div>
|
||||
<div class="divDx" style="padding: 4px; text-align: right; min-height: 400px; min-width: 200px; width: 19%;">
|
||||
<asp:Panel runat="server" ID="PaneOut">
|
||||
<asp:Button runat="server" ID="btnUscita" Text="Uscita" Width="200px" Height="300px" CssClass="fontTitolo" OnClick="btnUscita_Click" />
|
||||
</asp:Panel>
|
||||
</div>
|
||||
<div class="divCenter" style="min-height: 400px; width: 50%;">
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblBarcode" Text="Barcode" />
|
||||
<br />
|
||||
<asp:TextBox runat="server" ID="txtBarcode" Height="60px" Width="400px" Font-Size="32pt" AutoPostBack="true" Style="text-align: center"
|
||||
OnTextChanged="txtBarcode_TextChanged" TextMode="Password" />
|
||||
</div>
|
||||
<br />
|
||||
<div class="divCenter">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" DataSourceID="ods" AutoGenerateColumns="False" DataKeyNames="dataLav,idxDipendente"
|
||||
CellPadding="4" ForeColor="#333333" GridLines="None" Font-Size="9pt" Width="100%">
|
||||
<AlternatingRowStyle CssClass="alternatingRowStyle" />
|
||||
<EditRowStyle CssClass="editRowStyle" />
|
||||
<FooterStyle CssClass="footerStyle" ForeColor="White" />
|
||||
<HeaderStyle CssClass="headerStyle" ForeColor="White" />
|
||||
<PagerStyle CssClass="pagerStyle" ForeColor="White" />
|
||||
<RowStyle CssClass="rowStyle" />
|
||||
<SelectedRowStyle CssClass="selectedRowStyle" ForeColor="#333333" />
|
||||
<SortedAscendingCellStyle CssClass="sortAscCell" />
|
||||
<SortedAscendingHeaderStyle CssClass="sortAscHead" />
|
||||
<SortedDescendingCellStyle CssClass="sortDescCell" />
|
||||
<SortedDescendingHeaderStyle CssClass="sortDescHead" />
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="data" SortExpression="dataLav" ItemStyle-Wrap="false" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Bind("dataLav", "{0:dd-MM}") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ent" SortExpression="entrata_1" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label3" runat="server" Text='<%# Bind("entrata_1","{0:HH:mm}") %>' ForeColor="#226622" Font-Size="X-Small" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Usc" SortExpression="uscita_1" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label4" runat="server" Text='<%# Bind("uscita_1","{0:HH:mm}") %>' ForeColor="#222266" Font-Size="X-Small" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ent" SortExpression="entrata_2" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label5" runat="server" Text='<%# Bind("entrata_2","{0:HH:mm}") %>' ForeColor="#226622" Font-Size="X-Small" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Usc" SortExpression="uscita_2" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label6" runat="server" Text='<%# Bind("uscita_2","{0:HH:mm}") %>' ForeColor="#222266" Font-Size="X-Small" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ent" SortExpression="entrata_3" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label7" runat="server" Text='<%# Bind("entrata_3","{0:HH:mm}") %>' ForeColor="#226622" Font-Size="X-Small" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Usc" SortExpression="uscita_3" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label8" runat="server" Text='<%# Bind("uscita_3","{0:HH:mm}") %>' ForeColor="#222266" Font-Size="X-Small" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="H lav" SortExpression="h_lav" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<b>
|
||||
<asp:Label ID="Label11" runat="server" Text='<%# Bind("h_lav","{0:0.00}") %>' />
|
||||
</b>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<b>
|
||||
<asp:Label ID="lblIsOk" runat="server" Text="*" ForeColor="Red" Visible='<%# invBool(Eval("isOk")) %>' />
|
||||
</b>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="Original_{0}"
|
||||
SelectMethod="getLastByUser" TypeName="GPW_data.DS_ApplicazioneTableAdapters.TimbratureExplTableAdapter" UpdateMethod="Update">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter SessionField="idxDipendente" Name="idxDipendente" Type="Int32" />
|
||||
<asp:Parameter Name="num2show" DefaultValue="10" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<asp:Panel ID="pnlTimer" runat="server" ScrollBars="None">
|
||||
<asp:Label runat="server" ID="lblNextTimbr" />
|
||||
<%--<asp:Image ID="imgRun" runat="server" ImageUrl="~/images/ajax-loader.gif" />--%>
|
||||
<b>
|
||||
<asp:Label runat="server" ID="lblCountDown" CssClass="fontMedio" /></b>
|
||||
<asp:Timer ID="timerConf" runat="server" Interval="500" Enabled="false">
|
||||
</asp:Timer>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="lblCurrentPage" Text="Postazione Timbrature Barcode" Font-Size="16pt" ForeColor="White" />
|
||||
<br />
|
||||
<asp:HyperLink runat="server" ID="hlMenu" NavigateUrl="~/Default.aspx" Text="Main Menu" />
|
||||
</div>
|
||||
<%--<div class="clearDiv clockBar" style="height: 72px;">
|
||||
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<div class="divSx">
|
||||
<asp:Label runat="server" ID="lblData" Font-Size="48pt" Text="..." />
|
||||
</div>
|
||||
<div class="divDx">
|
||||
<asp:Label runat="server" ID="lblRTC" Font-Size="48pt" Text="..." Font-Bold="true" />
|
||||
</div>
|
||||
<asp:Timer ID="timerClock" runat="server" Interval="5000" Enabled="true">
|
||||
</asp:Timer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>--%>
|
||||
<%--<div class="clearDiv clockBar">
|
||||
<div class="clock">
|
||||
<div id="Date">
|
||||
</div>
|
||||
<ul>
|
||||
<li id="hours"></li>
|
||||
<li id="point">:</li>
|
||||
<li id="min"></li>
|
||||
<li id="point">:</li>
|
||||
<li id="sec"></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>--%>
|
||||
</div>
|
||||
</div>
|
||||
<div style="float: none; text-align: center; margin: auto;">
|
||||
<div class="clearDiv">
|
||||
<asp:Label runat="server" ID="lblDipendenteAttivo" Font-Size="36pt" Text="..." />
|
||||
</div>
|
||||
<div class="msgBoxBarcode">
|
||||
<asp:Label runat="server" ID="lblMessaggi" Text="attesa input utente" Font-Size="18pt" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="divSx" style="padding: 4px; text-align: left; min-height: 400px; min-width: 200px; width: 19%;">
|
||||
<asp:Panel runat="server" ID="pnlBtnIn">
|
||||
<asp:Button runat="server" ID="btnEntrata" Text="Entrata" Width="200px" Height="300px" CssClass="fontTitolo" OnClick="btnEntrata_Click" />
|
||||
</asp:Panel>
|
||||
</div>
|
||||
<div class="divDx" style="padding: 4px; text-align: right; min-height: 400px; min-width: 200px; width: 19%;">
|
||||
<asp:Panel runat="server" ID="PaneOut">
|
||||
<asp:Button runat="server" ID="btnUscita" Text="Uscita" Width="200px" Height="300px" CssClass="fontTitolo" OnClick="btnUscita_Click" />
|
||||
</asp:Panel>
|
||||
</div>
|
||||
<div class="divCenter" style="min-height: 400px; width: 50%;">
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblBarcode" Text="Barcode" />
|
||||
<br />
|
||||
<asp:TextBox runat="server" ID="txtBarcode" Height="60px" Width="400px" Font-Size="32pt" AutoPostBack="true" Style="text-align: center"
|
||||
OnTextChanged="txtBarcode_TextChanged" TextMode="Password" />
|
||||
</div>
|
||||
<br />
|
||||
<div class="divCenter">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" DataSourceID="ods" AutoGenerateColumns="False" DataKeyNames="dataLav,idxDipendente"
|
||||
CellPadding="4" ForeColor="#333333" GridLines="None" Font-Size="9pt" Width="100%">
|
||||
<AlternatingRowStyle CssClass="alternatingRowStyle" />
|
||||
<EditRowStyle CssClass="editRowStyle" />
|
||||
<FooterStyle CssClass="footerStyle" ForeColor="White" />
|
||||
<HeaderStyle CssClass="headerStyle" ForeColor="White" />
|
||||
<PagerStyle CssClass="pagerStyle" ForeColor="White" />
|
||||
<RowStyle CssClass="rowStyle" />
|
||||
<SelectedRowStyle CssClass="selectedRowStyle" ForeColor="#333333" />
|
||||
<SortedAscendingCellStyle CssClass="sortAscCell" />
|
||||
<SortedAscendingHeaderStyle CssClass="sortAscHead" />
|
||||
<SortedDescendingCellStyle CssClass="sortDescCell" />
|
||||
<SortedDescendingHeaderStyle CssClass="sortDescHead" />
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="data" SortExpression="dataLav" ItemStyle-Wrap="false" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Bind("dataLav", "{0:dd-MM}") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ent" SortExpression="entrata_1" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label3" runat="server" Text='<%# Bind("entrata_1","{0:HH:mm}") %>' ForeColor="#226622" Font-Size="X-Small" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Usc" SortExpression="uscita_1" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label4" runat="server" Text='<%# Bind("uscita_1","{0:HH:mm}") %>' ForeColor="#222266" Font-Size="X-Small" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ent" SortExpression="entrata_2" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label5" runat="server" Text='<%# Bind("entrata_2","{0:HH:mm}") %>' ForeColor="#226622" Font-Size="X-Small" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Usc" SortExpression="uscita_2" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label6" runat="server" Text='<%# Bind("uscita_2","{0:HH:mm}") %>' ForeColor="#222266" Font-Size="X-Small" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ent" SortExpression="entrata_3" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label7" runat="server" Text='<%# Bind("entrata_3","{0:HH:mm}") %>' ForeColor="#226622" Font-Size="X-Small" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Usc" SortExpression="uscita_3" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label8" runat="server" Text='<%# Bind("uscita_3","{0:HH:mm}") %>' ForeColor="#222266" Font-Size="X-Small" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="H lav" SortExpression="h_lav" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<b>
|
||||
<asp:Label ID="Label11" runat="server" Text='<%# Bind("h_lav","{0:0.00}") %>' />
|
||||
</b>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<b>
|
||||
<asp:Label ID="lblIsOk" runat="server" Text="*" ForeColor="Red" Visible='<%# invBool(Eval("isOk")) %>' />
|
||||
</b>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="Original_{0}"
|
||||
SelectMethod="getLastByUser" TypeName="GPW_data.DS_ApplicazioneTableAdapters.TimbratureExplTableAdapter" UpdateMethod="Update">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter SessionField="idxDipendente" Name="idxDipendente" Type="Int32" />
|
||||
<asp:Parameter Name="num2show" DefaultValue="10" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<asp:Panel ID="pnlTimer" runat="server" ScrollBars="None">
|
||||
<asp:Label runat="server" ID="lblNextTimbr" />
|
||||
<b>
|
||||
<asp:Label runat="server" ID="lblCountDown" CssClass="fontMedio" /></b>
|
||||
<asp:Timer ID="timerConf" runat="server" Interval="500" Enabled="false">
|
||||
</asp:Timer>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
@@ -9,480 +9,465 @@ using GPW_data;
|
||||
|
||||
namespace GPW.WebUserControls
|
||||
{
|
||||
public partial class mod_bCodeTimb : System.Web.UI.UserControl
|
||||
public partial class mod_bCodeTimb : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// salva il dato se il prox sia entrata...
|
||||
/// </summary>
|
||||
protected bool nextIsEntrata
|
||||
{
|
||||
/// <summary>
|
||||
/// salva il dato se il prox sia entrata...
|
||||
/// </summary>
|
||||
protected bool nextIsEntrata
|
||||
get
|
||||
{
|
||||
return memLayer.ML.BoolSessionObj("nextIsEntrata");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("nextIsEntrata", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// dataora associata all'evento scansioen BCode
|
||||
/// </summary>
|
||||
protected DateTime orarioBCode
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DateTime)memLayer.ML.objSessionObj("dataOraBCode");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("dataOraBCode", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica i secondi di countdown rimasti x auto-commit
|
||||
/// </summary>
|
||||
protected int countDown
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("countDownBCode");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("countDownBCode", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// pagina corrente
|
||||
/// </summary>
|
||||
protected string paginaCorrente
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
Uri MyUrl = Request.Url;
|
||||
string delimStr = "/";
|
||||
char[] delimiter = delimStr.ToCharArray();
|
||||
string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
|
||||
int n = finalUrl.Length;
|
||||
answ = finalUrl[n - 1].ToString();
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// prox messaggio utente (da mostrare)
|
||||
/// </summary>
|
||||
protected string nextUsrMsg
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.BoolSessionObj("nextIsEntrata");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("nextIsEntrata", value);
|
||||
}
|
||||
answ = memLayer.ML.StringSessionObj("nextUsrMsg");
|
||||
}
|
||||
/// <summary>
|
||||
/// dataora associata all'evento scansioen BCode
|
||||
/// </summary>
|
||||
protected DateTime orarioBCode
|
||||
catch
|
||||
{ }
|
||||
if (answ == "")
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DateTime)memLayer.ML.objSessionObj("dataOraBCode");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("dataOraBCode", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica i secondi di countdown rimasti x auto-commit
|
||||
/// </summary>
|
||||
protected int countDown
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("countDownBCode");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("countDownBCode", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// pagina corrente
|
||||
/// </summary>
|
||||
protected string paginaCorrente
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
Uri MyUrl = Request.Url;
|
||||
string delimStr = "/";
|
||||
char[] delimiter = delimStr.ToCharArray();
|
||||
string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
|
||||
int n = finalUrl.Length;
|
||||
answ = finalUrl[n - 1].ToString();
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// prox messaggio utente (da mostrare)
|
||||
/// </summary>
|
||||
protected string nextUsrMsg
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj("nextUsrMsg");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (answ == "")
|
||||
{
|
||||
answ = "...waiting...";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("nextUsrMsg", value);
|
||||
}
|
||||
answ = "...waiting...";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("nextUsrMsg", value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
chekIpPostazione();
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
DataProxy.idxDipendente = -1;
|
||||
bool visibile = false;
|
||||
setCtrlState(visibile);
|
||||
checkBarcode();
|
||||
}
|
||||
timerConf.Tick += new EventHandler<EventArgs>(timerConf_Tick);
|
||||
lblDipendenteAttivo.Text = nextUsrMsg;
|
||||
txtBarcode.Focus();
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica IP della postazione chiamante, se non è tra quelli permessi (o non è indicato "*") rimanda a pagina precedente...
|
||||
/// </summary>
|
||||
private void chekIpPostazione()
|
||||
{
|
||||
// recupero IP
|
||||
string IPv4 = Request.UserHostName;
|
||||
// controllo se IP locale = approvata...
|
||||
if (!memLayer.ML.confReadString("ipv4StazBCode").Contains(IPv4) && memLayer.ML.confReadString("ipv4StazBCode") != "*")
|
||||
{
|
||||
Response.Redirect("~/Default.aspx");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// allo scadere del timer controllo countdown!
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void timerConf_Tick(object sender, EventArgs e)
|
||||
{
|
||||
contatorePag = 0;
|
||||
if (countDown > 1)
|
||||
{
|
||||
countDown = countDown - 1;
|
||||
lblCountDown.Text = countDown.ToString();
|
||||
txtBarcode.Focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
// salvo operazione di default!
|
||||
registraTimbratura(nextIsEntrata);
|
||||
// reset visualizzazione
|
||||
setCtrlState(false);
|
||||
timerConf.Enabled = false;
|
||||
// reset valori
|
||||
Response.Redirect(paginaCorrente);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta lo stato visibile dei controlli
|
||||
/// </summary>
|
||||
/// <param name="visibile"></param>
|
||||
private void setCtrlState(bool visibile)
|
||||
{
|
||||
pnlTimer.Visible = visibile;
|
||||
//imgRun.Visible = visibile;
|
||||
if (DataProxy.idxDipendente > 0)
|
||||
{
|
||||
grView.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
grView.Visible = visibile;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica in che stato debbano essere i buttons (se barcode utente valido)
|
||||
/// </summary>
|
||||
private void checkButtons()
|
||||
{
|
||||
// controllo se il prox comando DOVREBBE essere entrata o uscita
|
||||
nextIsEntrata = true;
|
||||
// controllo dipendente
|
||||
if (DataProxy.idxDipendente > 0)
|
||||
{
|
||||
// ricavo ultima timbratura..
|
||||
nextIsEntrata = timbratrice.nextIsEntrata(DataProxy.idxDipendente);
|
||||
string tipoTimb = "uscita";
|
||||
// di conseguenza cambio abilitazione ad un buttons
|
||||
if (nextIsEntrata)
|
||||
{
|
||||
chekIpPostazione();
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
DataProxy.idxDipendente = -1;
|
||||
bool visibile = false;
|
||||
setCtrlState(visibile);
|
||||
checkBarcode();
|
||||
}
|
||||
timerConf.Tick += new EventHandler<EventArgs>(timerConf_Tick);
|
||||
#if false
|
||||
timerClock.Tick += new EventHandler<EventArgs>(timerClock_Tick);
|
||||
#endif
|
||||
lblDipendenteAttivo.Text = nextUsrMsg;
|
||||
txtBarcode.Focus();
|
||||
btnEntrata.CssClass = "btnPreferred";
|
||||
btnUscita.CssClass = "btnStd";
|
||||
tipoTimb = "ENTRATA";
|
||||
}
|
||||
#if false
|
||||
/// <summary>
|
||||
/// timer x update orario indicato
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void timerClock_Tick(object sender, EventArgs e)
|
||||
else
|
||||
{
|
||||
DateTime adesso = DateTime.Now;
|
||||
lblData.Text = string.Format("{0:ddd} {0:dd/MM/yyyy}", adesso);
|
||||
lblRTC.Text = string.Format("{0:HH:mm}", adesso);
|
||||
}
|
||||
#endif
|
||||
/// <summary>
|
||||
/// verifica IP della postazione chiamante, se non è tra quelli permessi (o non è indicato "*") rimanda a pagina precedente...
|
||||
/// </summary>
|
||||
private void chekIpPostazione()
|
||||
{
|
||||
// recupero IP
|
||||
string IPv4 = Request.UserHostName;
|
||||
// controllo se IP locale = approvata...
|
||||
if (!memLayer.ML.confReadString("ipv4StazBCode").Contains(IPv4) && memLayer.ML.confReadString("ipv4StazBCode") != "*")
|
||||
{
|
||||
Response.Redirect("~/Default.aspx");
|
||||
}
|
||||
btnEntrata.CssClass = "btnStd";
|
||||
btnUscita.CssClass = "btnPreferred";
|
||||
tipoTimb = "USCITA";
|
||||
}
|
||||
/// <summary>
|
||||
/// allo scadere del timer controllo countdown!
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void timerConf_Tick(object sender, EventArgs e)
|
||||
{
|
||||
contatorePag = 0;
|
||||
if (countDown > 1)
|
||||
{
|
||||
countDown = countDown - 1;
|
||||
lblCountDown.Text = countDown.ToString();
|
||||
txtBarcode.Focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
// salvo operazione di default!
|
||||
registraTimbratura(nextIsEntrata);
|
||||
// reset visualizzazione
|
||||
setCtrlState(false);
|
||||
timerConf.Enabled = false;
|
||||
// reset valori
|
||||
Response.Redirect(paginaCorrente);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta lo stato visibile dei controlli
|
||||
/// </summary>
|
||||
/// <param name="visibile"></param>
|
||||
private void setCtrlState(bool visibile)
|
||||
{
|
||||
pnlTimer.Visible = visibile;
|
||||
//imgRun.Visible = visibile;
|
||||
if (DataProxy.idxDipendente > 0)
|
||||
{
|
||||
grView.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
grView.Visible = visibile;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica in che stato debbano essere i buttons (se barcode utente valido)
|
||||
/// </summary>
|
||||
private void checkButtons()
|
||||
{
|
||||
// controllo se il prox comando DOVREBBE essere entrata o uscita
|
||||
nextIsEntrata = true;
|
||||
// controllo dipendente
|
||||
if (DataProxy.idxDipendente > 0)
|
||||
{
|
||||
// ricavo ultima timbratura..
|
||||
nextIsEntrata = timbratrice.nextIsEntrata(DataProxy.idxDipendente);
|
||||
string tipoTimb = "uscita";
|
||||
// di conseguenza cambio abilitazione ad un buttons
|
||||
if (nextIsEntrata)
|
||||
{
|
||||
btnEntrata.CssClass = "btnPreferred";
|
||||
btnUscita.CssClass = "btnStd";
|
||||
tipoTimb = "ENTRATA";
|
||||
}
|
||||
else
|
||||
{
|
||||
btnEntrata.CssClass = "btnStd";
|
||||
btnUscita.CssClass = "btnPreferred";
|
||||
tipoTimb = "USCITA";
|
||||
}
|
||||
lblNextTimbr.Text = string.Format("Allo scadere del timer verrà registrata una timbratura di <b>{0}</b>", tipoTimb);
|
||||
lblNextTimbr.Text = string.Format("Allo scadere del timer verrà registrata una timbratura di <b>{0}</b>", tipoTimb);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
btnEntrata.CssClass = "btnStd";
|
||||
btnUscita.CssClass = "btnStd";
|
||||
lblNextTimbr.Text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
btnEntrata.CssClass = "btnStd";
|
||||
btnUscita.CssClass = "btnStd";
|
||||
lblNextTimbr.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// controlla se ci sia un barcode valido, tra:
|
||||
/// - idxDipendente (INT, eventuale padding di zero...)
|
||||
/// - matr dipendente
|
||||
/// - cf dipendente
|
||||
/// </summary>
|
||||
private void checkBarcode()
|
||||
/// <summary>
|
||||
/// controlla se ci sia un barcode valido, tra:
|
||||
/// - idxDipendente (INT, eventuale padding di zero...)
|
||||
/// - matr dipendente
|
||||
/// - cf dipendente
|
||||
/// </summary>
|
||||
private void checkBarcode()
|
||||
{
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
// mostro i buttons enabled
|
||||
btnEntrata.Enabled = true;
|
||||
btnUscita.Enabled = true;
|
||||
lblMessaggi.Text = "Barcode";
|
||||
|
||||
switch (tipoBCode)
|
||||
{
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
// mostro i buttons enabled
|
||||
btnEntrata.Enabled = true;
|
||||
btnUscita.Enabled = true;
|
||||
lblMessaggi.Text = "Barcode";
|
||||
switch (tipoBCode)
|
||||
{
|
||||
case tipoCodiceBarcode.idxDipendente:
|
||||
// calcolo idxOperatore...
|
||||
int idxOper = 0;
|
||||
try
|
||||
{
|
||||
idxOper = Convert.ToInt32(barcodeIn.ToLowerInvariant().Replace("idx", ""));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// controllo esista il codice idxDipendente scansionato
|
||||
if (DataProxy.DP.taDipendenti.getByIdx(idxOper).Rows.Count == 0)
|
||||
{
|
||||
setCtrlState(false);
|
||||
DataProxy.idxDipendente = 0;
|
||||
orarioBCode = DateTime.Now;
|
||||
timerConf.Enabled = false;
|
||||
nextUsrMsg = "...waiting...";
|
||||
lblMessaggi.Text += " - codice non valido / non trovato.";
|
||||
pnlAll.CssClass = "stileComandoKo";
|
||||
}
|
||||
else
|
||||
{
|
||||
setCtrlState(true);
|
||||
DataProxy.idxDipendente = idxOper;
|
||||
orarioBCode = DateTime.Now;
|
||||
DS_Applicazione.DipendentiRow rigaDip = DataProxy.DP.taDipendenti.getByIdx(idxOper)[0];
|
||||
nextUsrMsg = string.Format("{0} {1} - {2: HH:mm:ss}", rigaDip.Cognome, rigaDip.Nome, orarioBCode);
|
||||
lblMessaggi.Text += " - impostato dipendente!";
|
||||
pnlAll.CssClass = "stileComandoOk";
|
||||
// faccio partire countdown
|
||||
countDown = SteamWare.memLayer.ML.confReadInt("secTimeoutBCode");
|
||||
lblCountDown.Text = countDown.ToString();
|
||||
timerConf.Enabled = true;
|
||||
}
|
||||
txtBarcode.Focus();
|
||||
break;
|
||||
case tipoCodiceBarcode.matrDipendente:
|
||||
// fare!!!
|
||||
txtBarcode.Focus();
|
||||
break;
|
||||
case tipoCodiceBarcode.cfDipendente:
|
||||
// fare!!!
|
||||
txtBarcode.Focus();
|
||||
break;
|
||||
case tipoCodiceBarcode.Comando:
|
||||
// procedo SOLO se ho cod dipendente
|
||||
if (DataProxy.DP.taDipendenti.getByIdx(DataProxy.idxDipendente).Rows.Count > 0)
|
||||
{
|
||||
timerConf.Enabled = false;
|
||||
setCtrlState(false);
|
||||
}
|
||||
nextUsrMsg = "...waiting...";
|
||||
// controlla se sia entra/esci (IN/OUT)
|
||||
if (barcodeIn.ToUpperInvariant() == "CMDIN")
|
||||
{
|
||||
// registro ingresso!
|
||||
registraTimbratura(true);
|
||||
Response.Redirect(paginaCorrente);
|
||||
}
|
||||
else if (barcodeIn.ToUpperInvariant() == "CMDOUT")
|
||||
{
|
||||
// registro uscita!
|
||||
registraTimbratura(false);
|
||||
Response.Redirect(paginaCorrente);
|
||||
}
|
||||
//else if (barcodeIn.ToUpperInvariant() == "CMD")
|
||||
//{
|
||||
// Response.Redirect(paginaCorrente);
|
||||
//}
|
||||
//DataProxy.idxDipendente = -1;
|
||||
txtBarcode.Focus();
|
||||
break;
|
||||
default:
|
||||
txtBarcode.Focus();
|
||||
break;
|
||||
}
|
||||
barcodeIn = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
lblMessaggi.Text = "...attesa barcode...";
|
||||
}
|
||||
grView.DataBind();
|
||||
checkButtons();
|
||||
txtBarcode.Focus();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// valore barcode
|
||||
/// </summary>
|
||||
public string barcodeIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtBarcode.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtBarcode.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// salvo entrata
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnEntrata_Click(object sender, EventArgs e)
|
||||
{
|
||||
// salvo entrata...
|
||||
registraTimbratura(true);
|
||||
Response.Redirect(paginaCorrente);
|
||||
}
|
||||
/// <summary>
|
||||
/// salvo uscita
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnUscita_Click(object sender, EventArgs e)
|
||||
{
|
||||
// salvo uscita
|
||||
registraTimbratura(false);
|
||||
Response.Redirect(paginaCorrente);
|
||||
}
|
||||
/// <summary>
|
||||
/// registro timbratura
|
||||
/// </summary>
|
||||
/// <param name="isEntrata"></param>
|
||||
/// <returns></returns>
|
||||
private void registraTimbratura(bool isEntrata)
|
||||
{
|
||||
// salvo evento entrata...
|
||||
string IPv4 = Request.UserHostName;
|
||||
// auto-approvazione da web.config
|
||||
bool approvata = memLayer.ML.confReadBool("barcodeAutoApprove");
|
||||
if (DataProxy.idxDipendente > 0)
|
||||
{
|
||||
string CognomeNome = "";
|
||||
if (memLayer.ML.confReadBool("showNameAfterCmd"))
|
||||
{
|
||||
CognomeNome = DataProxy.DP.CognomeNomeByIdx(DataProxy.idxDipendente);
|
||||
}
|
||||
if (nextIsEntrata)
|
||||
{
|
||||
nextUsrMsg = string.Format("{1} ENTRATA {0:HH:mm:ss}", orarioBCode, CognomeNome);
|
||||
}
|
||||
else
|
||||
{
|
||||
nextUsrMsg = string.Format("{1} USCITA {0:HH:mm:ss}", orarioBCode, CognomeNome);
|
||||
}
|
||||
timbratrice.registraTimbratura(DataProxy.idxDipendente, orarioBCode, isEntrata, IPv4, "Web", approvata);
|
||||
//aggiorno timbrature visualizzate
|
||||
setButtons();
|
||||
grView.DataBind();
|
||||
}
|
||||
else
|
||||
{
|
||||
lblMessaggi.Text = "IdxDipendente non trovato! timbratura impossibile";
|
||||
pnlAll.CssClass = "stileComandoND";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta i buttons secondo i valori in sessione...
|
||||
/// </summary>
|
||||
private void setButtons()
|
||||
{
|
||||
// mostrare e abilitare secondo condizioni al contorno
|
||||
}
|
||||
/// <summary>
|
||||
/// decodifica il tipo barcode acquisito
|
||||
/// </summary>
|
||||
public tipoCodiceBarcode tipoBCode
|
||||
{
|
||||
get
|
||||
{
|
||||
tipoCodiceBarcode answ = tipoCodiceBarcode.ND;
|
||||
// controllo non si tratti di un comando...
|
||||
string preCmd = memLayer.ML.confReadString("prefComandi");
|
||||
if (barcodeIn.StartsWith(preCmd, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
answ = tipoCodiceBarcode.Comando;
|
||||
}
|
||||
// controllo se sia un codice "idx"
|
||||
else if (barcodeIn.StartsWith("idx", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
answ = tipoCodiceBarcode.idxDipendente;
|
||||
}
|
||||
// controllo se sia un codice "matr"
|
||||
else if (barcodeIn.StartsWith("matr", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
answ = tipoCodiceBarcode.matrDipendente;
|
||||
}
|
||||
// controllo se sia un codice "cf"
|
||||
else if (barcodeIn.StartsWith("cf", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
answ = tipoCodiceBarcode.cfDipendente;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// inverte valore booleano
|
||||
/// </summary>
|
||||
/// <param name="isEnt"></param>
|
||||
/// <returns></returns>
|
||||
public bool invBool(object valore)
|
||||
{
|
||||
bool answ = true;
|
||||
case tipoCodiceBarcode.idxDipendente:
|
||||
// calcolo idxOperatore...
|
||||
int idxOper = 0;
|
||||
try
|
||||
{
|
||||
answ = !Convert.ToBoolean(valore);
|
||||
idxOper = Convert.ToInt32(barcodeIn.ToLowerInvariant().Replace("idx", ""));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// evento cambio testo
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtBarcode_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
// solo se ho ALMENO 3 char...
|
||||
if (barcodeIn.Length >= 3)
|
||||
// controllo esista il codice idxDipendente scansionato
|
||||
if (DataProxy.DP.taDipendenti.getByIdx(idxOper).Rows.Count == 0)
|
||||
{
|
||||
contatorePag = 0;
|
||||
checkBarcode();
|
||||
setCtrlState(false);
|
||||
DataProxy.idxDipendente = 0;
|
||||
orarioBCode = DateTime.Now;
|
||||
timerConf.Enabled = false;
|
||||
nextUsrMsg = "...waiting...";
|
||||
lblMessaggi.Text += " - codice non valido / non trovato.";
|
||||
pnlAll.CssClass = "stileComandoKo";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// variabile che conta numero di refresh parziali prima di fare reload completo
|
||||
/// </summary>
|
||||
protected int contatorePag
|
||||
{
|
||||
get
|
||||
else
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("numChiamatePaginaBCode");
|
||||
setCtrlState(true);
|
||||
DataProxy.idxDipendente = idxOper;
|
||||
orarioBCode = DateTime.Now;
|
||||
DS_Applicazione.DipendentiRow rigaDip = DataProxy.DP.taDipendenti.getByIdx(idxOper)[0];
|
||||
nextUsrMsg = string.Format("{0} {1} - {2: HH:mm:ss}", rigaDip.Cognome, rigaDip.Nome, orarioBCode);
|
||||
lblMessaggi.Text += " - impostato dipendente!";
|
||||
pnlAll.CssClass = "stileComandoOk";
|
||||
// faccio partire countdown
|
||||
countDown = SteamWare.memLayer.ML.confReadInt("secTimeoutBCode");
|
||||
lblCountDown.Text = countDown.ToString();
|
||||
timerConf.Enabled = true;
|
||||
}
|
||||
set
|
||||
txtBarcode.Focus();
|
||||
break;
|
||||
case tipoCodiceBarcode.matrDipendente:
|
||||
// fare!!!
|
||||
txtBarcode.Focus();
|
||||
break;
|
||||
case tipoCodiceBarcode.cfDipendente:
|
||||
// fare!!!
|
||||
txtBarcode.Focus();
|
||||
break;
|
||||
case tipoCodiceBarcode.Comando:
|
||||
// procedo SOLO se ho cod dipendente
|
||||
if (DataProxy.DP.taDipendenti.getByIdx(DataProxy.idxDipendente).Rows.Count > 0)
|
||||
{
|
||||
memLayer.ML.setSessionVal("numChiamatePaginaBCode", value);
|
||||
timerConf.Enabled = false;
|
||||
setCtrlState(false);
|
||||
}
|
||||
nextUsrMsg = "...waiting...";
|
||||
// controlla se sia entra/esci (IN/OUT)
|
||||
if (barcodeIn.ToUpperInvariant() == "CMDIN")
|
||||
{
|
||||
// registro ingresso!
|
||||
registraTimbratura(true);
|
||||
Response.Redirect(paginaCorrente);
|
||||
}
|
||||
else if (barcodeIn.ToUpperInvariant() == "CMDOUT")
|
||||
{
|
||||
// registro uscita!
|
||||
registraTimbratura(false);
|
||||
Response.Redirect(paginaCorrente);
|
||||
}
|
||||
//else if (barcodeIn.ToUpperInvariant() == "CMD")
|
||||
//{
|
||||
// Response.Redirect(paginaCorrente);
|
||||
//}
|
||||
//DataProxy.idxDipendente = -1;
|
||||
txtBarcode.Focus();
|
||||
break;
|
||||
default:
|
||||
txtBarcode.Focus();
|
||||
break;
|
||||
}
|
||||
|
||||
barcodeIn = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
lblMessaggi.Text = "...attesa barcode...";
|
||||
}
|
||||
grView.DataBind();
|
||||
checkButtons();
|
||||
txtBarcode.Focus();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// valore barcode
|
||||
/// </summary>
|
||||
public string barcodeIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtBarcode.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtBarcode.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// salvo entrata
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnEntrata_Click(object sender, EventArgs e)
|
||||
{
|
||||
// salvo entrata...
|
||||
registraTimbratura(true);
|
||||
Response.Redirect(paginaCorrente);
|
||||
}
|
||||
/// <summary>
|
||||
/// salvo uscita
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnUscita_Click(object sender, EventArgs e)
|
||||
{
|
||||
// salvo uscita
|
||||
registraTimbratura(false);
|
||||
Response.Redirect(paginaCorrente);
|
||||
}
|
||||
/// <summary>
|
||||
/// registro timbratura
|
||||
/// </summary>
|
||||
/// <param name="isEntrata"></param>
|
||||
/// <returns></returns>
|
||||
private void registraTimbratura(bool isEntrata)
|
||||
{
|
||||
// salvo evento entrata...
|
||||
string IPv4 = Request.UserHostName;
|
||||
// auto-approvazione da web.config
|
||||
bool approvata = memLayer.ML.confReadBool("barcodeAutoApprove");
|
||||
if (DataProxy.idxDipendente > 0)
|
||||
{
|
||||
string CognomeNome = "";
|
||||
if (memLayer.ML.confReadBool("showNameAfterCmd"))
|
||||
{
|
||||
CognomeNome = DataProxy.DP.CognomeNomeByIdx(DataProxy.idxDipendente);
|
||||
}
|
||||
if (nextIsEntrata)
|
||||
{
|
||||
nextUsrMsg = string.Format("{1} ENTRATA {0:HH:mm:ss}", orarioBCode, CognomeNome);
|
||||
}
|
||||
else
|
||||
{
|
||||
nextUsrMsg = string.Format("{1} USCITA {0:HH:mm:ss}", orarioBCode, CognomeNome);
|
||||
}
|
||||
timbratrice.registraTimbratura(DataProxy.idxDipendente, orarioBCode, isEntrata, IPv4, "Web", approvata);
|
||||
//aggiorno timbrature visualizzate
|
||||
setButtons();
|
||||
grView.DataBind();
|
||||
}
|
||||
else
|
||||
{
|
||||
lblMessaggi.Text = "IdxDipendente non trovato! timbratura impossibile";
|
||||
pnlAll.CssClass = "stileComandoND";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta i buttons secondo i valori in sessione...
|
||||
/// </summary>
|
||||
private void setButtons()
|
||||
{
|
||||
// mostrare e abilitare secondo condizioni al contorno
|
||||
}
|
||||
/// <summary>
|
||||
/// decodifica il tipo barcode acquisito
|
||||
/// </summary>
|
||||
public tipoCodiceBarcode tipoBCode
|
||||
{
|
||||
get
|
||||
{
|
||||
tipoCodiceBarcode answ = tipoCodiceBarcode.ND;
|
||||
// controllo non si tratti di un comando...
|
||||
string preCmd = memLayer.ML.confReadString("prefComandi");
|
||||
if (barcodeIn.StartsWith(preCmd, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
answ = tipoCodiceBarcode.Comando;
|
||||
}
|
||||
// controllo se sia un codice "idx"
|
||||
else if (barcodeIn.StartsWith("idx", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
answ = tipoCodiceBarcode.idxDipendente;
|
||||
}
|
||||
// controllo se sia un codice "matr"
|
||||
else if (barcodeIn.StartsWith("matr", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
answ = tipoCodiceBarcode.matrDipendente;
|
||||
}
|
||||
// controllo se sia un codice "cf"
|
||||
else if (barcodeIn.StartsWith("cf", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
answ = tipoCodiceBarcode.cfDipendente;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// inverte valore booleano
|
||||
/// </summary>
|
||||
/// <param name="isEnt"></param>
|
||||
/// <returns></returns>
|
||||
public bool invBool(object valore)
|
||||
{
|
||||
bool answ = true;
|
||||
try
|
||||
{
|
||||
answ = !Convert.ToBoolean(valore);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// evento cambio testo
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtBarcode_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
// solo se ho ALMENO 3 char...
|
||||
if (barcodeIn.Length >= 3)
|
||||
{
|
||||
contatorePag = 0;
|
||||
checkBarcode();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// variabile che conta numero di refresh parziali prima di fare reload completo
|
||||
/// </summary>
|
||||
protected int contatorePag
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("numChiamatePaginaBCode");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("numChiamatePaginaBCode", value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+192
-190
@@ -1,195 +1,197 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GPW.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_bCodeTimb {
|
||||
|
||||
/// <summary>
|
||||
/// pnlAll 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.Panel pnlAll;
|
||||
|
||||
/// <summary>
|
||||
/// lblPostazione 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.Label lblPostazione;
|
||||
|
||||
/// <summary>
|
||||
/// lblPrinter 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.Label lblPrinter;
|
||||
|
||||
/// <summary>
|
||||
/// lblCurrentPage 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.Label lblCurrentPage;
|
||||
|
||||
/// <summary>
|
||||
/// hlMenu 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.HyperLink hlMenu;
|
||||
|
||||
/// <summary>
|
||||
/// lblDipendenteAttivo 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.Label lblDipendenteAttivo;
|
||||
|
||||
/// <summary>
|
||||
/// lblMessaggi 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.Label lblMessaggi;
|
||||
|
||||
/// <summary>
|
||||
/// pnlBtnIn 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.Panel pnlBtnIn;
|
||||
|
||||
/// <summary>
|
||||
/// btnEntrata 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.Button btnEntrata;
|
||||
|
||||
/// <summary>
|
||||
/// PaneOut 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.Panel PaneOut;
|
||||
|
||||
/// <summary>
|
||||
/// btnUscita 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.Button btnUscita;
|
||||
|
||||
/// <summary>
|
||||
/// lblBarcode 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.Label lblBarcode;
|
||||
|
||||
/// <summary>
|
||||
/// txtBarcode 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 txtBarcode;
|
||||
|
||||
/// <summary>
|
||||
/// grView 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.GridView grView;
|
||||
|
||||
/// <summary>
|
||||
/// ods 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 ods;
|
||||
|
||||
/// <summary>
|
||||
/// UpdatePanel1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel UpdatePanel1;
|
||||
|
||||
/// <summary>
|
||||
/// pnlTimer 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.Panel pnlTimer;
|
||||
|
||||
/// <summary>
|
||||
/// lblNextTimbr 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.Label lblNextTimbr;
|
||||
|
||||
/// <summary>
|
||||
/// lblCountDown 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.Label lblCountDown;
|
||||
|
||||
/// <summary>
|
||||
/// timerConf control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.Timer timerConf;
|
||||
}
|
||||
namespace GPW.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class mod_bCodeTimb
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Controllo pnlAll.
|
||||
/// </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.Panel pnlAll;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblPostazione.
|
||||
/// </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 lblPostazione;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblPrinter.
|
||||
/// </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 lblPrinter;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblCurrentPage.
|
||||
/// </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 lblCurrentPage;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hlMenu.
|
||||
/// </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.HyperLink hlMenu;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblDipendenteAttivo.
|
||||
/// </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 lblDipendenteAttivo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblMessaggi.
|
||||
/// </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 lblMessaggi;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo pnlBtnIn.
|
||||
/// </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.Panel pnlBtnIn;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo btnEntrata.
|
||||
/// </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.Button btnEntrata;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo PaneOut.
|
||||
/// </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.Panel PaneOut;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo btnUscita.
|
||||
/// </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.Button btnUscita;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblBarcode.
|
||||
/// </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 lblBarcode;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtBarcode.
|
||||
/// </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.TextBox txtBarcode;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo grView.
|
||||
/// </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.GridView grView;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ods.
|
||||
/// </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 ods;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo UpdatePanel1.
|
||||
/// </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.UpdatePanel UpdatePanel1;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo pnlTimer.
|
||||
/// </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.Panel pnlTimer;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblNextTimbr.
|
||||
/// </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 lblNextTimbr;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblCountDown.
|
||||
/// </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 lblCountDown;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo timerConf.
|
||||
/// </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.Timer timerConf;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net462" />
|
||||
</packages>
|
||||
+60
-10
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
using SteamWare;
|
||||
|
||||
namespace GPW_data
|
||||
@@ -13,23 +14,43 @@ namespace GPW_data
|
||||
/// </summary>
|
||||
protected utils()
|
||||
{
|
||||
setupElencoClienti();
|
||||
#if false
|
||||
setupElencoClienti();
|
||||
#endif
|
||||
}
|
||||
#if false
|
||||
/// <summary>
|
||||
/// setup delle tabella elencoClienti
|
||||
/// </summary>
|
||||
protected void setupElencoClienti()
|
||||
{
|
||||
if (memLayer.ML.isInCacheObject("elencoClienti"))
|
||||
string redKey = memLayer.ML.redHash("elencoClienti");
|
||||
try
|
||||
{
|
||||
elencoClienti = (Dictionary<string, string>)memLayer.ML.objCacheObj("elencoClienti");
|
||||
string rawData = memLayer.ML.getRSV(redKey);
|
||||
if (string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
elencoClienti = ricaricaElencoClienti();
|
||||
|
||||
}
|
||||
if (memLayer.ML.isInCacheObject("elencoClienti"))
|
||||
{
|
||||
elencoClienti = (Dictionary<string, string>)memLayer.ML.objCacheObj("elencoClienti");
|
||||
}
|
||||
else
|
||||
{
|
||||
elencoClienti = ricaricaElencoClienti();
|
||||
memLayer.ML.setCacheVal("elencoClienti", elencoClienti, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
elencoClienti = ricaricaElencoClienti();
|
||||
memLayer.ML.setCacheVal("elencoClienti", elencoClienti, false);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
#endif
|
||||
/// <summary>
|
||||
/// restituisce elenco clienti trasformato in dictionary
|
||||
/// </summary>
|
||||
@@ -73,7 +94,36 @@ namespace GPW_data
|
||||
/// <summary>
|
||||
/// oggetto elenco clienti organizzato come dizionario con chiave idxCliente e valore la ragione sociale
|
||||
/// </summary>
|
||||
public Dictionary<string, string> elencoClienti;
|
||||
public Dictionary<string, string> elencoClienti
|
||||
{
|
||||
set
|
||||
{
|
||||
string redKey = memLayer.ML.redHash("elencoClienti");
|
||||
string rawData = JsonConvert.SerializeObject(value);
|
||||
memLayer.ML.setRSV(redKey, rawData, 60);
|
||||
}
|
||||
get
|
||||
{
|
||||
Dictionary<string, string> answ = new Dictionary<string, string>();
|
||||
string redKey = memLayer.ML.redHash("elencoClienti");
|
||||
string rawData = memLayer.ML.getRSV(redKey);
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
try
|
||||
{
|
||||
answ = JsonConvert.DeserializeObject<Dictionary<string, string>>(rawData);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
if (answ.Count == 0)
|
||||
{
|
||||
answ = ricaricaElencoClienti();
|
||||
elencoClienti = answ;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Effettua un insieme di controlli sulle anomalie delel timbrature/orari e invia le relative eventuali email
|
||||
/// </summary>
|
||||
|
||||
+17
-1
@@ -21,7 +21,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.1" newVersion="4.0.0.1" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
@@ -31,6 +31,22 @@
|
||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="SharpCompress" publicKeyToken="afb0a02973931d96" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-0.24.0.0" newVersion="0.24.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Channels" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
@@ -109,6 +112,7 @@
|
||||
<None Include="DS_Utility.xss">
|
||||
<DependentUpon>DS_Utility.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
|
||||
Vendored
+1
-1
@@ -14,7 +14,7 @@ pipeline {
|
||||
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=4091']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=4093']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '2.6.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '2.6.${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