86 lines
2.4 KiB
C#
86 lines
2.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using CMS_SC_Data;
|
|
using SteamWare;
|
|
|
|
namespace CMS_SC.WebUserControls
|
|
{
|
|
public partial class mod_anagSchedeColl : System.Web.UI.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.taAF.insertQuery("000000", "000000 Nuova Fase");
|
|
// 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));
|
|
}
|
|
/// <summary>
|
|
/// formatta URL completo
|
|
/// </summary>
|
|
/// <param name="docPath"></param>
|
|
/// <returns></returns>
|
|
public string getDocPath(object docPath)
|
|
{
|
|
string answ = "";
|
|
try
|
|
{
|
|
answ = string.Format(memLayer.ML.confReadString("urlSchede"), docPath);
|
|
}
|
|
catch
|
|
{ }
|
|
return answ;
|
|
}
|
|
/// <summary>
|
|
/// verifica se CI SIA il documento...
|
|
/// </summary>
|
|
/// <param name="docPath"></param>
|
|
/// <returns></returns>
|
|
public bool notNull(object docPath)
|
|
{
|
|
bool answ = false;
|
|
string docFilePath = "";
|
|
try
|
|
{
|
|
docFilePath = string.Format(memLayer.ML.confReadString("urlSchede"), docPath);
|
|
answ = fileMover.obj.fileExist(docFilePath);
|
|
}
|
|
catch
|
|
{ }
|
|
return answ;
|
|
}
|
|
}
|
|
} |