Ok registrazione inizio con LAT/LON ed update!!!
This commit is contained in:
+2
-2
@@ -5,7 +5,7 @@
|
||||
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("0.7.023.41")]
|
||||
[assembly: AssemblyFileVersion("0.7.023.41")]
|
||||
[assembly: AssemblyVersion("0.7.025.42")]
|
||||
[assembly: AssemblyFileVersion("0.7.025.42")]
|
||||
[assembly: AssemblyCopyright("Steamware © 2015-2015")]
|
||||
[assembly: AssemblyCompany("Steamware")]
|
||||
|
||||
+2
-2
@@ -6,8 +6,8 @@
|
||||
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("0.7.023.<#= this.RevisionNumber #>")]
|
||||
[assembly: AssemblyFileVersion("0.7.023.<#= this.RevisionNumber #>")]
|
||||
[assembly: AssemblyVersion("0.7.025.<#= this.RevisionNumber #>")]
|
||||
[assembly: AssemblyFileVersion("0.7.025.<#= this.RevisionNumber #>")]
|
||||
[assembly: AssemblyCopyright("Steamware © 2015-<#= DateTime.Now.Year #>")]
|
||||
[assembly: AssemblyCompany("Steamware")]
|
||||
<#+
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -13,6 +13,17 @@ namespace WebSCR
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
fixVisibility();
|
||||
mod_gestIntSquadra.eh_update += mod_gestIntSquadra_eh_update;
|
||||
}
|
||||
/// <summary>
|
||||
/// update gest squadra sul campo
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void mod_gestIntSquadra_eh_update(object sender, EventArgs e)
|
||||
{
|
||||
mod_dettInt.doUpdate();
|
||||
mod_ImpegnoSmall.doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// recupera valore querystring
|
||||
|
||||
@@ -29,5 +29,12 @@ namespace WebSCR.WebUserControls
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua update
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
frmViewImpegni.DataBind();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,106 +1,22 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_gestIntSquadra.ascx.cs" Inherits="WebSCR.WebUserControls.mod_gestIntSquadra" %>
|
||||
<script>
|
||||
function salvaCoord() {
|
||||
if (navigator.geolocation) {
|
||||
navigator.geolocation.getCurrentPosition(showPosition, positionError);
|
||||
function showPosition(position) {
|
||||
var currCoord = position.coords;
|
||||
//document.getElementById("<%=lblLat.ClientID %>").value = currCoord.latitude;
|
||||
//document.getElementById("<%=lblLon.ClientID %>").value = currCoord.longitude;
|
||||
//$("#ctl00_ContentPlaceHolder1_<%: this.ID %>_lblLat").innerHTML = currCoord.latitude;
|
||||
//$("#ctl00_ContentPlaceHolder1_<%: this.ID %>_lblLon").val(currCoord.longitude);
|
||||
$("#<%=lblLat.ClientID %>").val(currCoord.latitude);
|
||||
$("#<%=lblLon.ClientID %>").val(currCoord.longitude);
|
||||
}
|
||||
|
||||
function positionError(position) {
|
||||
alert("Errore: " + position.code);
|
||||
<asp:HiddenField runat="server" ClientIDMode="Static" id="hLat" />
|
||||
<asp:HiddenField runat="server" ClientIDMode="Static" id="hLon" />
|
||||
<script>
|
||||
$(document).ready(function (e) {
|
||||
navigator.geolocation.getCurrentPosition(function (pos) {
|
||||
var lat = pos.coords.latitude;
|
||||
var lng = pos.coords.longitude;
|
||||
if (lat == null) {
|
||||
alert("GPS not activated");
|
||||
}
|
||||
} else {
|
||||
alert("Errore: Geolocation is not supported by this browser.");
|
||||
}
|
||||
}
|
||||
// aggancio evento doc pronto con jQuery...
|
||||
$(function () {
|
||||
salvaCoord();
|
||||
});
|
||||
var prm = Sys.WebForms.PageRequestManager.getInstance();
|
||||
prm.add_endRequest(function () {
|
||||
$(function () {
|
||||
// chiamate jquery da rieseguire post ajax update x partial page render
|
||||
$(function () {
|
||||
salvaCoord();
|
||||
});
|
||||
$('#hLat').val(lat);
|
||||
$('#hLon').val(lng);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
var x = document.getElementById("demo");
|
||||
function getLocation() {
|
||||
if (navigator.geolocation) {
|
||||
navigator.geolocation.getCurrentPosition(showPosition);
|
||||
} else {
|
||||
x.innerHTML = "Geolocation is not supported by this browser.";
|
||||
}
|
||||
}
|
||||
function showPosition(position) {
|
||||
x.innerHTML = "Latitude: " + position.coords.latitude +
|
||||
"<br>Longitude: " + position.coords.longitude;
|
||||
}
|
||||
</script>
|
||||
<p>Click the button to get your coordinates.</p>
|
||||
|
||||
<button onclick="getLocation()">Try It</button>
|
||||
<p id="demo">aaaaaa</p>
|
||||
|
||||
<%--<script>
|
||||
function set<%=txtSel.ClientID %>()
|
||||
{
|
||||
$("#<%=txtSel.ClientID %>").autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
url: "<%=txtServiceUrl.Text %>",
|
||||
data: "{'prefixText':'" + request.term + "'}",
|
||||
dataType: "json",
|
||||
async: true,
|
||||
success: function (data) {
|
||||
//response(data.d);
|
||||
response($.map(data.d, function (item) {
|
||||
return {
|
||||
label: item.split('#')[0],
|
||||
val: item.split('#')[1]
|
||||
}
|
||||
}))
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Impossibile caricare i dati!");
|
||||
}
|
||||
});
|
||||
},
|
||||
select: function (e, i) {
|
||||
$("#<%=hiddenFieldID.ClientID %>").val(i.item.val);
|
||||
$("#<%=txtSel.ClientID %>").val(i.item.label);
|
||||
$("#<%=btnPost.ClientID %>").click();
|
||||
},
|
||||
minLength: <%=txtMinCharAutoCom.Text %>
|
||||
});
|
||||
}
|
||||
// aggancio evento doc pronto con jQuery...
|
||||
$(function () {
|
||||
set<%=txtSel.ClientID %>();
|
||||
});
|
||||
var prm = Sys.WebForms.PageRequestManager.getInstance();
|
||||
prm.add_endRequest(function () {
|
||||
$(function () {
|
||||
// chiamate jquery da rieseguire post ajax update x partial page render
|
||||
$(function () {
|
||||
set<%=txtSel.ClientID %>();
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>--%>
|
||||
<%--<asp:Button runat="server" ID="btnLoad" OnClick="btnLoad_Click" />
|
||||
<asp:Label runat="server" ID="lblCoord" Text="..." />--%>
|
||||
|
||||
<div class="ui-mini">
|
||||
<div style="text-align: center; margin: auto;">
|
||||
|
||||
@@ -11,6 +11,23 @@ namespace WebSCR.WebUserControls
|
||||
{
|
||||
public partial class mod_gestIntSquadra : System.Web.UI.UserControl
|
||||
{
|
||||
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();
|
||||
@@ -29,6 +46,34 @@ namespace WebSCR.WebUserControls
|
||||
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>
|
||||
@@ -63,24 +108,36 @@ namespace WebSCR.WebUserControls
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//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, 0, 0);
|
||||
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)
|
||||
{
|
||||
|
||||
fixVisibility();
|
||||
reportEvent();
|
||||
}
|
||||
|
||||
protected void lbFileInt_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
fixVisibility();
|
||||
reportEvent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,24 @@ namespace WebSCR.WebUserControls {
|
||||
|
||||
public partial class mod_gestIntSquadra {
|
||||
|
||||
/// <summary>
|
||||
/// hLat 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 hLat;
|
||||
|
||||
/// <summary>
|
||||
/// hLon 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 hLon;
|
||||
|
||||
/// <summary>
|
||||
/// lbInizioInt control.
|
||||
/// </summary>
|
||||
|
||||
@@ -24,18 +24,5 @@
|
||||
<%: DataSel %> | <%: ClienteSel %> | <%: SquadraSel %>
|
||||
</div>
|
||||
</div>
|
||||
<asp:Label runat="server" ClientIDMode="Static" id="demo" style="font-size:0.6em;" OnUnload="demo_Unload">test</asp:Label>
|
||||
<script>
|
||||
$(document).ready(function (e) {
|
||||
navigator.geolocation.getCurrentPosition(function (pos) {
|
||||
var lat = pos.coords.latitude;
|
||||
var lng = pos.coords.longitude;
|
||||
if (lat == null) {
|
||||
alert("GPS not activated");
|
||||
}
|
||||
var x = document.getElementById("demo");
|
||||
x.innerHTML = "Coordinate: lat=" + lat + " lon=" + lng;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<asp:Label runat="server" ID="lblCoord" Text="..." />
|
||||
|
||||
|
||||
|
||||
@@ -122,8 +122,6 @@ namespace WebSCR.WebUserControls
|
||||
Response.Redirect("UserAdmin");
|
||||
}
|
||||
}
|
||||
// !!!FARE!!! non lo intercetta
|
||||
lblCoord.Text = demo.Text;
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica che la pagina sia tra quelle autorizzate x l'utente
|
||||
@@ -238,11 +236,7 @@ namespace WebSCR.WebUserControls
|
||||
memLayer.ML.setCookieVal(memLayer.ML.confReadString("AuthCookieName"), "");
|
||||
memLayer.ML.emptyCookieVal(memLayer.ML.confReadString("AuthCookieName"));
|
||||
}
|
||||
|
||||
protected void demo_Unload(object sender, EventArgs e)
|
||||
{
|
||||
lblCoord.Text = demo.Text;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
-18
@@ -29,23 +29,5 @@ namespace WebSCR.WebUserControls {
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblVers;
|
||||
|
||||
/// <summary>
|
||||
/// demo control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label demo;
|
||||
|
||||
/// <summary>
|
||||
/// lblCoord control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblCoord;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user