Rinominato progetto TAB
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_ODL.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_ODL" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_tempoMSMC.ascx" TagPrefix="uc1" TagName="mod_tempoMSMC" %>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 text-center text-uppercase">
|
||||
<h3>Attrezzaggio</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row semaforoRosso" id="divWarningArt" runat="server" visible="false">
|
||||
<div class="col-sm-6">
|
||||
<h3>ATTENZIONE: articolo in revisione</h3>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<asp:LinkButton runat="server" ID="lbtConfNewRevProd" OnClick="lbtConfNewRevProd_Click" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaNuovaRev") %>' CssClass="btn btn-block"><i class="fa fa-star"></i> CONFERMA produzione nuova REV</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row pb-3">
|
||||
<div class="col-sm-6">
|
||||
<div class="col-auto px-0">
|
||||
<label class="sr-only" for="inlineFormInputGroup">Username</label>
|
||||
<div class="input-group mb-2">
|
||||
<asp:DropDownList runat="server" ID="ddlODL" DataSourceID="odsODL" DataTextField="label" DataValueField="value" CssClass="form-control btn-default textCondens" OnSelectedIndexChanged="ddlODL_SelectedIndexChanged" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
<asp:HiddenField runat="server" ID="hfIdxMacchina" />
|
||||
<asp:ObjectDataSource runat="server" ID="odsODL" OldValuesParameterFormatString="original_{0}" SelectMethod="getUnused" TypeName="MapoDb.DS_UtilityTableAdapters.v_selODLTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="hfIdxMacchina" DefaultValue="0" Name="IdxMacchina" PropertyName="Value" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<div class="input-group-append">
|
||||
<asp:CheckBox runat="server" ID="chkTutti" Text="TUTTI" CssClass="btn btn-secondary btn-sm" AutoPostBack="true" OnCheckedChanged="chkTutti_CheckedChanged" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div runat="server" id="divNote" visible="false" class="pt-2">
|
||||
<asp:TextBox runat="server" ID="txtNote" TextMode="MultiLine" Height="4em" CssClass="form-control" placeholder="Note attrezzaggio" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<asp:LinkButton runat="server" ID="lbtStartAttr" OnClick="lbtStartAttr_Click" CssClass="btn btn-block btn-primary"><i class="fa fa-check"></i> INIZIO Attrezzaggio</asp:LinkButton>
|
||||
<div runat="server" id="divTempo" visible="false" class="pt-2">
|
||||
<uc1:mod_tempoMSMC runat="server" ID="mod_tempoMSMC" modoControllo="selettori" modoTempo="MS" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row pb-3">
|
||||
<div class="col-sm-6">
|
||||
<asp:LinkButton runat="server" ID="lbtStartProd" OnClick="lbtStartProd_Click" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaInizioProd") %>' CssClass="btn btn-block btn-warning"><i class="fa fa-check"></i> FINE Attr / INIZIO Prod.</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<asp:LinkButton runat="server" ID="lbtEndProd" OnClick="lbtEndProd_Click" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaFineProd") %>' CssClass="btn btn-block btn-primary"><i class="fa fa-ban"></i> FINE Produzione</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row pb-3">
|
||||
<div class="col-sm-6">
|
||||
<asp:LinkButton runat="server" ID="lbtShowSplitODL" OnClick="lbtShowSplitODL_Click" CssClass="btn btn-block btn-info"><i class="fa fa-exclamation-triangle"></i> Mostra Riattrezzaggio</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<asp:CheckBox runat="server" ID="chkCloseOdl" Checked="false" Text="Chiudi ODL inevaso" CssClass="btn btn-block btn-light" data-toggle="buttons" />
|
||||
<asp:LinkButton runat="server" ID="lbtSplitODL" OnClick="lbtSplitODL_Click" Visible="false" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaRiattrezzaggio") %>' CssClass="btn btn-block btn-info"><i class="fa fa-exclamation-triangle"></i> Effettua Riattrezzaggio</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12 text-center">
|
||||
<asp:Label runat="server" ID="lblOut" ForeColor="Red" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,587 @@
|
||||
using MapoDb;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_ODL : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// stringa UID univoca
|
||||
/// </summary>
|
||||
public string uid
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.UniqueID.Replace("$", "_").Replace("-", "_");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// idx macchina selezionata
|
||||
/// </summary>
|
||||
public string idxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj(string.Format("idxMacchina-{0}", uid));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("idxMacchina-{0}", uid), value);
|
||||
hfIdxMacchina.Value = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// classe MapoDB x uso locale
|
||||
/// </summary>
|
||||
protected MapoDb.MapoDb controllerMapo = new MapoDb.MapoDb();
|
||||
/// <summary>
|
||||
/// Determina se sia abilitato il controllo x editing
|
||||
/// </summary>
|
||||
public bool isEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = memLayer.ML.BoolSessionObj(string.Format("isEnabled-{0}", uid));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("isEnabled-{0}", uid), value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// codice odl selezionato
|
||||
/// </summary>
|
||||
public int idxODLSel
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(ddlODL.SelectedValue);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Cod articolo dell'ODL selezionato
|
||||
/// </summary>
|
||||
public string CodArtSel
|
||||
{
|
||||
get
|
||||
{
|
||||
string CodArticolo = "";
|
||||
try
|
||||
{
|
||||
CodArticolo = DataLayer.obj.taODL.getByIdx(idxODLSel, false)[0].CodArticolo;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return CodArticolo;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// avvio pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
checkAll();
|
||||
}
|
||||
}
|
||||
|
||||
public void checkAll()
|
||||
{
|
||||
lblOut.Text = "";
|
||||
checkBtnStatus();
|
||||
chkCloseOdl.Checked = memLayer.ML.cdvb("chkCloseOdl");
|
||||
chkCloseOdl.Visible = memLayer.ML.cdvb("showChkCloseOdl");
|
||||
}
|
||||
/// <summary>
|
||||
/// Sistema CSS x status enabled/disabled
|
||||
/// </summary>
|
||||
/// <param name="lbtn"></param>
|
||||
protected void fixWCtrStatus(object lbtn)
|
||||
{
|
||||
// tolgo (eventuale) classe
|
||||
try
|
||||
{
|
||||
((WebControl)lbtn).CssClass = ((WebControl)lbtn).CssClass.Replace("disabled", "");
|
||||
// se richiesto metto disabled...
|
||||
if (!((WebControl)lbtn).Enabled) ((WebControl)lbtn).CssClass += " disabled";
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// controlla stato bottoni abilitato
|
||||
/// </summary>
|
||||
private void checkBtnStatus()
|
||||
{
|
||||
// di default rendo abilitato / disabilitato tutto in base al valore "isEnabled"
|
||||
lbtShowSplitODL.Enabled = isEnabled;
|
||||
lbtSplitODL.Enabled = isEnabled;
|
||||
chkCloseOdl.Enabled = isEnabled;
|
||||
fixWCtrStatus(lbtShowSplitODL);
|
||||
fixWCtrStatus(lbtSplitODL);
|
||||
fixWCtrStatus(chkCloseOdl);
|
||||
|
||||
// condizioni booleane
|
||||
bool inAttr = false;
|
||||
bool currHasOdl = false;
|
||||
// controllo se la macchina è in attrezzaggio...
|
||||
DS_applicazione.StatoMacchineRow rigaStato = null;
|
||||
try
|
||||
{
|
||||
rigaStato = DataLayer.obj.taStatoMacchine.GetDataByIdxMacchina(idxMacchina)[0];
|
||||
inAttr = (rigaStato.IdxStato == 2);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Eccezione in recupero dati rigaStato! {0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
try
|
||||
{
|
||||
currHasOdl = DataLayer.obj.taODL.getByMacchina(idxMacchina)[0].IdxODL != 0;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Eccezione in recupero dati currHasOdl! {0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
bool hasNewOdl = DataLayer.obj.taSelOdlFree.getUnused(idxMacchina).Rows.Count > 1;
|
||||
// sistemo buttons!
|
||||
lbtStartAttr.Enabled = (isEnabled && (!inAttr && hasNewOdl));
|
||||
lbtStartProd.Enabled = (isEnabled && inAttr);
|
||||
lbtEndProd.Enabled = (isEnabled && (!inAttr && currHasOdl));
|
||||
ddlODL.Enabled = (isEnabled && (!inAttr && hasNewOdl));
|
||||
odsODL.DataBind();
|
||||
// sistemo anche come css..
|
||||
fixWCtrStatus(lbtStartAttr);
|
||||
fixWCtrStatus(lbtStartProd);
|
||||
fixWCtrStatus(lbtEndProd);
|
||||
fixWCtrStatus(ddlODL);
|
||||
// sistemo show tempo/note attrezzaggio..
|
||||
if (inAttr)
|
||||
{
|
||||
showNoteTC(true);
|
||||
// sistemo SOLO se non si trtta di un postback...
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
int idxOdl = 0;
|
||||
try
|
||||
{
|
||||
idxOdl = DataLayer.obj.taODL.getByMacchina(idxMacchina)[0].IdxODL;
|
||||
updateTempoTc(idxOdl);
|
||||
updateNoteTC(idxOdl);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Eccezione in recupero dati ODL! {0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// verifico se l'articolo corrente sia in revisione x mostrare conferma modifica revisione...
|
||||
if (CodArtSel != "")
|
||||
{
|
||||
bool showWarn = false;
|
||||
try
|
||||
{
|
||||
showWarn = DataLayer.obj.taAnagArt.getByCod(CodArtSel)[0].FlagIsNew;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Eccezione in recupero dati showWarn! {0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
divWarningArt.Visible = showWarn;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// processa evento richiesto
|
||||
/// </summary>
|
||||
/// <param name="idxEvento"></param>
|
||||
/// <param name="userMsg"></param>
|
||||
/// <param name="idxODL"></param>
|
||||
private void processaEvento(int idxEvento, string userMsg, int idxODL)
|
||||
{
|
||||
MapoDb.inputComando inCmd;
|
||||
MapoDb.inputComando inCmd2;
|
||||
bool needStRefresh = false;
|
||||
DS_applicazione.StatoMacchineRow rigaStato = DataLayer.obj.taStatoMacchine.GetDataByIdxMacchina(idxMacchina)[0];
|
||||
// ricavo codice articolo...
|
||||
string CodArticolo = DataLayer.obj.taODL.getByIdx(idxODL, false)[0].CodArticolo;
|
||||
// processo evento...
|
||||
inCmd = controllerMapo.scriviRigaEventoBarcode(idxMacchina, idxEvento, CodArticolo, "", rigaStato.MatrOpr, rigaStato.pallet);
|
||||
// verifico se serva refresh
|
||||
if (inCmd.needStatusRefresh) needStRefresh = true;
|
||||
// se la macchina è MULTI (cod#tavola) e sonoa INIZIO/FINE attrezzaggio (idxEv <=2) processo ANCHE per la macchina madre...
|
||||
if (idxMacchina.IndexOf('#') > 0 && idxEvento <= 2)
|
||||
{
|
||||
string idxMacchinaParent = idxMacchina.Substring(0, idxMacchina.IndexOf('#'));
|
||||
inCmd2 = controllerMapo.scriviRigaEventoBarcode(idxMacchinaParent, idxEvento, CodArticolo, "", rigaStato.MatrOpr, rigaStato.pallet);
|
||||
if (inCmd2.needStatusRefresh) needStRefresh = true;
|
||||
}
|
||||
if (needStRefresh)
|
||||
{
|
||||
// chiamo refresh MSE
|
||||
DataLayer.obj.taMSE.getByRefreshData(memLayer.ML.confReadInt("refrMSE_0"));
|
||||
}
|
||||
lblOut.Text = userMsg;
|
||||
// loggo USR MSG
|
||||
logger.lg.scriviLog(userMsg, tipoLog.INFO);
|
||||
checkBtnStatus();
|
||||
}
|
||||
/// <summary>
|
||||
/// valore decimal del TC richiesto...
|
||||
/// </summary>
|
||||
protected decimal TCRichAttr
|
||||
{
|
||||
get
|
||||
{
|
||||
decimal answ = 0;
|
||||
try
|
||||
{
|
||||
answ = mod_tempoMSMC.tempoMC;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
mod_tempoMSMC.tempoMC = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore decimal del TC ASSEGNATO...
|
||||
/// </summary>
|
||||
protected decimal TCAssegnato(int idxODL)
|
||||
{
|
||||
decimal answ = 0;
|
||||
// leggo idxOdl da ultimo odl attivo x macchina
|
||||
DS_ProdTempi.ODLRow rigaOdl = DataLayer.obj.taODL.getByIdx(idxODL, false)[0];
|
||||
answ = rigaOdl.TCAssegnato;
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// dichiara inizio attrezzaggio ODL indicato..
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtStartAttr_Click(object sender, EventArgs e)
|
||||
{
|
||||
confermaProdOdl(false);
|
||||
if (idxODLSel > 0)
|
||||
{
|
||||
// se vedesse TCRich a zero lo reimposta a quello assegnato...
|
||||
if (TCRichAttr == 0)
|
||||
{
|
||||
TCRichAttr = TCAssegnato(idxODLSel);
|
||||
}
|
||||
// splitto VECCHIO ODL (se è rimasto qualcosa da produrre e se ce ne è rimasto uno.......)
|
||||
int idxODL = 0;
|
||||
try
|
||||
{
|
||||
idxODL = DataLayer.obj.taODL.getByMacchina(idxMacchina)[0].IdxODL;
|
||||
DataLayer.obj.taODL.splitODL(idxODL, idxMacchina, TCAssegnato(idxODL), string.Format("inizio attrezzaggio, Sospensione ODL {0}, generato residuo con pari TCiclo: {1}", idxODL, TCAssegnato(idxODL)), false);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// avvio NUOVO ODL
|
||||
DataLayer.obj.taODL.inizioSetup(idxODLSel, idxMacchina, TCRichAttr, txtNote.Text);
|
||||
int idxEvento = 2; // !!!HARD CODED
|
||||
processaEvento(idxEvento, String.Format("Registrata inizio attrezzaggio per ODL {0}", idxODLSel), idxODLSel);
|
||||
// ricarico...
|
||||
Response.Redirect("~/ODL.aspx");
|
||||
}
|
||||
else
|
||||
{
|
||||
lblOut.Text = "Selezionare un ODL valido!";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// inizio prod
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtStartProd_Click(object sender, EventArgs e)
|
||||
{
|
||||
confermaProdOdl(true);
|
||||
// se vedesse TCRich a zero lo reimposta a quello assegnato...
|
||||
if (TCRichAttr == 0)
|
||||
{
|
||||
TCRichAttr = TCAssegnato(idxODLSel);
|
||||
}
|
||||
// leggo idxOdl da ultimo odl attivo x macchina
|
||||
int idxODL = DataLayer.obj.taODL.getByMacchina(idxMacchina)[0].IdxODL;
|
||||
int idxEvento = 1; // !!!HARD CODED
|
||||
// aggiorno (se necessario) note e tempo setup
|
||||
DataLayer.obj.taODL.updateSetup(idxODL, TCRichAttr, txtNote.Text);
|
||||
// controllo se TC Assegnato != TCRichiesto allora invio email x verifiche...
|
||||
DS_ProdTempi.ODLRow rigaOdl = DataLayer.obj.taODL.getByIdx(idxODL, false)[0];
|
||||
if (rigaOdl.TCAssegnato != TCRichAttr)
|
||||
{
|
||||
// invio email!
|
||||
DataLayer.obj.sendWarnTcChangeReq(memLayer.ML.confReadString("_adminEmail"));
|
||||
}
|
||||
// processo chiusura setup
|
||||
processaEvento(idxEvento, String.Format("Registrata inizio produzione per ODL {0}", idxODL), idxODL);
|
||||
|
||||
// nascondo note!
|
||||
showNoteTC(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// fine prod
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtEndProd_Click(object sender, EventArgs e)
|
||||
{
|
||||
// leggo idxOdl da ultimo odl attivo x macchina
|
||||
int idxODL = DataLayer.obj.taODL.getByMacchina(idxMacchina)[0].IdxODL;
|
||||
int idxEvento = 7; // !!!HARD CODED
|
||||
|
||||
// confermo prod vecchio ODL
|
||||
confermaProdOdl(false);
|
||||
|
||||
|
||||
// se chk flaggato ovvero richiesta di chiudere ODL procedo come prima (chiudendo ODL senza averne altri...)
|
||||
if (chkCloseOdl.Checked)
|
||||
{
|
||||
// aggiungo try/catch x capire se sia qui che si "impasta" in chiusura ODL
|
||||
try
|
||||
{
|
||||
// processo
|
||||
DataLayer.obj.taODL.fineProd(idxODL, idxMacchina);
|
||||
processaEvento(idxEvento, String.Format("Registrata fine produzione per ODL {0}", idxODL), idxODL);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Eccezione in operazione chiusura ODL! {0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
Response.Redirect("~/DettaglioMacchina.aspx");
|
||||
}
|
||||
}
|
||||
// altrimenti split ODL x completare IN FUTURO la produzione...
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
// effettuo split su nuovo ODL
|
||||
DataLayer.obj.taODL.splitODL(idxODL, idxMacchina, TCAssegnato(idxODL), string.Format("Fine Produzione, Sospensione ODL {0}, generato residuo con pari TCiclo: {1}", idxODL, TCAssegnato(idxODL)), false);
|
||||
|
||||
// processo chiusura setup
|
||||
processaEvento(idxEvento, String.Format("Registrata fine produzione per ODL {0}, nuovo ODL per quantità residua", idxODL), idxODL);
|
||||
// sistemo buttons!
|
||||
bool splitOdl = false;
|
||||
fixSplitBtn(splitOdl);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Eccezione in operazione Chiusura + Split ODL su nuovo! {0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
Response.Redirect("~/DettaglioMacchina.aspx");
|
||||
}
|
||||
}
|
||||
// ricarico...
|
||||
Response.Redirect("~/ODL.aspx");
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica se sia necessario confermare la prod dell'ODL precedente prima di chiudere e lo fa in automatico...
|
||||
/// </summary>
|
||||
/// <param name="confZero">boolean, true = deve confermare 0 pezzi (es. in setup)</param>
|
||||
private void confermaProdOdl(bool confZero)
|
||||
{
|
||||
// 2016.11.17 NOTA: introdotti scarti, li confermiamo SEMPRE a zero se ins etup, però da valutare SE a FINE ATTREZZAGGIO chiedere num pezzi e num scarti (saldo zero buoni) da inserire...
|
||||
if (confZero)
|
||||
{
|
||||
// confermo produzione ZERO pezzi (in setup)
|
||||
DataLayer.obj.confermaProdMacchina(idxMacchina, memLayer.ML.confReadInt("modoConfProd"), 0, 0, DateTime.Now);
|
||||
}
|
||||
else // se NON sono in setup verifico se ho pz da confermare
|
||||
{
|
||||
// recupero pz da confermare
|
||||
DS_ProdTempi.stp_PzProd_getByMacchinaRow rigaProd = DataLayer.obj.taPzProd2conf.GetData(idxMacchina)[0];
|
||||
if (rigaProd.pezziNonConfermati > 0)
|
||||
{
|
||||
DataLayer.obj.confermaProdMacchina(idxMacchina, memLayer.ML.confReadInt("modoConfProd"), rigaProd.pezziNonConfermati, 0, DateTime.Now);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// mostra dati ed opzione x split ODL
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtShowSplitODL_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool splitOdl = true;
|
||||
fixSplitBtn(splitOdl);
|
||||
// recupero current idx
|
||||
int currODL = DataLayer.obj.taODL.getByMacchina(idxMacchina)[0].IdxODL;
|
||||
updateTempoTc(currODL);
|
||||
updateNoteTC(currODL);
|
||||
}
|
||||
/// <summary>
|
||||
/// sistema buttons split
|
||||
/// </summary>
|
||||
/// <param name="splitOdl"></param>
|
||||
private void fixSplitBtn(bool splitOdl)
|
||||
{
|
||||
lbtShowSplitODL.Visible = !splitOdl;
|
||||
chkCloseOdl.Visible = !splitOdl;
|
||||
lbtSplitODL.Visible = splitOdl;
|
||||
showNoteTC(splitOdl);
|
||||
ddlODL.Visible = !splitOdl;
|
||||
lbtStartAttr.Visible = !splitOdl;
|
||||
lbtStartProd.Visible = !splitOdl;
|
||||
lbtEndProd.Visible = !splitOdl;
|
||||
}
|
||||
/// <summary>
|
||||
/// split ODL con creazione nuovo ODL
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtSplitODL_Click(object sender, EventArgs e)
|
||||
{
|
||||
// chiamo stored che genera nuovo ODL, mette note e tempo, chiude vecchi e assegna nuovo...
|
||||
int currODL = DataLayer.obj.taODL.getByMacchina(idxMacchina)[0].IdxODL;
|
||||
int idxEvento = 1; // !!!HARD CODED
|
||||
// controllo se TC è valorizzato..
|
||||
if (TCRichAttr == 0)
|
||||
{
|
||||
mod_tempoMSMC.checkTC();
|
||||
}
|
||||
|
||||
// confermo prod vecchio ODL
|
||||
confermaProdOdl(false);
|
||||
|
||||
// effettuo split su nuovo ODL
|
||||
DataLayer.obj.taODL.splitODL(currODL, idxMacchina, TCRichAttr, txtNote.Text, true);
|
||||
|
||||
// invio email!
|
||||
DataLayer.obj.sendWarnTcChangeReq(memLayer.ML.confReadString("_adminEmail"));
|
||||
// processo chiusura setup
|
||||
processaEvento(idxEvento, String.Format("Registrato Riattrezzaggio ODL (old: {0})", currODL), currODL);
|
||||
// sistemo buttons!
|
||||
bool splitOdl = false;
|
||||
fixSplitBtn(splitOdl);
|
||||
}
|
||||
/// <summary>
|
||||
/// selezionato un ODL mostro note/tempo da validare
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlODL_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
checkDDL();
|
||||
}
|
||||
|
||||
private void checkDDL()
|
||||
{
|
||||
if (ddlODL.SelectedIndex > 0)
|
||||
{
|
||||
showNoteTC(true);
|
||||
updateTempoTc(idxODLSel);
|
||||
updateNoteTC(idxODLSel);
|
||||
}
|
||||
else
|
||||
{
|
||||
showNoteTC(false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// mostra/nasconde note
|
||||
/// </summary>
|
||||
private void showNoteTC(bool show)
|
||||
{
|
||||
// mostra/nasconde note da compilare
|
||||
divTempo.Visible = show;
|
||||
divNote.Visible = show;
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna note ODL
|
||||
/// </summary>
|
||||
/// <param name="idxOdl"></param>
|
||||
private void updateNoteTC(int idxOdl)
|
||||
{
|
||||
string testo = "";
|
||||
if (idxOdl > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
testo = DataLayer.obj.taODL.getByIdx(idxOdl, false)[0].Note;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
txtNote.Text = testo;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// update TC mostrato
|
||||
/// </summary>
|
||||
/// <param name="idxOdl"></param>
|
||||
private void updateTempoTc(int idxOdl)
|
||||
{
|
||||
// riporta TC
|
||||
DS_ProdTempi.ODLRow rigaOdl = DataLayer.obj.taODL.getByIdx(idxOdl, false)[0];
|
||||
decimal TCRichAttr = 0;
|
||||
if (rigaOdl.TCRichAttr > 0)
|
||||
{
|
||||
TCRichAttr = rigaOdl.TCRichAttr;
|
||||
}
|
||||
else
|
||||
{
|
||||
TCRichAttr = rigaOdl.TCAssegnato;
|
||||
}
|
||||
// mostro!
|
||||
mod_tempoMSMC.tempoMC = TCRichAttr;
|
||||
}
|
||||
|
||||
protected void lbtConfNewRevProd_Click(object sender, EventArgs e)
|
||||
{
|
||||
// chiamo stored x allineare revProd a revUT
|
||||
string CodArticolo = DataLayer.obj.taODL.getByIdx(idxODLSel, false)[0].CodArticolo;
|
||||
DataLayer.obj.taAnagArt.setNewRev(CodArticolo);
|
||||
checkBtnStatus();
|
||||
}
|
||||
|
||||
protected void chkTutti_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
// SE selezionato tutti cambio valore idxMacchina...
|
||||
if(chkTutti.Checked)
|
||||
{
|
||||
hfIdxMacchina.Value = "0";
|
||||
}
|
||||
else
|
||||
{
|
||||
hfIdxMacchina.Value = idxMacchina;
|
||||
}
|
||||
ddlODL.DataBind();
|
||||
checkDDL();
|
||||
}
|
||||
}
|
||||
}
|
||||
+168
@@ -0,0 +1,168 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_ODL {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divWarningArt.
|
||||
/// </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.HtmlControls.HtmlGenericControl divWarningArt;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtConfNewRevProd.
|
||||
/// </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.LinkButton lbtConfNewRevProd;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ddlODL.
|
||||
/// </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.DropDownList ddlODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfIdxMacchina.
|
||||
/// </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.HiddenField hfIdxMacchina;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo odsODL.
|
||||
/// </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 odsODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo chkTutti.
|
||||
/// </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.CheckBox chkTutti;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divNote.
|
||||
/// </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.HtmlControls.HtmlGenericControl divNote;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtNote.
|
||||
/// </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 txtNote;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtStartAttr.
|
||||
/// </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.LinkButton lbtStartAttr;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divTempo.
|
||||
/// </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.HtmlControls.HtmlGenericControl divTempo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_tempoMSMC.
|
||||
/// </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_tempoMSMC mod_tempoMSMC;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtStartProd.
|
||||
/// </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.LinkButton lbtStartProd;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtEndProd.
|
||||
/// </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.LinkButton lbtEndProd;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtShowSplitODL.
|
||||
/// </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.LinkButton lbtShowSplitODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo chkCloseOdl.
|
||||
/// </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.CheckBox chkCloseOdl;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtSplitODL.
|
||||
/// </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.LinkButton lbtSplitODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblOut.
|
||||
/// </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 lblOut;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_RepProd_GG.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_RepProd_GG" %>
|
||||
|
||||
<div data-theme="c">
|
||||
<div class="ui-grid-a">
|
||||
<div class="ui-block-a" style="text-align: center; margin: auto; vertical-align: middle;">
|
||||
Articolo
|
||||
<br />
|
||||
<asp:DropDownList ID="ddlArticolo" runat="server" DataTextField="label" DataValueField="value" ForeColor="Black"
|
||||
AutoCompleteMode="SuggestAppend" DropDownStyle="DropDownList" AutoPostBack="True"
|
||||
DataSourceID="odsArticoli" CssClass="WindowsStyle" MaxLength="0" Style="display: inline;" OnSelectedIndexChanged="ddlArticolo_SelectedIndexChanged" />
|
||||
<asp:ObjectDataSource ID="odsArticoli" runat="server" OldValuesParameterFormatString="Original_{0}"
|
||||
SelectMethod="GetData" TypeName="MapoDb.DS_UtilityTableAdapters.v_selArticoliTableAdapter"></asp:ObjectDataSource>
|
||||
</div>
|
||||
<%--<div class="ui-block-b" style="text-align: center; margin: auto; vertical-align: middle;">
|
||||
<h3>Storico Tempi Ciclo</h3>
|
||||
</div>--%>
|
||||
<div class="ui-block-b" style="text-align: center; margin: auto; vertical-align: middle;">
|
||||
Impianto
|
||||
<br />
|
||||
<asp:DropDownList ID="ddlMacchine" runat="server" DataTextField="label" DataValueField="value" ForeColor="Black"
|
||||
AutoCompleteMode="SuggestAppend" DropDownStyle="DropDownList" AutoPostBack="True"
|
||||
DataSourceID="odsMacchine" CssClass="WindowsStyle" MaxLength="0" Style="display: inline;" OnSelectedIndexChanged="ddlMacchine_SelectedIndexChanged" />
|
||||
<asp:ObjectDataSource ID="odsMacchine" runat="server" OldValuesParameterFormatString="Original_{0}"
|
||||
SelectMethod="GetData" TypeName="MapoDb.DS_UtilityTableAdapters.v_selMacchineTableAdapter"></asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-grid-solo" style="text-align: center; margin: auto; vertical-align: middle;">
|
||||
<asp:GridView ID="grView" runat="server" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="ods" BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" CellPadding="2" AllowPaging="True" ForeColor="Black" GridLines="None" Width="100%">
|
||||
<AlternatingRowStyle BackColor="PaleGoldenrod" />
|
||||
<FooterStyle BackColor="Tan" />
|
||||
<HeaderStyle BackColor="Tan" Font-Bold="True" />
|
||||
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
|
||||
<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
|
||||
<SortedAscendingCellStyle BackColor="#FAFAE7" />
|
||||
<SortedAscendingHeaderStyle BackColor="#DAC09E" />
|
||||
<SortedDescendingCellStyle BackColor="#E1DB9C" />
|
||||
<SortedDescendingHeaderStyle BackColor="#C2A47B" />
|
||||
<EmptyDataRowStyle BackColor="Tan" Font-Bold="True" />
|
||||
<EmptyDataTemplate>
|
||||
Nessun record storico trovato
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<asp:BoundField DataField="CodArticolo" HeaderText="Articolo" SortExpression="CodArticolo" />
|
||||
<asp:TemplateField HeaderText="Data" SortExpression="Data">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblData" runat="server" Text='<%# Eval("Data", "{0:ddd dd/MM/yyyy}") %>' />
|
||||
<br />
|
||||
<asp:Label ID="lblIdxODL" runat="server" Text='<%# Eval("IdxODL","ODL: {0}") %>' Font-Size="0.8em" ForeColor="#696969" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="TCiclo" SortExpression="TCAssegnato">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblTCAssMS" runat="server" Text='<%# SteamWare.TempiCiclo.minSec(Eval("TCAssegnato", "{0:N3}")) %>' />
|
||||
<br />
|
||||
<asp:Label ID="lblTCAssMC" runat="server" Text='<%# Bind("TCAssegnato", "{0:N2} min.cent") %>' Font-Size="0.8em" ForeColor="#696969" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Confermati" SortExpression="pzConf">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblpzConf" runat="server" Text='<%# Eval("pzConf") %>' />
|
||||
<div style="color: #636363; font-size: 0.8em;">
|
||||
<asp:Label ID="lblpzProd" runat="server" Text='<%# Eval("pzProd","({0} prod)") %>' />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Nome" HeaderText="Impianto" SortExpression="Nome" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="MapoDb.DS_ProdTempiTableAdapters.ResProdDett_splitGGTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="ddlMacchine" DefaultValue="0" Name="IdxMacchina" PropertyName="SelectedValue" Type="String" />
|
||||
<asp:ControlParameter ControlID="ddlArticolo" DefaultValue="0" Name="CodArticolo" PropertyName="SelectedValue" Type="String" />
|
||||
<asp:ControlParameter ControlID="hfDataFrom" Name="dataFrom" PropertyName="Value" Type="DateTime" />
|
||||
<asp:ControlParameter ControlID="hfDataTo" Name="dataTo" PropertyName="Value" Type="DateTime" />
|
||||
<asp:ControlParameter ControlID="hfClosed" Name="OdlClosed" PropertyName="Value" Type="Boolean" />
|
||||
<asp:ControlParameter ControlID="hfOpen" Name="OdlOpen" PropertyName="Value" Type="Boolean" />
|
||||
<asp:ControlParameter ControlID="hfNew" Name="OdlNew" PropertyName="Value" Type="Boolean" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:HiddenField runat="server" ID="hfDataFrom" />
|
||||
<asp:HiddenField runat="server" ID="hfDataTo" />
|
||||
<asp:HiddenField runat="server" ID="hfClosed" Value="true" />
|
||||
<asp:HiddenField runat="server" ID="hfOpen" Value="true" />
|
||||
<asp:HiddenField runat="server" ID="hfNew" Value="true" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_RepProd_GG : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
// seleziono valori "0"
|
||||
ddlArticolo.SelectedIndex = 0;
|
||||
ddlMacchine.SelectedIndex = 0;
|
||||
// data. ultimi 30 gg di default!
|
||||
hfDataFrom.Value = DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd");
|
||||
hfDataTo.Value = DateTime.Now.ToString("yyyy-MM-dd");
|
||||
}
|
||||
updateElenco();
|
||||
}
|
||||
|
||||
protected void ddlArticolo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
updateElenco();
|
||||
}
|
||||
|
||||
protected void ddlMacchine_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
updateElenco();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua update elenco tempi per articolo/impianto
|
||||
/// </summary>
|
||||
private void updateElenco()
|
||||
{
|
||||
// carico update!
|
||||
grView.DataBind();
|
||||
}
|
||||
}
|
||||
}
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class mod_RepProd_GG {
|
||||
|
||||
/// <summary>
|
||||
/// ddlArticolo control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddlArticolo;
|
||||
|
||||
/// <summary>
|
||||
/// odsArticoli 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 odsArticoli;
|
||||
|
||||
/// <summary>
|
||||
/// ddlMacchine control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddlMacchine;
|
||||
|
||||
/// <summary>
|
||||
/// odsMacchine 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 odsMacchine;
|
||||
|
||||
/// <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>
|
||||
/// hfDataFrom 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.HiddenField hfDataFrom;
|
||||
|
||||
/// <summary>
|
||||
/// hfDataTo 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.HiddenField hfDataTo;
|
||||
|
||||
/// <summary>
|
||||
/// hfClosed 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.HiddenField hfClosed;
|
||||
|
||||
/// <summary>
|
||||
/// hfOpen 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.HiddenField hfOpen;
|
||||
|
||||
/// <summary>
|
||||
/// hfNew 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.HiddenField hfNew;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_commenti.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_commenti" %>
|
||||
|
||||
|
||||
<div class="row small">
|
||||
<div class="col-12">
|
||||
<asp:Label runat="server" ID="lblNumGG" Text="# Commenti" AssociatedControlID="dlPageSize" />
|
||||
<asp:DropDownList runat="server" ID="dlPageSize" CssClass="form-control form-control-sm bg-dark text-light" AutoPostBack="true">
|
||||
<asp:ListItem>5</asp:ListItem>
|
||||
<asp:ListItem>10</asp:ListItem>
|
||||
<asp:ListItem>15</asp:ListItem>
|
||||
<asp:ListItem>20</asp:ListItem>
|
||||
<asp:ListItem>30</asp:ListItem>
|
||||
<asp:ListItem>50</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<asp:Repeater ID="repComm" runat="server" DataSourceID="odsComm">
|
||||
<ItemTemplate>
|
||||
<div class="my-1 w-100">
|
||||
<div class="card text-white dichBlock rCAll w-100">
|
||||
<div class='card-title py-0 px-2 mb-0 rCTop bg-dark '>
|
||||
<b style="font-size: 1.1em;">
|
||||
<asp:Label ID="Label3" runat="server" Text='<%# Eval("Operatore", "<b>{0}</b>") %>' />
|
||||
</b>
|
||||
</div>
|
||||
<div class="card-text p-1 d-flex align-items-end">
|
||||
<asp:Label ID="Label4" runat="server" Text='<%# Eval("Value") %>' Font-Bold="false" />
|
||||
</div>
|
||||
<div class="card-text p-1 d-flex align-items-end">
|
||||
<div class="labelBottom text-left">
|
||||
<asp:LinkButton runat="server" ID="lbtEdit" CommandArgument='<%# Eval("InizioStato","{0:dd/MM/yyyy HH:mm:ss.fff}") %>' OnClick="lbtEdit_Click" Visible='<%# enableEdit %>' CssClass="btn btn-sm btn-block btn-info py-0"><i class="fa fa-edit"></i></asp:LinkButton>
|
||||
</div>
|
||||
<div class="labelBottom text-right">
|
||||
<asp:LinkButton runat="server" ID="lbtDel" CommandArgument='<%# Eval("InizioStato","{0:dd/MM/yyyy HH:mm:ss.fff}") %>' OnClick="lbtDel_Click" Visible='<%# enableEdit %>' CssClass="btn btn-sm btn-block btn-danger py-0" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>'><i class="fa fa-trash"></i></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-text p-1 d-flex align-items-end rCBot" style="font-size: 0.8em; border-top: 1px solid #ACACAC; color: #ACACAC">
|
||||
<div class="labelBottom text-left p-0">
|
||||
<asp:Label ID="Label5" runat="server" Text='<%# Eval("InizioStato", "{0:dd/MM/yyyy HH:mm:ss}") %>' Font-Bold="false" />
|
||||
</div>
|
||||
<div class="labelBottom text-right p-0">
|
||||
<asp:Label runat="server" ID="Label1" Text='<%# Eval("CodArticolo") %>' Font-Bold="false" />
|
||||
<asp:Label runat="server" ID="Label2" Text='<%# Eval("idxODL","ODL{0}") %>' Font-Bold="false" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
<asp:ObjectDataSource ID="odsComm" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="MapoDb.DS_UtilityTableAdapters.CommentiTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter DefaultValue="0" Name="IdxMacchina" SessionField="idxMacchina" Type="String" />
|
||||
<asp:ControlParameter ControlID="dlPageSize" DefaultValue="5" Name="showMax" PropertyName="SelectedValue" Type="Int32" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,66 @@
|
||||
using MapoDb;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_commenti : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// registrata richiesta
|
||||
/// </summary>
|
||||
public event EventHandler eh_reqEdit;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// abilitazione edit commenti
|
||||
/// </summary>
|
||||
public bool enableEdit
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.confReadBool("commEnableEditDel");
|
||||
}
|
||||
}
|
||||
|
||||
public void doUpdate()
|
||||
{
|
||||
repComm.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// carico x edit commento
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton imgBtn = (LinkButton)sender;
|
||||
DateTime inizioStato = Convert.ToDateTime(imgBtn.CommandArgument);
|
||||
memLayer.ML.setSessionVal("inizioStato", inizioStato);
|
||||
// sollevo evento!
|
||||
if (eh_reqEdit != null)
|
||||
{
|
||||
eh_reqEdit(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// elimina commento
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtDel_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton imgBtn = (LinkButton)sender;
|
||||
DateTime inizioStato = Convert.ToDateTime(imgBtn.CommandArgument);
|
||||
string idxMacchina = memLayer.ML.StringSessionObj("idxMacchina");
|
||||
DataLayer.obj.taEventi.DeleteQuery(idxMacchina, inizioStato);
|
||||
doUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_commenti {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblNumGG.
|
||||
/// </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 lblNumGG;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo dlPageSize.
|
||||
/// </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.DropDownList dlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo repComm.
|
||||
/// </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.Repeater repComm;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo odsComm.
|
||||
/// </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 odsComm;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_confProd.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_confProd" %>
|
||||
|
||||
|
||||
<div class="row textCondens">
|
||||
<div class="col-6 py-1 text-left text-uppercase">
|
||||
<b>Dati Globali ODL</b>
|
||||
</div>
|
||||
<div class="col-6 text-right"><sub>Inizio ODL --> <%: dtReqUpdate.ToString() %></sub></div>
|
||||
<div class="col-6 col-sm-3 pr-1 py-0 text-right">
|
||||
<div class="alert alert-info py-1">
|
||||
<div class="text-truncate">
|
||||
Pz Prodotti TOT [A+B+C]
|
||||
</div>
|
||||
<div style="font-size: 2em; font-weight: bold;" class="my-0">
|
||||
<asp:Label runat="server" ID="lblPzTotODL">[A+B+C]</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-sm-3 pl-1 px-sm-1 py-0 text-right">
|
||||
<div class="alert alert-warning py-1">
|
||||
<div class="text-truncate">
|
||||
[A] NUOVI Pz.Prod
|
||||
</div>
|
||||
<div style="font-size: 2em; font-weight: bold;" class="my-0">
|
||||
<asp:Label runat="server" ID="lblPz2RecTot">[A]</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-sm-3 pr-1 px-sm-1 py-0 text-right">
|
||||
<div class="alert alert-danger py-1">
|
||||
<div class="text-truncate">
|
||||
[B] Scarti VERS.
|
||||
</div>
|
||||
<div style="font-size: 2em; font-weight: bold;" class="my-0">
|
||||
<asp:Label runat="server" ID="lblPzConfScarto">[B]</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-sm-3 pl-1 py-0 text-right">
|
||||
<div class="alert alert-success py-1">
|
||||
<div class="text-truncate">
|
||||
[C] Pz Buoni VERS.
|
||||
</div>
|
||||
<div style="font-size: 2em; font-weight: bold;" class="my-0">
|
||||
<asp:Label runat="server" ID="lblPzConfBuoni">[C]</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card bg-secondary">
|
||||
<div class="card-header p-0">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<asp:Label runat="server" ID="lblConfProd" CssClass="btn btn-dark btn-lg btn-block disabled">
|
||||
<i class="fa fa-check"></i> MOSTRA Conferma
|
||||
</asp:Label>
|
||||
<asp:Label runat="server" ID="lblMancaODL" Visible="false" ForeColor="Red">MANCA ODL: conferma NON permessa</asp:Label>
|
||||
<asp:LinkButton runat="server" ID="lbtShowConfProd" OnClick="lbtShowConfProd_Click" CssClass="btn btn-dark btn-lg btn-block">
|
||||
<i class="fa fa-check"></i>
|
||||
<asp:Label runat="server" ID="lblShowConfProd" />
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-12" runat="server" id="divSelMacc">
|
||||
<asp:DropDownList runat="server" ID="ddlSubMacc" DataSourceID="ods" CssClass="form-control" DataTextField="CodMaccArticolo" DataValueField="IdxMacchina" AutoPostBack="True" OnSelectedIndexChanged="ddlSubMacc_SelectedIndexChanged" OnDataBound="ddlSubMacc_DataBound"></asp:DropDownList>
|
||||
<asp:ObjectDataSource runat="server" ID="ods" OldValuesParameterFormatString="original_{0}" SelectMethod="getMulti" TypeName="MapoDb.DS_applicazioneTableAdapters.MSFDTableAdapter" FilterExpression="idxMacchina LIKE '%#%'">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter DefaultValue="0" Name="IdxMacchina" SessionField="IdxMacchina" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body p-1">
|
||||
<div class="row textCondens text-right " runat="server" id="divInnovazioni">
|
||||
<div class="col-6 py-1 text-left text-uppercase">
|
||||
<b>Dati Incrementali</b>
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
<sub>ultima conferma --> <%: dtReqUpdate.ToString() %></sub>
|
||||
</div>
|
||||
<div class="col-4 pr-1">
|
||||
<asp:Label runat="server" ID="lblNumPezzi" AssociatedControlID="txtNumPezzi" Text="Pz Prodotti" />
|
||||
<asp:TextBox runat="server" ID="txtNumPezzi" Font-Size="XX-Large" TextMode="Number" CssClass="form-control text-right alert alert-info py-0" Enabled="true" AutoPostBack="True" OnTextChanged="txtNumPezzi_TextChanged" />
|
||||
</div>
|
||||
<div class="col-4 px-1">
|
||||
<div class="row">
|
||||
<div class="col-5 pr-1">
|
||||
<asp:Label runat="server" ID="lblNumScarti" AssociatedControlID="txtNumScarti" Text="Pz Scarto" />
|
||||
<asp:TextBox runat="server" ID="txtNumScarti" Font-Size="XX-Large" TextMode="Number" CssClass="form-control text-right bg-dark text-danger py-0" Enabled="false" />
|
||||
<%--<asp:Label runat="server" ID="lblPz2RecScarto">[B2]</asp:Label>--%>
|
||||
</div>
|
||||
<div class="col-1 px-1">
|
||||
<asp:Label runat="server" ID="Label2" AssociatedControlID="lblPlus"> </asp:Label>
|
||||
<asp:Label runat="server" ID="lblPlus" Font-Size="XX-Large" TextMode="Number" Enabled="false">+</asp:Label>
|
||||
</div>
|
||||
<div class="col-6 pl-1">
|
||||
<asp:Label runat="server" ID="lblPzBuoni" AssociatedControlID="txtPzBuoni" Text="Pz Buoni" />
|
||||
<asp:TextBox runat="server" ID="txtPzBuoni" Font-Size="XX-Large" TextMode="Number" CssClass="form-control text-right bg-dark text-success py-0" Enabled="false" Text="---" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 pl-1">
|
||||
<asp:Label runat="server" ID="Label1" AssociatedControlID="txtPzBuoni" Text="-" />
|
||||
<asp:LinkButton runat="server" ID="lbtSalva" Visible="false" CssClass="btn btn-success text-light btn-lg btn-block" OnClick="lbtSalva_Click"><i class="fa fa-floppy-o"></i> CONFERMA</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-2">
|
||||
<div class="col-12">
|
||||
<asp:Label runat="server" ID="lblOut" ForeColor="Red" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,435 @@
|
||||
using MapoDb;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_confProd : 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;
|
||||
/// <summary>
|
||||
/// Data-Ora ultimo update valori produzione
|
||||
/// </summary>
|
||||
public DateTime dtReqUpdate
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime answ = DateTime.Now;
|
||||
DateTime.TryParse(memLayer.ML.StringSessionObj("dtReqUpdate"), out answ);
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("dtReqUpdate", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Dati produzioen rilevati
|
||||
/// </summary>
|
||||
public DS_ProdTempi.StatoProdRow datiProdAct;
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
checkAll();
|
||||
doUpdate();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Aggiorno valori produzione...
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
dtReqUpdate = DateTime.Now;
|
||||
datiProdAct = DataLayer.obj.taStatoProd.GetData(idxMacchina, dtReqUpdate)[0];
|
||||
// aggiorno visualizzazione...
|
||||
numPzProdotti = datiProdAct.PzTotODL;
|
||||
numPz2Rec = datiProdAct.Pz2RecTot;
|
||||
#if false
|
||||
numPzSca2Rec = datiProdAct.Pz2RecScarto;
|
||||
#endif
|
||||
numPzScaConf = datiProdAct.PzConfScarto;
|
||||
numPzBuoniConf = datiProdAct.PzConfBuoni;
|
||||
numPzProdotti2Rec = datiProdAct.Pz2RecTot;
|
||||
numPzScarto2Rec = datiProdAct.Pz2RecScarto;
|
||||
}
|
||||
/// <summary>
|
||||
/// Numero pezzi PRODOTTI GLOBALI
|
||||
/// </summary>
|
||||
protected int numPzProdotti
|
||||
{
|
||||
set
|
||||
{
|
||||
lblPzTotODL.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Numero pezzi PRODOTTI da ultima conferma
|
||||
/// </summary>
|
||||
protected int numPz2Rec
|
||||
{
|
||||
set
|
||||
{
|
||||
lblPz2RecTot.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Numero pezzi SCARTO da ultima conferma
|
||||
/// </summary>
|
||||
protected int numPzSca2Rec
|
||||
{
|
||||
set
|
||||
{
|
||||
lblPz2RecScarto.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/// <summary>
|
||||
/// Numero pezzi SCARTO già confermati
|
||||
/// </summary>
|
||||
protected int numPzScaConf
|
||||
{
|
||||
set
|
||||
{
|
||||
lblPzConfScarto.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Numero pezzi BUONI già confermati
|
||||
/// </summary>
|
||||
protected int numPzBuoniConf
|
||||
{
|
||||
set
|
||||
{
|
||||
lblPzConfBuoni.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Numero pezzi PRODOTTI da registrare
|
||||
/// </summary> da ultima conferma
|
||||
protected int numPzProdotti2Rec
|
||||
{
|
||||
set
|
||||
{
|
||||
txtNumPezzi.Text = value.ToString();
|
||||
}
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(txtNumPezzi.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Numero pezzi SCARTATI da registrare
|
||||
/// </summary>
|
||||
protected int numPzScarto2Rec
|
||||
{
|
||||
set
|
||||
{
|
||||
txtNumScarti.Text = value.ToString();
|
||||
}
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(txtNumScarti.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Numero pezzi confermati (buoni - scarto)
|
||||
/// </summary>
|
||||
protected int numPzConfermati
|
||||
{
|
||||
get
|
||||
{
|
||||
return numPzProdotti2Rec - numPzScarto2Rec;
|
||||
}
|
||||
}
|
||||
private void checkAll()
|
||||
{
|
||||
fixSelMacc();
|
||||
checkOdl();
|
||||
lblOut.Text = "";
|
||||
switchBtnConferma(false);
|
||||
lbtShowConfProd.Visible = odlOk;
|
||||
lblConfProd.Visible = !odlOk;
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica se abbia un ODL ATTIVO
|
||||
/// </summary>
|
||||
private void checkOdl()
|
||||
{
|
||||
lbtShowConfProd.Visible = odlOk;
|
||||
lblConfProd.Visible = !odlOk;
|
||||
lblMancaODL.Visible = !odlOk;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifica se la macchina MAIN sia MULTI (da DatiMacchina / redis...)
|
||||
/// </summary>
|
||||
protected bool isMulti
|
||||
{
|
||||
get
|
||||
{
|
||||
return DataLayer.isMulti(idxMacchinaSession);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Se la machcina è MULTI --> mostro selettore
|
||||
/// </summary>
|
||||
private void fixSelMacc()
|
||||
{
|
||||
divSelMacc.Visible = isMulti;
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce css disabled SE odl NON OK...
|
||||
/// </summary>
|
||||
public string cssBtnConf
|
||||
{
|
||||
get
|
||||
{
|
||||
return odlOk ? "" : "disabled";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica ODL OK (ovvero caricato x macchina...)
|
||||
/// </summary>
|
||||
public bool odlOk
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = true;
|
||||
// carico i dati preliminari: ODL
|
||||
int idxOdl = 0; // userò ODL del turno
|
||||
try
|
||||
{
|
||||
idxOdl = DataLayer.obj.taODL.getByMacchinaAperto(idxMacchina)[0].IdxODL;
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore a recuperare ODL per la macchina {0}", idxMacchina), tipoLog.ERROR);
|
||||
}
|
||||
// se ODL > 0 è ok!!!
|
||||
answ = (idxOdl > 0);
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// idx macchina selezionata
|
||||
/// </summary>
|
||||
public string idxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = memLayer.ML.StringSessionObj("IdxMacchina");
|
||||
// verifoc: se multi uso selettore tendina...
|
||||
if (isMulti)
|
||||
{
|
||||
if (ddlSubMacc.SelectedValue == "")
|
||||
{
|
||||
ddlSubMacc.DataBind();
|
||||
}
|
||||
if (ddlSubMacc.SelectedValue != "")
|
||||
{
|
||||
answ = ddlSubMacc.SelectedValue;
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("IdxMacchina", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// idx macchina selezionata
|
||||
/// </summary>
|
||||
public string idxMacchinaSession
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("IdxMacchina");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("IdxMacchina", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// cambio stato visibilità pannello e testo button
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtShowConfProd_Click(object sender, EventArgs e)
|
||||
{
|
||||
switchBtnConferma(!divInnovazioni.Visible);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// determina comportamento btn conferma
|
||||
/// </summary>
|
||||
private void switchBtnConferma(bool showConf)
|
||||
{
|
||||
// aggiorno valori rilevati
|
||||
doUpdate();
|
||||
divInnovazioni.Visible = showConf;
|
||||
if (showConf)
|
||||
{
|
||||
// continuo update
|
||||
lbtSalva.Visible = showConf;
|
||||
try
|
||||
{
|
||||
txtPzBuoni.Text = numPzConfermati.ToString();
|
||||
// sollevo evento!
|
||||
if (eh_inserting != null)
|
||||
{
|
||||
eh_inserting(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
txtNumPezzi.Text = "0";
|
||||
logger.lg.scriviLog(string.Format("Errore recupero pezzi da confermare per la macchina {0}", idxMacchina), tipoLog.ERROR);
|
||||
}
|
||||
}
|
||||
if (showConf)
|
||||
{
|
||||
lblShowConfProd.Text = "Nascondi Conferma";
|
||||
}
|
||||
else
|
||||
{
|
||||
lblShowConfProd.Text = "Mostra Conferma";
|
||||
// sollevo evento!
|
||||
if (eh_reset != null)
|
||||
{
|
||||
eh_reset(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// salvo produzione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtSalva_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (memLayer.ML.CRI("modoConfProd") == 2)
|
||||
{
|
||||
confermaPerTurni();
|
||||
}
|
||||
else
|
||||
{
|
||||
confermaPerGiorni();
|
||||
}
|
||||
// refresh tabella dati tablet...
|
||||
DataLayer.obj.taMSE.getByRefreshData(memLayer.ML.confReadInt("refrMSE_0"));
|
||||
// mostro output
|
||||
lblOut.Text = string.Format("Confermata la produzione per {0} pezzi! (+{1} pz scarto) alle {2:yyyy-MM-dd HH:mm:ss}", numPzConfermati, numPzScarto2Rec, dtReqUpdate);
|
||||
// cambio button conferma...
|
||||
switchBtnConferma(!txtNumPezzi.Enabled);
|
||||
// sollevo evento!
|
||||
if (eh_newVal != null)
|
||||
{
|
||||
eh_newVal(this, new EventArgs());
|
||||
}
|
||||
doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua conferma per giorni della produzione
|
||||
/// </summary>
|
||||
private void confermaPerGiorni()
|
||||
{
|
||||
DataLayer.obj.confermaProdMacchina(idxMacchina.ToString(), memLayer.ML.confReadInt("modoConfProd"), numPzConfermati, numPzScarto2Rec, dtReqUpdate);
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua conferma per turni della produzione
|
||||
/// </summary>
|
||||
private void confermaPerTurni()
|
||||
{
|
||||
DataLayer.obj.confermaProdMacchina(idxMacchina.ToString(), memLayer.ML.confReadInt("modoConfProd"), numPzConfermati, numPzScarto2Rec, dtReqUpdate);
|
||||
}
|
||||
/// <summary>
|
||||
/// update post modifica pz buoni
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtNumPezzi_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
updatePzBuoni();
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna visualizzazione pz buoni /prodotti - scarti)
|
||||
/// </summary>
|
||||
private void updatePzBuoni()
|
||||
{
|
||||
txtPzBuoni.Text = numPzConfermati.ToString();
|
||||
}
|
||||
|
||||
protected void ddlSubMacc_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
subMaccSel = ddlSubMacc.SelectedValue;
|
||||
checkAll();
|
||||
}
|
||||
|
||||
protected void ddlSubMacc_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
// se ho in memoria un valore LO REIMPOSTO...
|
||||
if (subMaccSel != "")
|
||||
{
|
||||
// provo a preselezionare...
|
||||
try
|
||||
{
|
||||
ddlSubMacc.SelectedValue = subMaccSel;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Sotto sistema (macchina) selezionato
|
||||
/// </summary>
|
||||
public string subMaccSel
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("subMaccSel");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("subMaccSel", value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+222
@@ -0,0 +1,222 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_confProd {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblPzTotODL.
|
||||
/// </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 lblPzTotODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblPz2RecTot.
|
||||
/// </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 lblPz2RecTot;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblPzConfScarto.
|
||||
/// </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 lblPzConfScarto;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblPzConfBuoni.
|
||||
/// </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 lblPzConfBuoni;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblConfProd.
|
||||
/// </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 lblConfProd;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblMancaODL.
|
||||
/// </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 lblMancaODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtShowConfProd.
|
||||
/// </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.LinkButton lbtShowConfProd;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblShowConfProd.
|
||||
/// </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 lblShowConfProd;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divSelMacc.
|
||||
/// </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.HtmlControls.HtmlGenericControl divSelMacc;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ddlSubMacc.
|
||||
/// </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.DropDownList ddlSubMacc;
|
||||
|
||||
/// <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 divInnovazioni.
|
||||
/// </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.HtmlControls.HtmlGenericControl divInnovazioni;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblNumPezzi.
|
||||
/// </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 lblNumPezzi;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtNumPezzi.
|
||||
/// </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 txtNumPezzi;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblNumScarti.
|
||||
/// </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 lblNumScarti;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtNumScarti.
|
||||
/// </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 txtNumScarti;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo Label2.
|
||||
/// </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 Label2;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblPlus.
|
||||
/// </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 lblPlus;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblPzBuoni.
|
||||
/// </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 lblPzBuoni;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtPzBuoni.
|
||||
/// </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 txtPzBuoni;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo Label1.
|
||||
/// </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 Label1;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtSalva.
|
||||
/// </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.LinkButton lbtSalva;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblOut.
|
||||
/// </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 lblOut;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_controlliProd.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_controlliProd" %>
|
||||
<div class="card">
|
||||
<div class="card-header p-0">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<asp:Label runat="server" ID="lblConfProd" CssClass="btn btn-primary btn-lg btn-block disabled">
|
||||
<i class="fa fa-wrench"></i> REGISTRA Controllo
|
||||
</asp:Label>
|
||||
<asp:Label runat="server" ID="lblMancaODL" Visible="false" ForeColor="Red">MANCA ODL: registrazione controlli produzione NON permessa</asp:Label>
|
||||
<asp:LinkButton runat="server" ID="lbtShowContr" OnClick="lbtShowContr_Click" CssClass="btn btn-primary btn-lg btn-block">
|
||||
<i class="fa fa-wrench"></i>
|
||||
<asp:Label runat="server" ID="lblShowContr" />
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-12" runat="server" id="divSelMacc">
|
||||
<asp:DropDownList runat="server" ID="ddlSubMacc" DataSourceID="ods" CssClass="form-control" DataTextField="CodMaccArticolo" DataValueField="IdxMacchina" AutoPostBack="True" OnSelectedIndexChanged="ddlSubMacc_SelectedIndexChanged" OnDataBound="ddlSubMacc_DataBound"></asp:DropDownList>
|
||||
<asp:ObjectDataSource runat="server" ID="ods" OldValuesParameterFormatString="original_{0}" SelectMethod="getMulti" TypeName="MapoDb.DS_applicazioneTableAdapters.MSFDTableAdapter" FilterExpression="idxMacchina LIKE '%#%'">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter DefaultValue="0" Name="IdxMacchina" SessionField="IdxMacchina" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body p-1 table-primary text-dark">
|
||||
<div class="row my-2" runat="server">
|
||||
<div class="col-6">
|
||||
<asp:LinkButton runat="server" ID="lbtOK" CssClass="btn btn-block btn-success" OnClick="lbtOK_Click">OK</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<asp:LinkButton runat="server" ID="lbtKO" CssClass="btn btn-block btn-danger" OnClick="lbtKO_Click">KO</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-12" runat="server" id="divNote" visible="false">
|
||||
<asp:Label runat="server" ID="Label1" CssClass="small disabled" AssociatedControlID="txtNoteContr">
|
||||
Note controllo NON superato (opzionali)
|
||||
</asp:Label>
|
||||
<asp:TextBox runat="server" ID="txtNoteContr" TextMode="MultiLine" CssClass="form-control"></asp:TextBox>
|
||||
<asp:LinkButton runat="server" ID="lbtSalva" CssClass="btn btn-danger text-light btn-lg btn-block" OnClick="lbtSalva_Click"><i class="fa fa-floppy-o"></i> CONFERMA controllo KO</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-12">
|
||||
<asp:Label runat="server" ID="lblOut" ForeColor="Red" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,254 @@
|
||||
using MapoDb;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_controlliProd : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// registrato nuovo valore
|
||||
/// </summary>
|
||||
public event EventHandler eh_newVal;
|
||||
/// <summary>
|
||||
/// registrato nuovo valore
|
||||
/// </summary>
|
||||
public event EventHandler eh_reset;
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
checkAll();
|
||||
}
|
||||
}
|
||||
|
||||
private void checkAll()
|
||||
{
|
||||
fixSelMacc();
|
||||
checkOdl();
|
||||
lblOut.Text = "";
|
||||
switchBtnConferma(false);
|
||||
lbtShowContr.Visible = odlOk;
|
||||
lblConfProd.Visible = !odlOk;
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica se abbia un ODL ATTIVO
|
||||
/// </summary>
|
||||
private void checkOdl()
|
||||
{
|
||||
lbtShowContr.Visible = odlOk;
|
||||
lblConfProd.Visible = !odlOk;
|
||||
lblMancaODL.Visible = !odlOk;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifica se la macchina MAIN sia MULTI (da DatiMacchina / redis...)
|
||||
/// </summary>
|
||||
protected bool isMulti
|
||||
{
|
||||
get
|
||||
{
|
||||
return DataLayer.isMulti(idxMacchinaSession);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Se la machcina è MULTI --> mostro selettore
|
||||
/// </summary>
|
||||
private void fixSelMacc()
|
||||
{
|
||||
divSelMacc.Visible = isMulti;
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce css disabled SE odl NON OK...
|
||||
/// </summary>
|
||||
public string cssBtnConf
|
||||
{
|
||||
get
|
||||
{
|
||||
return odlOk ? "" : "disabled";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica ODL OK (ovvero caricato x macchina...)
|
||||
/// </summary>
|
||||
public bool odlOk
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = true;
|
||||
// carico i dati preliminari: ODL
|
||||
int idxOdl = 0; // userò ODL del turno
|
||||
try
|
||||
{
|
||||
idxOdl = DataLayer.obj.taODL.getByMacchinaAperto(idxMacchina)[0].IdxODL;
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore a recuperare ODL per la macchina {0}", idxMacchina), tipoLog.ERROR);
|
||||
}
|
||||
// se ODL > 0 è ok!!!
|
||||
answ = (idxOdl > 0);
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// idx macchina selezionata
|
||||
/// </summary>
|
||||
public string idxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = memLayer.ML.StringSessionObj("IdxMacchina");
|
||||
// verifoc: se multi uso selettore tendina...
|
||||
if (isMulti)
|
||||
{
|
||||
if (ddlSubMacc.SelectedValue == "")
|
||||
{
|
||||
ddlSubMacc.DataBind();
|
||||
}
|
||||
if (ddlSubMacc.SelectedValue != "")
|
||||
{
|
||||
answ = ddlSubMacc.SelectedValue;
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("IdxMacchina", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// idx macchina selezionata
|
||||
/// </summary>
|
||||
public string idxMacchinaSession
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("IdxMacchina");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("IdxMacchina", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// cambio stato visibilità pannello e testo button
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtShowContr_Click(object sender, EventArgs e)
|
||||
{
|
||||
switchBtnConferma(!lbtOK.Visible);
|
||||
}
|
||||
/// <summary>
|
||||
/// determina comportamento btn conferma
|
||||
/// </summary>
|
||||
private void switchBtnConferma(bool showConf)
|
||||
{
|
||||
lbtOK.Visible = showConf;
|
||||
lbtKO.Visible = showConf;
|
||||
lbtSalva.Visible = showConf;
|
||||
if (showConf)
|
||||
{
|
||||
lblShowContr.Text = "Nascondi Controllo";
|
||||
}
|
||||
else
|
||||
{
|
||||
lblShowContr.Text = "Registra Controllo";
|
||||
// sollevo evento!
|
||||
if (eh_reset != null)
|
||||
{
|
||||
eh_reset(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// salvo produzione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtSalva_Click(object sender, EventArgs e)
|
||||
{
|
||||
// salvo controllo KO
|
||||
DataLayer.obj.taRC.insertQuery(idxMacchina, DataLayer.MatrOpr, false, txtNoteContr.Text.Trim(), DateTime.Now);
|
||||
// sollevo evento!
|
||||
if (eh_newVal != null)
|
||||
{
|
||||
eh_newVal(this, new EventArgs());
|
||||
}
|
||||
resetControlli();
|
||||
}
|
||||
|
||||
private void resetControlli()
|
||||
{
|
||||
txtNoteContr.Text = "";
|
||||
// nascondo!
|
||||
switchBtnConferma(false);
|
||||
divNote.Visible = false;
|
||||
}
|
||||
|
||||
protected void ddlSubMacc_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
subMaccSel = ddlSubMacc.SelectedValue;
|
||||
checkAll();
|
||||
}
|
||||
|
||||
protected void ddlSubMacc_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
// se ho in memoria un valore LO REIMPOSTO...
|
||||
if (subMaccSel != "")
|
||||
{
|
||||
// provo a preselezionare...
|
||||
try
|
||||
{
|
||||
ddlSubMacc.SelectedValue = subMaccSel;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Sotto sistema (macchina) selezionato
|
||||
/// </summary>
|
||||
public string subMaccSel
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("subMaccSel");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("subMaccSel", value);
|
||||
}
|
||||
}
|
||||
|
||||
protected void lbtOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Salvo controllo come OK
|
||||
DataLayer.obj.taRC.insertQuery(idxMacchina, DataLayer.MatrOpr, true, "", DateTime.Now);
|
||||
// sollevo evento!
|
||||
if (eh_newVal != null)
|
||||
{
|
||||
eh_newVal(this, new EventArgs());
|
||||
}
|
||||
resetControlli();
|
||||
}
|
||||
|
||||
protected void lbtKO_Click(object sender, EventArgs e)
|
||||
{
|
||||
divNote.Visible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_controlliProd {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblConfProd.
|
||||
/// </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 lblConfProd;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblMancaODL.
|
||||
/// </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 lblMancaODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtShowContr.
|
||||
/// </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.LinkButton lbtShowContr;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblShowContr.
|
||||
/// </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 lblShowContr;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divSelMacc.
|
||||
/// </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.HtmlControls.HtmlGenericControl divSelMacc;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ddlSubMacc.
|
||||
/// </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.DropDownList ddlSubMacc;
|
||||
|
||||
/// <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 lbtOK.
|
||||
/// </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.LinkButton lbtOK;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtKO.
|
||||
/// </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.LinkButton lbtKO;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divNote.
|
||||
/// </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.HtmlControls.HtmlGenericControl divNote;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo Label1.
|
||||
/// </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 Label1;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtNoteContr.
|
||||
/// </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 txtNoteContr;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtSalva.
|
||||
/// </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.LinkButton lbtSalva;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblOut.
|
||||
/// </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 lblOut;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_dettMacchina.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_dettMacchina" %>
|
||||
<%--Riporto dettaglio singola macchina--%>
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<asp:Repeater ID="repLI" runat="server" DataSourceID="ods">
|
||||
<ItemTemplate>
|
||||
<div class="col-12">
|
||||
<asp:HyperLink runat="server" ID="hlFermate" CssClass="btn btn-block btn-lg flashingRed mb-2 p-3" NavigateUrl="~/Fermate.aspx" Visible='<%# showInsFermata(Eval("IdxStato"),Eval("Durata")) %>'><i class="fa fa-lg fa-exclamation-triangle"></i> DICHIARARE FERMO <i class="fa fa-lg fa-exclamation-triangle"></i></asp:HyperLink>
|
||||
</div>
|
||||
<div class="col-9 col-sm-10">
|
||||
<div class="card text-white mapBlock rCAll">
|
||||
<div class='card <%# Eval("Semaforo") %> p-0 m-0 rCAll'>
|
||||
<div class="row justify-content-center m-2 bg-black">
|
||||
<div class="col-7 px-1">
|
||||
<b class="text-left">
|
||||
<asp:Label runat="server" ID="lblTitle" Text='<%# Eval("Nome") %>' /></b>
|
||||
</div>
|
||||
<div class="col-5 px-1 labelTopDx small text-right">
|
||||
<asp:Label runat="server" ID="lblBadge" Text='<%# Eval("CodArticolo","art: {0}") %>' />
|
||||
<asp:Label runat="server" ID="lblODC" Text='<%# Eval("idxODL","(ODL {0})") %>' />
|
||||
</div>
|
||||
<div class='col-12 px-1 <%# Eval("Semaforo") %>'>
|
||||
<div class="d-flex">
|
||||
<div class="p-1 mr-auto">
|
||||
<b>
|
||||
<asp:Label runat="server" ID="lblStato" Text='<%# Eval("DescrizioneStato") %>' /></b>
|
||||
</div>
|
||||
<div class="p-1">
|
||||
<asp:Label runat="server" ID="lblDurata" Text='<%# formatDurata(Eval("Durata")) %>' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 px-1 py-0">
|
||||
<div class="d-flex">
|
||||
<div class="p-1 mr-auto">
|
||||
<asp:Label runat="server" ID="Label2" Text='<%# Eval("PezziProd","prod: {0}") %>' ToolTip="pz prodotti" />
|
||||
/
|
||||
<asp:Label runat="server" ID="lblPzLanciati" Text='<%# Eval("NumPezzi","tot: {0}") %>' ToolTip="pz lanciati" />
|
||||
</div>
|
||||
<div class="p-1">
|
||||
<asp:Label runat="server" ID="Label1" Text='<%# Eval("PezziConf","conf: {0}") %>' ToolTip="pz confermati" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 col-sm-2">
|
||||
<asp:HyperLink runat="server" ID="hlDisegno" NavigateUrl='<%# urlDisegno(Eval("CodArticolo")) %>' CssClass="btn btn-secondary btn-sm btn-block small" Target="_blank">
|
||||
<i class="fa fa-file-pdf-o fa-2x"></i><br /><div class="small">DISEGNO</div>
|
||||
</asp:HyperLink>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</div>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByRefreshData"
|
||||
TypeName="MapoDb.DS_ProdTempiTableAdapters.MappaStatoExplTableAdapter" FilterExpression="IdxMacchina = '{0}'">
|
||||
<FilterParameters>
|
||||
<asp:SessionParameter Type="String" DefaultValue="0" SessionField="IdxMacchina" Name="IdxMacchina" />
|
||||
</FilterParameters>
|
||||
<SelectParameters>
|
||||
<asp:Parameter DefaultValue="1" Name="maxAgeSec" Type="Int32" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:HiddenField runat="server" ID="hfIdxMacchina" />
|
||||
<!-- timer refresh dettaglio macchina: 1 sec, 1'000 ms -->
|
||||
<asp:Timer ID="dmTimer" runat="server" Interval="1000" OnTick="Timer1_Tick">
|
||||
</asp:Timer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -0,0 +1,161 @@
|
||||
using MapoDb;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_dettMacchina : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// fatto refresh --> chiedo remove modal (se c'è)
|
||||
/// </summary>
|
||||
public event EventHandler eh_reqRemoveModal;
|
||||
/// <summary>
|
||||
/// idx macchina selezionata
|
||||
/// </summary>
|
||||
public string idxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("IdxMacchina");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("IdxMacchina", value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
dmTimer.Interval = memLayer.ML.CRI("dtTimerInt");
|
||||
}
|
||||
// controllo se ho dett macchina altrimenti ritorno a pagina generale...
|
||||
if (idxMacchina == "")
|
||||
{
|
||||
Response.Redirect("~/MappaStato.aspx");
|
||||
}
|
||||
//hlFermate.Visible = showInsFermata;
|
||||
}
|
||||
/// <summary>
|
||||
/// url completo immagine
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <returns></returns>
|
||||
public string ImgUrl(object url)
|
||||
{
|
||||
if (url.ToString() == "")
|
||||
{
|
||||
url = "empty.png";
|
||||
}
|
||||
return string.Format("./images/macchine/{0}", url);
|
||||
}
|
||||
/// <summary>
|
||||
/// fomratta durata in minuti/ore/gg a seconda del totale...
|
||||
/// </summary>
|
||||
/// <param name="minuti"></param>
|
||||
/// <returns></returns>
|
||||
public string formatDurata(object min)
|
||||
{
|
||||
return utility.formatDurata(min);
|
||||
}
|
||||
/// <summary>
|
||||
/// fa update del controllo
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
ods.DataBind();
|
||||
repLI.DataBind();
|
||||
}
|
||||
/// <summary>
|
||||
/// timeout scaduto
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
// sollevo evento!
|
||||
if (eh_reqRemoveModal != null)
|
||||
{
|
||||
eh_reqRemoveModal(this, new EventArgs());
|
||||
}
|
||||
// update
|
||||
doUpdate();
|
||||
//ScriptManager.RegisterStartupScript(Page, GetType(), "temp", "<script type='text/javascript'>$('div').trigger('create');</script>", false);
|
||||
ScriptManager.RegisterStartupScript(Page, GetType(), "temp", "<script type='text/javascript'>$('#dettMacch').trigger('create');</script>", false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Determina se il refresh (via timer) sia o meno abilitato
|
||||
/// </summary>
|
||||
public bool refreshEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return dmTimer.Enabled;
|
||||
}
|
||||
set
|
||||
{
|
||||
dmTimer.Enabled = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Determina se dato lo stato dell'impianto si debba mostrare btn fermata perché
|
||||
/// - fermo > xx min (da web.config, es 20')
|
||||
/// - impianto fermo (controllando idxStato: priorità > 1)
|
||||
/// </summary>
|
||||
public bool showInsFermata(object _idxStato, object _durata)
|
||||
{
|
||||
int idxStato = 0;
|
||||
int durata = 0;
|
||||
int durMinWarning = memLayer.ML.CRI("durMinWarning");
|
||||
int.TryParse(_idxStato.ToString(), out idxStato);
|
||||
int.TryParse(_durata.ToString(), out durata);
|
||||
bool answ = false;
|
||||
if (durata >= durMinWarning)
|
||||
{
|
||||
try
|
||||
{
|
||||
// in questo caso controllo idxStato... e recupero priorità se > 1 --> richiesta qualifica
|
||||
answ = (DataLayer.obj.taAnagStati.GetByIdx(idxStato)[0].Priorita > 1);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
public string urlDisegno(object _codArticolo)
|
||||
{
|
||||
// default è ND...
|
||||
string outVal = "~/Files/Disegni/ND.pdf";
|
||||
// recupero da anagrafica articoli...
|
||||
try
|
||||
{
|
||||
DS_ProdTempi.AnagArticoliDataTable tab = DataLayer.obj.taAnagArt.getByCod(_codArticolo.ToString());
|
||||
if (tab.Rows.Count > 0)
|
||||
{
|
||||
//DS_ProdTempi.AnagArticoliRow riga = DataLayer.obj.taAnagArt.getByCod(_codArticolo.ToString())[0];
|
||||
DS_ProdTempi.AnagArticoliRow riga = tab[0];
|
||||
outVal = string.Format("~/Files/Disegni/{0}.pdf", riga.Disegno);
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Attenzione! nessuna informazione trovata per l'articolo {0}", _codArticolo), tipoLog.WARNING);
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore in ricostruzione URL disegno:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
return outVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_dettMacchina {
|
||||
|
||||
/// <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 repLI.
|
||||
/// </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.Repeater repLI;
|
||||
|
||||
/// <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 hfIdxMacchina.
|
||||
/// </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.HiddenField hfIdxMacchina;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo dmTimer.
|
||||
/// </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 dmTimer;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_dettTurni.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_dettTurni" %>
|
||||
<div>
|
||||
<b>Turni Attivi</b>
|
||||
<asp:DetailsView ID="dtView" runat="server" DataSourceID="odsTurni" AutoGenerateRows="False" DataKeyNames="IdxMacchina" Width="100%" BorderStyle="None" GridLines="Vertical">
|
||||
<Fields>
|
||||
<asp:TemplateField HeaderText="T1">
|
||||
<ItemTemplate>
|
||||
<asp:Panel runat="server" ID="pnlT1" CssClass='<%# coloreDaTurno(Eval("T1")) %>'>
|
||||
<asp:Label ID="Label1" in="lblT1" runat="server" Text="Turno 1" />
|
||||
</asp:Panel>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="T2">
|
||||
<ItemTemplate>
|
||||
<asp:Panel runat="server" ID="pnlT1" CssClass='<%# coloreDaTurno(Eval("T2")) %>'>
|
||||
<asp:Label ID="lblT2" in="lblT2" runat="server" Text="Turno 2" />
|
||||
</asp:Panel>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="T3">
|
||||
<ItemTemplate>
|
||||
<asp:Panel runat="server" ID="pnlT1" CssClass='<%# coloreDaTurno(Eval("T3")) %>'>
|
||||
<asp:Label ID="lblT3" in="lblT3" runat="server" Text="Turno 3" />
|
||||
</asp:Panel>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Fields>
|
||||
</asp:DetailsView>
|
||||
<asp:ObjectDataSource ID="odsTurni" runat="server" SelectMethod="getByIdxMacc" TypeName="MapoDb.DS_ProdTempiTableAdapters.TurniMacchinaTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter Name="IdxMacchina" SessionField="idxMacchina" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
<div>
|
||||
<div class="sVe px-2">
|
||||
Turno Aperto
|
||||
</div>
|
||||
<div class="sGr px-2">
|
||||
Turno Chiuso
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_dettTurni : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
updateTurni();
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna classi grafiche turni
|
||||
/// </summary>
|
||||
protected void updateTurni()
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// fornisce classe CSS x colorare il turno secondo apertura o meno
|
||||
/// </summary>
|
||||
/// <param name="turno"></param>
|
||||
/// <returns></returns>
|
||||
public string coloreDaTurno(object turno)
|
||||
{
|
||||
string answ = "sGr px-2";
|
||||
bool aperto = false;
|
||||
try
|
||||
{
|
||||
aperto = Convert.ToBoolean(turno);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (aperto) answ = "sVe px-2";
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class mod_dettTurni {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo dtView.
|
||||
/// </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.DetailsView dtView;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo odsTurni.
|
||||
/// </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 odsTurni;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_dettaglioProd.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_dettaglioProd" %>
|
||||
<% if (false)
|
||||
{ %>
|
||||
<link href="../Style.css" rel="stylesheet" type="text/css" />
|
||||
<% } %>
|
||||
<div style="text-align: center; margin: auto;">
|
||||
<div style="text-align: center; margin: auto;">
|
||||
<table class="table table-striped table-sm small">
|
||||
<tr>
|
||||
<td colspan="4" style="color: White; background-color: #333333;">
|
||||
<asp:Label runat="server" ID="lblOdl" Font-Bold="true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternatingRowStyle stdFont" style="text-align: center; font-size: x-small">
|
||||
<td>Cod articolo
|
||||
</td>
|
||||
<td>Nr pezzi lanciati
|
||||
</td>
|
||||
<td>Nr pezzi confermati
|
||||
</td>
|
||||
<td>Nr pezzi fatti
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowStyle stdFont" style="font-weight: bold;">
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblCodArticolo" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblNumPzLanciati" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblNumPzConf" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblNumPzFatti" Font-Bold="false" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternatingRowStyle stdFont" style="text-align: center;">
|
||||
<td colspan="1">Efficienza Globale
|
||||
</td>
|
||||
<td colspan="1">Efficienza Lavoro
|
||||
</td>
|
||||
<td colspan="1">Efficienza Teorica
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="rowStyle stdFont">
|
||||
<td colspan="1">
|
||||
<asp:Label runat="server" ID="lblEfficienzaTot" Font-Bold="true" />
|
||||
<br />
|
||||
<asp:Label runat="server" ID="lblEfficienzaTotRT" />
|
||||
</td>
|
||||
<td colspan="1">
|
||||
<asp:Label runat="server" ID="lblEfficienzaLavoro" Font-Bold="true" />
|
||||
<br />
|
||||
<asp:Label runat="server" ID="lblEfficienzaLavoroRT" />
|
||||
</td>
|
||||
<td colspan="1">
|
||||
<asp:Label runat="server" ID="lblEfficienzaEff" Font-Bold="true" />
|
||||
<br />
|
||||
<asp:Label runat="server" ID="lblEfficienzaEffRT" />
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="alternatingRowStyle stdFont" style="text-align: center;">
|
||||
<td>Tc Medio
|
||||
</td>
|
||||
<td>Tc Lavoro
|
||||
</td>
|
||||
<td>Tc Tecnico
|
||||
</td>
|
||||
<td>Tc impostato
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowStyle stdFont" style="font-weight: bold;">
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblTcMedio" />
|
||||
<br />
|
||||
<asp:Label runat="server" ID="lblTcMedioRT" Font-Bold="false" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblTcLavoro" />
|
||||
<br />
|
||||
<asp:Label runat="server" ID="lblTcLavoroRT" Font-Bold="false" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblTcEffettivo" />
|
||||
<br />
|
||||
<asp:Label runat="server" ID="lblTcEffettivoRT" Font-Bold="false" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblTcImpostato" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,140 @@
|
||||
using MapoDb;
|
||||
using SteamWare;
|
||||
using System;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_dettaglioProd : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// effettua traduzione del lemma
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(string lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma);
|
||||
}
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
popolaLabels();
|
||||
}
|
||||
/// <summary>
|
||||
/// popola le labels
|
||||
/// </summary>
|
||||
private void popolaLabels()
|
||||
{
|
||||
// cambio: leggo NUOVA riga report...
|
||||
DS_ProdTempi.MappaStatoExplDataTable tabDati = DataLayer.obj.taMSE.getByRefreshData(memLayer.ML.confReadInt("refrMSE_5"));
|
||||
DS_ProdTempi.MappaStatoExplRow rigaDati = (DS_ProdTempi.MappaStatoExplRow)tabDati.Rows.Find(idxMacchina);
|
||||
// carico le info!
|
||||
lblOdl.Text = string.Format("ODL num: {0}, iniziato il {1:dd/MM/yy} alle {1:HH:mm}", rigaDati.idxODL, rigaDati.DataInizioODL);
|
||||
/************************************
|
||||
* data la postazione corrente decide cosa mostrare e come
|
||||
************************************/
|
||||
lblCodArticolo.Text = rigaDati.CodArticolo;
|
||||
lblNumPzLanciati.Text = string.Format("{0} pz.", rigaDati.NumPezzi);
|
||||
lblNumPzConf.Text = string.Format("{0} pz.", rigaDati.PezziConf);
|
||||
lblNumPzFatti.Text = string.Format("({0} pz.)", rigaDati.PezziProd);
|
||||
|
||||
|
||||
/************************************
|
||||
* calcolo efficienza totale
|
||||
* se il calcolo non è possibile mette n/a
|
||||
************************************/
|
||||
decimal tempoProd = rigaDati.TCAssegnato * rigaDati.PezziConf;
|
||||
try
|
||||
{
|
||||
lblEfficienzaTot.Text = Convert.ToString(String.Format("{0:p2}", tempoProd / rigaDati.TempoOn / 100));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaTot.Text = "n/a";
|
||||
}
|
||||
// calcolo efficienza lavoro - se il calcolo non è possibile mette n/a
|
||||
try
|
||||
{
|
||||
lblEfficienzaLavoro.Text = Convert.ToString(String.Format("{0:p2}", tempoProd / rigaDati.TempoAuto / 100));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaLavoro.Text = "n/a";
|
||||
|
||||
}
|
||||
// calcolo efficienza Teorica - se il calcolo non è possibile mette n/a
|
||||
try
|
||||
{
|
||||
lblEfficienzaEff.Text = Convert.ToString(String.Format("{0:p2}", tempoProd / rigaDati.TempoRun / 100));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaEff.Text = "n/a";
|
||||
}
|
||||
|
||||
/************************************
|
||||
* imposto i TEMPI CICLO
|
||||
************************************/
|
||||
// riporto Tempo ciclo impostato
|
||||
lblTcImpostato.Text = Convert.ToString(String.Format("{0:0.###}", rigaDati.TCAssegnato));
|
||||
// riporto Tempo ciclo medio
|
||||
lblTcMedio.Text = Convert.ToString(String.Format("{0:0.###}", rigaDati.TCMedio));
|
||||
lblTcMedioRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaDati.TCMedioRT));
|
||||
// riporto Tempo ciclo lavoro
|
||||
lblTcLavoro.Text = Convert.ToString(String.Format("{0:0.###}", rigaDati.TCLav));
|
||||
lblTcLavoroRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaDati.TCLavRT));
|
||||
// riporto Tempo ciclo effettivo/tecnico, come media dei 10 migliori delle ultime 8 ore
|
||||
lblTcEffettivo.Text = Convert.ToString(String.Format("{0:0.###}", rigaDati.TCEff));
|
||||
lblTcEffettivoRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaDati.TCEffRT));
|
||||
|
||||
/************************************
|
||||
* Sistemo efficienze RT da tempi ciclo
|
||||
************************************/
|
||||
try
|
||||
{
|
||||
lblEfficienzaTotRT.Text = Convert.ToString(String.Format("({0:p2})", rigaDati.TCAssegnato / rigaDati.TCMedioRT));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaTotRT.Text = "n/a";
|
||||
}
|
||||
// calcolo efficienza lavoro - se il calcolo non è possibile mette n/a
|
||||
try
|
||||
{
|
||||
lblEfficienzaLavoroRT.Text = Convert.ToString(String.Format("({0:p2})", rigaDati.TCAssegnato / rigaDati.TCLavRT));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaLavoroRT.Text = "n/a";
|
||||
|
||||
}
|
||||
// calcolo efficienza Teorica - se il calcolo non è possibile mette n/a
|
||||
try
|
||||
{
|
||||
lblEfficienzaEffRT.Text = Convert.ToString(String.Format("({0:p2})", rigaDati.TCAssegnato / rigaDati.TCEffRT));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaEffRT.Text = "n/a";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// idxMacchina
|
||||
/// </summary>
|
||||
public string idxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("idxMacchina");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxMacchina", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_dettaglioProd {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblOdl.
|
||||
/// </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 lblOdl;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblCodArticolo.
|
||||
/// </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 lblCodArticolo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblNumPzLanciati.
|
||||
/// </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 lblNumPzLanciati;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblNumPzConf.
|
||||
/// </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 lblNumPzConf;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblNumPzFatti.
|
||||
/// </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 lblNumPzFatti;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblEfficienzaTot.
|
||||
/// </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 lblEfficienzaTot;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblEfficienzaTotRT.
|
||||
/// </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 lblEfficienzaTotRT;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblEfficienzaLavoro.
|
||||
/// </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 lblEfficienzaLavoro;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblEfficienzaLavoroRT.
|
||||
/// </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 lblEfficienzaLavoroRT;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblEfficienzaEff.
|
||||
/// </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 lblEfficienzaEff;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblEfficienzaEffRT.
|
||||
/// </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 lblEfficienzaEffRT;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTcMedio.
|
||||
/// </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 lblTcMedio;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTcMedioRT.
|
||||
/// </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 lblTcMedioRT;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTcLavoro.
|
||||
/// </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 lblTcLavoro;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTcLavoroRT.
|
||||
/// </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 lblTcLavoroRT;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTcEffettivo.
|
||||
/// </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 lblTcEffettivo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTcEffettivoRT.
|
||||
/// </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 lblTcEffettivoRT;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTcImpostato.
|
||||
/// </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 lblTcImpostato;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_dichiarazione.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_dichiarazione" %>
|
||||
|
||||
<div class="d-flex p-2 bg-dark">
|
||||
<asp:Label runat="server" ID="lblOut" ForeColor="Red" />
|
||||
</div>
|
||||
<div class="d-flex flex-wrap">
|
||||
<asp:Repeater ID="repLI" runat="server" DataSourceID="ods">
|
||||
<ItemTemplate>
|
||||
<div class="m-1 p-0">
|
||||
<asp:LinkButton ID="hlEvento" runat="server" OnClick="hlEvento_Click" CommandArgument='<%# Eval("value") %>'>
|
||||
<div class="card text-white dichBlock rCAll">
|
||||
<img class="card-img bg-dark rCAll" src='<%# ImgUrl(Eval("value")) %>' alt='<%# Eval("label") %>'>
|
||||
<div class="card-img-overlay p-0 d-flex flex-row-reverse align-items-end rCBot">
|
||||
<div class="labelBottom text-center px-2 text-uppercase">
|
||||
<asp:Label runat="server" ID="lblBadge" Text='<%# Eval("label") %>' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="MapoDb.DS_UtilityTableAdapters.v_selEventiBCodeTableAdapter"></asp:ObjectDataSource>
|
||||
</div>
|
||||
@@ -0,0 +1,195 @@
|
||||
using MapoDb;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_dichiarazione : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// classe MapoDB x uso locale
|
||||
/// </summary>
|
||||
protected MapoDb.MapoDb controllerMapo = new MapoDb.MapoDb();
|
||||
/// <summary>
|
||||
/// registrato nuovo valore
|
||||
/// </summary>
|
||||
public event EventHandler eh_newVal;
|
||||
/// <summary>
|
||||
/// idx macchina selezionata
|
||||
/// </summary>
|
||||
public string idxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("IdxMacchina");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("IdxMacchina", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// caricamento principale
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
repLI.DataBind();
|
||||
}
|
||||
/// <summary>
|
||||
/// rimanda alla pagina di dettaglio della macchina scelta
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void hlEvento_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton lnkbtn = (LinkButton)sender;
|
||||
int idxEvento = 0;
|
||||
try
|
||||
{
|
||||
idxEvento = Convert.ToInt32(lnkbtn.CommandArgument);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (idxEvento > 0)
|
||||
{
|
||||
DS_applicazione.AnagraficaEventiRow rigaEvento = DataLayer.obj.taAnagEventi.GetByIdx(idxEvento)[0];
|
||||
if (rigaEvento != null)
|
||||
{
|
||||
DS_applicazione.StatoMacchineRow rigaStato = DataLayer.obj.taStatoMacchine.GetDataByIdxMacchina(idxMacchina.ToString())[0];
|
||||
// processo evento...
|
||||
if (insRealtime)
|
||||
{
|
||||
// se realtime
|
||||
controllerMapo.scriviRigaEventoBarcode(idxMacchina.ToString(), idxEvento, rigaStato.CodArticolo, "DRT", DataLayer.MatrOpr, rigaStato.pallet);
|
||||
}
|
||||
else
|
||||
{
|
||||
// in primis disabilito insert...
|
||||
DataLayer.obj.taStatoMacchine.setInsEnabled(idxMacchina.ToString(), false);
|
||||
// calcolo evento
|
||||
string evento = idxEvento.ToString();
|
||||
string commento = "";
|
||||
try
|
||||
{
|
||||
evento = DataLayer.obj.taAnagEventi.GetByIdx(idxEvento)[0].Nome.Replace("Barcode - ", "");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// genero stringa pseudo-univoca
|
||||
string codRich = string.Format("{0:yyMMddHHmmss}-{1}", DateTime.Now, idxEvento);
|
||||
// x prima cosa scrivo un evento tipo "1" x chiudere la durata appena prima dell'evento successivo
|
||||
try
|
||||
{
|
||||
// cerco da 1 sec DOPO evento...
|
||||
DS_applicazione.DiarioDiBordoDataTable tabNext = controllerMapo.nextEventoImpiantoFrom(idxMacchina.ToString(), dataOraEv.AddSeconds(1));
|
||||
|
||||
DateTime nextEvDT = DateTime.Now;
|
||||
if (tabNext.Rows.Count > 0)
|
||||
{
|
||||
nextEvDT = tabNext[0].InizioStato;
|
||||
}
|
||||
// se non trovo chiusura evento inserisco a 1 minuto prima di adesso la chiusura...
|
||||
else
|
||||
{
|
||||
nextEvDT = DateTime.Now.AddMinutes(-1);
|
||||
}
|
||||
// fix salvo la dichiarazione di chiusura
|
||||
commento = string.Format("999 - M.Lav EndEvt: {0} [{1}]", evento, codRich);
|
||||
controllerMapo.scriviRigaEventoBarcode(idxMacchina.ToString(), 1, rigaStato.CodArticolo, commento, DataLayer.MatrOpr, rigaStato.pallet, nextEvDT.AddSeconds(-1), DateTime.Now); // 1 hard-coded x resettare
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// update commento!
|
||||
commento = string.Format("999 - Dich StartEvt: {0} [{1}]", evento, codRich);
|
||||
// recupero data/ora evento da inserire (quella selezionata) ed AGGIUNGO 1 sec!!! così rimane traccia
|
||||
controllerMapo.scriviRigaEventoBarcode(idxMacchina.ToString(), idxEvento, rigaStato.CodArticolo, commento, DataLayer.MatrOpr, rigaStato.pallet, dataOraEv.AddSeconds(1), DateTime.Now);
|
||||
// eseguo ricalcolo!
|
||||
DateTime startRicalcolo = dataOraEv.AddMinutes(memLayer.ML.confReadInt("minAnticipoRicalcolo"));
|
||||
|
||||
// leggo parametri x esecuzione...
|
||||
int rdm_nEvStep = memLayer.ML.CRI("rdm_nEvStep");
|
||||
int rdm_nEvCheck = memLayer.ML.CRI("rdm_nEvCheck");
|
||||
bool rdm_ChkOnly = memLayer.ML.CRB("rdm_ChkOnly");
|
||||
DataLayer.obj.taComm.stp_ricalcolaDatiMacchinaFromDate(idxMacchina.ToString(), startRicalcolo, 1, rdm_nEvStep, rdm_nEvCheck, rdm_ChkOnly); // nella stored imposto macchina OFFline e poi ONline, parto da "minAnticipoRicalcolo" minuti prima...
|
||||
// aggiorno data evento x insert eventuale commento (5 sec...)
|
||||
dataOraEv = dataOraEv.AddSeconds(5);
|
||||
// riabilito insert... anche se non dovrebbe servire x stored ricalcolo precedente...
|
||||
DataLayer.obj.taStatoMacchine.setInsEnabled(idxMacchina.ToString(), true);
|
||||
}
|
||||
// mostro esito
|
||||
lblOut.Text = "Registrata dichiarazione fermata";
|
||||
}
|
||||
else
|
||||
{
|
||||
lblOut.Text = string.Format("Codice evento non valido! {0}", idxEvento);
|
||||
}
|
||||
}
|
||||
repLI.DataBind();
|
||||
// sollevo evento!
|
||||
if (eh_newVal != null)
|
||||
{
|
||||
eh_newVal(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// url completo immagine
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <returns></returns>
|
||||
public string ImgUrl(object url)
|
||||
{
|
||||
return string.Format("./images/iconDic/{0}.png", url);
|
||||
}
|
||||
/// <summary>
|
||||
/// update (resetta testo)
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
lblOut.Text = "";
|
||||
}
|
||||
/// <summary>
|
||||
/// determina se insert sia realtime o dataOra (in base a diff tra dataora sel ed evento, se superiore ad X minuto NON è realtime)
|
||||
/// </summary>
|
||||
public bool insRealtime
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = true;
|
||||
try
|
||||
{
|
||||
if (Math.Abs(dataOraEv.Subtract(DateTime.Now).TotalMinutes) > memLayer.ML.confReadInt("dltMinRealtime"))
|
||||
{
|
||||
answ = false;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_dichiarazione {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblOut.
|
||||
/// </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 lblOut;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo repLI.
|
||||
/// </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.Repeater repLI;
|
||||
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_directLinks.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_directLinks" %>
|
||||
|
||||
<div class="list-group textCondens">
|
||||
<asp:Label runat="server" ID="lblHead" class="list-group-item list-group-item-action bg-dark text-light">
|
||||
<i class="fa fa-map-marker"></i> LINK DIRETTI
|
||||
</asp:Label>
|
||||
<asp:Repeater ID="repLI" runat="server" DataSourceID="ods">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink runat="server" ID="btnMenuItem" CssClass='<%# cssPage(Eval("NavigateUrl")) %>' NavigateUrl='<%# Eval("NavigateUrl") %>'><i class="fa fa-angle-double-right" aria-hidden="true"></i> <b><i class='fa fa-lg <%# Eval("icona") %>'></i> <%# Eval("Testo") %></b></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByTipo" TypeName="MapoDb.DS_applicazioneTableAdapters.LinkMenuJQMTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter DefaultValue="-" Name="TipoLink" SessionField="TipoLink" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
@@ -0,0 +1,70 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_directLinks : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica se la pagina corrente sia URL indicato --> mostra ACTIVE
|
||||
/// </summary>
|
||||
/// <param name="navUrl"></param>
|
||||
/// <returns></returns>
|
||||
public string checkPage(object navUrl)
|
||||
{
|
||||
string answ = "p-2 list-group-item list-group-item-action";
|
||||
if (navUrl.ToString().Replace(".aspx", "").Replace("~/", "") == titolo.Replace(".aspx", ""))
|
||||
{
|
||||
answ += " disabled";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica se la pagina corrente sia URL indicato --> mostra ACTIVE
|
||||
/// </summary>
|
||||
/// <param name="navUrl"></param>
|
||||
/// <returns></returns>
|
||||
public bool linkEnabled(object navUrl)
|
||||
{
|
||||
bool answ = true;
|
||||
if (navUrl.ToString().Replace(".aspx", "").Replace("~/", "") == titolo.Replace(".aspx", ""))
|
||||
{
|
||||
answ = false;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica se la pagina corrente sia URL indicato --> mostra ACTIVE
|
||||
/// </summary>
|
||||
/// <param name="navUrl"></param>
|
||||
/// <returns></returns>
|
||||
public string cssPage(object navUrl)
|
||||
{
|
||||
string answ = "list-group-item list-group-item-action text-uppercase";
|
||||
if (navUrl.ToString().Replace(".aspx", "").Replace("~/", "") == titolo.Replace(".aspx", ""))
|
||||
{
|
||||
answ += " bg-secondary text-warning";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// titolo pagina
|
||||
/// </summary>
|
||||
public string titolo
|
||||
{
|
||||
get
|
||||
{
|
||||
return devicesAuthProxy.getPage(Request.Url);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_directLinks {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblHead.
|
||||
/// </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 lblHead;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo repLI.
|
||||
/// </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.Repeater repLI;
|
||||
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_elencoControlli.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_elencoControlli" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_selPeriodo.ascx" TagPrefix="uc1" TagName="mod_selPeriodo" %>
|
||||
|
||||
<div class="row small">
|
||||
<div class="col-12">
|
||||
<uc1:mod_selPeriodo runat="server" ID="mod_selPeriodo" />
|
||||
<asp:GridView ID="grView" runat="server" CssClass="table table-striped table-dark table-sm" DataSourceID="ods" AutoGenerateColumns="False" DataKeyNames="IdxControllo" AllowSorting="true" AllowPaging="true" PageSize="5">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Elenco Controlli <i class='fa fa-sort'></i>" SortExpression="DataOra" HeaderStyle-CssClass="btn btn-sm btn-block btn-secondary text-info" HeaderStyle-ForeColor="White">
|
||||
<ItemTemplate>
|
||||
<div class="row">
|
||||
<div class="col-5 small">
|
||||
<div>
|
||||
Art: <b>
|
||||
<asp:Label ID="Label5" runat="server" Text='<%# Eval("CodArticolo") %>' /></b>
|
||||
</div>
|
||||
<div>
|
||||
ODL: <b>
|
||||
<asp:Label ID="Label4" runat="server" Text='<%# Eval("IdxODL") %>' /></b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2 px-0 text-center">
|
||||
<i runat="server" class="fa fa-check-circle fa-3x text-success" aria-hidden="true" visible='<%# Convert.ToBoolean(Eval("EsitoOK")) %>'></i>
|
||||
<i runat="server" class="fa fa-ban fa-3x text-danger" aria-hidden="true" visible='<%# !Convert.ToBoolean(Eval("EsitoOK")) %>'></i>
|
||||
</div>
|
||||
<div class="col-5 text-right small">
|
||||
<div class="text-truncate"><asp:Label ID="Label1" runat="server" Text='<%# Eval("DataOra","{0:ddd dd.MM.yy HH:mm:ss}") %>' /> <i class="fa fa-clock-o" aria-hidden="true"></i></div>
|
||||
<div class="text-truncate"><b><asp:Label ID="Label3" runat="server" Text='<%# Eval("Operatore") %>' /></b>
|
||||
<i class="fa fa-user" aria-hidden="true"></i></div>
|
||||
</div>
|
||||
<div class="col-12 small">
|
||||
<i runat="server" id="iNote" visible='<%# Eval("Note").ToString()!="" %>'>Nota:
|
||||
<asp:Label ID="Label6" runat="server" CssClass="text-warning" Text='<%# Eval("Note") %>' /></i>
|
||||
</div>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getFilt" TypeName="MapoDb.DS_ProdTempiTableAdapters.RegistroControlliTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter Type="String" DefaultValue="0" SessionField="IdxMacchina" Name="IdxMacchina" />
|
||||
<asp:SessionParameter Type="DateTime" DefaultValue="" SessionField="_inizio" Name="DataFrom" />
|
||||
<asp:SessionParameter Type="DateTime" DefaultValue="" SessionField="_fine" Name="DataTo" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,22 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_elencoControlli : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
public void doUpdate()
|
||||
{
|
||||
grView.DataBind();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_elencoControlli {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_selPeriodo.
|
||||
/// </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_selPeriodo mod_selPeriodo;
|
||||
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_enrollByAuthKey.ascx.cs"
|
||||
Inherits="MoonProTablet.WebUserControls.mod_enrollByAuthKey" %>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 text-center">
|
||||
<h4>Registrazione Dispositivo</h4>
|
||||
</div>
|
||||
<div class="col-12 mb-3">
|
||||
<label for="ddlIdxDipendente">
|
||||
Selezionare Operatore:</label>
|
||||
<asp:DropDownList ID="ddlIdxDipendente" runat="server" DataSourceID="odsOperatori" CssClass="form-control form-control-sm btn-secondary"
|
||||
DataTextField="label" DataValueField="value">
|
||||
</asp:DropDownList>
|
||||
<asp:ObjectDataSource ID="odsOperatori" runat="server" OldValuesParameterFormatString="original_{0}"
|
||||
SelectMethod="GetData" TypeName="MapoDb.DS_UtilityTableAdapters.v_selOperatoriTableAdapter"></asp:ObjectDataSource>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<label for="UserAuthKey">
|
||||
UserAuthKey:</label>
|
||||
<asp:TextBox runat="server" ID="txtUserAuthKey" TextMode="Password" CssClass="form-control form-control-sm" />
|
||||
</div>
|
||||
<div class="col-12 mb-3">
|
||||
<asp:Label runat="server" ID="lblWarning" Visible="false" />
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<asp:Button runat="server" ID="btnConferma" Text="Salva" OnClick="btnConferma_Click" CssClass="btn btn-block btn-primary" />
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<asp:Button runat="server" ID="btnAnnulla" Text="Annulla" CausesValidation="false" CssClass="btn btn-block btn-warning"
|
||||
OnClick="btnAnnulla_Click" />
|
||||
</div>
|
||||
<%--<div class="col-12 my-4">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<a href="#moreInfo" class="btn btn-secondary btn-block" data-toggle="collapse">...more info</a>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<div id="moreInfo" class="collapse">
|
||||
Questa funzione permette di inserire un devices tra quelli gestiti tramite la AuthKey personale (da richiedere all'admin se non nota).
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>--%>
|
||||
</div>
|
||||
@@ -0,0 +1,107 @@
|
||||
using MapoDb;
|
||||
using SteamWare;
|
||||
using System;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_enrollByAuthKey : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// salvo nuovo device...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnConferma_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool fatto = false;
|
||||
// controllo se ho i dati...
|
||||
string plainUserAuthKey = txtUserAuthKey.Text.Trim();
|
||||
// in primis cerco il dipendente data la authKey...
|
||||
int MatrOpr = 0;
|
||||
try
|
||||
{
|
||||
MatrOpr = Convert.ToInt32(ddlIdxDipendente.SelectedValue);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
try
|
||||
{
|
||||
// controllo dipendente... che sia selezionato uno valido
|
||||
if (MatrOpr > 0)
|
||||
{
|
||||
// recupero dati...
|
||||
string userAgent = "";
|
||||
string DeviceName = "";
|
||||
string IPv4 = "";
|
||||
userAgent = Request.UserAgent;
|
||||
DeviceName = Request.UserHostName;
|
||||
IPv4 = Request.UserHostName;
|
||||
// calcolo authKey MD5...
|
||||
string md5UserAuthKey = SteamCrypto.EncryptString(plainUserAuthKey, memLayer.ML.confReadString("cookieName"));
|
||||
if (DataLayer.obj.taOp.getByMatrAuthKey(MatrOpr, md5UserAuthKey).Rows.Count > 0)
|
||||
{
|
||||
fatto = tryEnroll(MatrOpr, userAgent, fatto, DeviceName, IPv4, md5UserAuthKey);
|
||||
}
|
||||
// provo con "plainUserKey"
|
||||
else if (DataLayer.obj.taOp.getByMatrAuthKey(MatrOpr, plainUserAuthKey).Rows.Count > 0)
|
||||
{
|
||||
fatto = tryEnroll(MatrOpr, userAgent, fatto, DeviceName, IPv4, plainUserAuthKey);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblWarning.Text = "AuthKey non trovata! richiedere reset ad Admin.";
|
||||
lblWarning.Visible = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lblWarning.Text = "Dipendente non trovato!";
|
||||
lblWarning.Visible = true;
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore in registrazione device: {0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
if (fatto)
|
||||
{
|
||||
Response.Redirect(memLayer.ML.confReadString("mainPage"), true);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// prova a fare enroll device data chiave...
|
||||
/// </summary>
|
||||
/// <param name="MatrOpr"></param>
|
||||
/// <param name="userAgent"></param>
|
||||
/// <param name="fatto"></param>
|
||||
/// <param name="DeviceName"></param>
|
||||
/// <param name="IPv4"></param>
|
||||
/// <param name="userKey"></param>
|
||||
/// <returns></returns>
|
||||
private bool tryEnroll(int MatrOpr, string userAgent, bool fatto, string DeviceName, string IPv4, string userKey)
|
||||
{
|
||||
try
|
||||
{
|
||||
fatto = DataLayer.obj.enrollDevice(userKey, IPv4, DeviceName, userAgent, MatrOpr);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore in registrazione nuovo device con AuthKey utente: {0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
/// <summary>
|
||||
/// resetto tutto
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAnnulla_Click(object sender, EventArgs e)
|
||||
{
|
||||
txtUserAuthKey.Text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_enrollByAuthKey {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ddlIdxDipendente.
|
||||
/// </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.DropDownList ddlIdxDipendente;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo odsOperatori.
|
||||
/// </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 odsOperatori;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtUserAuthKey.
|
||||
/// </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 txtUserAuthKey;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblWarning.
|
||||
/// </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 lblWarning;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo btnConferma.
|
||||
/// </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 btnConferma;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo btnAnnulla.
|
||||
/// </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 btnAnnulla;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_enrollByJumperAuthKey.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_enrollByJumperAuthKey" %>
|
||||
<%--è una procedura automatica, niente elementi grafici!--%>
|
||||
@@ -0,0 +1,48 @@
|
||||
using MapoDb;
|
||||
using SteamWare;
|
||||
using System;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_enrollByJumperAuthKey : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// procedo alla ricerca di dati via sessione x User AuthKey
|
||||
tryAutoEnroll();
|
||||
}
|
||||
/// <summary>
|
||||
/// prova a fare auto enroll
|
||||
/// </summary>
|
||||
public void tryAutoEnroll()
|
||||
{
|
||||
// recupero dati da session
|
||||
string UserAuthKey = "";
|
||||
int MatrOpr = 0;
|
||||
string userAgent = "";
|
||||
bool fatto = false;
|
||||
string DeviceName = "";
|
||||
string IPv4 = "";
|
||||
try
|
||||
{
|
||||
UserAuthKey = memLayer.ML.StringSessionObj("UserAuthKey");
|
||||
MatrOpr = DataLayer.MatrOpr;
|
||||
userAgent = Request.UserAgent;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// se ci sono i dati effettua tentativo di AutoEnroll del device
|
||||
if (MatrOpr > 0 && UserAuthKey != "")
|
||||
{
|
||||
DeviceName = Request.UserHostName;
|
||||
IPv4 = Request.UserHostName;
|
||||
fatto = DataLayer.obj.enrollDevice(UserAuthKey, IPv4, DeviceName, userAgent, MatrOpr);
|
||||
if (fatto)
|
||||
{
|
||||
Response.Redirect(memLayer.ML.confReadString("mainPage"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class mod_enrollByJumperAuthKey
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_fermate.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_fermate" %>
|
||||
<div class="small textCondens">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<asp:Label runat="server" ID="lblNumGG" Text="Ultimi gg" AssociatedControlID="ddlPrevDays" />
|
||||
<asp:DropDownList ID="ddlPrevDays" runat="server" AutoPostBack="true" CssClass="form-control form-control-sm bg-secondary text-light" OnSelectedIndexChanged="ddlPrevDays_SelectedIndexChanged">
|
||||
<asp:ListItem Text="1" Value="1" />
|
||||
<asp:ListItem Text="2" Value="2" />
|
||||
<asp:ListItem Text="3" Value="3" Selected="True" />
|
||||
<asp:ListItem Text="4" Value="4" />
|
||||
<asp:ListItem Text="5" Value="5" />
|
||||
<asp:ListItem Text="6" Value="6" />
|
||||
<asp:ListItem Text="7" Value="7" />
|
||||
<asp:ListItem Text="8" Value="8" />
|
||||
<asp:ListItem Text="9" Value="9" />
|
||||
<asp:ListItem Text="10" Value="10" />
|
||||
<asp:ListItem Text="15" Value="15" />
|
||||
<asp:ListItem Text="20" Value="20" />
|
||||
<asp:ListItem Text="30" Value="30" />
|
||||
<asp:ListItem Text="60" Value="60" />
|
||||
<asp:ListItem Text="90" Value="90" />
|
||||
<asp:ListItem Text="180" Value="180" />
|
||||
<asp:ListItem Text="360" Value="360" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<asp:Label runat="server" ID="lblDurataMin" Text="Durata min" AssociatedControlID="ddlDurataMin" />
|
||||
<asp:DropDownList ID="ddlDurataMin" runat="server" AutoPostBack="true" CssClass="form-control form-control-sm bg-secondary text-light" OnSelectedIndexChanged="ddlDurataMin_SelectedIndexChanged">
|
||||
<asp:ListItem Text="5'" Value="5" />
|
||||
<asp:ListItem Text="10'" Value="10" />
|
||||
<asp:ListItem Text="20'" Value="20" Selected="True" />
|
||||
<asp:ListItem Text="30'" Value="30" />
|
||||
<asp:ListItem Text="1h" Value="60" />
|
||||
<asp:ListItem Text="2h" Value="120" />
|
||||
<asp:ListItem Text="4h" Value="240" />
|
||||
<asp:ListItem Text="8h" Value="480" />
|
||||
<asp:ListItem Text="1gg" Value="1440" />
|
||||
<asp:ListItem Text="2gg" Value="2880" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:Repeater ID="repComm" runat="server" DataSourceID="odsFerm">
|
||||
<ItemTemplate>
|
||||
<div class="col-12 col-sm-6 col-lg-4 text-truncate">
|
||||
<div class="my-1 ">
|
||||
<asp:LinkButton runat="server" ID="btnEdit" CommandArgument='<%# Eval("InizioStato") %>' OnClick="btnEdit_Click">
|
||||
<div class="card text-white dichBlock rCAll w-100">
|
||||
<div class='card-title p-2 mb-0 rCTop <%# Eval("Semaforo") %>'>
|
||||
<b style="font-size: 1.3em;">
|
||||
<asp:Label ID="lblStato" runat="server" Text='<%# Eval("Stato", "<b>{0}</b>") %>' />
|
||||
</b>
|
||||
<div class="text-right ml-auto" style="font-size: 1.1em;">
|
||||
<asp:Label runat="server" ID="lblCodArticolo" Text='<%# Eval("CodArticolo") %>' />
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-text p-0 d-flex align-items-end rCBot" style="font-size: 0.8em;">
|
||||
<div class="labelBottom text-left p-1">
|
||||
<asp:Label ID="lblInizioStato" runat="server" Text='<%# Eval("InizioStato", "{0:dd.MM.yy HH:mm}") %>' />
|
||||
</div>
|
||||
<div class="labelBottom text-right p-1">
|
||||
<asp:Label ID="lblDurataMinuti" runat="server" Text='<%# durataEvento(Eval("DurataMinuti")) %>' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:LinkButton></div></div></ItemTemplate></asp:Repeater><asp:ObjectDataSource ID="odsFerm" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="MapoDb.DS_UtilityTableAdapters.FermiNonQualTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter DefaultValue="0" Name="IdxMacchina" SessionField="idxMacchina" Type="String" />
|
||||
<asp:ControlParameter ControlID="ddlPrevDays" DefaultValue="3" Name="gg" PropertyName="SelectedValue" Type="Int32" />
|
||||
<asp:ControlParameter ControlID="ddlDurataMin" DefaultValue="10" Name="durataMin" PropertyName="SelectedValue" Type="Double" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,94 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_fermate : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// registrata richiesta
|
||||
/// </summary>
|
||||
public event EventHandler eh_reqEdit;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
try
|
||||
{
|
||||
ddlDurataMin.SelectedValue = durMin.ToString();
|
||||
ddlPrevDays.SelectedValue = prevDays.ToString();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void doUpdate()
|
||||
{
|
||||
repComm.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// carico x edit commento
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton lnkBtn = (LinkButton)sender;
|
||||
DateTime inizioStato = Convert.ToDateTime(lnkBtn.CommandArgument);
|
||||
memLayer.ML.setSessionVal("inizioStato", inizioStato);
|
||||
// sollevo evento!
|
||||
if (eh_reqEdit != null)
|
||||
{
|
||||
eh_reqEdit(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// restituisce stringa formattata in HH:mm
|
||||
/// </summary>
|
||||
/// <param name="durataMinuti"></param>
|
||||
/// <returns></returns>
|
||||
public string durataEvento(object durataMinuti)
|
||||
{
|
||||
return utility.formatDurata(durataMinuti);
|
||||
}
|
||||
|
||||
protected int prevDays
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("prevDays");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("prevDays", value);
|
||||
}
|
||||
}
|
||||
protected int durMin
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("durMin");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("durMin", value);
|
||||
}
|
||||
}
|
||||
protected void ddlPrevDays_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
prevDays = Convert.ToInt16(ddlPrevDays.SelectedValue);
|
||||
}
|
||||
|
||||
protected void ddlDurataMin_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
durMin = Convert.ToInt16(ddlDurataMin.SelectedValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_fermate {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblNumGG.
|
||||
/// </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 lblNumGG;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ddlPrevDays.
|
||||
/// </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.DropDownList ddlPrevDays;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblDurataMin.
|
||||
/// </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 lblDurataMin;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ddlDurataMin.
|
||||
/// </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.DropDownList ddlDurataMin;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo repComm.
|
||||
/// </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.Repeater repComm;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo odsFerm.
|
||||
/// </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 odsFerm;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_footer.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_footer" %>
|
||||
<footer class="navbar fixed-bottom navbar-dark bg-dark text-light p-0 px-2 m-0 bg-black " style="font-size: 1em; height: 1.5em;">
|
||||
<div class="d-flex justify-content-start pl-1 text-left align-self-center small">
|
||||
<strong><%: System.Web.Configuration.WebConfigurationManager.AppSettings["Environment"] %></strong> - v.<%: currVersion.ToString() %> [ <%: videoSize %> ]
|
||||
</div>
|
||||
<div class="d-flex justify-content-end pr-1 text-right align-self-center small">
|
||||
<img src="./images/logoSteamware.png" height="20" /> Steamware © <%: DateTime.Now.Year %>
|
||||
</div>
|
||||
</footer>
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_footer : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
updateLabels();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Versione corrente sw
|
||||
/// </summary>
|
||||
public Version currVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
|
||||
}
|
||||
}
|
||||
private void updateLabels()
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// Dimensione schermata video attuale
|
||||
/// </summary>
|
||||
public string videoSize
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "?x?";
|
||||
if (Session["BrowserWidth"] != null)
|
||||
{
|
||||
answ = string.Format("{0} x {1}", Session["BrowserWidth"], Session["BrowserHeight"]);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_footer {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +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="row">
|
||||
<div class="col">
|
||||
<asp:LinkButton ID="lbtAddCom" runat="server" OnClick="lbtAddCommento_Click" CssClass="btn btn-block btn-info">
|
||||
<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="row">
|
||||
<div class="col-8 col-sm-7 col-md-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 form-control-sm" />
|
||||
</div>
|
||||
<div class="col-4 col-sm-5 col-md-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 form-control-sm" />
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<asp:Label runat="server" ID="lblCommento" AssociatedControlID="txtCommento" Text="Commento" />
|
||||
<asp:TextBox runat="server" ID="txtCommento" TextMode="MultiLine" Height="6em" placeholder="Inserire commento" CssClass="form-control form-control-sm" />
|
||||
</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>
|
||||
|
||||
@@ -0,0 +1,217 @@
|
||||
using MapoDb;
|
||||
using SteamWare;
|
||||
using System;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
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"));
|
||||
dataOraEv = 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_insComm {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo pnlButtons.
|
||||
/// </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 pnlButtons;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtAddCom.
|
||||
/// </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.LinkButton lbtAddCom;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblAddComm.
|
||||
/// </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 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>
|
||||
/// Controllo lblDate.
|
||||
/// </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 lblDate;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtDate.
|
||||
/// </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 txtDate;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTime.
|
||||
/// </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 lblTime;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtTime.
|
||||
/// </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 txtTime;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblCommento.
|
||||
/// </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 lblCommento;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtCommento.
|
||||
/// </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 txtCommento;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtSalva.
|
||||
/// </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.LinkButton lbtSalva;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtAnnulla.
|
||||
/// </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.LinkButton lbtAnnulla;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_mappaStato.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_mappaStato" %>
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<asp:Repeater ID="repLI" runat="server" DataSourceID="ods">
|
||||
<ItemTemplate>
|
||||
<div class="col-6 col-sm-6 col-md-4 col-lg-3 col-xl-2 mb-3 px-1 bloccoMacc">
|
||||
<asp:LinkButton ID="hlMacchina" runat="server" OnClick="hlMacchina_Click" CommandArgument='<%# Eval("IdxMacchina") %>'>
|
||||
<div class='card text-white mapBlock rCAll <%# Eval("Semaforo") %> p-0 m-0'>
|
||||
<img class="card-img bg-dark rCTop" src='<%# ImgUrl(Eval("url")) %>' alt='<%# Eval("CodMacchina") %>'>
|
||||
<div class="m-1 bg-black rCAll">
|
||||
<div class="card-img-overlay p-0 d-flex flex-row-reverse align-items-start rCTop">
|
||||
<div class="labelTopDx text-right px-2">
|
||||
<asp:Label runat="server" ID="lblBadge" Text='<%# Eval("CodArticolo","art: {0}") %>' />
|
||||
<asp:Label runat="server" ID="lblODC" Text='<%# Eval("idxODL","(ODL {0})") %>' />
|
||||
</div>
|
||||
</div>
|
||||
<div class="card bg-black p-0 rCBot">
|
||||
<div class='row justify-content-center mx-0'>
|
||||
<div class="col-12 px-1">
|
||||
<h4 class="text-left">
|
||||
<asp:Label runat="server" ID="lblTitle" Text='<%# Eval("Nome") %>' /></h4>
|
||||
</div>
|
||||
<div class='col-12 p-1 <%# Eval("Semaforo") %>'>
|
||||
<div class="d-flex">
|
||||
<div class="p-0 mr-auto">
|
||||
<b>
|
||||
<asp:Label runat="server" ID="lblStato" Text='<%# Eval("DescrizioneStato") %>' /></b>
|
||||
</div>
|
||||
<div class="p-0">
|
||||
<asp:Label runat="server" ID="lblDurata" Text='<%# formatDurata(Eval("Durata")) %>' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 px-1 pb-1">
|
||||
<div class="d-flex">
|
||||
<div class="p-1 mr-auto">
|
||||
<asp:Label runat="server" ID="Label2" Text='<%# Eval("PezziProd","prod: {0}") %>' ToolTip="pz prodotti" />
|
||||
/
|
||||
<asp:Label runat="server" ID="lblPzLanciati" Text='<%# Eval("NumPezzi","tot: {0}") %>' ToolTip="pz lanciati" />
|
||||
</div>
|
||||
<div class="p-1">
|
||||
<asp:Label runat="server" ID="Label1" Text='<%# Eval("PezziConf","conf: {0}") %>' ToolTip="pz confermati" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByRefreshData"
|
||||
TypeName="MapoDb.DS_ProdTempiTableAdapters.MappaStatoExplTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:Parameter DefaultValue="3001" Name="maxAgeSec" Type="Int32" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
<!-- timer refresh dei blocchi in mappa stato: 2 sec, 2'000 ms -->
|
||||
<asp:Timer ID="Timer1" runat="server" Interval="200000" OnTick="Timer1_Tick">
|
||||
</asp:Timer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -0,0 +1,69 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_mappaStato : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// url completo immagine
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <returns></returns>
|
||||
public string ImgUrl(object url)
|
||||
{
|
||||
// se vuoto metto empty...
|
||||
if (url.ToString() == "")
|
||||
{
|
||||
url = "empty.png";
|
||||
}
|
||||
return string.Format("./images/macchine/{0}", url);
|
||||
}
|
||||
/// <summary>
|
||||
/// fomratta durata in minuti/ore/gg a seconda del totale...
|
||||
/// </summary>
|
||||
/// <param name="minuti"></param>
|
||||
/// <returns></returns>
|
||||
public string formatDurata(object min)
|
||||
{
|
||||
return utility.formatDurata(min);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// rimanda alla pagina di dettaglio della macchina scelta
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void hlMacchina_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton lnkbtn = (LinkButton)sender;
|
||||
memLayer.ML.setSessionVal("IdxMacchina", lnkbtn.CommandArgument);
|
||||
Response.Redirect("~/DettaglioMacchina.aspx");
|
||||
}
|
||||
/// <summary>
|
||||
/// fa update del controllo
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
ods.DataBind();
|
||||
repLI.DataBind();
|
||||
}
|
||||
/// <summary>
|
||||
/// timeout scaduto
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
doUpdate();
|
||||
//ScriptManager.RegisterStartupScript(Page, GetType(), "temp", "<script type='text/javascript'>$('div').trigger('create');</script>", false);
|
||||
ScriptManager.RegisterStartupScript(Page, GetType(), "temp", "<script type='text/javascript'>$('#dettMacch').trigger('create');</script>", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class mod_mappaStato {
|
||||
|
||||
/// <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 repLI.
|
||||
/// </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.Repeater repLI;
|
||||
|
||||
/// <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 Timer1.
|
||||
/// </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 Timer1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_regNewDevice.ascx.cs"
|
||||
Inherits="MoonProTablet.WebUserControls.mod_regNewDevice" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_enrollByAuthKey.ascx" TagPrefix="uc2" TagName="mod_enrollByAuthKey" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_enrollByJumperAuthKey.ascx" TagPrefix="uc1" TagName="mod_enrollByJumperAuthKey" %>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<uc2:mod_enrollByAuthKey runat="server" ID="mod_enrollByAuthKey" />
|
||||
<uc1:mod_enrollByJumperAuthKey runat="server" ID="mod_enrollByJumperAuthKey" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_regNewDevice : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
/*************************************************************************
|
||||
* REGISTRAZIONE nuovi devices
|
||||
*
|
||||
* ci sono tre modalità
|
||||
* - idxDipendente + authKey (manuale)
|
||||
* - con richiesta reset ed invio authKey (generazione pwd casuale da email dipendente + dataora in MD5, INSERENDO EMAIL e cercando se esista...)
|
||||
* - con "rimbalzo" su ~/jumper.aspx?UserAuthkey={0}&idxDipendente={1}... poi messe in session x cui autosetup
|
||||
*
|
||||
* ***********************************************************************/
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_regNewDevice {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_enrollByAuthKey.
|
||||
/// </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_enrollByAuthKey mod_enrollByAuthKey;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_enrollByJumperAuthKey.
|
||||
/// </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_enrollByJumperAuthKey mod_enrollByJumperAuthKey;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_regScarti.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_regScarti" %>
|
||||
<div class="card">
|
||||
<div class="card-header p-0">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<asp:Label runat="server" ID="lblConfScarti" CssClass="btn btn-info btn-lg btn-block disabled">
|
||||
<i class="fa fa-bug"></i> Registra SCARTI
|
||||
</asp:Label>
|
||||
<asp:Label runat="server" ID="lblMancaODL" Visible="false" ForeColor="Red">MANCA ODL: registrazione scarti produzione NON permessa</asp:Label>
|
||||
<asp:LinkButton runat="server" ID="lbtShowScarti" OnClick="lbtShowContr_Click" CssClass="btn btn-info btn-lg btn-block">
|
||||
<i class="fa fa-bug"></i>
|
||||
<asp:Label runat="server" ID="lblShowScarti" />
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body p-1 table-info text-dark">
|
||||
<div class="row my-2 textCondens" runat="server" id="divDetail">
|
||||
<div class="col-4">
|
||||
<div class="text-truncate">
|
||||
Num Pz
|
||||
</div>
|
||||
<div class="my-0">
|
||||
<asp:TextBox runat="server" ID="txtNumPz" CssClass="form form-control" TextMode="Number" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="text-truncate">
|
||||
Data
|
||||
</div>
|
||||
<div class="my-0">
|
||||
<asp:TextBox runat="server" ID="txtData" CssClass="form form-control" TextMode="Date" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="text-truncate">
|
||||
Ora
|
||||
</div>
|
||||
<div class="my-0">
|
||||
<asp:TextBox runat="server" ID="txtOra" CssClass="form form-control" TextMode="Time" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<asp:LinkButton runat="server" ID="lbtSalva" CssClass="btn btn-success btn-block" OnClick="lbtSalva_Click"><i class="fa fa-floppy-o" aria-hidden="true"></i> Salva</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<asp:TextBox runat="server" ID="txtNote" CssClass="form form-control" placeholder="Note (opzionale)" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-12">
|
||||
<asp:Label runat="server" ID="lblOut" ForeColor="Red" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,191 @@
|
||||
using MapoDb;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_regScarti : System.Web.UI.UserControl
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// registrato nuovo valore
|
||||
/// </summary>
|
||||
public event EventHandler eh_newVal;
|
||||
/// <summary>
|
||||
/// registrato nuovo valore
|
||||
/// </summary>
|
||||
public event EventHandler eh_reset;
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
checkAll();
|
||||
}
|
||||
}
|
||||
|
||||
private void checkAll()
|
||||
{
|
||||
fixData();
|
||||
checkOdl();
|
||||
lblOut.Text = "";
|
||||
switchBtnConferma(false);
|
||||
lbtShowScarti.Visible = odlOk;
|
||||
lblConfScarti.Visible = !odlOk;
|
||||
}
|
||||
|
||||
private void fixData()
|
||||
{
|
||||
DateTime adesso = DateTime.Now;
|
||||
txtData.Text = adesso.ToString("yyyy-MM-dd");
|
||||
txtOra.Text = adesso.ToString("HH:mm");
|
||||
numPzScarto = 1;
|
||||
}
|
||||
/// <summary>
|
||||
/// Num pezzi scarto
|
||||
/// </summary>
|
||||
protected int numPzScarto
|
||||
{
|
||||
set
|
||||
{
|
||||
txtNumPz.Text = value.ToString();
|
||||
}
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
int.TryParse(txtNumPz.Text, out answ);
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica se abbia un ODL ATTIVO
|
||||
/// </summary>
|
||||
private void checkOdl()
|
||||
{
|
||||
lbtShowScarti.Visible = odlOk;
|
||||
lblConfScarti.Visible = !odlOk;
|
||||
lblMancaODL.Visible = !odlOk;
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica se la macchina MAIN sia MULTI (da DatiMacchina / redis...)
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// restituisce css disabled SE odl NON OK...
|
||||
/// </summary>
|
||||
public string cssBtnConf
|
||||
{
|
||||
get
|
||||
{
|
||||
return odlOk ? "" : "disabled";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica ODL OK (ovvero caricato x macchina...)
|
||||
/// </summary>
|
||||
public bool odlOk
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = true;
|
||||
// carico i dati preliminari: ODL
|
||||
int idxOdl = 0; // userò ODL del turno
|
||||
try
|
||||
{
|
||||
idxOdl = DataLayer.obj.taODL.getByMacchinaAperto(idxMacchina)[0].IdxODL;
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore a recuperare ODL per la macchina {0}", idxMacchina), tipoLog.ERROR);
|
||||
}
|
||||
// se ODL > 0 è ok!!!
|
||||
answ = (idxOdl > 0);
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// idx macchina selezionata
|
||||
/// </summary>
|
||||
public string idxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = memLayer.ML.StringSessionObj("IdxMacchina");
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// cambio stato visibilità pannello e testo button
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtShowContr_Click(object sender, EventArgs e)
|
||||
{
|
||||
switchBtnConferma(!divDetail.Visible);
|
||||
}
|
||||
/// <summary>
|
||||
/// determina comportamento btn conferma
|
||||
/// </summary>
|
||||
private void switchBtnConferma(bool showConf)
|
||||
{
|
||||
divDetail.Visible = showConf;
|
||||
if (showConf)
|
||||
{
|
||||
lblShowScarti.Text = "Nascondi SCARTI";
|
||||
}
|
||||
else
|
||||
{
|
||||
lblShowScarti.Text = "Registra SCARTI";
|
||||
// sollevo evento!
|
||||
if (eh_reset != null)
|
||||
{
|
||||
eh_reset(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// salvo produzione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtSalva_Click(object sender, EventArgs e)
|
||||
{
|
||||
// salvo registrazione scarto...
|
||||
DateTime dataRif = DateTime.Now;
|
||||
try
|
||||
{
|
||||
// ricompongo data dai 2 controlli
|
||||
DateTime dateOnly;
|
||||
DateTime timeOnly;
|
||||
DateTime.TryParse(txtData.Text, out dateOnly);
|
||||
DateTime.TryParse(txtOra.Text, out timeOnly);
|
||||
dataRif = dateOnly.Add(timeOnly.TimeOfDay);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
DataLayer.obj.taRS.insertQuery(idxMacchina, dataRif, "ND", numPzScarto, txtNote.Text.Trim(), DataLayer.MatrOpr);
|
||||
// sollevo evento!
|
||||
if (eh_newVal != null)
|
||||
{
|
||||
eh_newVal(this, new EventArgs());
|
||||
}
|
||||
resetControlli();
|
||||
}
|
||||
|
||||
private void resetControlli()
|
||||
{
|
||||
txtNote.Text = "";
|
||||
// nascondo!
|
||||
switchBtnConferma(false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_regScarti {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblConfScarti.
|
||||
/// </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 lblConfScarti;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblMancaODL.
|
||||
/// </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 lblMancaODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtShowScarti.
|
||||
/// </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.LinkButton lbtShowScarti;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblShowScarti.
|
||||
/// </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 lblShowScarti;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divDetail.
|
||||
/// </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.HtmlControls.HtmlGenericControl divDetail;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtNumPz.
|
||||
/// </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 txtNumPz;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtData.
|
||||
/// </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 txtData;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtOra.
|
||||
/// </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 txtOra;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtSalva.
|
||||
/// </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.LinkButton lbtSalva;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtNote.
|
||||
/// </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 txtNote;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblOut.
|
||||
/// </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 lblOut;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_selPeriodo.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_selPeriodo" %>
|
||||
<%if (false)
|
||||
{ %>
|
||||
<webopt:BundleReference ID="BundleReference1" runat="server" Path="~/Content/css" />
|
||||
<%} %>
|
||||
<script>
|
||||
// Gestione oggetti datepicker (globale)
|
||||
function fixDatePicker() {
|
||||
try {
|
||||
if (!Modernizr.inputtypes.date) {
|
||||
// If not native HTML5 support, fallback to jQuery datePicker
|
||||
$('input[type=date]').datepicker({
|
||||
// Consistent format with the HTML5 picker
|
||||
dateFormat: 'yy-mm-dd'
|
||||
}
|
||||
//// Localization
|
||||
//,$.datepicker.regional['it']
|
||||
);
|
||||
}
|
||||
}
|
||||
catch (err) { }
|
||||
}
|
||||
|
||||
|
||||
// richiamo quando il DOM della pagina è ok...
|
||||
$(function () {
|
||||
fixDatePicker();
|
||||
});
|
||||
|
||||
// oggetto da legare all'update parziale ajax x sistemare script vari
|
||||
var prm = Sys.WebForms.PageRequestManager.getInstance();
|
||||
prm.add_endRequest(function () {
|
||||
// re-bind your jQuery events here
|
||||
$(function () {
|
||||
fixDatePicker();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<asp:DropDownList ID="ddlSelPeriodo" runat="server" AutoPostBack="True" class="input-group-text" OnSelectedIndexChanged="ddlSelPeriodo_SelectedIndexChanged" DataSourceID="ods_ddlSelPeriodo" DataTextField="label" DataValueField="value">
|
||||
</asp:DropDownList>
|
||||
<asp:ObjectDataSource ID="ods_ddlSelPeriodo" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByTableField" TypeName="SteamWare.DS_UtilityTableAdapters.v_selListValTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:Parameter DefaultValue="All" Name="TableName" Type="String" />
|
||||
<asp:Parameter DefaultValue="SelPeriodo" Name="FieldName" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
<asp:TextBox ID="txtInizio" runat="server" MaxLength="10" AutoPostBack="True" OnTextChanged="txtInizio_TextChanged" CssClass="datepicker form-control" Font-Size="Small" TextMode="Date" />
|
||||
<asp:TextBox ID="txtFine" runat="server" MaxLength="10" AutoPostBack="True" OnTextChanged="txtFine_TextChanged" CssClass="datepicker form-control" Font-Size="Small" TextMode="Date" />
|
||||
<div class="input-group-append">
|
||||
<asp:Button ID="btnUpdate" CssClass="btn btn-success btn-sm" runat="server" Text="update" Visible="false" OnClick="btnUpdate_Click" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,328 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_selPeriodo : System.Web.UI.UserControl
|
||||
{
|
||||
protected intervalloDate _intervallo;
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
txtInizio.ToolTip = "inizio periodo di riferimento per i dati mostrati";
|
||||
txtFine.ToolTip = "fine periodo di riferimento per i dati mostrati";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// avvio componente
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
base.OnInit(e);
|
||||
txtInizio.ToolTip = "inizio periodo di riferimento per i dati mostrati";
|
||||
txtFine.ToolTip = "fine periodo di riferimento per i dati mostrati";
|
||||
setIntervallo();
|
||||
}
|
||||
/// <summary>
|
||||
/// definisce se sia da mostrare il selettore delle ore nel controllo
|
||||
/// </summary>
|
||||
protected bool mostraSelOra
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
if (memLayer.ML.isInSessionObject("mostraSelOra"))
|
||||
{
|
||||
answ = memLayer.ML.BoolSessionObj("mostraSelOra");
|
||||
}
|
||||
else
|
||||
{
|
||||
// leggo da sessione e salvo...
|
||||
try
|
||||
{
|
||||
answ = memLayer.ML.confReadBool("mostraSelOra");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
memLayer.ML.setSessionVal("mostraSelOra", answ);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// gestione del selettore rapido dell'intervallo temporale...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlSelPeriodo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// verifico cosa sia cambiato ed imposto date...
|
||||
datario _datario = new datario();
|
||||
switch (ddlSelPeriodo.SelectedValue)
|
||||
{
|
||||
case "1": // selezione libera
|
||||
break;
|
||||
case "2": // oggi
|
||||
_intervallo = _datario.giornata(DateTime.Now);
|
||||
break;
|
||||
case "3": // ieri
|
||||
_intervallo = _datario.giornata(DateTime.Now.AddDays(-1));
|
||||
break;
|
||||
case "4":
|
||||
_intervallo = _datario.questaSett(DateTime.Now);
|
||||
break;
|
||||
case "5":
|
||||
_intervallo = _datario.ultimiGiorni(DateTime.Now, 7);
|
||||
break;
|
||||
case "6":
|
||||
_intervallo = _datario.questoMese(DateTime.Now);
|
||||
break;
|
||||
case "7":
|
||||
_intervallo = _datario.ultimiGiorni(DateTime.Now, 30);
|
||||
break;
|
||||
case "8":
|
||||
_intervallo = _datario.ultimiGiorni(DateTime.Now, 366);
|
||||
break;
|
||||
case "9":
|
||||
_intervallo = _datario.estremiAnno(DateTime.Now);
|
||||
break;
|
||||
case "10":
|
||||
_intervallo = _datario.estremiAnno(DateTime.Now.AddYears(-1));
|
||||
break;
|
||||
case "11":
|
||||
_intervallo = _datario.ultimiGiorni(DateTime.Now, 36600);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if ((intervalloAnalisi.inizio != _intervallo.inizio) || (intervalloAnalisi.fine != _intervallo.fine))
|
||||
{
|
||||
verificaCoerenzaDate();
|
||||
aggiornaDateMostrate(false);
|
||||
// mostro btn update
|
||||
btnUpdate.Visible = true;
|
||||
if (autoUpdate)
|
||||
{
|
||||
forceUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua update delle date mostrate da intervallo analisi (ed eventualmente riporta update...)
|
||||
/// </summary>
|
||||
/// <param name="doReportUpdate"></param>
|
||||
private void aggiornaDateMostrate(bool doReportUpdate)
|
||||
{
|
||||
scriviDate();
|
||||
if (doReportUpdate)
|
||||
{
|
||||
reportUpdate();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// scrive nuove date in controllo
|
||||
/// </summary>
|
||||
private void scriviDate()
|
||||
{
|
||||
// se intervallo non è valorizzato leggo da sessione...
|
||||
if (!_intervallo.isValid)
|
||||
{
|
||||
_intervallo = intervalloAnalisi;
|
||||
}
|
||||
txtInizio.Text = _intervallo.inizio.ToString("yyyy-MM-dd");
|
||||
txtFine.Text = _intervallo.fine.ToString("yyyy-MM-dd");
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta intervallo da sessione o di default
|
||||
/// </summary>
|
||||
private void setIntervallo()
|
||||
{
|
||||
intervalloDate _intervallo;
|
||||
try
|
||||
{
|
||||
_intervallo = (intervalloDate)Session["_intervallo"];
|
||||
}
|
||||
catch
|
||||
{
|
||||
_intervallo = new intervalloDate();
|
||||
_intervallo.inizio = DateTime.Now.AddDays(memLayer.ML.confReadInt("defDayFrom"));
|
||||
_intervallo.fine = DateTime.Now.AddDays(1);
|
||||
Session["_intervallo"] = _intervallo;
|
||||
Session["_inizio"] = _intervallo.inizio;
|
||||
Session["_fine"] = _intervallo.fine;
|
||||
}
|
||||
scriviDate();
|
||||
}
|
||||
/// <summary>
|
||||
/// update periodo
|
||||
/// </summary>
|
||||
private void aggiornaPeriodo()
|
||||
{
|
||||
_intervallo = new intervalloDate();
|
||||
// calcolo tempi arrotondati
|
||||
_intervallo.inizio = Convert.ToDateTime(txtInizio.Text);
|
||||
_intervallo.fine = Convert.ToDateTime(txtFine.Text);
|
||||
verificaCoerenzaDate();
|
||||
reportUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica che le date dell'intervallo siano coerenti (inizio < fine)
|
||||
/// </summary>
|
||||
private void verificaCoerenzaDate()
|
||||
{
|
||||
// controllo date siano coerenti (fine > inizio)...
|
||||
if (_intervallo.inizio >= _intervallo.fine)
|
||||
{
|
||||
// controllo non siano date successive ad oggi...
|
||||
if (_intervallo.fine > DateTime.Now)
|
||||
{
|
||||
_intervallo.fine = DateTime.Now;
|
||||
}
|
||||
_intervallo.inizio = _intervallo.fine.AddDays(-1);
|
||||
}
|
||||
//intervalloAnalisi = _intervallo;
|
||||
aggiornaDateMostrate(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// evento cambio testo data inizio
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtInizio_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
procDateMod();
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica la modifica delle date..
|
||||
/// </summary>
|
||||
private void procDateMod()
|
||||
{
|
||||
// imposto il selettore a discesa...
|
||||
setPeriodoFree();
|
||||
// mostro btn update
|
||||
btnUpdate.Visible = true;
|
||||
if (autoUpdate)
|
||||
{
|
||||
forceUpdate();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// evento cambio testo data fine
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtFine_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
procDateMod();
|
||||
}
|
||||
/// <summary>
|
||||
/// in questo caso faccio udpate periodo mostrato
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
forceUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// forza update
|
||||
/// </summary>
|
||||
private void forceUpdate()
|
||||
{
|
||||
aggiornaPeriodo();
|
||||
// nascondo btn update
|
||||
btnUpdate.Visible = false;
|
||||
}
|
||||
/// <summary>
|
||||
/// riporta aggiornamento a controller
|
||||
/// </summary>
|
||||
protected void reportUpdate()
|
||||
{
|
||||
intervalloAnalisi = _intervallo;
|
||||
// alzo l'evento d update/inserimento e ricarico cache...
|
||||
if (eh_doUpdate != null)
|
||||
{
|
||||
eh_doUpdate(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
public intervalloDate intervalloAnalisi
|
||||
{
|
||||
get
|
||||
{
|
||||
return (intervalloDate)Session["_intervallo"];
|
||||
}
|
||||
set
|
||||
{
|
||||
intervalloDate interv = value;
|
||||
Session["_intervallo"] = interv;
|
||||
Session["_inizio"] = interv.inizio;
|
||||
Session["_fine"] = interv.fine;
|
||||
_intervallo = interv;
|
||||
aggiornaDateMostrate(false);
|
||||
}
|
||||
}
|
||||
public DateTime inizio
|
||||
{
|
||||
get
|
||||
{
|
||||
return intervalloAnalisi.inizio;
|
||||
}
|
||||
}
|
||||
public DateTime fine
|
||||
{
|
||||
get
|
||||
{
|
||||
return intervalloAnalisi.fine;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua update
|
||||
/// </summary>
|
||||
/// <param name="doReportUpdate"></param>
|
||||
public void doUpdate(bool doReportUpdate)
|
||||
{
|
||||
aggiornaDateMostrate(doReportUpdate);
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta periodo libero di selezione
|
||||
/// </summary>
|
||||
public void setPeriodoFree()
|
||||
{
|
||||
ddlSelPeriodo.SelectedIndex = 0;
|
||||
}
|
||||
/// <summary>
|
||||
/// indica se il controllo debba fare update in automatico o attendere pressione button update da utente
|
||||
/// </summary>
|
||||
public bool autoUpdate { get; set; }
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
|
||||
#region gestione eventi
|
||||
|
||||
public event EventHandler eh_doUpdate;
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_selPeriodo {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo BundleReference1.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::Microsoft.AspNet.Web.Optimization.WebForms.BundleReference BundleReference1;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ddlSelPeriodo.
|
||||
/// </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.DropDownList ddlSelPeriodo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ods_ddlSelPeriodo.
|
||||
/// </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_ddlSelPeriodo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtInizio.
|
||||
/// </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 txtInizio;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtFine.
|
||||
/// </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 txtFine;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo btnUpdate.
|
||||
/// </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 btnUpdate;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_slideMenu.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_slideMenu" %>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<script type="text/javascript">
|
||||
//function closeModal() {
|
||||
// $('#MainSideMenu').modal('hide');
|
||||
// $('#btnClose').click();
|
||||
//}
|
||||
function openTemp() {
|
||||
$('#MainSideMenu').modal('toggle');
|
||||
myVar = setTimeout(closeModal, 10000);
|
||||
function closeModal() {
|
||||
$('#MainSideMenu').modal('hide');
|
||||
clearTimeout(myVar);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="modal fade text-dark" id="MainSideMenu" tabindex="-1" role="dialog" aria-labelledby="MainSideMenu" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-slideout modal-sm" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<div class="d-flex flex-row">
|
||||
<div class="p-0">
|
||||
<asp:Image ID="Image1" ImageUrl="../images/logoSteamware.png" runat="server" Height="40px" CssClass="img-fluid" />
|
||||
</div>
|
||||
<div class="p-0 pl-1">
|
||||
<div class="flex-row">
|
||||
<h5 class="modal-title">Steamware</h5>
|
||||
</div>
|
||||
<div class="flex-row">
|
||||
<small>Main Menu</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button id="btnClose" type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true" class="text-secondary">x</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="d-flex flex-row">
|
||||
<div class="p-2">
|
||||
<b class="text-danger">LINK DIRETTI</b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex flex-column">
|
||||
<div class="list-group">
|
||||
<asp:Repeater ID="repLI" runat="server" DataSourceID="ods">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink runat="server" ID="btnMenuItem" CssClass='<%# checkPage(Eval("NavigateUrl")) %>' NavigateUrl='<%# Eval("NavigateUrl") %>'><i class='fa fa-lg <%# Eval("icona") %>'></i> <%# Eval("Testo") %></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByTipo" TypeName="MapoDb.DS_applicazioneTableAdapters.LinkMenuJQMTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter DefaultValue="-" Name="TipoLink" SessionField="TipoLink" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary btn-block" data-dismiss="modal">Chiudi</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex flex-row">
|
||||
<div class="p-0">
|
||||
<button class="btn btn-link text-light" type="button" onclick="openTemp()">
|
||||
<span class="fa fa-bars fa-lg"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="py-2 ml-auto small"><%: string.Format("{0:ddd dd MMM yyyy}",DateTime.Now) %></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,42 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_slideMenu : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica se la pagina corrente sia URL indicato --> mostra ACTIVE
|
||||
/// </summary>
|
||||
/// <param name="navUrl"></param>
|
||||
/// <returns></returns>
|
||||
public string checkPage(object navUrl)
|
||||
{
|
||||
string answ = "p-2 list-group-item list-group-item-action";
|
||||
if (navUrl.ToString().Replace(".aspx", "").Replace("~/", "") == titolo.Replace(".aspx", ""))
|
||||
{
|
||||
answ += " active";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// titolo pagina
|
||||
/// </summary>
|
||||
public string titolo
|
||||
{
|
||||
get
|
||||
{
|
||||
return devicesAuthProxy.getPage(Request.Url);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_slideMenu {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo Image1.
|
||||
/// </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.Image Image1;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo repLI.
|
||||
/// </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.Repeater repLI;
|
||||
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_storicoTC.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_storicoTC" %>
|
||||
|
||||
<div data-theme="c">
|
||||
<div class="ui-grid-a">
|
||||
<div class="ui-block-a" style="text-align: center; margin: auto; vertical-align: middle;">
|
||||
Articolo
|
||||
<br />
|
||||
<asp:DropDownList ID="ddlArticolo" runat="server" DataTextField="label" DataValueField="value"
|
||||
AutoCompleteMode="SuggestAppend" DropDownStyle="DropDownList" AutoPostBack="True"
|
||||
DataSourceID="odsArticoli" CssClass="WindowsStyle" MaxLength="0" Style="display: inline;" OnSelectedIndexChanged="ddlArticolo_SelectedIndexChanged" />
|
||||
<asp:ObjectDataSource ID="odsArticoli" runat="server" OldValuesParameterFormatString="Original_{0}"
|
||||
SelectMethod="GetData" TypeName="MapoDb.DS_UtilityTableAdapters.v_selArticoliTableAdapter"></asp:ObjectDataSource>
|
||||
</div>
|
||||
<%--<div class="ui-block-b" style="text-align: center; margin: auto; vertical-align: middle;">
|
||||
<h3>Storico Tempi Ciclo</h3>
|
||||
</div>--%>
|
||||
<div class="ui-block-b" style="text-align: center; margin: auto; vertical-align: middle;">
|
||||
Impianto
|
||||
<br />
|
||||
<asp:DropDownList ID="ddlMacchine" runat="server" DataTextField="label" DataValueField="value"
|
||||
AutoCompleteMode="SuggestAppend" DropDownStyle="DropDownList" AutoPostBack="True"
|
||||
DataSourceID="odsMacchine" CssClass="WindowsStyle" MaxLength="0" Style="display: inline;" OnSelectedIndexChanged="ddlMacchine_SelectedIndexChanged" />
|
||||
<asp:ObjectDataSource ID="odsMacchine" runat="server" OldValuesParameterFormatString="Original_{0}"
|
||||
SelectMethod="GetData" TypeName="MapoDb.DS_UtilityTableAdapters.v_selMacchineTableAdapter"></asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-grid-solo" style="text-align: center; margin: auto; vertical-align: middle;">
|
||||
<asp:GridView ID="grViewTempi" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" CellPadding="2" DataKeyNames="IdxODL" DataSourceID="odsTempi" ForeColor="Black" GridLines="None" Width="100%">
|
||||
<AlternatingRowStyle BackColor="PaleGoldenrod" />
|
||||
<FooterStyle BackColor="Tan" />
|
||||
<HeaderStyle BackColor="Tan" Font-Bold="True" />
|
||||
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
|
||||
<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
|
||||
<SortedAscendingCellStyle BackColor="#FAFAE7" />
|
||||
<SortedAscendingHeaderStyle BackColor="#DAC09E" />
|
||||
<SortedDescendingCellStyle BackColor="#E1DB9C" />
|
||||
<SortedDescendingHeaderStyle BackColor="#C2A47B" />
|
||||
<EmptyDataRowStyle BackColor="Tan" Font-Bold="True" />
|
||||
<EmptyDataTemplate>
|
||||
Nessun record storico trovato
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Articolo" SortExpression="CodArticolo">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label5" runat="server" Text='<%# Eval("CodArticolo") %>' />
|
||||
<div style="color: #696969; font-size: 0.75em;">
|
||||
<asp:Label ID="Label4" runat="server" Text='<%# Eval("DescArticolo") %>' />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField DataField="IdxODL" HeaderText="IdxODL" InsertVisible="False" ReadOnly="True" SortExpression="IdxODL" />--%>
|
||||
<asp:TemplateField HeaderText="TCiclo" SortExpression="TCAssegnato">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Eval("TCAssegnato", "{0:N2}") %>' />
|
||||
<div style="color: #696969; font-size: 0.85em;">
|
||||
<asp:Label ID="Label4" runat="server" Text='<%# Eval("TCRichAttr", "{0:N2} (attr.)") %>' />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Note" SortExpression="Note">
|
||||
<ItemTemplate>
|
||||
<div style="font-size: 0.75em;">
|
||||
<asp:Label ID="Label7" runat="server" Text='<%# Eval("Note") %>' />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Periodo" SortExpression="DataInizio" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<div style="color: #696969; font-size: 0.75em; white-space: nowrap;">
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# Eval("DataInizio","{0:dd/MM/yy HH:mm}...") %>' />
|
||||
<br />
|
||||
<asp:Label ID="Label3" runat="server" Text='<%# Eval("DataFine","...{0:dd/MM/yy HH:mm}") %>' />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Impianto" SortExpression="Nome">
|
||||
<ItemTemplate>
|
||||
<div style="white-space: nowrap; font-size: 0.9em;">
|
||||
<asp:Label ID="Label6" runat="server" Text='<%# Eval("Nome") %>' />
|
||||
<div style="color: #696969; font-size: 0.9em;">
|
||||
<asp:Label ID="Label4" runat="server" Text='<%# Eval("NumPezzi", "{0:N0} pz") %>' />
|
||||
</div>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="odsTempi" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByMacchinaArticolo" TypeName="MapoDb.DS_ProdTempiTableAdapters.ODLTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="ddlMacchine" DefaultValue="0" Name="IdxMacchina" PropertyName="SelectedValue" Type="String" />
|
||||
<asp:ControlParameter ControlID="ddlArticolo" DefaultValue="0" Name="CodArticolo" PropertyName="SelectedValue" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_storicoTC : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
// seleziono valori "0"
|
||||
ddlArticolo.SelectedIndex = 0;
|
||||
ddlMacchine.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
protected void ddlArticolo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
updateElenco();
|
||||
}
|
||||
|
||||
protected void ddlMacchine_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
updateElenco();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua update elenco tempi per articolo/impianto
|
||||
/// </summary>
|
||||
private void updateElenco()
|
||||
{
|
||||
// carico update!
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class mod_storicoTC {
|
||||
|
||||
/// <summary>
|
||||
/// ddlArticolo control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddlArticolo;
|
||||
|
||||
/// <summary>
|
||||
/// odsArticoli 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 odsArticoli;
|
||||
|
||||
/// <summary>
|
||||
/// ddlMacchine control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddlMacchine;
|
||||
|
||||
/// <summary>
|
||||
/// odsMacchine 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 odsMacchine;
|
||||
|
||||
/// <summary>
|
||||
/// grViewTempi 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 grViewTempi;
|
||||
|
||||
/// <summary>
|
||||
/// odsTempi 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 odsTempi;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_tempoMSMC.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_tempoMSMC" %>
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div runat="server" id="divTesto">
|
||||
<asp:TextBox runat="server" ID="txtTempo" placeholder="Tempo" AutoPostBack="true" OnTextChanged="txtTempo_TextChanged" />
|
||||
</div>
|
||||
<div runat="server" id="divSelettori">
|
||||
<div class="row">
|
||||
<div class="col text-center align-items-center">
|
||||
Min:Sec
|
||||
</div>
|
||||
<div class="col">
|
||||
<asp:DropDownList ID="ddlMinuti" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlMinuti_SelectedIndexChanged" DataSourceID="odsMinuti" DataTextField="value" DataValueField="value" CssClass="form-control form-control-sm" />
|
||||
<asp:ObjectDataSource ID="odsMinuti" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getSubset" TypeName="MapoDb.DS_UtilityTableAdapters.v_selTallyTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:Parameter DefaultValue="0" Name="minVal" Type="Int32" />
|
||||
<asp:Parameter DefaultValue="59" Name="maxVal" Type="Int32" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
<div class="col">
|
||||
<asp:DropDownList ID="ddlSecondi" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlSecondi_SelectedIndexChanged" DataSourceID="odsSecondi" DataTextField="value" DataValueField="value" CssClass="form-control form-control-sm" />
|
||||
<asp:ObjectDataSource ID="odsSecondi" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getSubset" TypeName="MapoDb.DS_UtilityTableAdapters.v_selTallyTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:Parameter DefaultValue="0" Name="minVal" Type="Int32" />
|
||||
<asp:Parameter DefaultValue="59" Name="maxVal" Type="Int32" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<asp:Label runat="server" ID="lblTempo" Text="..." />
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,339 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_tempoMSMC : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// stringa UID univoca
|
||||
/// </summary>
|
||||
public string uid
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.UniqueID.Replace("$", "_").Replace("-", "_");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// modalità rendering controllo
|
||||
/// </summary>
|
||||
public timeControlMode modoControllo { get; set; }
|
||||
/// <summary>
|
||||
/// modalità controllo tempo
|
||||
/// </summary>
|
||||
public timeMode modoTempo { get; set; }
|
||||
/// <summary>
|
||||
/// tempo min.cent
|
||||
/// </summary>
|
||||
protected decimal _tempoMC
|
||||
{
|
||||
get
|
||||
{
|
||||
decimal answ = 0;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToDecimal(memLayer.ML.objSessionObj(string.Format("tempoMC-{0}", uid)));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("tempoMC-{0}", uid), value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// tempo min:sec
|
||||
/// </summary>
|
||||
protected TimeSpan _tempoMS
|
||||
{
|
||||
get
|
||||
{
|
||||
TimeSpan answ = new TimeSpan(0, 0, 0);
|
||||
try
|
||||
{
|
||||
answ = (TimeSpan)memLayer.ML.objSessionObj(string.Format("tempoMS-{0}", uid));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("tempoMS-{0}", uid), value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// a secondo del modo di controllo mostro textbox o selettori...
|
||||
bool showTesto = true;
|
||||
if (modoControllo == timeControlMode.testo)
|
||||
{
|
||||
showTesto = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
showTesto = false;
|
||||
}
|
||||
// sistemo visualizzazione dei 2 div
|
||||
divTesto.Visible = showTesto;
|
||||
divSelettori.Visible = !showTesto;
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
// fix numero item secondi
|
||||
odsSecondi.SelectParameters.Clear();
|
||||
odsSecondi.SelectParameters.Add("minVal", "0");
|
||||
odsSecondi.SelectParameters.Add("maxVal", numItemSec.ToString());
|
||||
// fix visualizzazione
|
||||
showControls();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// mostra i controlli secondo richiesta
|
||||
/// </summary>
|
||||
private void showControls()
|
||||
{
|
||||
if (modoControllo == timeControlMode.testo)
|
||||
{
|
||||
if (modoTempo == timeMode.MC)
|
||||
{
|
||||
txtTempo.Text = string.Format("{0:0.000}", tempoMC);
|
||||
}
|
||||
else
|
||||
{
|
||||
txtTempo.Text = string.Format("{0:#0}:{1:00}", tempoMS.Minutes, tempoMS.Seconds);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ddlMinuti.SelectedValue = tempoMS.Minutes.ToString();
|
||||
if (modoTempo == timeMode.MC)
|
||||
{
|
||||
ddlSecondi.SelectedValue = Convert.ToInt32((tempoMC - Math.Floor(tempoMC)) * 100).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
ddlSecondi.SelectedValue = tempoMS.Seconds.ToString();
|
||||
}
|
||||
}
|
||||
// fix label...
|
||||
if (modoTempo == timeMode.MC)
|
||||
{
|
||||
lblTempo.Text = string.Format("--> {0:#0}' {1:00}s (min,sec)", tempoMS.Minutes, tempoMS.Seconds);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblTempo.Text = string.Format("--> {0:0.000} (min,cent)", tempoMC);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// num item x controllo secondi/centesimi
|
||||
/// </summary>
|
||||
public int numItemSec
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 60;
|
||||
if (modoTempo == timeMode.MS)
|
||||
{
|
||||
answ = 59;
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = 99;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// tempo selezionato in formato Minuti Secondi
|
||||
/// </summary>
|
||||
public TimeSpan tempoMS
|
||||
{
|
||||
get
|
||||
{
|
||||
return _tempoMS;
|
||||
}
|
||||
set
|
||||
{
|
||||
_tempoMS = value;
|
||||
_tempoMC = minSec2Cent(value);
|
||||
showControls();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica se TC sia stato caricato dai controlli, se zero va caricato (almento tentato caricamento...)
|
||||
/// </summary>
|
||||
public void checkTC()
|
||||
{
|
||||
if (tempoMC == 0)
|
||||
{
|
||||
if (modoControllo == timeControlMode.testo)
|
||||
{
|
||||
updFromTextBox();
|
||||
}
|
||||
else
|
||||
{
|
||||
updFromDropDown();
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// tempo selezionato in formato Minuti Centesimi
|
||||
/// </summary>
|
||||
public decimal tempoMC
|
||||
{
|
||||
get
|
||||
{
|
||||
return _tempoMC;
|
||||
}
|
||||
set
|
||||
{
|
||||
_tempoMC = value;
|
||||
_tempoMS = minCent2Sec(value);
|
||||
showControls();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// conversione da tempo minuti/secondi a minuti centesimali
|
||||
/// </summary>
|
||||
/// <param name="valore"></param>
|
||||
/// <returns></returns>
|
||||
protected decimal minSec2Cent(TimeSpan valore)
|
||||
{
|
||||
Decimal answ = 0;
|
||||
try
|
||||
{
|
||||
answ = Math.Round((valore.Minutes + (decimal)valore.Seconds / 60), 3);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// conversione da tempo minuti centesimali a minuti/secondi
|
||||
/// </summary>
|
||||
/// <param name="valore"></param>
|
||||
/// <returns></returns>
|
||||
protected TimeSpan minCent2Sec(decimal valore)
|
||||
{
|
||||
TimeSpan answ = new TimeSpan(0, 0, 1);
|
||||
try
|
||||
{
|
||||
answ = new TimeSpan(0, Convert.ToInt32(valore), Convert.ToInt32((valore - Convert.ToInt32(valore)) * 60));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// cambiato valore tempo...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtTempo_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
updFromTextBox();
|
||||
}
|
||||
/// <summary>
|
||||
/// update da casella testo
|
||||
/// </summary>
|
||||
private void updFromTextBox()
|
||||
{
|
||||
if (modoControllo == timeControlMode.testo)
|
||||
{
|
||||
if (modoTempo == timeMode.MC)
|
||||
{
|
||||
tempoMC = Convert.ToDecimal(txtTempo.Text.Replace(".", ","));
|
||||
}
|
||||
else
|
||||
{
|
||||
string tempoDP = txtTempo.Text.Replace(".", ":").Replace(",", ":");
|
||||
int min = 0;
|
||||
int sec = 0;
|
||||
try
|
||||
{
|
||||
min = Convert.ToInt32(tempoDP.Substring(0, tempoDP.IndexOf(":")));
|
||||
sec = Convert.ToInt32(tempoDP.Substring(tempoDP.IndexOf(":") + 1, tempoDP.Length - tempoDP.IndexOf(":") - 1));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
tempoMS = new TimeSpan(0, min, sec);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// update da controlli dropdown
|
||||
/// </summary>
|
||||
private void updFromDropDown()
|
||||
{
|
||||
if (modoControllo == timeControlMode.selettori)
|
||||
{
|
||||
if (modoTempo == timeMode.MS)
|
||||
{
|
||||
tempoMS = new TimeSpan(0, Convert.ToInt32(ddlMinuti.SelectedValue), Convert.ToInt32(ddlSecondi.SelectedValue));
|
||||
}
|
||||
else
|
||||
{
|
||||
tempoMC = Convert.ToDecimal(Convert.ToDecimal(ddlMinuti.SelectedValue) + Convert.ToDecimal(ddlSecondi.SelectedValue) / 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// selezione minuti
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlMinuti_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
updFromDropDown();
|
||||
}
|
||||
/// <summary>
|
||||
/// selezione secondi/centesimi
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlSecondi_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
updFromDropDown();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// modalità tempo principale (Minuti Secondi o Minuti Centesimali=
|
||||
/// </summary>
|
||||
public enum timeMode
|
||||
{
|
||||
/// <summary>
|
||||
/// Minuti Secondi
|
||||
/// </summary>
|
||||
MS = 0,
|
||||
/// <summary>
|
||||
/// Minuti Centesimali
|
||||
/// </summary>
|
||||
MC = 1
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// modalità di visualizzazione ed interazione controllo tempo
|
||||
/// </summary>
|
||||
public enum timeControlMode
|
||||
{
|
||||
/// <summary>
|
||||
/// controllo textbox
|
||||
/// </summary>
|
||||
testo = 0,
|
||||
/// <summary>
|
||||
/// selettori dropdown list
|
||||
/// </summary>
|
||||
selettori = 1
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_tempoMSMC {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divTesto.
|
||||
/// </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.HtmlControls.HtmlGenericControl divTesto;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtTempo.
|
||||
/// </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 txtTempo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divSelettori.
|
||||
/// </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.HtmlControls.HtmlGenericControl divSelettori;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ddlMinuti.
|
||||
/// </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.DropDownList ddlMinuti;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo odsMinuti.
|
||||
/// </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 odsMinuti;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ddlSecondi.
|
||||
/// </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.DropDownList ddlSecondi;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo odsSecondi.
|
||||
/// </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 odsSecondi;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTempo.
|
||||
/// </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 lblTempo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_title.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_title" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_slideMenu.ascx" TagPrefix="uc1" TagName="mod_slideMenu" %>
|
||||
|
||||
<nav class="navbar navbar-expand fixed-top navbar-dark bg-black text-light titleBlock">
|
||||
<a class="navbar-brand p-0 align-text-bottom" href=".">
|
||||
<div class="d-flex flex-row">
|
||||
<div class="p-0" style="width: 1.5em;">
|
||||
<asp:Image ID="logo" ImageUrl="../images/logoSteamware.png" runat="server" CssClass="img-fluid" />
|
||||
</div>
|
||||
<div class="p-0 pl-1">
|
||||
<div class="flex-row">
|
||||
<b>MoonProTAB</b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-0 pl-1">
|
||||
<i class="fa fa-lg fa-home"></i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarText">
|
||||
<div class="navbar-text ml-auto my-0 py-0">
|
||||
<div class="text-right">
|
||||
<b><%: CognomeNome %></b>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="mb-4"> </div>
|
||||
<uc1:mod_slideMenu runat="server" ID="mod_slideMenu" />
|
||||
@@ -0,0 +1,219 @@
|
||||
using MapoDb;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_title : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// user agent corrente
|
||||
/// </summary>
|
||||
protected string userAgent = "";
|
||||
/// <summary>
|
||||
/// IP corrente
|
||||
/// </summary>
|
||||
protected string postazione_IP = "";
|
||||
/// <summary>
|
||||
/// Versione corrente sw
|
||||
/// </summary>
|
||||
protected Version currVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// prima apertura registro NO popup = refresh enabled
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
memLayer.ML.setSessionVal("refreshEnabled", true);
|
||||
}
|
||||
// se ho user/dominio e matricola in sessione NON controllo coockie
|
||||
if (user_std.UtSn.utente == "" || user_std.UtSn.dominio == "" || DataLayer.MatrOpr == 0)
|
||||
{
|
||||
// altrimenti controllo se c'è utente in sessione..
|
||||
checkAuthCookieMoonProTablet();
|
||||
}
|
||||
// cerco in sessione i vari dati disponibili...
|
||||
string cognomeNome = "";
|
||||
try
|
||||
{
|
||||
cognomeNome = user_std.UtSn.CognomeNome;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Eccezione in mod_title - page_load: {0}", exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica al presenza di un cookie VALIDO per autorizzare il device
|
||||
/// </summary>
|
||||
private void checkAuthCookieMoonProTablet()
|
||||
{
|
||||
Uri MyUrl = Request.Url;
|
||||
string delimStr = "/";
|
||||
char[] delimiter = delimStr.ToCharArray();
|
||||
string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
|
||||
int n = finalUrl.Length;
|
||||
string _paginaCorrente = finalUrl[n - 1].ToString().Replace(".aspx", "");
|
||||
try
|
||||
{
|
||||
HttpCookie cookie = Request.Cookies[memLayer.ML.CRS("cookieName")];
|
||||
if (cookie == null || cookie.Value == "")
|
||||
{
|
||||
// rimando pagina x registrazione devices
|
||||
logger.lg.scriviLog("Cookie non valido / non trovato", tipoLog.STARTUP);
|
||||
// solo se NON sono alla pagina di registrazione o altre SAFE pages......
|
||||
if (memLayer.ML.CRS("safePages").ToLower().IndexOf(_paginaCorrente.ToLower()) < 0)
|
||||
{
|
||||
Response.Redirect("~/regNewDevice");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// ricavo utente da cookie...
|
||||
string devSecret = cookie.Value;
|
||||
DS_devices.AnagDevicesRow device = null;
|
||||
// cerco il device...ogni dipendente può averne + di 1 registrato a suo nome...
|
||||
string UsrName = "";
|
||||
string Dominio = "";
|
||||
try
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Cookie trovato con devSecret {0}", devSecret), tipoLog.STARTUP);
|
||||
device = DataWrap.DW.taAnagDev.getByDeviceSecret(devSecret)[0];
|
||||
UsrName = device.User_Name;
|
||||
Dominio = device.Dominio;
|
||||
DataLayer.MatrOpr = device.MatrOpr; // salvo MatrOpr!
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore recupero dati da cookie:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
if (UsrName != "" && Dominio != "")
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Dati utente da cookie: dominio {0}, user:{1}", Dominio, UsrName), tipoLog.STARTUP);
|
||||
// aggiorno descrizione (user agent) ed IP...
|
||||
userAgent = Request.UserAgent;
|
||||
postazione_IP = Request.UserHostName;
|
||||
// controllo IP e DeviceDescription x eventuale update
|
||||
if ((device.lastIPv4 != postazione_IP) || (device.Description != userAgent))
|
||||
{
|
||||
// salvo ultimo "contatto" del device aggiornando descrizione ed IP
|
||||
DataWrap.DW.taAnagDev.updateIP(device.IdxDevice, DateTime.Now, postazione_IP, userAgent);
|
||||
}
|
||||
// avvio utente...
|
||||
user_std.UtSn.startUpUtente(Dominio, UsrName);
|
||||
}
|
||||
else
|
||||
{
|
||||
// svuoto cookie...
|
||||
memLayer.ML.emptyCookieVal(memLayer.ML.CRS("cookieName"));
|
||||
// rimando pagina x registrazione devices
|
||||
logger.lg.scriviLog(string.Format("Dominio / UsrName non validi / non trovati:{0}devSec:{1}{0}UsrName{2}{0}Dominio{3}", Environment.NewLine, devSecret, UsrName, Dominio), tipoLog.STARTUP);
|
||||
Response.Redirect("~/regNewDevice.aspx");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore in checkAuthCookie:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Path locale dove scaricare gli installer
|
||||
/// </summary>
|
||||
protected string localDownloadPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format(@"{0}\{1}", memLayer.ML.CRS("downloadPath"), memLayer.ML.CRS("appVers"));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// URL stringa di UPDATE...
|
||||
/// </summary>
|
||||
protected string updateUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format("http://seriate.steamware.net:8083/SWS/MAPO/TAB/{0}/manifest.xml", memLayer.ML.CRS("appVers"));
|
||||
}
|
||||
}
|
||||
public string isActive(object pageName)
|
||||
{
|
||||
string answ = "";
|
||||
if (true)
|
||||
{
|
||||
answ = "active";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica se la pagina corrente sia URL indicato --> mostra ACTIVE
|
||||
/// </summary>
|
||||
/// <param name="navUrl"></param>
|
||||
/// <returns></returns>
|
||||
public string checkPage(object navUrl)
|
||||
{
|
||||
string answ = "";
|
||||
if (navUrl.ToString().Replace(".aspx", "").Replace("~/", "") == titolo.Replace(".aspx", ""))
|
||||
{
|
||||
answ = "active btn-primary";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// titolo pagina
|
||||
/// </summary>
|
||||
public string titolo
|
||||
{
|
||||
get
|
||||
{
|
||||
return devicesAuthProxy.getPage(Request.Url);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cognome Nome utente
|
||||
/// </summary>
|
||||
public string CognomeNome
|
||||
{
|
||||
get
|
||||
{
|
||||
string swData = "";
|
||||
string cognomeNome = "";
|
||||
try
|
||||
{
|
||||
cognomeNome = user_std.UtSn.CognomeNome;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Eccezione in User.aspx - page_load: {0}", exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
if (cognomeNome != "")
|
||||
{
|
||||
swData = cognomeNome;
|
||||
}
|
||||
else if (DataLayer.MatrOpr > 0)
|
||||
{
|
||||
swData = DataLayer.CognomeNomeOpr;
|
||||
}
|
||||
else
|
||||
{
|
||||
swData = "MoonProTablet";
|
||||
}
|
||||
return swData;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_title {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo logo.
|
||||
/// </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.Image logo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_slideMenu.
|
||||
/// </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_slideMenu mod_slideMenu;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_turni.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_turni" %>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6" style="text-align: right; padding-right: 1rem; vertical-align: middle;">
|
||||
<b>Turno 1:</b>
|
||||
</div>
|
||||
<div class="col-6 dropdown-menu1">
|
||||
<label class="switch">
|
||||
<asp:CheckBox runat="server" ID="chkT1" AutoPostBack="true" OnCheckedChanged="chkT1_CheckedChanged" />
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right; padding-right: 1rem; vertical-align: middle;">
|
||||
<b>Turno 2:</b>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<label class="switch">
|
||||
<asp:CheckBox runat="server" ID="chkT2" AutoPostBack="true" OnCheckedChanged="chkT2_CheckedChanged" />
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right; padding-right: 1rem; vertical-align: middle;">
|
||||
<b>Turno 3:</b>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<label class="switch">
|
||||
<asp:CheckBox runat="server" ID="chkT3" AutoPostBack="true" OnCheckedChanged="chkT3_CheckedChanged" />
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,83 @@
|
||||
using MapoDb;
|
||||
using SteamWare;
|
||||
using System;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_turni : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// registrato nuovo valore
|
||||
/// </summary>
|
||||
public event EventHandler eh_updated;
|
||||
/// <summary>
|
||||
/// idx macchina selezionata
|
||||
/// </summary>
|
||||
public string idxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("IdxMacchina");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("IdxMacchina", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
setupTurni();
|
||||
}
|
||||
/// <summary>
|
||||
/// setta i valori turni attivi x macchina
|
||||
/// </summary>
|
||||
private void setupTurni()
|
||||
{
|
||||
// carico dati macchina attiva...
|
||||
try
|
||||
{
|
||||
DS_ProdTempi.TurniMacchinaRow rigaTurni = DataLayer.obj.taTurniMacc.getByIdxMacc(idxMacchina.ToString())[0];
|
||||
// fix checkboxes
|
||||
chkT1.Checked = rigaTurni.T1;
|
||||
chkT2.Checked = rigaTurni.T2;
|
||||
chkT3.Checked = rigaTurni.T3;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
/// <summary>
|
||||
/// fa toggle del valore attivo/disattivo del turno
|
||||
/// </summary>
|
||||
/// <param name="turno"></param>
|
||||
private void toggleTurno(int turno)
|
||||
{
|
||||
DataLayer.obj.taTurniMacc.stp_turniMacchineUpdateTurno(idxMacchina.ToString(), turno);
|
||||
setupTurni();
|
||||
// sollevo evento!
|
||||
if (eh_updated != null)
|
||||
{
|
||||
eh_updated(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
protected void chkT1_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
toggleTurno(1);
|
||||
}
|
||||
|
||||
protected void chkT2_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
toggleTurno(2);
|
||||
}
|
||||
|
||||
protected void chkT3_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
toggleTurno(3);
|
||||
}
|
||||
}
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_turni {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo chkT1.
|
||||
/// </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.CheckBox chkT1;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo chkT2.
|
||||
/// </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.CheckBox chkT2;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo chkT3.
|
||||
/// </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.CheckBox chkT3;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user