78 lines
2.0 KiB
C#
78 lines
2.0 KiB
C#
using AppData;
|
|
using System;
|
|
using System.IO;
|
|
using System.Web.UI.HtmlControls;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace NKC_WF.WebUserControls
|
|
{
|
|
public partial class cmp_offOrderDetail : System.Web.UI.UserControl
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
public int OffOrdId
|
|
{
|
|
get
|
|
{
|
|
int answ = 0;
|
|
int.TryParse(hfOffOrderId.Value, out answ);
|
|
return answ;
|
|
}
|
|
set
|
|
{
|
|
hfOffOrderId.Value = value.ToString();
|
|
// faccio udpate svg...
|
|
frmView.DataBind();
|
|
}
|
|
}
|
|
|
|
protected void frmView_DataBound(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
Label filePath = (Label)frmView.FindControl("DrawFilePathLabel");
|
|
// se ho una stringa valida mostro svg, altrimenti NOT PROCESSED...
|
|
if (filePath.Text != "")
|
|
{
|
|
string filename = Server.MapPath(filePath.Text);
|
|
string svgRawData = File.ReadAllText(filename);
|
|
HtmlGenericControl svgControl = (HtmlGenericControl)frmView.FindControl("svgTable");
|
|
svgControl.InnerHtml = svgRawData;
|
|
}
|
|
}
|
|
catch (Exception exc)
|
|
{ }
|
|
}
|
|
|
|
protected void lbtMakeCnc_Click(object sender, EventArgs e)
|
|
{
|
|
/* ************************************************
|
|
* cerco su redis la richiesta corrente:
|
|
* - se NON C'E' ricreo richiesta
|
|
* - se c'è senza risposta --> non faccio nulla
|
|
* - se c'è e ho risposta --> update DB (status + file)
|
|
* *************************************************/
|
|
|
|
// !!!FIXME!!! mandare su redis richiesta CREAZIONE CNC
|
|
|
|
// ...x ora registro richiesta di CNC COME GIA' FATTA
|
|
//DataLayer.man.taOffOL.
|
|
}
|
|
|
|
protected void lbtPrintLabels_Click(object sender, EventArgs e)
|
|
{
|
|
// registro che ho stampato... 2!
|
|
DataLayer.man.taOffOL.updateStatus(OffOrdId, 2);
|
|
}
|
|
|
|
protected void lblDone_Click(object sender, EventArgs e)
|
|
{
|
|
// registro che ho COMPLETATO... 3!
|
|
DataLayer.man.taOffOL.updateStatus(OffOrdId, 3);
|
|
}
|
|
|
|
}
|
|
} |