mostra task squadre...

This commit is contained in:
Samuele E. Locatelli
2015-05-12 12:49:23 +02:00
parent c55448f526
commit 5dbadd4d4a
15 changed files with 226 additions and 11 deletions
BIN
View File
Binary file not shown.
+136 -3
View File
@@ -1,8 +1,141 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_consegne.ascx.cs" Inherits="WebSCR.WebUserControls.mod_consegne" %>
Consegne: prevede
<p>
<p>
2) vedere impegni (di oggi)</p>
2) vedere impegni (di oggi)
</p>
<p>
3) possibilità di cliccare &quot;inizio&quot;, &quot;fine&quot;, mostra Allegati, carica foto (allegati) ad ogni TASK</p>
3) possibilità di cliccare &quot;inizio&quot;, &quot;fine&quot;, mostra Allegati, carica foto (allegati) ad ogni TASK
</p>
<div class="ui-mini">
<asp:GridView ID="grView" runat="server" DataSourceID="ods" AutoGenerateColumns="False" DataKeyNames="IdxImpegno" CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%" AllowPaging="True" OnRowCommand="grView_RowCommand" OnSelectedIndexChanged="grView_SelectedIndexChanged">
<EditRowStyle BackColor="#2461BF" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#EFF3FB" HorizontalAlign="Left" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#F5F7FB" />
<SortedAscendingHeaderStyle BackColor="#6D95E1" />
<SortedDescendingCellStyle BackColor="#E9EBEF" />
<SortedDescendingHeaderStyle BackColor="#4870BE" />
<AlternatingRowStyle BackColor="White" />
<EmptyDataTemplate>
Nessun risultato
</EmptyDataTemplate>
<Columns>
<asp:TemplateField HeaderText="Appuntamento" SortExpression="DataOra">
<ItemTemplate>
<div style="clear: both; width: 240px;">
<div class="flLeft">
<asp:Label ID="lblDataOra" runat="server" Text='<%# Eval("DataOra","{0:dd/MM/yy HH:mm}") %>' ForeColor="#ACACAC" Visible='<%# !notNull(Eval("InizioInt")) %>' />
<asp:Label ID="lblInizioInt" runat="server" Text='<%# Eval("InizioInt","<b>{0:dd/MM/yy HH:mm}</b>") %>' ForeColor="#333333" Visible='<%# notNull(Eval("InizioInt")) %>' />
</div>
<div class="flRight" style="color: #ACACAC;">
<asp:Label ID="lblFinePrev" runat="server" Text='<%# Eval("FinePrev","{0:dd/MM/yy HH:mm}") %>' ForeColor="#ACACAC" Visible='<%# !notNull(Eval("FineInt")) %>' />
<asp:Label ID="lblFineInt" runat="server" Text='<%# Eval("FineInt","<b>{0:dd/MM/yy HH:mm}</b>") %>' ForeColor="#333333" Visible='<%# notNull(Eval("FineInt")) %>' />
</div>
<div class="text-center" style="padding: 0px 2px;">
<div style="font-size: 0.8em; color: #ACACAC; font-style: italic;">
<asp:Label ID="lblTipoOra" runat="server" Text='<%# Eval("TipoOrario") %>' />
</div>
</div>
</div>
<div style="clear: both; width: 240px; font-size: 0.8em; color: #ACACAC;">
<div>
<div class="flRight">
<i class="fa fa-truck"></i>
<asp:Label ID="lblMinViaggio" runat="server" Text='<%# Eval("MinViaggio","{0} min") %>' />
&nbsp; + &nbsp;
<asp:Label ID="lblMinTotCons" runat="server" Text='<%# Eval("MinTotCons","{0} min") %>' />
<i class="fa fa-wrench"></i>
</div>
</div>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Squadra" SortExpression="DescrSquadra">
<ItemTemplate>
<div>
<asp:Label ID="lblDescrSquadra" runat="server" Text='<%# Bind("DescrSquadra") %>'></asp:Label>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="op" SortExpression="NumOp" ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>
<i class="fa fa-users fa-2x"></i>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Eval("NumOp") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Cliente" SortExpression="RagSoc">
<ItemTemplate>
<div class="flLeft" style="font-size: 0.75em;">
<asp:Label CssClass="tStrong flRight" ID="CognomeLabel" runat="server" Text='<%# Eval("RagSoc") %>' />
</div>
<%--</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Indirizzo" SortExpression="Localita">
<ItemTemplate>--%>
<div class="flRight" style="font-size: 0.8em;">
<asp:Label CssClass="flRight" ID="IndirLabel" runat="server" Text='<%# Eval("Indir") %>' />
<br />
<asp:Label CssClass="flRight" ID="CapLabel" runat="server" Text='<%# string.Format("{0} - {1} ({2})", Eval("Cap"), Eval("Localita"), Eval("Prov")) %>' />
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="piano" SortExpression="PianoCons" ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>
<i class="fa fa-building-o fa-2x"></i>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblPianoCons" runat="server" Text='<%# Eval("PianoCons") %>' />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="DOC / note" SortExpression="RifOC">
<ItemTemplate>
<asp:Label ID="lblRifOC" runat="server" Text='<%# Eval("RifOC") %>' />
<div class="flRight" style="font-size: 0.8em; color: #ACACAC;">
<asp:Label ID="lblNoteGen" runat="server" Text='<%# Eval("NoteGen") %>' />
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Usato" SortExpression="RitUsato" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Eval("RitUsato") %>' CssClass="ui-state-disabled" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Asc." SortExpression="Ascensore" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:CheckBox ID="CheckBox2" runat="server" Checked='<%# Eval("Ascensore") %>' CssClass="ui-state-disabled" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<div class="ui-nodisc-icon ui-alt-icon" style="white-space: nowrap;">
<asp:LinkButton ID="lbSelect" runat="server" CausesValidation="False" CommandName="Select" CommandArgument="select" Text="list" ToolTip="Mostra Intervento" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-search ui-btn-icon-notext ui-btn-inline" />
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="getBySearch" TypeName="WebSCR_data.DS_ApplicazioneTableAdapters.ImpegniTableAdapter" OldValuesParameterFormatString="original_{0}">
<%--FilterExpression="CodSquadra LIKE '%{0}%' OR DescrSquadra LIKE '%{0}%' OR CodCliente LIKE '%{0}%' OR RagSoc LIKE '%{0}%' OR RifOC LIKE '%{0}%' "
<FilterParameters>
<asp:ControlParameter ControlID="txtSearch" DefaultValue="*" Type="string" />
</FilterParameters>--%>
<SelectParameters>
<asp:Parameter DefaultValue="*" Name="Stato" Type="String" />
<asp:CookieParameter CookieName="DataRif" Name="DataRif" Type="DateTime" />
<asp:CookieParameter CookieName="NumGg" Name="NumGg" Type="Int32" />
<asp:CookieParameter CookieName="CodSquadra" Name="CodSquadra" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
+58 -1
View File
@@ -1,9 +1,11 @@
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;
using WebSCR_data;
namespace WebSCR.WebUserControls
{
@@ -13,5 +15,60 @@ namespace WebSCR.WebUserControls
{
}
/// <summary>
/// verifica se valore passato è NON NULLO
/// </summary>
/// <param name="dataInizio"></param>
/// <returns></returns>
public bool notNull(object dataInizio)
{
bool answ = false;
try
{
answ = dataInizio.ToString() != "";
}
catch
{ }
return answ;
}
protected void grView_RowCommand(object sender, GridViewCommandEventArgs e)
{
// salvo il command argument...
lastCmd = e.CommandArgument.ToString();
}
/// <summary>
/// ultimo comando letto da link button
/// </summary>
public string lastCmd { get; set; }
/// <summary>
/// evento selezione paziente...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
{
// recupero dati paziente...
int IdxImpegno = 0;
DS_Applicazione.ImpegniRow riga;// = DtProxy.man.taImp.GetData()[0];
try
{
IdxImpegno = Convert.ToInt32(grView.SelectedDataKey["IdxImpegno"]);
memLayer.ML.setSessionVal("IdxImpegno", IdxImpegno);
riga = DtProxy.man.taImp.getByKey(IdxImpegno)[0];
memLayer.ML.setSessionVal("Cliente", string.Format("{0}", riga.RagSoc));
memLayer.ML.setSessionVal("CodCliente", riga.CodCliente);
}
catch (Exception exc)
{
logger.lg.scriviLog(string.Format("Errore in rimando clienti --> interventi: {0}{1}", Environment.NewLine, exc));
riga = DtProxy.man.taImp.GetData()[0];
}
//if (lastCmd == "select")
//{
// mando su PIANIFICAZIONE intervento cliente!
Response.Redirect(string.Format("{0}?CodCliente={1}&Indir={2}&Data={3:yyyy-MM-dd}&IdxImpegno={4}", "Pianificazione", riga.CodCliente, riga.Indir, riga.DataOra, IdxImpegno));
//}
}
}
}
+23 -7
View File
@@ -3,15 +3,31 @@
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebSCR.WebUserControls
{
public partial class mod_consegne
{
namespace WebSCR.WebUserControls {
public partial class mod_consegne {
/// <summary>
/// grView control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.GridView grView;
/// <summary>
/// ods control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
}
}
@@ -252,6 +252,10 @@ namespace WebSCR.WebUserControls
protected void lbtResetSquadra_Click(object sender, EventArgs e)
{
memLayer.ML.emptyCookieVal("colorSquadraCurr");
memLayer.ML.emptyCookieVal("SquadraCurr");
memLayer.ML.emptyCookieVal("CodSquadra");
memLayer.ML.emptyCookieVal("DataRif");
memLayer.ML.emptyCookieVal("NumGg");
Response.Redirect(devicesAuthProxy.pagCorrente);
}
}
@@ -44,6 +44,11 @@ namespace WebSCR.WebUserControls
{
DS_Applicazione.AnagSquadreRow riga = DtProxy.man.taAS.getByKey(codSquadra)[0];
memLayer.ML.setCookieVal(cookieName, riga.CssColor, DateTime.Now.AddMinutes(memLayer.ML.confReadInt("minCookieSquadra")));
memLayer.ML.setCookieVal("CodSquadra", riga.CodSquadra, DateTime.Now.AddMinutes(memLayer.ML.confReadInt("minCookieSquadra")));
memLayer.ML.setCookieVal("SquadraCurr", riga.DescrSquadra, DateTime.Now.AddMinutes(memLayer.ML.confReadInt("minCookieSquadra")));
memLayer.ML.setCookieVal("DataRif", DateTime.Now.ToString("yyyy-MM-dd"), DateTime.Now.AddMinutes(memLayer.ML.confReadInt("minCookieSquadra")));
memLayer.ML.setCookieVal("NumGg", "2", DateTime.Now.AddMinutes(memLayer.ML.confReadInt("minCookieSquadra")));
// ricarico!
Response.Redirect(devicesAuthProxy.pagCorrente);
}
}
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.