using MapoDb; using SteamWare; using System; using System.Web.UI; namespace MoonProTablet { public partial class ODL : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Session["TipoLink"] = "EditMacch"; checkConfProd(); } }/// /// idx macchina selezionata /// public int idxMacchina { get { return memLayer.ML.IntSessionObj("IdxMacchina"); } set { memLayer.ML.setSessionVal("IdxMacchina", value); } } /// /// verifica se sia necessario confermare la produzione PRIMA di operare sull'ODL /// private void checkConfProd() { bool needConfProd = true; int pz2conf = 0; //int idxODL = DataLayer.obj.taODL.getByMacchina(idxMacchina.ToString())[0].IdxODL; DS_ProdTempi.stp_PzProd_getByMacchinaRow rigaProd; try { rigaProd = DataLayer.obj.taPzProd2conf.GetData(idxMacchina.ToString())[0]; pz2conf = rigaProd.pezziNonConfermati; needConfProd = (pz2conf > 0); } catch { logger.lg.scriviLog(string.Format("Errore recupero pezzi da confermare per la macchina {0}", idxMacchina), tipoLog.ERROR); } // se necessario mostro warning... if (needConfProd) { lblWarningHead.Text = traduci("ConfProdBeforeContinueHead"); lblWarningBody.Text = traduci("ConfProdBeforeContinueBody"); lblNumPz2Conf.Text = string.Format("{0} pz NC", pz2conf); } divPz2Conf.Visible = needConfProd; mod_ODL1.isEnabled = !needConfProd; } /// /// effettua traduzione del lemma /// /// /// public string traduci(string lemma) { return user_std.UtSn.Traduci(lemma); } } }