using MapoDb; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace MoonProTablet.WebUserControls { public partial class cmp_sheetTech : BaseUserControl { #region Public Properties public string CodArticolo { get { return hfCodArticolo.Value.Trim(); } set { string newVal = value.Trim(); hfCodArticolo.Value = newVal; cmp_ST_objCheck.CodArticolo = newVal; // se ho articolo FIX DISPLAY! if (!string.IsNullOrEmpty(newVal)) { repGroup.DataBind(); } } } #endregion Public Properties #region Private Methods /// /// Verifica visibilità reset /// private void checkReset() { // condizioni booleane bool inAttr = false; // SOLO SE ho articolo sennò niente reset... if (!string.IsNullOrEmpty(CodArticolo)) { // controllo se la macchina è in attrezzaggio... DS_applicazione.StatoMacchineRow rigaStato = null; try { string idxMacc = ""; // se è multi controllo parent... if (isMulti) { idxMacc = idxMaccParent; } else { idxMacc = !string.IsNullOrEmpty(idxMacchinaFix) ? idxMacchinaFix : idxMacchina; } if (!string.IsNullOrEmpty(idxMacc)) { rigaStato = selData.mng.rigaStato(idxMacc); } if (rigaStato != null) { inAttr = (rigaStato.IdxStato == 2); } } catch { } } lbtClearOdl.Visible = inAttr; cmp_ST_objCheck.checkInputData(); } private void cmp_ST_objCheck_eh_doUpdate(object sender, EventArgs e) { repGroup.DataBind(); checkReset(); } #endregion Private Methods #region Protected Methods protected void lbtClearOdl_Click(object sender, EventArgs e) { // chiamo stored x ripulire dati check già caricati DataLayerObj.taSTChk.cleanByOdl(idxOdl); // sollevo evento repGroup.DataBind(); reportUpdate(); checkReset(); } protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { lbtClearOdl.DataBind(); } cmp_ST_objCheck.eh_doUpdate += cmp_ST_objCheck_eh_doUpdate; checkReset(); } #endregion Protected Methods } }