completata gestione filtraggio da stato schede...
This commit is contained in:
@@ -5,8 +5,11 @@
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-Wrap="false">
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="lbtReset" runat="server" OnClick="btnReset_Click" CssClass="fa fa-refresh fa-2x" Visible="true"></asp:LinkButton>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbEdit" runat="server" CausesValidation="False" CommandName="Select" ToolTip="Select" CssClass="fa fa-search fa-2x" />
|
||||
<asp:LinkButton ID="lbSelect" runat="server" CausesValidation="False" CommandName="Select" ToolTip='<%# traduci("select") %>' CssClass="fa fa-search fa-2x" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Stato" SortExpression="Stato">
|
||||
@@ -18,26 +21,12 @@
|
||||
<div class="col-xs-1">
|
||||
<asp:Label ID="lblCodScheda" runat="server" Text='<%# string.Format("{0}.{1}.{2}", Eval("CodScheda"), Eval("Vers"), Eval("NumScheda")) %>' />
|
||||
</div>
|
||||
<div class="col-xs-9">
|
||||
<div class="col-xs-9 limitText">
|
||||
<asp:Label ID="lblDescrizione" runat="server" Text='<%# Eval("Descrizione") %>' />
|
||||
</div>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField DataField="DescrStato" HeaderText="DescrStato" ReadOnly="True" SortExpression="DescrStato" />
|
||||
<asp:BoundField DataField="CodScheda" HeaderText="CodScheda" ReadOnly="True" SortExpression="CodScheda" />
|
||||
<asp:BoundField DataField="Vers" HeaderText="Vers" ReadOnly="True" SortExpression="Vers" />
|
||||
<asp:BoundField DataField="NumScheda" HeaderText="#" SortExpression="NumScheda" ControlStyle-Width="2em" ReadOnly="True">
|
||||
<ControlStyle Width="2em"></ControlStyle>
|
||||
</asp:BoundField>
|
||||
<asp:BoundField DataField="Descrizione" HeaderText="Descrizione" SortExpression="Descrizione" ControlStyle-Width="50em">
|
||||
<ControlStyle Width="50em"></ControlStyle>
|
||||
</asp:BoundField>--%>
|
||||
<%--<asp:BoundField DataField="Fase" HeaderText="Fase" SortExpression="Fase" />
|
||||
<asp:BoundField DataField="TotMisure" HeaderText="TotMisure" SortExpression="TotMisure" />
|
||||
<asp:BoundField DataField="MisEffettuate" HeaderText="MisEffettuate" SortExpression="MisEffettuate" />
|
||||
<asp:BoundField DataField="MisOk" HeaderText="MisOk" SortExpression="MisOk" />
|
||||
<asp:BoundField DataField="MisOkDerog" HeaderText="MisOkDerog" SortExpression="MisOkDerog" />--%>
|
||||
</Columns>
|
||||
<PagerStyle CssClass="active GridPager" />
|
||||
<PagerSettings Mode="NumericFirstLast" />
|
||||
|
||||
@@ -60,6 +60,26 @@ namespace CMS_SC.WebUserControls
|
||||
grView.DataBind();
|
||||
}
|
||||
}
|
||||
|
||||
public string CodSchedaVersNum
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
answ = string.Format("{0}.{1}.{2}", grView.SelectedDataKey["CodScheda"], grView.SelectedDataKey["Vers"], grView.SelectedDataKey["NumScheda"]);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
grView.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void doUpdate()
|
||||
{
|
||||
grView.DataBind();
|
||||
@@ -71,9 +91,10 @@ namespace CMS_SC.WebUserControls
|
||||
/// <param name="e"></param>
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// verifico se ho un argomento di tipo moveUp / moveDown... quale comando?
|
||||
#if false
|
||||
string CodSchedaVersNum = "";
|
||||
CodSchedaVersNum = string.Format("{0}.{1}.{2}", grView.SelectedDataKey["CodScheda"], grView.SelectedDataKey["Vers"], grView.SelectedDataKey["NumScheda"]);
|
||||
CodSchedaVersNum = string.Format("{0}.{1}.{2}", grView.SelectedDataKey["CodScheda"], grView.SelectedDataKey["Vers"], grView.SelectedDataKey["NumScheda"]);
|
||||
#endif
|
||||
if (CodSchedaVersNum != "")
|
||||
{
|
||||
// salvo parametro
|
||||
@@ -104,5 +125,6 @@ namespace CMS_SC.WebUserControls
|
||||
grView.DataBind();
|
||||
raiseEvent(ucEvType.Reset);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,14 @@
|
||||
<asp:LinkButton ID="lbEdit" runat="server" CausesValidation="False" CommandName="Edit" ToolTip="Edit" CssClass="fa fa-edit" Font-Size="1.5em" Visible='<%# Convert.ToBoolean(hfEditEnabled.Value) %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="CodSchedaVersNum" HeaderText="Scheda" ReadOnly="True" SortExpression="CodSchedaVersNum" />
|
||||
<asp:TemplateField HeaderText="Scheda" SortExpression="CodSchedaVersNum">
|
||||
<EditItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Eval("CodSchedaVersNum") %>'></asp:Label>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Eval("CodSchedaVersNum") %>'></asp:Label> <asp:HyperLink runat="server" ID="hlDoc" Target="_blank" Visible='<%# hasDoc(Eval("CodSchedaVersNum")) %>' NavigateUrl='<%# urlDoc(Eval("CodSchedaVersNum")) %>' ToolTip='<%# urlDoc(Eval("CodSchedaVersNum")) %>'><i class="fa fa-file-pdf-o fa-2x"></i></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="CodMisura" HeaderText="CodMis" ReadOnly="True" SortExpression="CodMisura" />
|
||||
<asp:BoundField DataField="NomeMisura" HeaderText="Misura" SortExpression="NomeMisura" ReadOnly="true" />
|
||||
<asp:TemplateField HeaderText="Val. Misura" SortExpression="ValoreMis">
|
||||
|
||||
@@ -255,40 +255,7 @@ namespace CMS_SC.WebUserControls
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
#if false
|
||||
/// <summary>
|
||||
/// save + edit del record precedente (se possibile)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnUp_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (grView.EditIndex > 0)
|
||||
{
|
||||
// salvo
|
||||
grView.UpdateRow(grView.EditIndex, false);
|
||||
// seleziono nuovo record x edit
|
||||
grView.EditIndex = grView.EditIndex - 1;
|
||||
//grView.FindControl("txtValoreMis").Focus();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// save + edit del record successivo (se possibile)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDown_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (grView.EditIndex < pageSize - 1)
|
||||
{
|
||||
// salvo
|
||||
grView.UpdateRow(grView.EditIndex, false);
|
||||
// seleziono nuovo record x edit
|
||||
grView.EditIndex = grView.EditIndex + 1;
|
||||
//grView.FindControl("txtValoreMis").Focus();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// save del record
|
||||
/// </summary>
|
||||
@@ -311,15 +278,66 @@ namespace CMS_SC.WebUserControls
|
||||
grView.DataBind();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if false
|
||||
protected void lbFileMan_DataBinding(object sender, EventArgs e)
|
||||
/// <summary>
|
||||
/// recupera codice scheda/vers da scheda/vers/num
|
||||
/// </summary>
|
||||
/// <param name="codSchedaVers"></param>
|
||||
/// <returns></returns>
|
||||
protected string getPathDoc(string codSchedaVers)
|
||||
{
|
||||
LinkButton lnkBtn = (LinkButton)sender;
|
||||
lnkBtn.Attributes.Add("target", "_blank");
|
||||
//lnkBtn.Attributes.Add("onClick", "window.open (this.href, 'Files', 'height=500,width=400,scrollbars'); return false");
|
||||
}
|
||||
#endif
|
||||
string answ = "";
|
||||
string codScheda = "";
|
||||
if (codSchedaVers != "")
|
||||
{
|
||||
try
|
||||
{
|
||||
codScheda = codSchedaVers.Substring(0, codSchedaVers.LastIndexOf("."));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (codScheda != "")
|
||||
{
|
||||
try
|
||||
{
|
||||
answ = DtProxy.man.taASC.getByCodScheda(codScheda)[0].Path;
|
||||
}
|
||||
catch
|
||||
{
|
||||
answ = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica se ci sia un doc da mostrare...
|
||||
/// </summary>
|
||||
/// <param name="codSchedaVers"></param>
|
||||
/// <returns></returns>
|
||||
public bool hasDoc(object _currCodSchedaVers)
|
||||
{
|
||||
bool answ = false;
|
||||
string pathDoc = getPathDoc(_currCodSchedaVers.ToString());
|
||||
if (pathDoc != "")
|
||||
{
|
||||
answ = DtProxy.notNullDocPath(pathDoc);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// link URL doc da mostrare...
|
||||
/// </summary>
|
||||
/// <param name="codSchedaVers"></param>
|
||||
/// <returns></returns>
|
||||
public string urlDoc(object _currCodSchedaVers)
|
||||
{
|
||||
string answ = "";
|
||||
string pathDoc = getPathDoc(_currCodSchedaVers.ToString());
|
||||
if (pathDoc != "")
|
||||
{
|
||||
answ = DtProxy.getDocPath(pathDoc);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user