66 lines
1.8 KiB
C#
66 lines
1.8 KiB
C#
using AppData;
|
|
using System;
|
|
using System.Text.RegularExpressions;
|
|
|
|
namespace C_TRACK.WebUserControls
|
|
{
|
|
public partial class mod_postMulti : System.Web.UI.UserControl
|
|
{
|
|
/// <summary>
|
|
/// evento aggiunta record
|
|
/// </summary>
|
|
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;
|
|
}
|
|
}
|
|
} |