106 lines
2.9 KiB
C#
106 lines
2.9 KiB
C#
using SteamWare;
|
|
using System;
|
|
|
|
namespace C_TRACK.WebUserControls
|
|
{
|
|
public partial class mod_selTask : BaseUserControl
|
|
{
|
|
#region Public Events
|
|
|
|
/// <summary>
|
|
/// evento selezione dati
|
|
/// </summary>
|
|
public event EventHandler eh_dataSel;
|
|
|
|
#endregion Public Events
|
|
|
|
#region Public Properties
|
|
|
|
/// <summary>
|
|
/// Codice ART corrente
|
|
/// </summary>
|
|
public string CurrCodArt
|
|
{
|
|
get
|
|
{
|
|
return memLayer.ML.StringSessionObj("CurrCodArt");
|
|
}
|
|
set
|
|
{
|
|
memLayer.ML.setSessionVal("CurrCodArt", value);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Codice TASK corrente
|
|
/// </summary>
|
|
public string CurrNumTask
|
|
{
|
|
get
|
|
{
|
|
return memLayer.ML.StringSessionObj("CurrNumTask");
|
|
}
|
|
set
|
|
{
|
|
memLayer.ML.setSessionVal("CurrNumTask", value);
|
|
// salvo anche come btn pressed...
|
|
memLayer.ML.setSessionVal("btnCmdPress", value);
|
|
}
|
|
}
|
|
|
|
#endregion Public Properties
|
|
|
|
#region Private Methods
|
|
|
|
/// <summary>
|
|
/// Verifica se il task vada importato
|
|
/// </summary>
|
|
/// <param name="idxPromessa"></param>
|
|
private void checkTask(int idxPromessa)
|
|
{
|
|
DLMan.taTL.ImportNew(idxPromessa);
|
|
}
|
|
|
|
#endregion Private Methods
|
|
|
|
#region Protected Methods
|
|
|
|
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
// selezionata una richiesta
|
|
int idxProm = 0;
|
|
int.TryParse(grView.SelectedValue.ToString(), out idxProm);
|
|
if (idxProm > 0)
|
|
{
|
|
// --> ho IdxPromessa --> recupero KeyRichiesta = CurrNumTask
|
|
var tab = DLMan.taPODL.getByKey(idxProm);
|
|
string _numTask = "";
|
|
if (tab.Rows.Count > 0)
|
|
{
|
|
// recupero NumTask
|
|
_numTask = tab[0].KeyRichiesta;
|
|
if (_numTask != "")
|
|
{
|
|
// verifica preliminare se vada creato Task...
|
|
checkTask(idxProm);
|
|
// salvo commessa
|
|
CurrNumTask = _numTask;
|
|
// salvo articolo...
|
|
CurrCodArt = tab[0].CodArticolo;
|
|
// segnalo update
|
|
if (eh_dataSel != null)
|
|
{
|
|
eh_dataSel(this, new EventArgs());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
}
|
|
} |