Files
MoonPro.net/MP-MAG/WebUserControls/cmp_UdcODL.ascx.cs
T
2021-01-13 11:01:33 +01:00

67 lines
1.6 KiB
C#

using MagData;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MP_MAG.WebUserControls
{
public partial class cmp_UdcODL : BaseUserControl
{
#region Private Methods
private void resetSelezione()
{
grView.SelectedIndex = -1;
grView.DataBind();
raiseReset();
}
#endregion Private Methods
#region Protected Methods
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
{
// invio comando di ristampa..
if (grView.SelectedIndex >= 0)
{
tipoDocumento tipoDoc = currData.isProdFinito ? tipoDocumento.docFinito : tipoDocumento.docSemilavorato;
string UDC = $"{grView.SelectedValue}";
MagDataLayerObj.taPJQ.insertQuery($"{tipoDoc}", UDC, currData.CodPost);
}
resetSelezione();
}
/// <summary>
/// comando reset
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbtReset_Click(object sender, EventArgs e)
{
resetSelezione();
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
hfIdxODL.Value = $"{currData.IdxOdl}";
}
}
#endregion Protected Methods
#region Internal Methods
internal void doUpdate()
{
grView.DataBind();
}
#endregion Internal Methods
}
}