inserite prime modifiche x gestione nuova tab LOG

This commit is contained in:
Samuele E. Locatelli
2018-04-11 12:53:46 +02:00
parent 86a855ea20
commit 9f457f45a1
19 changed files with 2105 additions and 2051 deletions
+157 -157
View File
@@ -9,163 +9,163 @@ using WebSCR_data;
namespace WebSCR.WebUserControls
{
public partial class mod_gestIntSquadre : System.Web.UI.UserControl
public partial class mod_gestIntSquadre : System.Web.UI.UserControl
{
public event EventHandler eh_update;
/// <summary>
/// solleva evento selezione data
/// </summary>
protected void reportEvent()
{
public event EventHandler eh_update;
/// <summary>
/// solleva evento selezione data
/// </summary>
protected void reportEvent()
{
// evento!
if (eh_update != null)
{
eh_update(this, new EventArgs());
}
}
/// <summary>
/// load pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
fixVisibility();
}
protected int IdxImpegno
{
get
{
int answ = 0;
try
{
answ = memLayer.ML.QSI("IdxImpegno");
}
catch
{ }
return answ;
}
}
protected double latitude
{
get
{
double answ = 0;
try
{
answ = Convert.ToDouble(hLat.Value.Replace(".", ","));
}
catch
{ }
return answ;
}
}
protected double longitude
{
get
{
double answ = 0;
try
{
answ = Convert.ToDouble(hLon.Value.Replace(".", ","));
}
catch
{ }
return answ;
}
}
/// <summary>
/// sistemo visibilità buttons
/// </summary>
private void fixVisibility()
{
// verifico se impegno è iniziato o meno e di conseguenza mostro inizio/fine
if (IdxImpegno > 0)
{
DS_Applicazione.ImpegniRow riga = DtProxy.man.taImp.getByKey(IdxImpegno)[0];
bool iniziato = false;
bool finito = false;
try
{
if (riga.InizioInt != null)
{
iniziato = true;
}
}
catch
{ }
try
{
if (riga.FineInt != null)
{
finito = true;
}
}
catch
{ }
lbInizioInt.Visible = !iniziato;
lbFineInt.Visible = iniziato && !finito;
if (divNote.Visible)
{
lbNoteInt.Text = "Chiudi Note Intervento";
}
else
{
lbNoteInt.Text = "Note Intervento";
}
}
}
//protected void btnLoad_Click(object sender, EventArgs e)
//{
// lblCoord.Text = string.Format("Lat: {0}, Lon: {1}", hLat.Value, hLon.Value);
//}
protected void lbInizioInt_Click(object sender, EventArgs e)
{
DtProxy.man.taImp.recStartInt(IdxImpegno, DateTime.Now, latitude, longitude);
fixVisibility();
reportEvent();
}
protected void lbFineInt_Click(object sender, EventArgs e)
{
DtProxy.man.taImp.recFineInt(IdxImpegno, DateTime.Now, latitude, longitude);
fixVisibility();
reportEvent();
}
protected void lbNoteInt_Click(object sender, EventArgs e)
{
divNote.Visible = !divNote.Visible;
fixVisibility();
string note = "";
bool aperto = false;
try
{
DS_Applicazione.ImpegniRow riga = DtProxy.man.taImp.getByKey(IdxImpegno)[0];
note = riga.NoteInt;
aperto = riga.IntAperto;
}
catch
{ }
txtNote.Text = note;
chkIntAperto.Checked = aperto;
reportEvent();
}
/// <summary>
/// Aggiungo nota...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbAddNote_Click(object sender, EventArgs e)
{
DtProxy.man.taImp.updNoteInt(IdxImpegno, txtNote.Text.Trim(), chkIntAperto.Checked);
divNote.Visible = false;
fixVisibility();
reportEvent();
}
// evento!
if (eh_update != null)
{
eh_update(this, new EventArgs());
}
}
/// <summary>
/// load pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
fixVisibility();
}
protected int IdxImpegno
{
get
{
int answ = 0;
try
{
answ = memLayer.ML.QSI("IdxImpegno");
}
catch
{ }
return answ;
}
}
protected double latitude
{
get
{
double answ = 0;
try
{
answ = Convert.ToDouble(hLat.Value.Replace(".", ","));
}
catch
{ }
return answ;
}
}
protected double longitude
{
get
{
double answ = 0;
try
{
answ = Convert.ToDouble(hLon.Value.Replace(".", ","));
}
catch
{ }
return answ;
}
}
/// <summary>
/// sistemo visibilità buttons
/// </summary>
private void fixVisibility()
{
// verifico se impegno è iniziato o meno e di conseguenza mostro inizio/fine
if (IdxImpegno > 0)
{
DS_Applicazione.ImpegniRow riga = DtProxy.man.taImp.getByKey(IdxImpegno)[0];
bool iniziato = false;
bool finito = false;
try
{
if (riga.InizioInt != null)
{
iniziato = true;
}
}
catch
{ }
try
{
if (riga.FineInt != null)
{
finito = true;
}
}
catch
{ }
lbInizioInt.Visible = !iniziato;
lbFineInt.Visible = iniziato && !finito;
if (divNote.Visible)
{
lbNoteInt.Text = "Chiudi Note Intervento";
}
else
{
lbNoteInt.Text = "Note Intervento";
}
}
}
//protected void btnLoad_Click(object sender, EventArgs e)
//{
// lblCoord.Text = string.Format("Lat: {0}, Lon: {1}", hLat.Value, hLon.Value);
//}
protected void lbInizioInt_Click(object sender, EventArgs e)
{
DtProxy.man.taImp.recStartInt(IdxImpegno, DateTime.Now, latitude, longitude);
fixVisibility();
reportEvent();
}
protected void lbFineInt_Click(object sender, EventArgs e)
{
DtProxy.man.taImp.recFineInt(IdxImpegno, DateTime.Now, latitude, longitude);
fixVisibility();
reportEvent();
}
protected void lbNoteInt_Click(object sender, EventArgs e)
{
divNote.Visible = !divNote.Visible;
fixVisibility();
string note = "";
bool aperto = false;
try
{
DS_Applicazione.ImpegniRow riga = DtProxy.man.taImp.getByKey(IdxImpegno)[0];
note = riga.NoteInt;
aperto = riga.IntAperto;
}
catch
{ }
txtNote.Text = note;
chkIntAperto.Checked = aperto;
reportEvent();
}
/// <summary>
/// Aggiungo nota...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbAddNote_Click(object sender, EventArgs e)
{
DtProxy.man.taImp.updNoteInt(IdxImpegno, txtNote.Text.Trim(), chkIntAperto.Checked, user_std.UtSn.userNameAD, DateTime.Now);
divNote.Visible = false;
fixVisibility();
reportEvent();
}
}
}
+1 -1
View File
@@ -104,7 +104,7 @@ namespace WebSCR.WebUserControls
if (matrOp != "")
{
// sposto evento!
DtProxy.man.taImp.updStart(Convert.ToInt32(e.Id), e.NewStart, matrOp, DateTime.Now);
DtProxy.man.taImp.updStart(Convert.ToInt32(e.Id), e.NewStart, user_std.UtSn.userNameAD, matrOp, DateTime.Now);
if (memLayer.ML.confReadBool("svuotaMatrOpMove"))
{
// rimuovo matrOp
+5 -1
View File
@@ -287,12 +287,14 @@
</div>
</ItemTemplate>
</asp:FormView>
<asp:ObjectDataSource ID="odsImpegni" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="getByKey" TypeName="WebSCR_data.DS_ApplicazioneTableAdapters.ImpegniTableAdapter" UpdateMethod="updateQuery" OnUpdating="odsImpegni_Updating" DeleteMethod="deleteQuery" OnDeleted="odsImpegni_Deleted" OnUpdated="odsImpegni_Updated">
<asp:ObjectDataSource ID="odsImpegni" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="getByKey" TypeName="WebSCR_data.DS_ApplicazioneTableAdapters.ImpegniTableAdapter" UpdateMethod="updateQuery" OnUpdating="odsImpegni_Updating" DeleteMethod="deleteQuery" OnDeleted="odsImpegni_Deleted" OnUpdated="odsImpegni_Updated" OnDeleting="odsImpegni_Deleting">
<SelectParameters>
<asp:QueryStringParameter DefaultValue="0" Name="IdxImpegno" QueryStringField="IdxImpegno" Type="Int32" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="Original_IdxImpegno" Type="Int32" />
<asp:Parameter Name="UserMod" Type="String" />
<asp:Parameter Name="MatrOp" Type="String" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="Original_IdxImpegno" Type="Int32" />
@@ -307,6 +309,8 @@
<asp:Parameter Name="PianoCons" Type="Int32" />
<asp:Parameter Name="UserMod" Type="String" />
<asp:Parameter Name="IntAperto" Type="Boolean" />
<asp:Parameter Name="MatrOp" Type="String" />
<asp:Parameter Name="DataOra" Type="DateTime" />
<asp:Parameter Name="DataOraComFrom" Type="DateTime" />
<asp:Parameter Name="DataOraComTo" Type="DateTime" />
</UpdateParameters>
+10 -8
View File
@@ -139,18 +139,13 @@ namespace WebSCR.WebUserControls
{
e.InputParameters["UrlDoc"] = "";
}
if (e.InputParameters["UserMod"] == null)
{
e.InputParameters["UserMod"] = SteamWare.user_std.UtSn.userNameAD;
}
if (e.InputParameters["NoteGen"] == null)
{
e.InputParameters["NoteGen"] = "";
}
if (e.InputParameters["MatrOp"] == null)
{
e.InputParameters["MatrOp"] = matrOp;
}
//forzo sempre userMod e matrOp corrente
e.InputParameters["UserMod"] = user_std.UtSn.userNameAD;
e.InputParameters["MatrOp"] = matrOp;
}
protected void odsImpegni_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
@@ -214,5 +209,12 @@ namespace WebSCR.WebUserControls
{
raiseEventUpd();
}
protected void odsImpegni_Deleting(object sender, ObjectDataSourceMethodEventArgs e)
{
//forzo sempre userMod e matrOp corrente
e.InputParameters["UserMod"] = user_std.UtSn.userNameAD;
e.InputParameters["MatrOp"] = matrOp;
}
}
}
+65 -65
View File
@@ -11,79 +11,79 @@
<%@ Register Src="~/WebUserControls/mod_fileUpload.ascx" TagPrefix="uc1" TagName="mod_fileUpload" %>
<%@ Register Src="~/WebUserControls/mod_compSquadra.ascx" TagPrefix="uc1" TagName="mod_compSquadra" %>
<script type="text/javascript">
function bindEvents() {
$("#<%=upnTestata.ClientID%>").trigger("create");
}
function bindEvents() {
$("#<%=upnTestata.ClientID%>").trigger("create");
}
bindEvents();
//Re-bind for callbacks
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(function () {
bindEvents();
//Re-bind for callbacks
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(function () {
bindEvents();
});
});
</script>
<asp:UpdatePanel runat="server" ID="upnTestata" UpdateMode="Always">
<ContentTemplate>
<div class="ui-grid-b ui-mini noShadows">
<div class="ui-block-a ui-corner-all" style="text-align: center; margin: auto; font-size: 0.9em; border: 1px solid #CDCDCD; min-height: 80px; background-color: #EAEAFF;">
<div class="tStrong">Ricerca per Documento</div>
<uc1:mod_filtroZona runat="server" ID="mod_filtroZona" />
</div>
<div class="ui-block-b ui-corner-all" style="text-align: center; margin: auto; font-size: 0.9em; border: 1px solid #CDCDCD; min-height: 80px; background-color: #EAEAFF;">
<div class="tStrong">Matr. Operatore</div>
<div style="width: 80%; margin: auto;">
<asp:TextBox runat="server" ID="txtMatrOp" AutoPostBack="true" OnTextChanged="txtMatrOp_TextChanged" />
<asp:Label runat="server" ID="lblWarning" ForeColor="Red"></asp:Label>
</div>
</div>
<div class="ui-block-c ui-corner-all" style="text-align: center; margin: auto; font-size: 0.9em; border: 1px solid #CDCDCD; min-height: 80px; background-color: #EAEAFF;">
<div class="tStrong">Ricerca per Periodo</div>
<uc1:mod_filtroPeriodo runat="server" ID="mod_filtroPeriodo" />
</div>
<ContentTemplate>
<div class="ui-grid-b ui-mini noShadows">
<div class="ui-block-a ui-corner-all" style="text-align: center; margin: auto; font-size: 0.9em; border: 1px solid #CDCDCD; min-height: 80px; background-color: #EAEAFF;">
<div class="tStrong">Ricerca per Documento</div>
<uc1:mod_filtroZona runat="server" ID="mod_filtroZona" />
</div>
<div class="ui-block-b ui-corner-all" style="text-align: center; margin: auto; font-size: 0.9em; border: 1px solid #CDCDCD; min-height: 80px; background-color: #EAEAFF;">
<div class="tStrong">Matr. Operatore</div>
<div style="width: 80%; margin: auto;">
<asp:TextBox runat="server" ID="txtMatrOp" AutoPostBack="true" OnTextChanged="txtMatrOp_TextChanged" />
<asp:Label runat="server" ID="lblWarning" ForeColor="Red"></asp:Label>
</div>
<div class="ui-mini" style="width: 100%; margin: -2px -4px; text-align: center;">
<div style="width: 90%; float: left; text-align: center; margin: auto;">
<uc1:mod_selSquadre runat="server" ID="mod_selSquadre" />
</div>
<div style="width: 10%; float: right; text-align: center; margin: auto; min-width: 80px;">
<asp:LinkButton runat="server" ID="lbLess" OnClick="lbLess_Click"><i class="fa fa-minus-square fa-2x"></i></asp:LinkButton>
&nbsp;
</div>
<div class="ui-block-c ui-corner-all" style="text-align: center; margin: auto; font-size: 0.9em; border: 1px solid #CDCDCD; min-height: 80px; background-color: #EAEAFF;">
<div class="tStrong">Ricerca per Periodo</div>
<uc1:mod_filtroPeriodo runat="server" ID="mod_filtroPeriodo" />
</div>
</div>
<div class="ui-mini" style="width: 100%; margin: -2px -4px; text-align: center;">
<div style="width: 90%; float: left; text-align: center; margin: auto;">
<uc1:mod_selSquadre runat="server" ID="mod_selSquadre" />
</div>
<div style="width: 10%; float: right; text-align: center; margin: auto; min-width: 80px;">
<asp:LinkButton runat="server" ID="lbLess" OnClick="lbLess_Click"><i class="fa fa-minus-square fa-2x"></i></asp:LinkButton>
&nbsp;
<asp:LinkButton runat="server" ID="lbMore" OnClick="lbMore_Click"><i class="fa fa-plus-square fa-2x"></i></asp:LinkButton>
</div>
</div>
<div class="ui-mini noShadows" style="width: 100%;">
<div style="min-width: 85px; width: 12%; float: left;">
<uc1:mod_dispPeriodo runat="server" ID="mod_dispPeriodo" />
</div>
<div style="width: 88%; float: right;">
<uc1:mod_giornata runat="server" ID="mod_giornata" />
<div style="width: 100%;">
<div style="width: 75%; float: left;">
<div data-role="listview" data-inset="true">
<div class="ui-field-contain">
<uc1:mod_impegno runat="server" ID="mod_impegno" />
</div>
<div class="ui-body">
<uc1:mod_dettInt runat="server" ID="mod_dettInt" />
</div>
</div>
</div>
<div style="width: 25%; float: right;">
<div data-role="listview" data-inset="true">
<div class="ui-body">
<uc1:mod_compSquadra runat="server" ID="mod_compSquadra" />
</div>
<div class="ui-body">
<uc1:mod_fileImpegno runat="server" ID="mod_fileImpegno" />
<uc1:mod_fileUpload runat="server" ID="mod_fileUpload" enableMod="false" showOpenNewTab="true" />
</div>
</div>
</div>
</div>
<div class="ui-mini noShadows" style="width: 100%;">
<div style="min-width: 85px; width: 12%; float: left;">
<uc1:mod_dispPeriodo runat="server" ID="mod_dispPeriodo" />
</div>
<div style="width: 88%; float: right;">
<uc1:mod_giornata runat="server" ID="mod_giornata" />
<div style="width: 100%;">
<div style="width: 75%; float: left;">
<div data-role="listview" data-inset="true">
<div class="ui-field-contain">
<uc1:mod_impegno runat="server" ID="mod_impegno" />
</div>
<div class="ui-body">
<uc1:mod_dettInt runat="server" ID="mod_dettInt" />
</div>
</div>
</div>
<div style="width: 25%; float: right;">
<div data-role="listview" data-inset="true">
<div class="ui-body">
<uc1:mod_compSquadra runat="server" ID="mod_compSquadra" />
</div>
<div class="ui-body">
<uc1:mod_fileImpegno runat="server" ID="mod_fileImpegno" />
<uc1:mod_fileUpload runat="server" ID="mod_fileUpload" enableMod="false" showOpenNewTab="true" />
</div>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -3,6 +3,6 @@
<configSections>
</configSections>
<connectionStrings>
<add name="WebSCR_data.Properties.Settings.WebSCRConnectionString" connectionString="Data Source=SQL-STEAM\SQL2012;Initial Catalog=WebSCR;Persist Security Info=True;User ID=sa;Password=keyhammer" providerName="System.Data.SqlClient"/>
<add name="WebSCR_data.Properties.Settings.WebSCRConnectionString" connectionString="Data Source=SQL2012DEV;Initial Catalog=WebSCR;Persist Security Info=True;User ID=sa;Password=keyhammer16;" providerName="System.Data.SqlClient"/>
</connectionStrings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>