84 lines
2.5 KiB
C#
84 lines
2.5 KiB
C#
using SteamWare;
|
|
using System;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace MP_SITE.WebUserControls
|
|
{
|
|
public partial class mod_AnPro_DettGg : SteamWare.UserControl
|
|
{
|
|
#region Private Methods
|
|
|
|
/// <summary>
|
|
/// aggiorno numero righe da mostrare
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void Mod_righePag_eh_newNum(object sender, EventArgs e)
|
|
{
|
|
grView.PageSize = mod_righePag.numRowPag;
|
|
}
|
|
|
|
#endregion Private Methods
|
|
|
|
#region Protected Methods
|
|
|
|
protected void grView_DataBound(object sender, EventArgs e)
|
|
{
|
|
if (grView.Rows.Count > 0)
|
|
{
|
|
LinkButton lb;
|
|
// aggiorno gli headers
|
|
foreach (TableCell cella in grView.HeaderRow.Cells)
|
|
{
|
|
try
|
|
{
|
|
lb = (LinkButton)cella.Controls[0];
|
|
lb.Text = traduci(lb.Text);
|
|
}
|
|
catch
|
|
{ }
|
|
}
|
|
}
|
|
}
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!Page.IsPostBack)
|
|
{
|
|
mod_righePag.numRowPag = Convert.ToInt32(memLayer.ML.CRI("_righeDataGridMed") / 2);
|
|
grView.PageSize = mod_righePag.numRowPag;
|
|
}
|
|
mod_righePag.eh_newNum += Mod_righePag_eh_newNum;
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
|
|
#region Public Methods
|
|
|
|
public string cssByStato(object stato)
|
|
{
|
|
return string.Format("css_{0}", stato); ;
|
|
}
|
|
|
|
/// <summary>
|
|
/// aggiorna visualizzazione
|
|
/// </summary>
|
|
/// <param name="IdxMacchina">Macchina</param>
|
|
/// <param name="CodArticolo">Articolo</param>
|
|
/// <param name="OdlChiusi">Si/No ODL già conclusi</param>
|
|
/// <param name="OdlAperti">Si/No ODL in corso</param>
|
|
/// <param name="OdlNew">Si/No ODL da attrezzare</param>
|
|
public void doUpdate(string IdxMacchina, string CodArticolo, bool OdlChiusi, bool OdlAperti, bool OdlNew)
|
|
{
|
|
hfIdxMacchina.Value = IdxMacchina;
|
|
hfCodArticolo.Value = CodArticolo;
|
|
hfClosed.Value = OdlChiusi.ToString();
|
|
hfOpen.Value = OdlAperti.ToString();
|
|
hfNew.Value = OdlNew.ToString();
|
|
grView.DataBind();
|
|
}
|
|
|
|
#endregion Public Methods
|
|
}
|
|
} |