using AppData; using SteamWare; using System; using System.Web.UI; namespace NKC_WF.WebUserControls { public partial class cmp_validationSummary : BaseUserControl { protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { fixVisibility(); } } /// /// fix visibilità buttons /// private void fixVisibility() { // controllo SE HO nuove PARTS da validare... var tabItems2Valid = DLMan.taIL.getNeedValid(); var tabItemsUnValid = DLMan.taIL.getUnValid(); var tabItems2ReValid = DLMan.taIL.getNeedRevalid(); lbtValidateMissing.Visible = tabItems2Valid.Count > 0; lbtRevalidate.Visible = tabItemsUnValid.Count > 0; lbtReValidAll.Visible = tabItems2ReValid.Count > 0; } protected void lbtValidateMissing_Click(object sender, EventArgs e) { // chiamo stored x creazione NUOVI BATCH... try { string cadBasePath = $"{memLayer.ML.CRS("nestBasePath")}{memLayer.ML.CRS("drawingFolder")}/"; DLMan.taBL.createPartValBatch(cadBasePath); // eventualmente mando primo batch da validare... bool newValidSent = ComLib.sendFirstValidationBatch(); } catch { } // update! doUpdate(); } protected void lbtRevalidate_Click(object sender, EventArgs e) { // rimetto da validare tramite stored try { DLMan.taBL.resetPartUnValid(); // eventualmente mando primo batch da validare... bool newValidSent = ComLib.sendFirstValidationBatch(); } catch { } // update! doUpdate(); } /// /// Update forzato /// public void doUpdate(bool reportEvent = true) { fixVisibility(); frmView.DataBind(); if (reportEvent) { raiseEvent(); } } protected void lbtRevalAll_Click(object sender, EventArgs e) { // rimetto da validare tramite stored try { // eventualmente mando primo batch da validare... bool newValidSent = ComLib.sendFirstValidationBatch(); } catch { } // update! doUpdate(); } protected void lbtForceRevali_Click(object sender, EventArgs e) { // rimetto da validare tramite stored try { DLMan.taBL.redoPartValid("*"); // eventualmente mando primo batch da validare... bool newValidSent = ComLib.sendFirstValidationBatch(); } catch { } // update! doUpdate(); } } }