Ancora conf dichiarazioni
This commit is contained in:
Vendored
+1
-1
@@ -17,7 +17,7 @@ pipeline {
|
||||
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=652']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=654']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '4.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '4.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.APP_NAME = 'MAPO'
|
||||
|
||||
@@ -13,47 +13,37 @@
|
||||
border-bottom-right-radius: inherit;
|
||||
line-height: 1em;
|
||||
}
|
||||
.dichBlock {
|
||||
font-family: 'Open Sans Condensed', sans-serif;
|
||||
color: #FFF;
|
||||
background-image: linear-gradient(#111, #000);
|
||||
box-shadow: 5px 5px 10px 0 rgba(150, 150, 150, 0.2), 10px 10px 10px 0 rgba(200, 200, 200, 0.39);
|
||||
width: 6em;
|
||||
}
|
||||
/* First breakpoint is 460px. 3 column layout. Tiles 150x150 pixels at the breakpoint. */
|
||||
@media all and (max-width: 600px) {
|
||||
.dichBlock {
|
||||
font-family: 'Open Sans Condensed', sans-serif;
|
||||
color: #FFF;
|
||||
background-image: linear-gradient(#111, #000);
|
||||
box-shadow: 5px 5px 10px 0 rgba(150, 150, 150, 0.2), 10px 10px 10px 0 rgba(200, 200, 200, 0.39);
|
||||
width: 7em;
|
||||
font-size: 1em;
|
||||
}
|
||||
}
|
||||
/* Second breakpoint. 4 column layout. Tiles will be 150x150 pixels again at the breakpoint. */
|
||||
@media all and (min-width: 600px) {
|
||||
.dichBlock {
|
||||
font-family: 'Open Sans Condensed', sans-serif;
|
||||
color: #FFF;
|
||||
background-image: linear-gradient(#111, #000);
|
||||
box-shadow: 5px 5px 10px 0 rgba(150, 150, 150, 0.2), 10px 10px 10px 0 rgba(200, 200, 200, 0.39);
|
||||
width: 8em;
|
||||
font-size: 1.25em;
|
||||
font-size: 1em;
|
||||
width: 7em;
|
||||
}
|
||||
}
|
||||
/* Second breakpoint. 5 column layout. Tiles will be 156x156 pixels again at the breakpoint. */
|
||||
@media all and (min-width: 800px) {
|
||||
.dichBlock {
|
||||
font-family: 'Open Sans Condensed', sans-serif;
|
||||
color: #FFF;
|
||||
background-image: linear-gradient(#111, #000);
|
||||
box-shadow: 5px 5px 10px 0 rgba(150, 150, 150, 0.2), 10px 10px 10px 0 rgba(200, 200, 200, 0.39);
|
||||
width: 8em;
|
||||
font-size: 1.5em;
|
||||
font-size: 1.4em;
|
||||
width: 7em;
|
||||
}
|
||||
}
|
||||
/* Second breakpoint. 6 column layout. Tiles will be 156x156 pixels again at the breakpoint. */
|
||||
@media all and (min-width: 1100px) {
|
||||
.dichBlock {
|
||||
font-family: 'Open Sans Condensed', sans-serif;
|
||||
color: #FFF;
|
||||
background-image: linear-gradient(#111, #000);
|
||||
box-shadow: 5px 5px 10px 0 rgba(150, 150, 150, 0.2), 10px 10px 10px 0 rgba(200, 200, 200, 0.39);
|
||||
width: 9em;
|
||||
font-size: 1.6em;
|
||||
font-size: 1.5em;
|
||||
width: 7em;
|
||||
}
|
||||
}
|
||||
@@ -14,48 +14,38 @@
|
||||
border-bottom-right-radius: inherit;
|
||||
line-height: 1em;
|
||||
}
|
||||
.dichBlock {
|
||||
font-family: 'Open Sans Condensed', sans-serif;
|
||||
color: #FFF;
|
||||
background-image: linear-gradient(#111, #000);
|
||||
box-shadow: 5px 5px 10px 0 rgba(150, 150, 150, 0.2), 10px 10px 10px 0 rgba(200, 200, 200, 0.39);
|
||||
width: 6em;
|
||||
}
|
||||
|
||||
/* First breakpoint is 460px. 3 column layout. Tiles 150x150 pixels at the breakpoint. */
|
||||
@media all and (max-width: 600px) {
|
||||
.dichBlock {
|
||||
font-family: 'Open Sans Condensed', sans-serif;
|
||||
color: #FFF;
|
||||
background-image: linear-gradient(#111, #000);
|
||||
box-shadow: 5px 5px 10px 0 rgba(150, 150, 150, 0.2), 10px 10px 10px 0 rgba(200, 200, 200, 0.39);
|
||||
width: 7em;
|
||||
font-size: 1em;
|
||||
/* First breakpoint is 460px. 3 column layout. Tiles 150x150 pixels at the breakpoint. */
|
||||
@media all and (max-width: 600px) {
|
||||
.dichBlock {
|
||||
font-size: 1em;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Second breakpoint. 4 column layout. Tiles will be 150x150 pixels again at the breakpoint. */
|
||||
@media all and (min-width: 600px) {
|
||||
.dichBlock {
|
||||
font-family: 'Open Sans Condensed', sans-serif;
|
||||
color: #FFF;
|
||||
background-image: linear-gradient(#111, #000);
|
||||
box-shadow: 5px 5px 10px 0 rgba(150, 150, 150, 0.2), 10px 10px 10px 0 rgba(200, 200, 200, 0.39);
|
||||
width: 8em;
|
||||
font-size: 1.25em;
|
||||
/* Second breakpoint. 4 column layout. Tiles will be 150x150 pixels again at the breakpoint. */
|
||||
@media all and (min-width: 600px) {
|
||||
.dichBlock {
|
||||
font-size: 1em;
|
||||
width: 7em;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Second breakpoint. 5 column layout. Tiles will be 156x156 pixels again at the breakpoint. */
|
||||
@media all and (min-width: 800px) {
|
||||
.dichBlock {
|
||||
font-family: 'Open Sans Condensed', sans-serif;
|
||||
color: #FFF;
|
||||
background-image: linear-gradient(#111, #000);
|
||||
box-shadow: 5px 5px 10px 0 rgba(150, 150, 150, 0.2), 10px 10px 10px 0 rgba(200, 200, 200, 0.39);
|
||||
width: 8em;
|
||||
font-size: 1.5em;
|
||||
/* Second breakpoint. 5 column layout. Tiles will be 156x156 pixels again at the breakpoint. */
|
||||
@media all and (min-width: 800px) {
|
||||
.dichBlock {
|
||||
font-size: 1.4em;
|
||||
width: 7em;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Second breakpoint. 6 column layout. Tiles will be 156x156 pixels again at the breakpoint. */
|
||||
@media all and (min-width: 1100px) {
|
||||
.dichBlock {
|
||||
font-family: 'Open Sans Condensed', sans-serif;
|
||||
color: #FFF;
|
||||
background-image: linear-gradient(#111, #000);
|
||||
box-shadow: 5px 5px 10px 0 rgba(150, 150, 150, 0.2), 10px 10px 10px 0 rgba(200, 200, 200, 0.39);
|
||||
width: 9em;
|
||||
font-size: 1.6em;
|
||||
/* Second breakpoint. 6 column layout. Tiles will be 156x156 pixels again at the breakpoint. */
|
||||
@media all and (min-width: 1100px) {
|
||||
.dichBlock {
|
||||
font-size: 1.5em;
|
||||
width: 7em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
.labelBottom{background:#111;background:rgba(0,0,0,.8);-webkit-background-clip:padding-box;background-clip:padding-box;padding:0 .4em;min-height:30%;width:100%;-webkit-border-bottom-left-radius:inherit;border-bottom-left-radius:inherit;-webkit-border-bottom-right-radius:inherit;border-bottom-right-radius:inherit;line-height:1em;}@media all and (max-width:600px){.dichBlock{font-family:'Open Sans Condensed',sans-serif;color:#fff;background-image:linear-gradient(#111,#000);box-shadow:5px 5px 10px 0 rgba(150,150,150,.2),10px 10px 10px 0 rgba(200,200,200,.39);width:7em;font-size:1em;}}@media all and (min-width:600px){.dichBlock{font-family:'Open Sans Condensed',sans-serif;color:#fff;background-image:linear-gradient(#111,#000);box-shadow:5px 5px 10px 0 rgba(150,150,150,.2),10px 10px 10px 0 rgba(200,200,200,.39);width:8em;font-size:1.25em;}}@media all and (min-width:800px){.dichBlock{font-family:'Open Sans Condensed',sans-serif;color:#fff;background-image:linear-gradient(#111,#000);box-shadow:5px 5px 10px 0 rgba(150,150,150,.2),10px 10px 10px 0 rgba(200,200,200,.39);width:8em;font-size:1.5em;}}@media all and (min-width:1100px){.dichBlock{font-family:'Open Sans Condensed',sans-serif;color:#fff;background-image:linear-gradient(#111,#000);box-shadow:5px 5px 10px 0 rgba(150,150,150,.2),10px 10px 10px 0 rgba(200,200,200,.39);width:9em;font-size:1.6em;}}
|
||||
.labelBottom{background:#111;background:rgba(0,0,0,.8);-webkit-background-clip:padding-box;background-clip:padding-box;padding:0 .4em;min-height:30%;width:100%;-webkit-border-bottom-left-radius:inherit;border-bottom-left-radius:inherit;-webkit-border-bottom-right-radius:inherit;border-bottom-right-radius:inherit;line-height:1em;}.dichBlock{font-family:'Open Sans Condensed',sans-serif;color:#fff;background-image:linear-gradient(#111,#000);box-shadow:5px 5px 10px 0 rgba(150,150,150,.2),10px 10px 10px 0 rgba(200,200,200,.39);width:6em;}@media all and (max-width:600px){.dichBlock{font-size:1em;}}@media all and (min-width:600px){.dichBlock{font-size:1em;width:7em;}}@media all and (min-width:800px){.dichBlock{font-size:1.4em;width:7em;}}@media all and (min-width:1100px){.dichBlock{font-size:1.5em;width:7em;}}
|
||||
@@ -1,18 +1,19 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/Bootstrap.Master" AutoEventWireup="true" CodeBehind="Dichiarazione.aspx.cs"
|
||||
Inherits="MoonProTablet.Dichiarazione" %>
|
||||
|
||||
<%@ Register Src="WebUserControls/mod_dettMacchina.ascx" TagName="mod_dettMacchina" TagPrefix="uc1" %>
|
||||
<%@ Register Src="WebUserControls/mod_dichiarazione.ascx" TagName="mod_dichiarazione" TagPrefix="uc2" %>
|
||||
<%@ Register Src="WebUserControls/mod_insComm.ascx" TagName="mod_insComm" TagPrefix="uc3" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_dettMacchina.ascx" TagName="mod_dettMacchina" TagPrefix="uc1" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_dichiarazione.ascx" TagName="mod_dichiarazione" TagPrefix="uc2" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_insComm.ascx" TagPrefix="uc1" TagName="mod_insComm" %>
|
||||
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<div class="container-fluid my-3 mx-4" role="main">
|
||||
<div class="container my-3" role="main">
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-6 col-md-4 col-lg-3">
|
||||
<uc1:mod_dettMacchina ID="mod_dettMacchina1" runat="server" />
|
||||
</div>
|
||||
<div class="col-12 col-sm-6 col-md-8 col-lg-9">
|
||||
<uc3:mod_insComm ID="mod_insComm1" runat="server" showSalva="false" labelAddCommento="Dich Retroattiva" />
|
||||
<uc1:mod_insComm runat="server" ID="mod_insComm" showSalva="false" labelAddCommento="Dich Retroattiva" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
@@ -4,63 +4,63 @@ using System.Web.UI;
|
||||
|
||||
namespace MoonProTablet
|
||||
{
|
||||
public partial class Dichiarazione : System.Web.UI.Page
|
||||
public partial class Dichiarazione : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
Session["TipoLink"] = "EditMacch";
|
||||
mod_dettMacchina1.detailLevel(true);
|
||||
// se c'è una data/ora in sessione la imposto...
|
||||
if (memLayer.ML.isInSessionObject("inizioStato"))
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime dataOraEv = Convert.ToDateTime(memLayer.ML.objSessionObj("inizioStato"));
|
||||
mod_insComm1.dataEv = dataOraEv;
|
||||
mod_dettMacchina1.detailLevel(false);
|
||||
memLayer.ML.emptySessionVal("inizioStato");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
}
|
||||
mod_dichiarazione1.eh_newVal += new EventHandler(mod_dichiarazione1_eh_newVal);
|
||||
mod_insComm1.eh_inserting += mod_insComm1_eh_inserting;
|
||||
mod_insComm1.eh_reset += mod_insComm1_eh_reset;
|
||||
}
|
||||
|
||||
void mod_insComm1_eh_reset(object sender, EventArgs e)
|
||||
{
|
||||
mod_dettMacchina1.detailLevel(true);
|
||||
}
|
||||
|
||||
void mod_insComm1_eh_inserting(object sender, EventArgs e)
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
Session["TipoLink"] = "EditMacch";
|
||||
mod_dettMacchina1.detailLevel(true);
|
||||
// se c'è una data/ora in sessione la imposto...
|
||||
if (memLayer.ML.isInSessionObject("inizioStato"))
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime dataOraEv = Convert.ToDateTime(memLayer.ML.objSessionObj("inizioStato"));
|
||||
mod_insComm.dataEv = dataOraEv;
|
||||
mod_dettMacchina1.detailLevel(false);
|
||||
memLayer.ML.emptySessionVal("inizioStato");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
/// <summary>
|
||||
/// chiama udpate x evento in controller dichiarazioni
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void mod_dichiarazione1_eh_newVal(object sender, EventArgs e)
|
||||
{
|
||||
mod_dettMacchina1.doUpdate();
|
||||
// controllo: se è "aperto" ins dichiarazione metto pure quella...
|
||||
if (!mod_dichiarazione1.insRealtime)
|
||||
{
|
||||
if (mod_insComm1.commento != "")
|
||||
{
|
||||
// chiamo insert SE C'E' commento
|
||||
mod_insComm1.salvaCommento();
|
||||
}
|
||||
// elimino data ev! e quindi realtime!
|
||||
memLayer.ML.emptySessionVal("dataOraEv");
|
||||
// ricarico pagina!
|
||||
Response.Redirect("Commenti.aspx");
|
||||
}
|
||||
}
|
||||
}
|
||||
mod_dichiarazione1.eh_newVal += new EventHandler(mod_dichiarazione1_eh_newVal);
|
||||
mod_insComm.eh_inserting += mod_insComm1_eh_inserting;
|
||||
mod_insComm.eh_reset += mod_insComm1_eh_reset;
|
||||
}
|
||||
|
||||
void mod_insComm1_eh_reset(object sender, EventArgs e)
|
||||
{
|
||||
mod_dettMacchina1.detailLevel(true);
|
||||
}
|
||||
|
||||
void mod_insComm1_eh_inserting(object sender, EventArgs e)
|
||||
{
|
||||
mod_dettMacchina1.detailLevel(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// chiama udpate x evento in controller dichiarazioni
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void mod_dichiarazione1_eh_newVal(object sender, EventArgs e)
|
||||
{
|
||||
mod_dettMacchina1.doUpdate();
|
||||
// controllo: se è "aperto" ins dichiarazione metto pure quella...
|
||||
if (!mod_dichiarazione1.insRealtime)
|
||||
{
|
||||
if (mod_insComm.commento != "")
|
||||
{
|
||||
// chiamo insert SE C'E' commento
|
||||
mod_insComm.salvaCommento();
|
||||
}
|
||||
// elimino data ev! e quindi realtime!
|
||||
memLayer.ML.emptySessionVal("dataOraEv");
|
||||
// ricarico pagina!
|
||||
Response.Redirect("Commenti.aspx");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+2
-2
@@ -22,13 +22,13 @@ namespace MoonProTablet {
|
||||
protected global::MoonProTablet.WebUserControls.mod_dettMacchina mod_dettMacchina1;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_insComm1.
|
||||
/// Controllo mod_insComm.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MoonProTablet.WebUserControls.mod_insComm mod_insComm1;
|
||||
protected global::MoonProTablet.WebUserControls.mod_insComm mod_insComm;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_dichiarazione1.
|
||||
|
||||
@@ -1,33 +1,36 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_insComm.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_insComm" %>
|
||||
|
||||
|
||||
<asp:Panel runat="server" ID="pnlButtons">
|
||||
<div class="ui-grid-a">
|
||||
<div class="ui-block-b" data-role="content">
|
||||
<asp:Button ID="btnAddCom" runat="server" data-icon="plus" Text="Commento" OnClick="btnAddCommento_Click" />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<asp:LinkButton ID="lbtAddCom" runat="server" OnClick="lbtAddCommento_Click" CssClass="btn btn-block btn-dark">
|
||||
<i class="fa fa-star"></i>
|
||||
<asp:Label runat="server" ID="lblAddComm">Commento</asp:Label>
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="pnlDate" Visible="false">
|
||||
<div class="ui-grid-a" data-role="content">
|
||||
<div class="ui-block-a">
|
||||
<asp:Label runat="server" ID="lblDate" AssociatedControlID="txtDate" Text="Data" />
|
||||
<asp:TextBox runat="server" ID="txtDate" type="date" AutoPostBack="True" OnTextChanged="txtDate_TextChanged" />
|
||||
</div>
|
||||
<div class="ui-block-b">
|
||||
<asp:Label runat="server" ID="lblTime" AssociatedControlID="txtTime" Text="Ora" />
|
||||
<asp:TextBox runat="server" ID="txtTime" type="time" AutoPostBack="True" OnTextChanged="txtTime_TextChanged" />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<asp:Label runat="server" ID="lblDate" AssociatedControlID="txtDate" Text="Data" />
|
||||
<asp:TextBox runat="server" ID="txtDate" type="date" AutoPostBack="True" OnTextChanged="txtDate_TextChanged" CssClass="form-control" />
|
||||
</div>
|
||||
<div class="ui-grid-solo" data-role="content">
|
||||
<asp:Label runat="server" ID="lblCommento" AssociatedControlID="txtCommento" Text="Commento" />
|
||||
<asp:TextBox runat="server" ID="txtCommento" TextMode="MultiLine" placeholder="Inserire commento" />
|
||||
<div class="col-6">
|
||||
<asp:Label runat="server" ID="lblTime" AssociatedControlID="txtTime" Text="Ora" />
|
||||
<asp:TextBox runat="server" ID="txtTime" type="time" AutoPostBack="True" OnTextChanged="txtTime_TextChanged" CssClass="form-control" />
|
||||
</div>
|
||||
<div class="ui-grid-a" data-role="content">
|
||||
<div class="ui-block-a">
|
||||
<asp:Button runat="server" ID="btnSalva" Text="Salva" data-icon="plus" OnClick="btnSalva_Click" />
|
||||
</div>
|
||||
<div class="ui-block-b">
|
||||
<asp:Button runat="server" ID="btnAnnulla" Text="Annulla" data-icon="delete" OnClick="btnAnnulla_Click" />
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<asp:Label runat="server" ID="lblCommento" AssociatedControlID="txtCommento" Text="Commento" />
|
||||
<asp:TextBox runat="server" ID="txtCommento" TextMode="MultiLine" placeholder="Inserire commento" CssClass="form-control" />
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<asp:LinkButton runat="server" ID="lbtSalva" OnClick="lbtSalva_Click" CssClass="btn btn-block btn-success"><i class="fa fa-plus"></i> Salva</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<asp:LinkButton runat="server" ID="lbtAnnulla" OnClick="lbtAnnulla_Click" CssClass="btn btn-block btn-warning"><i class="fa fa-ban"></i> Annulla</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
|
||||
@@ -4,213 +4,213 @@ using System;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_insComm : System.Web.UI.UserControl
|
||||
public partial class mod_insComm : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// registrato nuovo valore
|
||||
/// </summary>
|
||||
public event EventHandler eh_inserting;
|
||||
/// <summary>
|
||||
/// registrato nuovo valore
|
||||
/// </summary>
|
||||
public event EventHandler eh_newVal;
|
||||
/// <summary>
|
||||
/// registrato nuovo valore
|
||||
/// </summary>
|
||||
public event EventHandler eh_reset;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
/// <summary>
|
||||
/// registrato nuovo valore
|
||||
/// </summary>
|
||||
public event EventHandler eh_inserting;
|
||||
/// <summary>
|
||||
/// registrato nuovo valore
|
||||
/// </summary>
|
||||
public event EventHandler eh_newVal;
|
||||
/// <summary>
|
||||
/// registrato nuovo valore
|
||||
/// </summary>
|
||||
public event EventHandler eh_reset;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void btnAddCommento_Click(object sender, EventArgs e)
|
||||
{
|
||||
dataOraEv = DateTime.Now;
|
||||
showInsert();
|
||||
}
|
||||
|
||||
protected void showInsert()
|
||||
{
|
||||
fixPanels(false, true, false);
|
||||
// imposto valori
|
||||
txtDate.Text = dataOraEv.ToString("yyyy-MM-dd");
|
||||
txtTime.Text = dataOraEv.ToString("HH:mm");
|
||||
txtCommento.Text = "";
|
||||
// sollevo evento!
|
||||
if (eh_inserting != null)
|
||||
{
|
||||
eh_inserting(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
private void fixPanels(bool showBtn, bool showComm, bool showEventi)
|
||||
{
|
||||
// mostro dati da compilare e nascondo button...
|
||||
pnlButtons.Visible = showBtn;
|
||||
pnlDate.Visible = !showBtn;
|
||||
}
|
||||
|
||||
protected void btnAnnulla_Click(object sender, EventArgs e)
|
||||
{
|
||||
// tolgo da sessione dataOra corrente...
|
||||
memLayer.ML.emptySessionVal("dataOraEv");
|
||||
fixPanels(true, false, false);
|
||||
// sollevo evento!
|
||||
if (eh_reset != null)
|
||||
{
|
||||
eh_reset(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnSalva_Click(object sender, EventArgs e)
|
||||
{
|
||||
salvaCommento();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua salvataggio del commento indicato (data/ora e testo)
|
||||
/// </summary>
|
||||
public void salvaCommento()
|
||||
{
|
||||
// salvo!
|
||||
string idxMacchina = memLayer.ML.StringSessionObj("idxMacchina");
|
||||
int idxTipo = memLayer.ML.confReadInt("idxTipoCommento");
|
||||
string CodArticolo = "ND";
|
||||
try
|
||||
{
|
||||
// cerco di recuperare CodArticolo da evento
|
||||
CodArticolo = DataLayer.obj.taODL.getByMacchinaPeriodo(idxMacchina, dataOraEv, dataOraEv)[0].CodArticolo;
|
||||
}
|
||||
catch
|
||||
{
|
||||
CodArticolo = "ND";
|
||||
}
|
||||
string commento = txtCommento.Text.Trim();
|
||||
// elimino eventuale record precedente
|
||||
try
|
||||
{
|
||||
DataLayer.obj.taEventi.DeleteQuery(idxMacchina, dataOraEv);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// inserisco nuovo record
|
||||
DataLayer.obj.taEventi.Insert(idxMacchina, dataOraEv, idxTipo, CodArticolo, commento, DataLayer.MatrOpr, "-");
|
||||
doUpdate();
|
||||
}
|
||||
|
||||
private void doUpdate()
|
||||
{
|
||||
// aggiorno vista...
|
||||
fixPanels(true, false, false);
|
||||
if (eh_newVal != null)
|
||||
{
|
||||
eh_newVal(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
protected void txtDate_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
salvaDataOra();
|
||||
}
|
||||
|
||||
private void salvaDataOra()
|
||||
{
|
||||
DateTime inizioStato = DateTime.Now;
|
||||
try
|
||||
{
|
||||
DateTime ora = Convert.ToDateTime(txtTime.Text);
|
||||
inizioStato = Convert.ToDateTime(txtDate.Text).AddHours(ora.Hour).AddMinutes(ora.Minute);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
dataOraEv = inizioStato;
|
||||
}
|
||||
|
||||
protected void txtTime_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
salvaDataOra();
|
||||
}
|
||||
|
||||
public void caricaCommento()
|
||||
{
|
||||
string idxMacchina = memLayer.ML.StringSessionObj("idxMacchina");
|
||||
DS_applicazione.EventListRow riga = null;
|
||||
DateTime inizioStato = DateTime.Now;
|
||||
try
|
||||
{
|
||||
inizioStato = Convert.ToDateTime(memLayer.ML.objSessionObj("inizioStato"));
|
||||
riga = DataLayer.obj.taEventi.GetByMacchinaPeriodo(idxMacchina, inizioStato, inizioStato)[0];
|
||||
txtDate.Text = riga.InizioStato.ToString("yyyy-MM-dd");
|
||||
txtTime.Text = riga.InizioStato.ToString("HH:mm");
|
||||
txtCommento.Text = riga.Value;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
fixPanels(false, true, false);
|
||||
}
|
||||
/// <summary>
|
||||
/// determian se mostrare pulsante salva (non serve x dichiarazioni fermata)
|
||||
/// </summary>
|
||||
public bool showSalva
|
||||
{
|
||||
set
|
||||
{
|
||||
btnSalva.Visible = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta la label x inserimento commento singolo / con dichiarazione fermata
|
||||
/// </summary>
|
||||
public string labelAddCommento
|
||||
{
|
||||
set
|
||||
{
|
||||
btnAddCom.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta data/ora del commento
|
||||
/// </summary>
|
||||
public DateTime dataEv
|
||||
{
|
||||
set
|
||||
{
|
||||
// salvo in sessione dataOra corrente...
|
||||
dataOraEv = value;
|
||||
// mostro insert!
|
||||
showInsert();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// commento inserito
|
||||
/// </summary>
|
||||
public string commento
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtCommento.Text.Trim();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// data-ora selezionata
|
||||
/// </summary>
|
||||
protected DateTime dataOraEv
|
||||
{
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("dataOraEv", value);
|
||||
}
|
||||
get
|
||||
{
|
||||
DateTime answ = DateTime.Now;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToDateTime(memLayer.ML.objSessionObj("dataOraEv"));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void lbtAddCommento_Click(object sender, EventArgs e)
|
||||
{
|
||||
dataOraEv = DateTime.Now;
|
||||
showInsert();
|
||||
}
|
||||
|
||||
protected void showInsert()
|
||||
{
|
||||
fixPanels(false, true, false);
|
||||
// imposto valori
|
||||
txtDate.Text = dataOraEv.ToString("yyyy-MM-dd");
|
||||
txtTime.Text = dataOraEv.ToString("HH:mm");
|
||||
txtCommento.Text = "";
|
||||
// sollevo evento!
|
||||
if (eh_inserting != null)
|
||||
{
|
||||
eh_inserting(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
private void fixPanels(bool showBtn, bool showComm, bool showEventi)
|
||||
{
|
||||
// mostro dati da compilare e nascondo button...
|
||||
pnlButtons.Visible = showBtn;
|
||||
pnlDate.Visible = !showBtn;
|
||||
}
|
||||
|
||||
protected void lbtAnnulla_Click(object sender, EventArgs e)
|
||||
{
|
||||
// tolgo da sessione dataOra corrente...
|
||||
memLayer.ML.emptySessionVal("dataOraEv");
|
||||
fixPanels(true, false, false);
|
||||
// sollevo evento!
|
||||
if (eh_reset != null)
|
||||
{
|
||||
eh_reset(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
protected void lbtSalva_Click(object sender, EventArgs e)
|
||||
{
|
||||
salvaCommento();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua salvataggio del commento indicato (data/ora e testo)
|
||||
/// </summary>
|
||||
public void salvaCommento()
|
||||
{
|
||||
// salvo!
|
||||
string idxMacchina = memLayer.ML.StringSessionObj("idxMacchina");
|
||||
int idxTipo = memLayer.ML.confReadInt("idxTipoCommento");
|
||||
string CodArticolo = "ND";
|
||||
try
|
||||
{
|
||||
// cerco di recuperare CodArticolo da evento
|
||||
CodArticolo = DataLayer.obj.taODL.getByMacchinaPeriodo(idxMacchina, dataOraEv, dataOraEv)[0].CodArticolo;
|
||||
}
|
||||
catch
|
||||
{
|
||||
CodArticolo = "ND";
|
||||
}
|
||||
string commento = txtCommento.Text.Trim();
|
||||
// elimino eventuale record precedente
|
||||
try
|
||||
{
|
||||
DataLayer.obj.taEventi.DeleteQuery(idxMacchina, dataOraEv);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// inserisco nuovo record
|
||||
DataLayer.obj.taEventi.Insert(idxMacchina, dataOraEv, idxTipo, CodArticolo, commento, DataLayer.MatrOpr, "-");
|
||||
doUpdate();
|
||||
}
|
||||
|
||||
private void doUpdate()
|
||||
{
|
||||
// aggiorno vista...
|
||||
fixPanels(true, false, false);
|
||||
if (eh_newVal != null)
|
||||
{
|
||||
eh_newVal(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
protected void txtDate_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
salvaDataOra();
|
||||
}
|
||||
|
||||
private void salvaDataOra()
|
||||
{
|
||||
DateTime inizioStato = DateTime.Now;
|
||||
try
|
||||
{
|
||||
DateTime ora = Convert.ToDateTime(txtTime.Text);
|
||||
inizioStato = Convert.ToDateTime(txtDate.Text).AddHours(ora.Hour).AddMinutes(ora.Minute);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
dataOraEv = inizioStato;
|
||||
}
|
||||
|
||||
protected void txtTime_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
salvaDataOra();
|
||||
}
|
||||
|
||||
public void caricaCommento()
|
||||
{
|
||||
string idxMacchina = memLayer.ML.StringSessionObj("idxMacchina");
|
||||
DS_applicazione.EventListRow riga = null;
|
||||
DateTime inizioStato = DateTime.Now;
|
||||
try
|
||||
{
|
||||
inizioStato = Convert.ToDateTime(memLayer.ML.objSessionObj("inizioStato"));
|
||||
riga = DataLayer.obj.taEventi.GetByMacchinaPeriodo(idxMacchina, inizioStato, inizioStato)[0];
|
||||
txtDate.Text = riga.InizioStato.ToString("yyyy-MM-dd");
|
||||
txtTime.Text = riga.InizioStato.ToString("HH:mm");
|
||||
txtCommento.Text = riga.Value;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
fixPanels(false, true, false);
|
||||
}
|
||||
/// <summary>
|
||||
/// determian se mostrare pulsante salva (non serve x dichiarazioni fermata)
|
||||
/// </summary>
|
||||
public bool showSalva
|
||||
{
|
||||
set
|
||||
{
|
||||
lbtSalva.Visible = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta la label x inserimento commento singolo / con dichiarazione fermata
|
||||
/// </summary>
|
||||
public string labelAddCommento
|
||||
{
|
||||
set
|
||||
{
|
||||
lblAddComm.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta data/ora del commento
|
||||
/// </summary>
|
||||
public DateTime dataEv
|
||||
{
|
||||
set
|
||||
{
|
||||
// salvo in sessione dataOra corrente...
|
||||
dataOraEv = value;
|
||||
// mostro insert!
|
||||
showInsert();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// commento inserito
|
||||
/// </summary>
|
||||
public string commento
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtCommento.Text.Trim();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// data-ora selezionata
|
||||
/// </summary>
|
||||
protected DateTime dataOraEv
|
||||
{
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("dataOraEv", value);
|
||||
}
|
||||
get
|
||||
{
|
||||
DateTime answ = DateTime.Now;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToDateTime(memLayer.ML.objSessionObj("dataOraEv"));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+53
-45
@@ -1,115 +1,123 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 MoonProTablet.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_insComm {
|
||||
|
||||
/// <summary>
|
||||
/// pnlButtons control.
|
||||
/// Controllo pnlButtons.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// 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 pnlButtons;
|
||||
|
||||
/// <summary>
|
||||
/// btnAddCom control.
|
||||
/// Controllo lbtAddCom.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// 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 btnAddCom;
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtAddCom;
|
||||
|
||||
/// <summary>
|
||||
/// pnlDate control.
|
||||
/// Controllo lblAddComm.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// 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 lblAddComm;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo pnlDate.
|
||||
/// </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 pnlDate;
|
||||
|
||||
/// <summary>
|
||||
/// lblDate control.
|
||||
/// Controllo lblDate.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// 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 lblDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtDate control.
|
||||
/// Controllo txtDate.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// 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 txtDate;
|
||||
|
||||
/// <summary>
|
||||
/// lblTime control.
|
||||
/// Controllo lblTime.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// 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 lblTime;
|
||||
|
||||
/// <summary>
|
||||
/// txtTime control.
|
||||
/// Controllo txtTime.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// 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 txtTime;
|
||||
|
||||
/// <summary>
|
||||
/// lblCommento control.
|
||||
/// Controllo lblCommento.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// 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 lblCommento;
|
||||
|
||||
/// <summary>
|
||||
/// txtCommento control.
|
||||
/// Controllo txtCommento.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// 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 txtCommento;
|
||||
|
||||
/// <summary>
|
||||
/// btnSalva control.
|
||||
/// Controllo lbtSalva.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// 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 btnSalva;
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtSalva;
|
||||
|
||||
/// <summary>
|
||||
/// btnAnnulla control.
|
||||
/// Controllo lbtAnnulla.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// 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 btnAnnulla;
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtAnnulla;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user