108 lines
2.9 KiB
C#
108 lines
2.9 KiB
C#
using AppData;
|
|
using SteamWare;
|
|
using System;
|
|
using System.Web.UI;
|
|
|
|
namespace C_TRACK.WebUserControls
|
|
{
|
|
public partial class mod_postazioni : System.Web.UI.UserControl
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!Page.IsPostBack)
|
|
{
|
|
memLayer.ML.emptySessionVal("DescPost");
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Codice postazione di lavoro
|
|
/// </summary>
|
|
public string CodPost
|
|
{
|
|
get
|
|
{
|
|
return memLayer.ML.StringSessionObj("CodPost");
|
|
}
|
|
set
|
|
{
|
|
memLayer.ML.setSessionVal("CodPost", value);
|
|
memLayer.ML.emptySessionVal("DescPost");
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Codice Operatore
|
|
/// </summary>
|
|
public string CodOpr
|
|
{
|
|
get
|
|
{
|
|
return memLayer.ML.StringSessionObj("CodOpr");
|
|
}
|
|
set
|
|
{
|
|
memLayer.ML.setSessionVal("CodOpr", value);
|
|
memLayer.ML.emptySessionVal("NomeOpr");
|
|
}
|
|
}
|
|
|
|
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
// salvo la postazione selezionata
|
|
CodPost = grView.SelectedValue.ToString();
|
|
string nextPage = "";
|
|
if (memLayer.ML.StringSessionObj("nextObjCommand") == "setOpr")
|
|
{
|
|
// salvo su DB...
|
|
dataLayer.man.taAP.setOpr(CodPost, CodOpr);
|
|
// set rimando a BCode con settato Postazione
|
|
nextPage = "~/barcode";
|
|
}
|
|
else if (memLayer.ML.StringSessionObj("nextObjCommand") == "freePost")
|
|
{
|
|
// salvo su DB...
|
|
dataLayer.man.taAP.setOpr(CodPost, "");
|
|
CodPost = "";
|
|
// set rimando a postazioni
|
|
nextPage = "~/postazioni";
|
|
}
|
|
else if (memLayer.ML.StringSessionObj("nextObjCommand") == "selPost")
|
|
{
|
|
// set rimando a BCode con settato Postazione
|
|
nextPage = "~/barcode";
|
|
}
|
|
memLayer.ML.setSessionVal("nextObjCommand", "");
|
|
// reload pagina!
|
|
Response.Redirect(nextPage);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// salvo in session che il prox comando è liberare postazione...
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void lbtFreePost_Click(object sender, EventArgs e)
|
|
{
|
|
memLayer.ML.setSessionVal("nextObjCommand", "freePost");
|
|
}
|
|
/// <summary>
|
|
/// salvo in session che il prox comando è impostare operatore...
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void lbtSetOpr_Click(object sender, EventArgs e)
|
|
{
|
|
memLayer.ML.setSessionVal("nextObjCommand", "setOpr");
|
|
}
|
|
/// <summary>
|
|
/// salvo in session che il prox comando è impostare postazione...
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void lbtSelPost_Click(object sender, EventArgs e)
|
|
{
|
|
memLayer.ML.setSessionVal("nextObjCommand", "selPost");
|
|
}
|
|
|
|
}
|
|
} |