60 lines
1.4 KiB
C#
60 lines
1.4 KiB
C#
using AppData;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace NKC_WF.WebUserControls
|
|
{
|
|
public partial class cmp_batchList : System.Web.UI.UserControl
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!Page.IsPostBack)
|
|
{
|
|
divDetail.Visible = false;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Converte il codice stato in effettivo campo
|
|
/// </summary>
|
|
/// <param name="_status"></param>
|
|
/// <returns></returns>
|
|
public string BStatus(object _status)
|
|
{
|
|
string answ = ComLib.BatchStatusDescr(_status);
|
|
return answ;
|
|
}
|
|
/// <summary>
|
|
/// comando reset
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void lbtReset_Click(object sender, EventArgs e)
|
|
{
|
|
grView.SelectedIndex = -1;
|
|
grView.DataBind();
|
|
divDetail.Visible = false;
|
|
}
|
|
/// <summary>
|
|
/// BatchId selezionato
|
|
/// </summary>
|
|
protected int BatchIdSel
|
|
{
|
|
get
|
|
{
|
|
int answ = 0;
|
|
int.TryParse(grView.SelectedValue.ToString(), out answ);
|
|
return answ;
|
|
}
|
|
}
|
|
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
divDetail.Visible = true;
|
|
// recupero BatchId selezionato
|
|
cmp_batchDetail.BatchId = BatchIdSel;
|
|
}
|
|
}
|
|
} |