76 lines
1.8 KiB
C#
76 lines
1.8 KiB
C#
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_newODL : System.Web.UI.UserControl
|
|
{
|
|
|
|
/// <summary>
|
|
/// registrato nuovo valore
|
|
/// </summary>
|
|
public event EventHandler eh_newVal;
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!Page.IsPostBack)
|
|
{
|
|
setDefaults();
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// idxMacchina selezionata
|
|
/// </summary>
|
|
public string idxMacchina
|
|
{
|
|
get
|
|
{
|
|
return hfIdxMacchina.Value;
|
|
}
|
|
set
|
|
{
|
|
hfIdxMacchina.Value = value;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// imposta valori std
|
|
/// </summary>
|
|
private void setDefaults()
|
|
{
|
|
txtNumPz.Text = "1";
|
|
txtTC_min.Text = "1";
|
|
txtTC_sec.Text = "0";
|
|
}
|
|
|
|
protected void lbtCreaOdlProvv_Click(object sender, EventArgs e)
|
|
{
|
|
// effettua creazione ODL provvisorio e riporta a parent...
|
|
int numPz = 1;
|
|
int.TryParse(txtNumPz.Text, out numPz);
|
|
int numMin = 0;
|
|
int numSec = 0;
|
|
int.TryParse(txtTC_min.Text, out numMin);
|
|
int.TryParse(txtTC_sec.Text, out numSec);
|
|
decimal tCiclo = numMin + ((decimal)numSec) / 60;
|
|
// !!!FARE!!!
|
|
//DataLayer.obj.taODL.insertProvv(ddlArticolo.SelectedValue, idxMacchina, numPz, tCiclo, txtNote.Text.Trim());
|
|
// invio email notifica creazione ODL PROVVISORIO (da riconciliare...)
|
|
|
|
|
|
// sollevo evento!
|
|
if (eh_newVal != null)
|
|
{
|
|
eh_newVal(this, new EventArgs());
|
|
}
|
|
}
|
|
|
|
protected void txtSearch_TextChanged(object sender, EventArgs e)
|
|
{
|
|
ddlArticolo.DataBind();
|
|
}
|
|
}
|
|
} |