using AppData; using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace C_TRACK.WebUserControls { public partial class mod_postMulti : System.Web.UI.UserControl { /// /// evento aggiunta record /// public event EventHandler eh_reqUpdate; protected void Page_Load(object sender, EventArgs e) { mod_task2postAttive.eh_reqUpdate += Mod_task2postAttive_eh_reqUpdate; mod_task2postSospese.eh_reqUpdate += Mod_task2postSospese_eh_reqUpdate; mod_opr2post.eh_reqUpdate += Mod_opr2post_eh_reqUpdate; } private void Mod_opr2post_eh_reqUpdate(object sender, EventArgs e) { refreshAndRaise(); } private void Mod_task2postSospese_eh_reqUpdate(object sender, EventArgs e) { refreshAndRaise(); } private void Mod_task2postAttive_eh_reqUpdate(object sender, EventArgs e) { refreshAndRaise(); } private void refreshAndRaise() { mod_task2postAttive.doUpdate(); mod_task2postSospese.doUpdate(); // invoco update... if (eh_reqUpdate != null) { eh_reqUpdate(this, new EventArgs()); } } public bool processInput(string valore) { bool answ = false; // controllo se sto leggendo un operatore o una commessa Match testNumTask = Regex.Match(valore, mUtils.reNumTask); Match testOper = Regex.Match(valore, mUtils.reCodOper); // a seconda dei cari decido se far processare ai controlli oepratore o commessa in post multi... if (testOper.Success) { mod_opr2post.newInput = valore; answ = true; } else if (testNumTask.Success) { mod_task2postSospese.newInput = valore; answ = true; } return answ; } } }