Files
SSC/CMS_SC/WebUserControls/mod_anagSchedeColl.ascx.cs
2018-02-23 16:24:18 +01:00

59 lines
1.7 KiB
C#

using CMS_SC_Data;
using SteamWare;
using System;
using System.Web.UI.WebControls;
namespace CMS_SC.WebUserControls
{
public partial class mod_anagSchedeColl : SteamWare.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
/// <summary>
/// dimensione pagina grid view
/// </summary>
public int pageSize
{
get
{
return grView.PageSize;
}
set
{
grView.PageSize = value;
}
}
/// <summary>
/// richiesta di aggiunta record, tutto a zero!
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbAddNew_Click(object sender, EventArgs e)
{
// inserisco nuovo record
DtProxy.man.taASC.insertQuery(memLayer.ML.CRS("defASC01"), 0, memLayer.ML.CRS("defASC02"), "", memLayer.ML.CRS("defFasiEnab"));
// update!
grView.DataBind();
}
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
{
// mando a dettaglio scheda...
string codScheda = string.Format("{0}.{1}", grView.SelectedDataKey["CodScheda"], grView.SelectedDataKey["Vers"]);
Response.Redirect(string.Format("~/DettScheda?CodSchedaVers={0}", codScheda));
}
protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e)
{
if (e.InputParameters["Path"] == null) e.InputParameters["Path"] = "";
if (e.InputParameters["FasiEnab"] == null) e.InputParameters["FasiEnab"] = "";
// metto a capo tra i vari tag SE non ci fosse...
if (e.InputParameters["Descrizione"].ToString().IndexOf("][") >= 0)
{
e.InputParameters["Descrizione"] = e.InputParameters["Descrizione"].ToString().Replace("][", "]\n[");
}
}
}
}