Files
C.TRACK/C-TRACK/WebUserControls/mod_task2post.ascx.cs
T
2019-08-13 18:16:32 +02:00

68 lines
1.5 KiB
C#

using AppData;
using SteamWare;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace C_TRACK.WebUserControls
{
public partial class mod_task2post : System.Web.UI.UserControl
{
/// <summary>
/// evento aggiunta record
/// </summary>
public event EventHandler eh_reqUpdate;
protected void Page_Load(object sender, EventArgs e)
{
}
public void doUpdate()
{
grView.DataBind();
}
/// <summary>
/// Stato TASK da mostrare
/// </summary>
public bool taskIsActive
{
get
{
bool answ = false;
bool.TryParse(hfIsActive.Value, out answ);
return answ;
}
set
{
hfIsActive.Value = value.ToString();
}
}
/// <summary>
/// Verifica se lo stato sia ATTIVO
/// </summary>
/// <param name="_IsActive"></param>
/// <returns></returns>
public bool checkActive(object _IsActive)
{
bool answ = false;
bool.TryParse(_IsActive.ToString(), out answ);
return answ;
}
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
{
string codPost = memLayer.ML.StringSessionObj("CodPost");
string numTask = grView.SelectedValue.ToString();
// chiamo toggle status, segnalo update!
dataLayer.man.taTL2Post.ToggleActive(codPost, numTask);
// invoco update...
if (eh_reqUpdate != null)
{
eh_reqUpdate(this, new EventArgs());
}
}
}
}