184 lines
3.8 KiB
C#
184 lines
3.8 KiB
C#
using CMS_SC_Data;
|
|
using SteamWare;
|
|
using System;
|
|
using System.Web.UI;
|
|
|
|
namespace CMS_SC.WebUserControls
|
|
{
|
|
public partial class mod_StatoCollaudi : SteamWare.UserControl
|
|
{
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!Page.IsPostBack)
|
|
{
|
|
doUpdate();
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// dimensione pagina grid view
|
|
/// </summary>
|
|
public int pageSize
|
|
{
|
|
get
|
|
{
|
|
return grView.PageSize;
|
|
}
|
|
set
|
|
{
|
|
grView.PageSize = value;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// dossier selezionato
|
|
/// </summary>
|
|
public string idxDossier
|
|
{
|
|
get
|
|
{
|
|
return hfIdxDossier.Value;
|
|
}
|
|
set
|
|
{
|
|
hfIdxDossier.Value = value;
|
|
//grView.DataBind();
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// FASE selezionato
|
|
/// </summary>
|
|
public string Fase
|
|
{
|
|
get
|
|
{
|
|
return hfFase.Value;
|
|
}
|
|
set
|
|
{
|
|
hfFase.Value = value;
|
|
//grView.DataBind();
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// REV selezionata
|
|
/// </summary>
|
|
public int Rev
|
|
{
|
|
get
|
|
{
|
|
int answ = 0;
|
|
int.TryParse(hfRev.Value, out answ);
|
|
return answ;
|
|
}
|
|
set
|
|
{
|
|
hfRev.Value = value.ToString();
|
|
//grView.DataBind();
|
|
}
|
|
}
|
|
|
|
public string CodSchedaVersNum
|
|
{
|
|
get
|
|
{
|
|
string answ = "";
|
|
if (grView.SelectedIndex >= 0)
|
|
{
|
|
try
|
|
{
|
|
answ = string.Format("{0}.{1}.{2}", grView.SelectedDataKey["CodScheda"], grView.SelectedDataKey["Vers"], grView.SelectedDataKey["NumScheda"]);
|
|
}
|
|
catch (Exception exc)
|
|
{
|
|
logger.lg.scriviLog(exc.ToString(), tipoLog.EXCEPTION);
|
|
}
|
|
}
|
|
return answ;
|
|
}
|
|
set
|
|
{
|
|
//grView.SelectedIndex = 0;
|
|
}
|
|
}
|
|
|
|
public void doUpdate()
|
|
{
|
|
grView.DataBind();
|
|
}
|
|
/// <summary>
|
|
/// selezione scheda...
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
if (CodSchedaVersNum != "")
|
|
{
|
|
// salvo parametro
|
|
savePar("ddlSelScheda", CodSchedaVersNum);
|
|
// fix visualizzazione...
|
|
doUpdate();
|
|
// sollevo evento...
|
|
raiseEvent(ucEvType.Selected);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// salva su DB il parametro scelto dall'utente
|
|
/// </summary>
|
|
/// <param name="paramName"></param>
|
|
/// <param name="paramValue"></param>
|
|
protected void savePar(string paramName, string paramValue)
|
|
{
|
|
DtProxy.man.taUsrPar.upsert(OpAuth.currAuth.email, paramName, paramValue);
|
|
}
|
|
protected void btnReset_Click(object sender, EventArgs e)
|
|
{
|
|
resetSelezione();
|
|
}
|
|
protected void lbtShowAll_Click(object sender, EventArgs e)
|
|
{
|
|
grView.SelectedIndex = -1;
|
|
doUpdate();
|
|
// salvo parametro
|
|
savePar("ddlSelScheda", "");
|
|
raiseEvent(ucEvType.ReqUpdateParent);
|
|
}
|
|
protected void lbtHideAll_Click(object sender, EventArgs e)
|
|
{
|
|
resetSelezione();
|
|
}
|
|
/// <summary>
|
|
/// resetto selezione
|
|
/// </summary>
|
|
public void resetSelezione()
|
|
{
|
|
grView.SelectedIndex = -1;
|
|
doUpdate();
|
|
// salvo parametro
|
|
savePar("ddlSelScheda", "");
|
|
raiseEvent(ucEvType.Reset);
|
|
}
|
|
/// <summary>
|
|
/// Abilita o disabilita filtro su ODS..
|
|
/// </summary>
|
|
public bool enableFilter
|
|
{
|
|
get
|
|
{
|
|
return ods.FilterExpression != "";
|
|
}
|
|
set
|
|
{
|
|
if (value)
|
|
{
|
|
ods.FilterExpression = " Descrizione LIKE '%{0}%' OR DescrStato LIKE '%{0}%' OR CodScheda LIKE '%{0}%' ";
|
|
}
|
|
else
|
|
{
|
|
ods.FilterExpression = "";
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
} |