Continuo costruzione infrastruttura, ANCORA NON HO TUTTI i metodi..

This commit is contained in:
Samuele E. Locatelli
2018-08-31 18:43:46 +02:00
parent db73ee6164
commit 4b76c601af
33 changed files with 2561 additions and 323 deletions
+7
View File
@@ -52,6 +52,7 @@
<DependentUpon>DS_Utility.xsd</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="stateMachine.cs" />
</ItemGroup>
<ItemGroup>
<None Include="DS_App.xsc">
@@ -77,5 +78,11 @@
<DependentUpon>DS_Utility.xsd</DependentUpon>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\VisualStudioProject\SteamWare\SteamWareLib\SteamWare.csproj">
<Project>{2872dcfe-8b46-43b2-baa0-842a816a2dd5}</Project>
<Name>SteamWare</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
+142
View File
@@ -0,0 +1,142 @@
using SteamWare;
namespace BusinessLogic
{
/// <summary>
/// macchina di gestione degli stati
/// </summary>
public class stateMachine
{
#if false
protected DS_applicazioneTableAdapters.EventiTableAdapter taEv;
private DS_applicazioneTableAdapters.TraEv2StatiTableAdapter taEv2St;
private DS_applicazioneTableAdapters.IstObjTableAdapter taIstObj;
#endif
protected stateMachine()
{
avvioTA();
setupConnectionStringBase();
}
/// <summary>
/// avvia table adapters
/// </summary>
private void avvioTA()
{
#if false
taEv = new DS_applicazioneTableAdapters.EventiTableAdapter();
taEv2St = new DS_applicazioneTableAdapters.TraEv2StatiTableAdapter();
taIstObj = new DS_applicazioneTableAdapters.IstObjTableAdapter();
#endif
}
/// <summary>
/// effettua setup dei connection strings da web.config delal singola applicazione
/// </summary>
protected virtual void setupConnectionStringBase()
{
#if false
string connString = memLayer.ML.confReadString("XPSConnectionString");
// connections strings del db
taEv.Connection.ConnectionString = connString;
taEv2St.Connection.ConnectionString = connString;
taIstObj.Connection.ConnectionString = connString;
#endif
}
public static stateMachine st = new stateMachine();
/// <summary>
/// restituisce il tipo di comando associato...
/// </summary>
/// <param name="comando"></param>
/// <returns></returns>
public tipoAzione azioneComando(inputComando comando)
{
tipoAzione _azione = tipoAzione.noAct;
string toDo = "";
#if false
try
{
toDo = taEv.getByCodEvento(comando.currCmdIn)[0].Action;
}
catch
{ }
switch (toDo)
{
case "ok":
_azione = tipoAzione.conferma;
break;
case "ko":
_azione = tipoAzione.annulla;
break;
case "act":
_azione = tipoAzione.esegui;
break;
default:
_azione = tipoAzione.noAct;
break;
}
#endif
return _azione;
}
/// <summary>
/// verifica se sia possibile, dagli input segnalati, eseguire un comando secondo la tab transizione stati e restituisce adeguato output su esecuzione/errore e eventuali messaggi
/// </summary>
/// <param name="codMappa">mappa di riferimento</param>
/// <param name="codTipoObj">oggetto di riferimento</param>
/// <param name="codStato">stato corrente</param>
/// <param name="codEvento">evento</param>
/// <returns>oggetto di risposta x esito ok/ko</returns>
public tipoEsito doAction(string codMappa, string idxObj, string codStato, string codEvento)
{
tipoEsito answ = tipoEsito.undef;
string codTipoObj = ""; // di default pongo a vuoto...
#if false
try
{
codTipoObj = taIstObj.getByIdxObj(idxObj)[0].CodObj;
}
catch
{ }
// controllo su tab se ci sia riga con transizione
DS_applicazione.TraEv2StatiDataTable tabEv2St = taEv2St.getByKey(codMappa, codTipoObj, codStato, codEvento);
if (tabEv2St.Rows.Count > 0)
{
switch (codTipoObj)
{
case "U":
// aggiorno singolo obj
XPS.obj.taObj.updateStato(tabEv2St[0].NextCodStato, user_std.UtSn.utente, DateTime.Now, idxObj);
// chiamo update stato obj ancestors:
XPS.obj.taSP.sp_updateAncestorState(string.Format("{0}%", idxObj.Substring(0, 8)));
break;
case "D":
// sto scannando il DDT aggiorno tutto il tree...
string codObjCommon = idxObj.Replace("D", "%");
XPS.obj.taObj.updateStatoTree(tabEv2St[0].NextCodStato, user_std.UtSn.utente, DateTime.Now, codObjCommon);
break;
}
// salvo esito
answ = tipoEsito.ok;
}
else
{
// non c'è, segnalo errore...
answ = tipoEsito.error;
}
#endif
return answ;
}
}
public enum tipoAzione
{
annulla,
conferma,
esegui,
noAct
}
public enum tipoEsito
{
error,
ok,
undef
}
}
+3
View File
@@ -3,5 +3,8 @@
<styleBundle path="~/Content/css">
<include path="~/Content/bootstrap.css" />
<include path="~/Content/Site.css" />
<include path="~/Content/font-awesome.min.css" />
<include path="~/Content/fonts.min.css" />
<include path="~/Content/Style.min.css" />
</styleBundle>
</bundles>
+23 -1
View File
@@ -141,7 +141,19 @@
<Content Include="Content\bootstrap.min.css" />
<Content Include="Content\font-awesome.css" />
<Content Include="Content\font-awesome.min.css" />
<Content Include="Content\fonts.css">
<DependentUpon>fonts.less</DependentUpon>
</Content>
<Content Include="Content\fonts.min.css">
<DependentUpon>fonts.css</DependentUpon>
</Content>
<Content Include="Content\Site.css" />
<Content Include="Content\Style.css">
<DependentUpon>Style.less</DependentUpon>
</Content>
<Content Include="Content\Style.min.css">
<DependentUpon>Style.css</DependentUpon>
</Content>
<Content Include="Content\themes\base\accordion.css" />
<Content Include="Content\themes\base\all.css" />
<Content Include="Content\themes\base\autocomplete.css" />
@@ -221,6 +233,14 @@
<Content Include="WebUserControls\mod_btnComandi.ascx" />
<Content Include="WebUserControls\mod_footer.ascx" />
<Content Include="WebUserControls\mod_menuTopCompact.ascx" />
<Content Include="Content\fonts.less" />
<Content Include="Content\OpenSans.woff" />
<Content Include="Content\OpenSansCondensed.woff" />
<Content Include="Content\Style.less" />
<None Include="compilerconfig.json" />
<None Include="compilerconfig.json.defaults">
<DependentUpon>compilerconfig.json</DependentUpon>
</None>
<None Include="NLog.xsd">
<SubType>Designer</SubType>
</None>
@@ -261,7 +281,9 @@
<Content Include="Scripts\WebForms\WebForms.js" />
<Content Include="Scripts\WebForms\WebParts.js" />
<Content Include="Scripts\WebForms\WebUIValidation.js" />
<Content Include="Web.config" />
<Content Include="Web.config">
<SubType>Designer</SubType>
</Content>
<Content Include="Bundle.config" />
<Content Include="WebMasterPages\Bootstrap.Master" />
<Content Include="Scripts\umd\popper.min.js.map" />
Binary file not shown.
Binary file not shown.
+8 -8
View File
@@ -1,26 +1,26 @@
/* Move down content because we have a fixed navbar that is 50px tall */
body {
/*body {
padding-top: 50px;
padding-bottom: 20px;
}
}*/
/* Wrapping element */
/* Set some basic padding to keep content from hitting the edges */
.body-content {
/*.body-content {
padding-left: 15px;
padding-right: 15px;
}
}*/
/* Set widths on the form inputs since otherwise they're 100% wide */
input,
/*input,
select,
textarea {
max-width: 280px;
}
}*/
/* Responsive: Portrait tablets and up */
@media screen and (min-width: 768px) {
/*@media screen and (min-width: 768px) {
.jumbotron {
margin-top: 20px;
}
@@ -28,4 +28,4 @@ textarea {
.body-content {
padding: 0;
}
}
}*/
+482
View File
@@ -0,0 +1,482 @@
body {
margin-top: 0px;
margin-left: 0px;
margin-bottom: 0px;
margin-right: 0px;
font-family: Verdana, Arial;
font-size: small;
}
.fullscreen {
display: block;
/*set the div in the top-left corner of the screen*/
position: absolute;
top: 0;
left: 0;
/*set the width and height to 100% of the screen*/
width: 100%;
height: 100%;
}
#content {
width: 210px;
height: 240px;
padding: 0px;
border: 1px black solid;
background-position: center bottom;
background-image: url('images/logo_sw.jpg');
background-repeat: no-repeat;
}
#activeContent {
height: 200px;
}
#topBanner {
height: 20px;
}
#smallTable {
width: 98%;
padding: 1px;
white-space: nowrap;
font-size: 10pt;
}
#smallGrid {
width: 100%;
font-size: 8pt;
}
#smallGridDetail {
width: 100%;
font-size: 9pt;
}
.quadro1,
.quadro3,
.quadro5 {
float: left;
width: 48%;
text-align: center;
vertical-align: middle;
margin-top: 2px;
margin-bottom: 2px;
}
.quadro2,
.quadro4,
.quadro6 {
float: right;
width: 48%;
text-align: center;
vertical-align: middle;
margin-top: 2px;
margin-bottom: 2px;
}
.userBanner {
padding-top: 2px;
padding-bottom: 2px;
background-color: #6969AC;
text-align: center;
font-weight: bold;
color: White;
}
.taskBanner {
height: 16px;
padding-top: 0px;
padding-bottom: 0px;
background-color: #ABABFF;
text-align: center;
color: Black;
}
.ctrHeaderPager {
background-color: #b8b8b8;
font-weight: bold;
color: White;
text-align: center;
}
.ctrHeaderPagerMini {
background-color: #b8b8b8;
color: White;
text-align: center;
font-size: x-small;
height: 10px;
}
.ctrHeaderPagerWide {
background-color: #b8b8b8;
font-weight: bold;
color: White;
font-size: 10pt;
}
.ctrRowStyle {
vertical-align: top;
background-color: #EFF3FB;
text-align: left;
}
.ctrAltRowStyle {
vertical-align: top;
background-color: White;
text-align: left;
}
.ctrRowStyleRight {
background-color: #EFF3FB;
text-align: right;
}
.ctrAltRowStyleRight {
background-color: White;
text-align: right;
}
.ctrInsRowStyle {
background-color: #b8b8b8;
}
.ctrEditRowStyle {
background-color: #D1DDF1;
}
.ctrSelRowStyle {
font-weight: bold;
color: #333333;
background-color: #D1DDF1;
}
.ctrFooterMini {
font-size: x-small;
height: 15px;
}
.btnDeposita {
display: block;
width: 80px;
height: 40px;
border: solid 2px red;
background-color: #FFCCAA;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnSposta {
display: block;
width: 80px;
height: 40px;
border: solid 2px green;
background-color: #AAFFAA;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnRettifica {
display: block;
width: 80px;
height: 40px;
border: solid 2px blue;
background-color: #5454FF;
font-size: x-small;
font-weight: bold;
white-space: pre;
color: White;
}
.btnPreleva {
display: block;
width: 80px;
height: 40px;
border: solid 2px red;
background-color: #FFCCAA;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnRiattiva {
display: block;
width: 80px;
height: 40px;
border: solid 2px red;
background-color: #FFCCFF;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnConferma {
display: block;
width: 56px;
height: 40px;
border: solid 2px #DDDD99;
background-color: #FFFFAA;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnCellaPiena {
display: block;
width: 56px;
height: 40px;
border: solid 2px blue;
background-color: #AAFFFF;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnBarcode {
display: block;
width: 80px;
height: 40px;
text-align: center;
border: solid 2px blue;
background-color: #AAFFFF;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnChiudi {
display: block;
width: 80px;
height: 40px;
border: solid 2px #DDDD99;
background-color: #FFFFAA;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnChiudiInput {
display: block;
width: 80px;
height: 40px;
border: solid 2px red;
background-color: #FFCCAA;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnDeliberaFusi {
display: block;
width: 80px;
height: 40px;
border: solid 2px green;
background-color: #AAFFAA;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnDeliberaWipPre {
display: block;
width: 80px;
height: 40px;
border: solid 2px green;
background-color: #AAFFAA;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnDeliberaWipPost {
display: block;
width: 80px;
height: 40px;
border: solid 2px green;
background-color: #AAFFAA;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnUpdate {
display: block;
width: 80px;
height: 40px;
border: solid 2px green;
background-color: #AAFFAA;
font-size: x-small;
font-weight: bold;
}
.btnCancel {
display: block;
width: 80px;
height: 40px;
border: solid 2px blue;
background-color: #AAAAFF;
font-size: x-small;
font-weight: bold;
}
/* classe generale per div dei bottoni */
.divButtons {
float: left;
}
/* bottoni homepage */
.btnBarcodeBigWide1 {
width: 320px;
height: 140px;
border: solid 2px blue;
background-color: #88FFFF;
font-weight: bold;
font-size: 20pt;
text-align: center;
}
.btnBarcodeBigWide2 {
width: 320px;
height: 140px;
border: solid 2px blue;
background-color: #FF88FF;
font-weight: bold;
font-size: 20pt;
text-align: center;
}
.btnBarcodeBigWide3 {
width: 320px;
height: 140px;
border: solid 2px blue;
background-color: #FFFF88;
font-weight: bold;
font-size: 20pt;
text-align: center;
}
.btnBarcodeBigWide4 {
width: 320px;
height: 140px;
border: solid 2px blue;
background-color: #F8F8F8;
font-weight: bold;
font-size: 20pt;
text-align: center;
}
.btnBarcodeBigWide5 {
width: 320px;
height: 140px;
border: solid 2px blue;
background-color: #44FF44;
font-weight: bold;
font-size: 20pt;
text-align: center;
}
.btnBarcodeBigWide6 {
width: 320px;
height: 140px;
border: solid 2px blue;
background-color: #FF4444;
font-weight: bold;
font-size: 20pt;
text-align: center;
}
.btnBarcodeBig {
width: 95px;
height: 90px;
border: solid 2px blue;
background-color: #AAFFFF;
font-weight: bold;
text-align: center;
white-space: pre;
}
.btnBarcodeBigWide {
width: 155px;
height: 80px;
border: solid 2px blue;
background-color: #AAFFFF;
font-weight: bold;
text-align: center;
white-space: nowrap;
}
.btnSearchBig {
width: 95px;
height: 90px;
border: solid 2px #DDDD99;
background-color: #FFFFAA;
font-weight: bold;
white-space: pre;
}
.btnCaricaBig {
width: 95px;
height: 90px;
border: solid 2px #99DD99;
background-color: #AAFFAA;
font-weight: bold;
white-space: pre;
}
.btnScaricaBig {
width: 95px;
height: 90px;
border: solid 2px #FF6666;
background-color: #FFAA88;
font-weight: bold;
white-space: pre;
}
.btnListBig {
width: 95px;
height: 90px;
border: solid 2px #BBBB33;
background-color: #FFFF00;
font-weight: bold;
white-space: pre;
}
.btnListBigWide {
width: 190px;
height: 90px;
border: solid 2px red;
background-color: #FFAA88;
font-weight: bold;
white-space: nowrap;
}
.btnTaskBig {
width: 95px;
height: 90px;
border: solid 2px green;
background-color: #AAFFAA;
font-weight: bold;
white-space: pre;
}
.btnHome {
width: 80px;
height: 40px;
border: solid 2px green;
background-color: #AAFFAA;
white-space: pre;
font-size: 9pt;
font-weight: bold;
}
.btnLogout {
width: 80px;
height: 40px;
border: solid 2px red;
background-color: #FFAAAA;
white-space: pre;
font-size: 9pt;
font-weight: bold;
}
.btnShowPeriodo {
height: 40px;
border: solid 2px Orange;
background-color: #FFCCAA;
white-space: pre;
font-size: 9pt;
font-weight: bold;
}
.btnBarcodeSmall {
width: 80px;
height: 40px;
border: solid 2px blue;
background-color: #AAFFFF;
white-space: pre;
font-size: 9pt;
font-weight: bold;
}
.btnPrendiInCarico {
width: 140px;
height: 40px;
border: solid 2px red;
background-color: #FFCCAA;
white-space: pre;
font-size: 9pt;
font-weight: bold;
}
.btnCarica {
width: 80px;
height: 40px;
border: solid 2px green;
background-color: #AAFFAA;
white-space: pre;
font-size: 9pt;
font-weight: bold;
}
.btnScarica {
width: 80px;
height: 40px;
border: solid 2px red;
background-color: #FFAAAA;
white-space: pre;
font-size: 9pt;
font-weight: bold;
}
.errore {
color: Red;
font-weight: bold;
}
.divSx {
float: left;
}
.divDx {
float: right;
}
+559
View File
@@ -0,0 +1,559 @@
body
{
margin-top: 0px;
margin-left: 0px;
margin-bottom: 0px;
margin-right: 0px;
font-family: Verdana, Arial;
font-size: small;
}
.fullscreen
{
display: block; /*set the div in the top-left corner of the screen*/
position: absolute;
top: 0;
left: 0; /*set the width and height to 100% of the screen*/
width: 100%;
height: 100%;
}
#content
{
width: 210px;
height: 240px;
padding: 0px;
border: 1px black solid;
background-position: center bottom;
background-image: url('images/logo_sw.jpg');
background-repeat: no-repeat;
}
#activeContent
{
height: 200px;
}
#topBanner
{
height: 20px;
}
#smallTable
{
width: 98%;
padding: 1px;
white-space: nowrap;
font-size: 10pt;
}
#smallGrid
{
width: 100%;
font-size: 8pt;
}
#smallGridDetail
{
width: 100%;
font-size: 9pt;
}
.quadro1, .quadro3, .quadro5
{
float: left;
width: 48%;
text-align: center;
vertical-align: middle;
margin-top: 2px;
margin-bottom: 2px;
}
.quadro2, .quadro4, .quadro6
{
float: right;
width: 48%;
text-align: center;
vertical-align: middle;
margin-top: 2px;
margin-bottom: 2px;
}
.userBanner
{
padding-top: 2px;
padding-bottom: 2px;
background-color: #6969AC;
text-align: center;
font-weight: bold;
color: White;
}
.taskBanner
{
height: 16px;
padding-top: 0px;
padding-bottom: 0px;
background-color: #ABABFF;
text-align: center;
color: Black;
}
.ctrHeaderPager
{
background-color: #b8b8b8;
font-weight: bold;
color: White;
text-align: center;
}
.ctrHeaderPagerMini
{
background-color: #b8b8b8;
color: White;
text-align: center;
font-size: x-small;
height: 10px;
}
.ctrHeaderPagerWide
{
background-color: #b8b8b8;
font-weight: bold;
color: White;
font-size: 10pt;
}
.ctrRowStyle
{
vertical-align: top;
background-color: #EFF3FB;
text-align: left;
}
.ctrAltRowStyle
{
vertical-align: top;
background-color: White;
text-align: left;
}
.ctrRowStyleRight
{
background-color: #EFF3FB;
text-align: right;
}
.ctrAltRowStyleRight
{
background-color: White;
text-align: right;
}
.ctrInsRowStyle
{
background-color: #b8b8b8;
}
.ctrEditRowStyle
{
background-color: #D1DDF1;
}
.ctrSelRowStyle
{
font-weight: bold;
color: #333333;
background-color: #D1DDF1;
}
.ctrFooterMini
{
font-size: x-small;
height: 15px;
}
.btnDeposita
{
display: block;
width: 80px;
height: 40px;
border: solid 2px red;
background-color: #FFCCAA;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnSposta
{
display: block;
width: 80px;
height: 40px;
border: solid 2px green;
background-color: #AAFFAA;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnRettifica
{
display: block;
width: 80px;
height: 40px;
border: solid 2px blue;
background-color: #5454FF;
font-size: x-small;
font-weight: bold;
white-space: pre;
color: White;
}
.btnPreleva
{
display: block;
width: 80px;
height: 40px;
border: solid 2px red;
background-color: #FFCCAA;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnRiattiva
{
display: block;
width: 80px;
height: 40px;
border: solid 2px red;
background-color: #FFCCFF;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnConferma
{
display: block;
width: 56px;
height: 40px;
border: solid 2px #DDDD99;
background-color: #FFFFAA;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnCellaPiena
{
display: block;
width: 56px;
height: 40px;
border: solid 2px blue;
background-color: #AAFFFF;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnBarcode
{
display: block;
width: 80px;
height: 40px;
text-align: center;
border: solid 2px blue;
background-color: #AAFFFF;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnChiudi
{
display: block;
width: 80px;
height: 40px;
border: solid 2px #DDDD99;
background-color: #FFFFAA;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnChiudiInput
{
display: block;
width: 80px;
height: 40px;
border: solid 2px red;
background-color: #FFCCAA;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnDeliberaFusi
{
display: block;
width: 80px;
height: 40px;
border: solid 2px green;
background-color: #AAFFAA;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnDeliberaWipPre
{
display: block;
width: 80px;
height: 40px;
border: solid 2px green;
background-color: #AAFFAA;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnDeliberaWipPost
{
display: block;
width: 80px;
height: 40px;
border: solid 2px green;
background-color: #AAFFAA;
font-size: x-small;
font-weight: bold;
white-space: pre;
}
.btnUpdate
{
display: block;
width: 80px;
height: 40px;
border: solid 2px green;
background-color: #AAFFAA;
font-size: x-small;
font-weight: bold;
}
.btnCancel
{
display: block;
width: 80px;
height: 40px;
border: solid 2px blue;
background-color: #AAAAFF;
font-size: x-small;
font-weight: bold;
}
/* classe generale per div dei bottoni */
.divButtons
{
float: left;
}
/* bottoni homepage */
.btnBarcodeBigWide1
{
width: 320px;
height: 140px;
border: solid 2px blue;
background-color: #88FFFF;
font-weight: bold;
font-size: 20pt;
text-align: center;
}
.btnBarcodeBigWide2
{
width: 320px;
height: 140px;
border: solid 2px blue;
background-color: #FF88FF;
font-weight: bold;
font-size: 20pt;
text-align: center;
}
.btnBarcodeBigWide3
{
width: 320px;
height: 140px;
border: solid 2px blue;
background-color: #FFFF88;
font-weight: bold;
font-size: 20pt;
text-align: center;
}
.btnBarcodeBigWide4
{
width: 320px;
height: 140px;
border: solid 2px blue;
background-color: #F8F8F8;
font-weight: bold;
font-size: 20pt;
text-align: center;
}
.btnBarcodeBigWide5
{
width: 320px;
height: 140px;
border: solid 2px blue;
background-color: #44FF44;
font-weight: bold;
font-size: 20pt;
text-align: center;
}
.btnBarcodeBigWide6
{
width: 320px;
height: 140px;
border: solid 2px blue;
background-color: #FF4444;
font-weight: bold;
font-size: 20pt;
text-align: center;
}
.btnBarcodeBig
{
width: 95px;
height: 90px;
border: solid 2px blue;
background-color: #AAFFFF;
font-weight: bold;
text-align: center;
white-space: pre;
}
.btnBarcodeBigWide
{
width: 155px;
height: 80px;
border: solid 2px blue;
background-color: #AAFFFF;
font-weight: bold;
text-align: center;
white-space: nowrap;
}
.btnSearchBig
{
width: 95px;
height: 90px;
border: solid 2px #DDDD99;
background-color: #FFFFAA;
font-weight: bold;
white-space: pre;
}
.btnCaricaBig
{
width: 95px;
height: 90px;
border: solid 2px #99DD99;
background-color: #AAFFAA;
font-weight: bold;
white-space: pre;
}
.btnScaricaBig
{
width: 95px;
height: 90px;
border: solid 2px #FF6666;
background-color: #FFAA88;
font-weight: bold;
white-space: pre;
}
.btnListBig
{
width: 95px;
height: 90px;
border: solid 2px #BBBB33;
background-color: #FFFF00;
font-weight: bold;
white-space: pre;
}
.btnListBigWide
{
width: 190px;
height: 90px;
border: solid 2px red;
background-color: #FFAA88;
font-weight: bold;
white-space: nowrap;
}
.btnTaskBig
{
width: 95px;
height: 90px;
border: solid 2px green;
background-color: #AAFFAA;
font-weight: bold;
white-space: pre;
}
.btnHome
{
width: 80px;
height: 40px;
border: solid 2px green;
background-color: #AAFFAA;
white-space: pre;
font-size: 9pt;
font-weight: bold;
}
.btnLogout
{
width: 80px;
height: 40px;
border: solid 2px red;
background-color: #FFAAAA;
white-space: pre;
font-size: 9pt;
font-weight: bold;
}
.btnShowPeriodo
{
height: 40px;
border: solid 2px Orange;
background-color: #FFCCAA;
white-space: pre;
font-size: 9pt;
font-weight: bold;
}
.btnBarcodeSmall
{
width: 80px;
height: 40px;
border: solid 2px blue;
background-color: #AAFFFF;
white-space: pre;
font-size: 9pt;
font-weight: bold;
}
.btnPrendiInCarico
{
width: 140px;
height: 40px;
border: solid 2px red;
background-color: #FFCCAA;
white-space: pre;
font-size: 9pt;
font-weight: bold;
}
.btnCarica
{
width: 80px;
height: 40px;
border: solid 2px green;
background-color: #AAFFAA;
white-space: pre;
font-size: 9pt;
font-weight: bold;
}
.btnScarica
{
width: 80px;
height: 40px;
border: solid 2px red;
background-color: #FFAAAA;
white-space: pre;
font-size: 9pt;
font-weight: bold;
}
.errore
{
color: Red;
font-weight: bold;
}
.divSx
{
float: left;
}
.divDx
{
float: right;
}
+1
View File
File diff suppressed because one or more lines are too long
+12
View File
@@ -0,0 +1,12 @@
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: url('OpenSans.woff') format('woff');
}
@font-face {
font-family: 'Open Sans Condensed';
font-style: normal;
font-weight: 300;
src: url('OpenSansCondensed.woff') format('woff');
}
+13
View File
@@ -0,0 +1,13 @@
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: url('OpenSans.woff') format('woff');
}
@font-face {
font-family: 'Open Sans Condensed';
font-style: normal;
font-weight: 300;
src: url('OpenSansCondensed.woff') format('woff');
}
+1
View File
@@ -0,0 +1 @@
@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:url('OpenSans.woff') format('woff');}@font-face{font-family:'Open Sans Condensed';font-style:normal;font-weight:300;src:url('OpenSansCondensed.woff') format('woff');}
-72
View File
@@ -1,72 +0,0 @@
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="C_TRACK.SiteMaster" %>
<!DOCTYPE html>
<html lang="en">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%: Page.Title %> - Applicazione ASP.NET</title>
<asp:PlaceHolder runat="server">
<%: Scripts.Render("~/bundles/modernizr") %>
</asp:PlaceHolder>
<webopt:bundlereference runat="server" path="~/Content/css" />
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
</head>
<body>
<form runat="server">
<asp:ScriptManager runat="server">
<Scripts>
<%--To learn more about bundling scripts in ScriptManager see https://go.microsoft.com/fwlink/?LinkID=301884 --%>
<%--Framework Scripts--%>
<asp:ScriptReference Name="MsAjaxBundle" />
<asp:ScriptReference Name="jquery" />
<asp:ScriptReference Name="bootstrap" />
<asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
<asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
<asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
<asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
<asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
<asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
<asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
<asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />
<asp:ScriptReference Name="WebFormsBundle" />
<%--Site Scripts--%>
</Scripts>
</asp:ScriptManager>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" runat="server" href="~/">Nome applicazione</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a runat="server" href="~/">Home</a></li>
<li><a runat="server" href="~/About">Informazioni</a></li>
<li><a runat="server" href="~/Contact">Contatto</a></li>
</ul>
</div>
</div>
</div>
<div class="container body-content">
<asp:ContentPlaceHolder ID="MainContent" runat="server">
</asp:ContentPlaceHolder>
<hr />
<footer>
<p>&copy; <%: DateTime.Now.Year %> - Applicazione ASP.NET</p>
</footer>
</div>
</form>
</body>
</html>
-17
View File
@@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace C_TRACK
{
public partial class SiteMaster : MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
-35
View File
@@ -1,35 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Codice generato da uno strumento.
//
// Le modifiche apportate a questo file possono causare un comportamento non corretto e andranno perse se
// il codice viene rigenerato.
// </auto-generated>
//------------------------------------------------------------------------------
namespace C_TRACK
{
public partial class SiteMaster
{
/// <summary>
/// Controllo HeadContent.
/// </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.ContentPlaceHolder HeadContent;
/// <summary>
/// Controllo MainContent.
/// </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.ContentPlaceHolder MainContent;
}
}
-23
View File
@@ -1,23 +0,0 @@
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.Mobile.master.cs" Inherits="C_TRACK.Site_Mobile" %>
<%@ Register Src="~/ViewSwitcher.ascx" TagPrefix="friendlyUrls" TagName="ViewSwitcher" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta name="viewport" content="width=device-width" />
<title></title>
<asp:ContentPlaceHolder runat="server" ID="HeadContent" />
</head>
<body>
<form id="form1" runat="server">
<div>
<h1>Mobile Master Page</h1>
<asp:ContentPlaceHolder runat="server" ID="FeaturedContent" />
<section class="content-wrapper main-content clear-fix">
<asp:ContentPlaceHolder runat="server" ID="MainContent" />
</section>
<friendlyUrls:ViewSwitcher runat="server" />
</div>
</form>
</body>
</html>
-17
View File
@@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace C_TRACK
{
public partial class Site_Mobile : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
-51
View File
@@ -1,51 +0,0 @@
//------------------------------------------------------------------------------
// <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 C_TRACK {
public partial class Site_Mobile {
/// <summary>
/// HeadContent 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.ContentPlaceHolder HeadContent;
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// FeaturedContent 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.ContentPlaceHolder FeaturedContent;
/// <summary>
/// MainContent 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.ContentPlaceHolder MainContent;
}
}
-4
View File
@@ -1,4 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ViewSwitcher.ascx.cs" Inherits="C_TRACK.ViewSwitcher" %>
<div id="viewSwitcher">
<%: CurrentView %> view | <a href="<%: SwitchUrl %>" data-ajax="false">Switch to <%: AlternateView %></a>
</div>
-43
View File
@@ -1,43 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Routing;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.AspNet.FriendlyUrls.Resolvers;
namespace C_TRACK
{
public partial class ViewSwitcher : System.Web.UI.UserControl
{
protected string CurrentView { get; private set; }
protected string AlternateView { get; private set; }
protected string SwitchUrl { get; private set; }
protected void Page_Load(object sender, EventArgs e)
{
// Determine current view
var isMobile = WebFormsFriendlyUrlResolver.IsMobileView(new HttpContextWrapper(Context));
CurrentView = isMobile ? "Mobile" : "Desktop";
// Determine alternate view
AlternateView = isMobile ? "Desktop" : "Mobile";
// Create switch URL from the route, e.g. ~/__FriendlyUrls_SwitchView/Mobile?ReturnUrl=/Page
var switchViewRouteName = "AspNet.FriendlyUrls.SwitchView";
var switchViewRoute = RouteTable.Routes[switchViewRouteName];
if (switchViewRoute == null)
{
// Friendly URLs is not enabled or the name of the switch view route is out of sync
this.Visible = false;
return;
}
var url = GetRouteUrl(switchViewRouteName, new { view = AlternateView, __FriendlyUrls_SwitchViews = true });
url += "?ReturnUrl=" + HttpUtility.UrlEncode(Request.RawUrl);
SwitchUrl = url;
}
}
}
-15
View File
@@ -1,15 +0,0 @@
//------------------------------------------------------------------------------
// <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 C_TRACK {
public partial class ViewSwitcher {
}
}
+2 -2
View File
@@ -64,7 +64,7 @@ namespace C_TRACK.WebMasterPages {
/// 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.UserControl mod_menuTopCompact;
protected global::C_TRACK.WebUserControls.mod_menuTopCompact mod_menuTopCompact;
/// <summary>
/// Controllo uppContainer.
@@ -91,7 +91,7 @@ namespace C_TRACK.WebMasterPages {
/// 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.UserControl mod_footer;
protected global::C_TRACK.WebUserControls.mod_footer mod_footer;
/// <summary>
/// Controllo PlaceHolder2.
+38
View File
@@ -1 +1,39 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_barcode.ascx.cs" Inherits="C_TRACK.WebUserControls.mod_barcode" %>
<script type="text/javascript">
$(document).ready(function () {
$('#<%=txtInput.ClientID %>').focus();
// oggetto da legare all'update parziale ajax x sistemare btns & co
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(function () {
// re-bind jQuery events
$('#<%=txtInput.ClientID %>').focus();
});
});
</script>
<div class="form-row">
<div class="form-group col-8 col-md-9 col-lg-10">
<asp:TextBox runat="server" ID="txtInput" CssClass="form-control form-control-lg" OnTextChanged="txtInput_TextChanged" TabIndex="1" AutoPostBack="true" />
</div>
<div class="col-4 col-md-3 col-lg-2">
<asp:LinkButton ID="lbtCerca" runat="server" CssClass="btn text-truncate btn-warning btn-lg btn-block text-uppercase"><i class="fa fa-search"></i> cerca</asp:LinkButton>
</div>
</div>
<div style="text-align: center; font-size: 20pt;">
<div class="ui-grid-solo">
<asp:Panel runat="server" ID="pnlBarcodeBox" CssClass="">
<div style="background-color: #FFE800; padding: 8px; margin: 1px;">
<asp:Label runat="server" ID="lblInput" Text="" />
</div>
<div style="background-color: #FFC500; padding: 8px; margin: 1px;">
<asp:Label runat="server" ID="lblValore" Text="" />
</div>
<div style="background-color: #FF7700; padding: 8px; margin: 1px;">
<asp:Label runat="server" ID="lblRichiesta" Text="" Font-Bold="true" />
</div>
<asp:Label ID="lblBrowser" runat="server" />
</asp:Panel>
</div>
</div>
+264 -5
View File
@@ -1,17 +1,276 @@
using System;
using SteamWare;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace C_TRACK.WebUserControls
{
public partial class mod_barcode : System.Web.UI.UserControl
{
#region area protected
/// <summary>
/// dictionary comandi ammessi
/// </summary>
protected Dictionary<string, string> _comandi = new Dictionary<string, string>();
/// <summary>
/// dictionary dei valori ammessi
/// </summary>
protected Dictionary<string, string> _tabValori = new Dictionary<string, string>();
/// <summary>
/// oggetto comando locale alla classe
/// </summary>
protected inputComando comando
{
get
{
inputComando answ;
if (memLayer.ML.isInSessionObject("barcodeCmd"))
{
answ = (inputComando)memLayer.ML.objSessionObj("barcodeCmd");
}
else
{
answ = new inputComando();
}
return answ;
}
set
{
memLayer.ML.setSessionVal("barcodeCmd", value, false);
}
}
/// <summary>
/// al caricamento della pagina...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
DetectAgent();
myInitialize();
}
/// <summary>
/// inizializzazione specifica barcode
/// </summary>
private void myInitialize()
{
lblInput.Text = traduci("PregoInserireBarcode");
if (!Page.IsPostBack)
{
comando = new inputComando();
}
}
public string BCodeVal
{
get
{
return txtInput.Text.Trim().ToUpper();
}
set
{
txtInput.Text = value;
}
}
/// <summary>
/// barcode completato con invio...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtInput_TextChanged(object sender, EventArgs e)
{
processInput();
}
private void processInput()
{
// verifico se sia un comando o un valore valido...
isInputEvent();
isValore();
// verifico se c'è stato input evento
if (comando.isValid)
{
if (comando.currCmdIn != "")
{
txtInput2show = comando.descrComando;
}
else
{
txtInput2show = "---";
}
if (comando.valore != "")
{
txtVal2show = comando.valoreTrad;
}
else
{
txtVal2show = "---";
}
if (eh_comandoRegistrato != null)
{
eh_comandoRegistrato(this, new EventArgs());
}
}
else
{
lblInput.Text = traduci("ComandoSconosciuto");
lblValore.Text = BCodeVal;
comando = new inputComando();
}
BCodeVal = "";
}
/// <summary>
/// verifico se sia un valore compreso nell'elenco fornito
/// </summary>
private void isValore()
{
if (_tabValori.ContainsKey(BCodeVal)) // verifico se il comando digitato esista...
{
comando.isValid = true;
comando.valore = BCodeVal;
_tabValori.TryGetValue(BCodeVal, out comando.valoreTrad);
}
}
/// <summary>
/// verifica se il comando inserito sia valido
/// </summary>
private void isInputEvent()
{
if (_comandi.ContainsKey(BCodeVal)) // verifico se il comando digitato esista...
{
comando.isValid = true;
// salvo comando precedente (se c'è...)
comando.prevCmdIn = comando.currCmdIn;
comando.descrComandoPrev = comando.descrComando;
comando.currCmdIn = BCodeVal;
_comandi.TryGetValue(BCodeVal, out comando.descrComando);
}
}
/// <summary>
/// verifica quale browser usato e applica css corretto al div attorno al box
/// </summary>
private void DetectAgent()
{
System.Web.HttpBrowserCapabilities browser = Request.Browser;
if (browser.Browser == "IE")
{
pnlBarcodeBox.CssClass = "barcodeBoxIE";
}
else
{
pnlBarcodeBox.CssClass = "barcodeBoxOther";
}
}
#endregion
#region area public
/// <summary>
/// effettua al ettura da sessione del comando cliccato e lo inserisce come fosse barcode
/// </summary>
public void loadBtnClickComando()
{
BCodeVal = memLayer.ML.StringSessionObj("btnCmdPress");
memLayer.ML.emptySessionVal("btnCmdPress");
processInput();
}
/// <summary>
/// elenco dei comandi riconosciuti
/// </summary>
public Dictionary<string, string> comandiAmmessi
{
get
{
return _comandi;
}
set
{
_comandi = value;
}
}
/// <summary>
/// tabella di valori ammissibili
/// </summary>
public Dictionary<string, string> tabValori
{
get
{
return _tabValori;
}
set
{
_tabValori = value;
}
}
/// <summary>
/// evento comando registrato
/// </summary>
public event EventHandler eh_comandoRegistrato;
/// <summary>
/// comando registrato dal barcode
/// </summary>
public inputComando comandoRegistrato
{
get
{
return comando;
}
}
/// <summary>
/// scrive nella label input
/// </summary>
public string txtInput2show
{
set
{
lblInput.Text = value;
}
}
/// <summary>
/// scrive nella label valore
/// </summary>
public string txtVal2show
{
set
{
lblValore.Text = value;
}
}
/// <summary>
/// scrive nella label richiesta
/// </summary>
public string txtRich2show
{
set
{
lblRichiesta.Text = value;
}
}
/// <summary>
/// reset del controllo
/// </summary>
public void resetMe()
{
comando = new inputComando();
txtInput2show = "Prego inserire barcode";
txtVal2show = "";
txtRich2show = "";
}
/// <summary>
/// wrapper traduzione termini
/// </summary>
/// <param name="lemma"></param>
/// <returns></returns>
public string traduci(string lemma)
{
return user_std.UtSn.Traduci(lemma);
}
#endregion
}
}
+71 -10
View File
@@ -1,17 +1,78 @@
//------------------------------------------------------------------------------
// <auto-generated>
// <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.
// </auto-generated>
// il codice viene rigenerato.
// </generato automaticamente>
//------------------------------------------------------------------------------
namespace C_TRACK.WebUserControls
{
public partial class mod_barcode
{
}
namespace C_TRACK.WebUserControls {
public partial class mod_barcode {
/// <summary>
/// Controllo txtInput.
/// </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 txtInput;
/// <summary>
/// Controllo lbtCerca.
/// </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 lbtCerca;
/// <summary>
/// Controllo pnlBarcodeBox.
/// </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 pnlBarcodeBox;
/// <summary>
/// Controllo lblInput.
/// </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 lblInput;
/// <summary>
/// Controllo lblValore.
/// </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 lblValore;
/// <summary>
/// Controllo lblRichiesta.
/// </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 lblRichiesta;
/// <summary>
/// Controllo lblBrowser.
/// </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 lblBrowser;
}
}
@@ -1 +1,38 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_btnComandi.ascx.cs" Inherits="C_TRACK.WebUserControls.mod_btnComandi" %>
<div class="row my-2">
<div class="col-6">
<asp:LinkButton ID="lbt1" runat="server" CssClass="btn text-truncate btn-lg btn-block btn-success" OnClick="lbt1_Click">
<i class="fa fa-plus"></i> <%: comandiAmmessi["04"] %>
</asp:LinkButton>
</div>
<div class="col-6">
<asp:LinkButton ID="lbt2" runat="server" CssClass="btn text-truncate btn-lg btn-block btn-primary" OnClick="lbt2_Click">
<i class="fa fa-gear"></i> <%: comandiAmmessi["05"] %>
</asp:LinkButton>
</div>
</div>
<div class="row my-2">
<div class="col-6">
<asp:LinkButton ID="lbt3" runat="server" CssClass="btn text-truncate btn-lg btn-block btn-dark" OnClick="lbt3_Click">
<i class="fa fa-star"></i> <%: comandiAmmessi["06"] %>
</asp:LinkButton>
</div>
<div class="col-6">
<asp:LinkButton ID="lbt4" runat="server" CssClass="btn text-truncate btn-lg btn-block btn-warning" OnClick="lbt4_Click">
<i class="fa fa-info"></i> <%: comandiAmmessi["07"] %>
</asp:LinkButton>
</div>
</div>
<div class="row my-2">
<div class="col-6">
<asp:LinkButton ID="lbt5" runat="server" CssClass="btn text-truncate btn-lg btn-block btn-success" OnClick="lbt5_Click">
<i class="fa fa-check"></i> <%: comandiAmmessi["ok"] %>
</asp:LinkButton>
</div>
<div class="col-6">
<asp:LinkButton ID="lbt6" runat="server" CssClass="btn text-truncate btn-lg btn-block btn-dark" OnClick="lbt6_Click">
<i class="fa fa-ban"></i> <%: comandiAmmessi["ko"] %>
</asp:LinkButton>
</div>
</div>
+346 -5
View File
@@ -1,17 +1,358 @@
using System;
using SteamWare;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace C_TRACK.WebUserControls
{
public partial class mod_btnComandi : System.Web.UI.UserControl
{
/// <summary>
/// evento comando clicked
/// </summary>
public event EventHandler eh_clickComando;
protected void Page_Load(object sender, EventArgs e)
{
setupComandiBarcode();
updateBtn();
}
/// <summary>
/// Restituisce email dest da codCliente + check conf da web.config con forzatura a email interna
/// </summary>
/// <param name="CodCliente"></param>
/// <returns></returns>
protected string getEmailDest(string CodCliente)
{
string answ = "";
#if false
if (memLayer.ML.CRS("_forcedDestEmail") != "")
{
answ = memLayer.ML.CRS("_forcedDestEmail");
}
else
{
answ = XPS_data.XPS.obj.taAnCli.getByKey(CodCliente)[0].email;
}
#endif
return answ;
}
/// <summary>
/// Aggiorna stato buttons
/// </summary>
public void updateBtn()
{
// determino visibilità lbt4: SOLO se ho un UDC valido ed è in stato 05...
int currState = 0;
bool emailReq = false;
string emailSent = "";
string emailDest = "";
string CodCliente = "";
#if false
DS_applicazione.IstObjRow rigaIstObj;
// calcolo lo stato dell'oggetto...
try
{
rigaIstObj = XPS_data.XPS.obj.taObj.getByIdxObj(comando.valore)[0];
currState = Convert.ToInt32(rigaIstObj.CodStato);
emailReq = rigaIstObj.emailReq;
CodCliente = rigaIstObj.CodCliente;
emailDest = getEmailDest(CodCliente);
}
catch
{ }
try
{
rigaIstObj = XPS_data.XPS.obj.taObj.getByIdxObj(comando.valore)[0];
emailSent = rigaIstObj.emailSent.ToString("dd/MM/yy HH:mm");
}
catch
{ }
#endif
switch (currState)
{
case 1:
case 2:
case 3:
lbt1.Enabled = true;
lbt2.Enabled = false;
lbt3.Enabled = false;
lbt4.Enabled = false;
break;
case 4:
lbt1.Enabled = false;
lbt2.Enabled = true;
lbt3.Enabled = false;
lbt4.Enabled = false;
break;
case 5:
lbt1.Enabled = false;
lbt2.Enabled = false;
lbt3.Enabled = true;
lbt4.Enabled = true;
break;
case 6:
case 7:
lbt1.Enabled = false;
lbt2.Enabled = false;
lbt3.Enabled = false;
lbt4.Enabled = true;
break;
default:
lbt1.Enabled = false;
lbt2.Enabled = false;
lbt3.Enabled = false;
lbt4.Enabled = false;
break;
}
// fix CSS... inizio togliendo disabled...
lbt1.CssClass = lbt1.CssClass.Replace("disabled", "").Trim();
lbt2.CssClass = lbt2.CssClass.Replace("disabled", "").Trim();
lbt3.CssClass = lbt3.CssClass.Replace("disabled", "").Trim();
lbt4.CssClass = lbt4.CssClass.Replace("disabled", "").Trim();
lbt5.CssClass = lbt5.CssClass.Replace("disabled", "").Trim();
lbt6.CssClass = lbt6.CssClass.Replace("disabled", "").Trim();
// rimetto dove serve disabled...
if (!lbt1.Enabled)
{
lbt1.CssClass += " disabled";
}
if (!lbt2.Enabled)
{
lbt2.CssClass += " disabled";
}
if (!lbt3.Enabled)
{
lbt3.CssClass += " disabled";
}
if (!lbt4.Enabled)
{
lbt4.CssClass += " disabled";
}
if (!lbt5.Enabled)
{
lbt5.CssClass += " disabled";
}
if (!lbt6.Enabled)
{
lbt6.CssClass += " disabled";
}
if (currState >= 5)
{
// controllo se c'è email del cliente...
if (emailDest != "")
{
lbt4.Enabled = true;
}
else
{
lbt4.Enabled = false;
}
// controllo se era indicato email richiesta!
if (emailReq)
{
lbt4.Text = string.Format("{0}{1}{2}", comandiAmmessi["07"], Environment.NewLine, user_std.UtSn.Traduci("emailReq"));
}
else
{
lbt4.Enabled = false;
}
// controllo se mai spedita email...
if (emailSent != "")
{
lbt4.Text += string.Format("{0}{1}: {2}", Environment.NewLine, user_std.UtSn.Traduci("emailSent"), emailSent);
}
}
// se autoconferma nascondo button conferma...
if (memLayer.ML.confReadBool("autoConfCmd"))
{
lbt5.Visible = false;
}
else
{
lbt5.Visible = true;
}
}
/// <summary>
/// carico da tab i comandi ammessi per il barcode...
/// </summary>
private void setupComandiBarcode()
{
#if false
XPS_data.DS_applicazioneTableAdapters.TraEv2StatiTableAdapter taTrEv2St = new XPS_data.DS_applicazioneTableAdapters.TraEv2StatiTableAdapter();
DS_applicazione.TraEv2StatiDataTable _tabTran = taTrEv2St.getByCodMappa("E_BC");
Dictionary<string, string> comandi = new Dictionary<string, string>();
foreach (DS_applicazione.TraEv2StatiRow riga in _tabTran)
{
comandi.Add(riga.CodEvento, user_std.UtSn.Traduci(riga.text2show));
}
// impongo i comandi al barcode...
comandiAmmessi = comandi;
#endif
}
/// <summary>
/// dictionary comandi ammessi
/// </summary>
protected Dictionary<string, string> _comandi = new Dictionary<string, string>();
/// <summary>
/// elenco dei comandi riconosciuti
/// </summary>
public Dictionary<string, string> comandiAmmessi
{
get
{
return _comandi;
}
set
{
_comandi = value;
}
}
/// <summary>
/// segnala click su button comando
/// </summary>
public void segnalaClick()
{
if (eh_clickComando != null)
{
eh_clickComando(this, new EventArgs());
}
}
protected void lbt1_Click(object sender, EventArgs e)
{
memLayer.ML.setSessionVal("btnCmdPress", "04", false);
segnalaClick();
}
protected void lbt2_Click(object sender, EventArgs e)
{
memLayer.ML.setSessionVal("btnCmdPress", "05", false);
segnalaClick();
}
protected void lbt3_Click(object sender, EventArgs e)
{
memLayer.ML.setSessionVal("btnCmdPress", "06", false);
segnalaClick();
}
protected void lbt4_Click(object sender, EventArgs e)
{
#if false
logger.lg.scriviLog("Richiesto invio email...");
// mi limito a mandare email e non segnalo altro... carico dati!
// determino visibilità lbt4: SOLO se ho un UDC valido ed è in stato 05...
int currState = 0;
bool emailReq = false;
string emailSent = "";
string emailDest = "";
string CodCliente = "";
string ddt = "";
string dataRif = "";
string descr = "";
string peso = "";
DS_applicazione.IstObjRow rigaIstObj = null;
// calcolo lo stato dell'oggetto...
try
{
rigaIstObj = XPS_data.XPS.obj.taObj.getByIdxObj(comando.valore)[0];
currState = Convert.ToInt32(rigaIstObj.CodStato);
emailReq = rigaIstObj.emailReq;
CodCliente = rigaIstObj.CodCliente;
emailDest = getEmailDest(CodCliente);
logger.lg.scriviLog(string.Format("Recuperati dati per invio email: {0} | {1} | {2}", comando.valore, CodCliente, emailDest));
}
catch (Exception exc)
{
logger.lg.scriviLog(String.Format("Eccezione in recupero dati commessa x email: {0}", exc), tipoLog.EXCEPTION);
}
try
{
rigaIstObj = XPS_data.XPS.obj.taObj.getByIdxObj(comando.valore)[0];
emailSent = rigaIstObj.emailSent.ToString("dd/MM/yy HH:mm");
}
catch (Exception exc)
{
logger.lg.scriviLog(String.Format("Eccezione in invio email: {0}", exc), tipoLog.EXCEPTION);
}
try
{
ddt = rigaIstObj.Nome;
dataRif = rigaIstObj.DataRif.ToString("dd/MM/yy HH:mm");
descr = rigaIstObj.Note;
peso = rigaIstObj.Peso.ToString();
}
catch (Exception exc)
{
ddt = "n.d.";
dataRif = "n.d.";
descr = "n.d.";
peso = "n.d.";
logger.lg.scriviLog(String.Format("Eccezione in recupero dati x email: {0}", exc), tipoLog.EXCEPTION);
}
if (currState >= 5 && emailDest != "")
{
// invio email
string subject = user_std.UtSn.Traduci("emailSubject"); // 'Notifica merce pronta'
string bodyMsg = string.Format(user_std.UtSn.Traduci("emailBody"), ddt, dataRif, descr, peso); //'Attenzione, la merce relativa al DDT {0} del {1}, ({2}, peso {3} kg) è pronta per il ritiro presso EQUA s.p.a di Pedrengo'
// se è forzato invio interno cambio subject e body...
if (memLayer.ML.CRS("_forcedDestEmail") != "")
{
DS_applicazione.v_commesseRow rigaComm = XPS_data.XPS.obj.taComm.getByCod(comando.valore)[0];
subject += string.Format(" | cliente: {0}", rigaComm.Cliente);
bodyMsg += string.Format("<br/><br/><a href=\"{0}detComm?CodDDT={1}\">Link diretto al DDT {2} - {3}</a>", memLayer.ML.CRS("mainSite"), rigaComm.Cod, rigaComm.DDT, rigaComm.descrizione);
}
// invio email!
bool fatto = gestEmail.geAuth.mandaEmail(memLayer.ML.confReadString("_emailUser"), emailDest, subject, bodyMsg);
if (fatto)
{
// aggiorno stato obj
XPS_data.XPS.obj.taObj.updateEmailSent(comando.valore);
}
}
#endif
updateBtn();
}
protected void lbt5_Click(object sender, EventArgs e)
{
memLayer.ML.setSessionVal("btnCmdPress", "ok", false);
segnalaClick();
}
protected void lbt6_Click(object sender, EventArgs e)
{
memLayer.ML.setSessionVal("btnCmdPress", "ko", false);
segnalaClick();
}
/// <summary>
/// oggetto comando locale alla classe
/// </summary>
protected inputComando comando
{
get
{
inputComando answ;
if (memLayer.ML.isInSessionObject("barcodeCmd"))
{
answ = (inputComando)memLayer.ML.objSessionObj("barcodeCmd");
}
else
{
answ = new inputComando();
}
return answ;
}
}
}
}
+62 -10
View File
@@ -1,17 +1,69 @@
//------------------------------------------------------------------------------
// <auto-generated>
// <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.
// </auto-generated>
// il codice viene rigenerato.
// </generato automaticamente>
//------------------------------------------------------------------------------
namespace C_TRACK.WebUserControls
{
public partial class mod_btnComandi
{
}
namespace C_TRACK.WebUserControls {
public partial class mod_btnComandi {
/// <summary>
/// Controllo lbt1.
/// </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 lbt1;
/// <summary>
/// Controllo lbt2.
/// </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 lbt2;
/// <summary>
/// Controllo lbt3.
/// </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 lbt3;
/// <summary>
/// Controllo lbt4.
/// </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 lbt4;
/// <summary>
/// Controllo lbt5.
/// </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 lbt5;
/// <summary>
/// Controllo lbt6.
/// </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 lbt6;
}
}
+431 -5
View File
@@ -1,9 +1,8 @@
using System;
using SteamWare;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Diagnostics;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace C_TRACK
{
@@ -12,6 +11,433 @@ namespace C_TRACK
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
// Crea stopwatch.
Stopwatch stopwatch = new Stopwatch();
// Avvio...
stopwatch.Start();
traduciObj();
// registro che i valori in cache sono scaduti...
lastDataRefresh = DateTime.Now.AddDays(-1);
numDD = memLayer.ML.CRI("numDD");
cacheValSec = memLayer.ML.CRI("cacheValSec");
// registro
stopwatch.Stop();
lastUpdDuration = stopwatch.Elapsed;
}
// effettuo load valori...
setupComandiBarcode();
setupValoriBarcode();
// registro eventi
mod_barcode1.eh_comandoRegistrato += new EventHandler(mod_barcode1_eh_comandoRegistrato);
mod_btnComandi1.eh_clickComando += new EventHandler(mod_btnComandi1_eh_clickComando);
}
/// <summary>
/// Numero comandi ammessi caricati
/// </summary>
public int nComandi
{
get
{
return comandiAmmessiBCode.Count;
}
}
/// <summary>
/// Numero record BCode caricati
/// </summary>
public int nBCodeRec
{
get
{
return valoriAmmessiBCode.Count;
}
}
/// <summary>
/// Memorizzo durata ultimo update (lettura record...) come timespan
/// </summary>
public TimeSpan lastUpdDuration
{
get
{
return (TimeSpan)memLayer.ML.objSessionObj("lastUpdDuration");
}
set
{
memLayer.ML.setSessionVal("lastUpdDuration", value);
}
}
/// <summary>
/// inviato un comando dai link buttons
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void mod_btnComandi1_eh_clickComando(object sender, EventArgs e)
{
// chiamo metodo caricamento comandi in modulo barcode...
mod_barcode1.loadBtnClickComando();
}
private void traduciObj()
{
}
/// <summary>
/// imposta/recupera valore num gg da rileggere...
/// </summary>
public int numDD
{
get
{
int answ = 85;
try
{
answ = Convert.ToInt32(txtNumDD.Text.Trim());
}
catch
{ }
return answ;
}
set
{
txtNumDD.Text = value.ToString();
}
}
/// <summary>
/// logLevel impostato...
/// </summary>
public int logLevel
{
get
{
int answ = 1;
try
{
answ = memLayer.ML.CRI("_logLevel");
}
catch
{ }
return answ;
}
}
/// <summary>
/// imposta/recupera valore num sec validità cache...
/// </summary>
public int cacheValSec
{
get
{
int answ = 55;
try
{
answ = Convert.ToInt32(txtCacheSec.Text.Trim());
}
catch
{ }
return answ;
}
set
{
txtCacheSec.Text = value.ToString();
}
}
/// <summary>
/// Variabile x controllo scadenza valori in cache
/// </summary>
protected DateTime lastDataRefresh
{
get
{
DateTime answ = DateTime.Now.AddDays(-1);
try
{
answ = Convert.ToDateTime(memLayer.ML.objCacheObj("lastBCodeDataRead"));
}
catch
{ }
return answ;
}
set
{
// registro che i valori in cache sono scaduti...
memLayer.ML.setCacheVal("lastBCodeDataRead", value);
if (logLevel > 5)
{
logger.lg.scriviLog("impostata validità cache");
}
}
}
protected bool cacheValida
{
get
{
bool answ = false;
try
{
if (DateTime.Now.Subtract(lastDataRefresh).TotalSeconds < cacheValSec)
{
answ = true;
}
}
catch
{ }
return answ;
}
}
/// <summary>
/// Elenco (da cache) dei valori ammessi x BCode
/// </summary>
protected Dictionary<string, string> valoriAmmessiBCode
{
get
{
Dictionary<string, string> answ = new Dictionary<string, string>();
if (memLayer.ML.isInCacheObject("valoriAmmessiBCode") && cacheValida)
{
answ = (Dictionary<string, string>)memLayer.ML.objCacheObj("valoriAmmessiBCode");
}
return answ;
}
set
{
memLayer.ML.setCacheVal("valoriAmmessiBCode", value);
}
}
/// <summary>
/// Elenco (da cache) dei comandi ammessi x BCode
/// </summary>
protected Dictionary<string, string> comandiAmmessiBCode
{
get
{
Dictionary<string, string> answ = new Dictionary<string, string>();
if (memLayer.ML.isInCacheObject("comandiAmmessiBCode"))
{
answ = (Dictionary<string, string>)memLayer.ML.objCacheObj("comandiAmmessiBCode");
}
return answ;
}
set
{
memLayer.ML.setCacheVal("comandiAmmessiBCode", value);
}
}
/// <summary>
/// effettuo il setup dei valori ammessi x il barcode...
/// </summary>
private void setupValoriBarcode()
{
if (valoriAmmessiBCode.Count > 0)
{
// assegno valori al barcode...
mod_barcode1.tabValori = valoriAmmessiBCode;
if (logLevel > 5)
{
logger.lg.scriviLog("Letti da cache VALORI Barcode", tipoLog.INFO);
}
}
else
{
// Crea stopwatch.
Stopwatch stopwatch = new Stopwatch();
// Avvio...
stopwatch.Start();
// carico dati!
if (logLevel > 5)
{
logger.lg.scriviLog("Inizio setup valori Barcode", tipoLog.INFO);
}
Dictionary<string, string> valori = new Dictionary<string, string>();
#if false
XPS_data.DS_applicazioneTableAdapters.v_commesseTableAdapter taCommesse = new XPS_data.DS_applicazioneTableAdapters.v_commesseTableAdapter();
DS_applicazione.v_commesseDataTable _tabComm = taCommesse.getLastDD(numDD);
// aggiungo i DDT...
foreach (DS_applicazione.v_commesseRow riga in _tabComm)
{
// QUI formattazione campi mostrati a barcode
// 2017.05.23 tolto stato...
valori.Add(riga.Cod.ToString(), string.Format("{0} - {6}<br/><b>{1}</b> DDT {2} del {3:dd MMM yyyy}<br/>{4} colli ({5} kg)", riga.Cod, riga.Cliente, riga.DDT, riga.DataDDT, riga.Colli, riga.Peso, riga.Ciclo));
//valori.Add(riga.Cod.ToString(), string.Format("{0} - {7}<br/><b>{1}</b> DDT {2} del {3:dd MMM yyyy}<br/>{4} colli ({5} kg)<br /><b>{6}</b>", riga.Cod, riga.Cliente, riga.DDT, riga.DataDDT, riga.Colli, riga.Peso, riga.Stato, riga.Ciclo));
}
if (logLevel > 5)
{
logger.lg.scriviLog("Caricato commesse per Barcode", tipoLog.INFO);
}
// ora aggiungo i singoli ULP...
XPS_data.DS_applicazioneTableAdapters.v_ULPTableAdapter taULP = new XPS_data.DS_applicazioneTableAdapters.v_ULPTableAdapter();
DS_applicazione.v_ULPDataTable _tabUlp = taULP.getLastDD(numDD);
// aggiungo colli (ULP)...
foreach (DS_applicazione.v_ULPRow riga in _tabUlp)
{
// QUI formattazione campi mostrati a barcode
// 2017.05.23 tolto stato...
valori.Add(riga.Cod.ToString(), string.Format("{0} - {6}<br/><b>{1}</b> DDT {2} del {3:dd MMM yyyy}<br/>nr {4} items ({5} kg)", riga.Cod, riga.Cliente, riga.DDT, riga.DataDDT, riga.Qta, riga.Peso, riga.CodCli));
//valori.Add(riga.Cod.ToString(), string.Format("{0} - {7}<br/><b>{1}</b> DDT {2} del {3:dd MMM yyyy}<br/>nr {4} items ({5} kg)<br /><b>{6}</b>", riga.Cod, riga.Cliente, riga.DDT, riga.DataDDT, riga.Qta, riga.Peso, riga.Stato, riga.CodCli));
}
if (logLevel > 5)
{
logger.lg.scriviLog("Caricato RIGHE per Barcode", tipoLog.INFO);
}
#endif
// assegno valori al barcode...
mod_barcode1.tabValori = valori;
valoriAmmessiBCode = valori;
lastDataRefresh = DateTime.Now;
logger.lg.scriviLog("Letti da DB VALORI Barcode", tipoLog.INFO);
stopwatch.Start();
lastUpdDuration = stopwatch.Elapsed;
}
}
/// <summary>
/// carico da tab i comandi ammessi per il barcode...
/// </summary>
private void setupComandiBarcode()
{
if (comandiAmmessiBCode.Count > 0)
{
// assegno valori al barcode...
mod_barcode1.comandiAmmessi = comandiAmmessiBCode;
if (logLevel > 5)
{
logger.lg.scriviLog("Letti da cache COMANDI Barcode", tipoLog.INFO);
}
}
else
{
#if false
XPS_data.DS_applicazioneTableAdapters.TraEv2StatiTableAdapter taTrEv2St = new XPS_data.DS_applicazioneTableAdapters.TraEv2StatiTableAdapter();
DS_applicazione.TraEv2StatiDataTable _tabTran = taTrEv2St.getByCodMappa("E_BC");
Dictionary<string, string> comandi = new Dictionary<string, string>();
foreach (DS_applicazione.TraEv2StatiRow riga in _tabTran)
{
comandi.Add(riga.CodEvento, user_std.UtSn.Traduci(riga.text2show));
}
// impongo i comandi al barcode...
mod_barcode1.comandiAmmessi = comandi;
comandiAmmessiBCode = comandi;
logger.lg.scriviLog("Letti da DB COMANDI Barcode", tipoLog.INFO);
#endif
}
}
/// <summary>
/// il barcode ha registrato un evento...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void mod_barcode1_eh_comandoRegistrato(object sender, EventArgs e)
{
#if false
switch (stateMachine.st.azioneComando(mod_barcode1.comandoRegistrato))
{
case tipoAzione.annulla:
mod_barcode1.resetMe();
break;
case tipoAzione.conferma:
// se input completo eseguo...
if (mod_barcode1.comandoRegistrato.currCmdIn != "" && mod_barcode1.comandoRegistrato.valore != "")
{
eseguiComando();
}
else // altrimenti warning... e rimetto valori precedenti
{
mod_barcode1.txtRich2show = user_std.UtSn.Traduci("codObjUnknown");
mod_barcode1.comandoRegistrato.currCmdIn = mod_barcode1.comandoRegistrato.prevCmdIn;
mod_barcode1.comandoRegistrato.descrComando = mod_barcode1.comandoRegistrato.descrComandoPrev;
mod_barcode1.txtInput2show = mod_barcode1.comandoRegistrato.descrComandoPrev;
}
break;
case tipoAzione.esegui:
// se ho auto conferma eseguo!
if (memLayer.ML.confReadBool("autoConfCmd"))
{
mod_barcode1.comandoRegistrato.prevCmdIn = mod_barcode1.comandoRegistrato.currCmdIn;
mod_barcode1.comandoRegistrato.currCmdIn = "ok";
eseguiComando();
}
else
{
if (mod_barcode1.comandoRegistrato.valore != "")
{
mod_barcode1.txtRich2show = user_std.UtSn.Traduci("pleaseConfirm");
}
else
{
mod_barcode1.txtRich2show = user_std.UtSn.Traduci("codObjUnknown");
}
}
break;
case tipoAzione.noAct:
break;
default:
break;
}
#endif
mod_btnComandi1.updateBtn();
}
/// <summary>
/// eseguo il comando
/// </summary>
private void eseguiComando()
{
// in primis: sono in esecuzione, x cui il comando è valido...
string msg2show = "";
string currState = "";
#if false
DS_applicazione.IstObjRow rigaIstObj;
// calcolo lo stato dell'oggetto...
try
{
rigaIstObj = XPS_data.XPS.obj.taObj.getByIdxObj(mod_barcode1.comandoRegistrato.valore)[0];
currState = rigaIstObj.CodStato;
}
catch
{
}
tipoEsito esito = stateMachine.st.doAction("E_Stati", mod_barcode1.comandoRegistrato.valore, currState, mod_barcode1.comandoRegistrato.prevCmdIn);
if (esito == tipoEsito.ok)
{
msg2show = string.Format("{0}: {1}", mod_barcode1.comandoRegistrato.valore, user_std.UtSn.Traduci("chgStateDone"));
}
else if (esito == tipoEsito.error)
{
msg2show = user_std.UtSn.Traduci("cannotStateChange");
}
else
{
msg2show = user_std.UtSn.Traduci("unknownCmd");
}
#endif
// reset e mostro output...
mod_barcode1.resetMe();
if (msg2show != "")
{
mod_barcode1.txtInput2show = msg2show;
}
}
protected void btnReload_Click(object sender, EventArgs e)
{
resetCache();
}
private void resetCache()
{
// resetto tutto!
comandiAmmessiBCode = new Dictionary<string, string>();
valoriAmmessiBCode = new Dictionary<string, string>();
lastDataRefresh = DateTime.Now.AddDays(-1);
}
protected void txtCacheSec_TextChanged(object sender, EventArgs e)
{
resetCache();
}
protected void txtNumDD_TextChanged(object sender, EventArgs e)
{
resetCache();
}
}
}
}
+10
View File
@@ -0,0 +1,10 @@
[
{
"outputFile": "Content/fonts.css",
"inputFile": "Content/fonts.less"
},
{
"outputFile": "Content/Style.css",
"inputFile": "Content/Style.less"
}
]
+49
View File
@@ -0,0 +1,49 @@
{
"compilers": {
"less": {
"autoPrefix": "",
"cssComb": "none",
"ieCompat": true,
"strictMath": false,
"strictUnits": false,
"relativeUrls": true,
"rootPath": "",
"sourceMapRoot": "",
"sourceMapBasePath": "",
"sourceMap": false
},
"sass": {
"includePath": "",
"indentType": "space",
"indentWidth": 2,
"outputStyle": "nested",
"Precision": 5,
"relativeUrls": true,
"sourceMapRoot": "",
"sourceMap": false
},
"stylus": {
"sourceMap": false
},
"babel": {
"sourceMap": false
},
"coffeescript": {
"bare": false,
"runtimeMode": "node",
"sourceMap": false
}
},
"minifiers": {
"css": {
"enabled": true,
"termSemicolons": true,
"gzip": false
},
"javascript": {
"enabled": true,
"termSemicolons": true,
"gzip": false
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 31 KiB