rimozione pagina utility x SIM
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Utility.aspx.cs" Inherits="NKC_WF.Utility" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<div class="container">
|
||||
<h3>Utility</h3>
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
Cod Takt:<br />
|
||||
<asp:TextBox runat="server" ID="txtCodTakt" />
|
||||
</div>
|
||||
<div class="col-3">
|
||||
Num Stacks:<br />
|
||||
<asp:TextBox runat="server" ID="txtNumStaks" TextMode="Number" />
|
||||
</div>
|
||||
<div class="col-3">
|
||||
Num Panels per stack:<br />
|
||||
<asp:TextBox runat="server" ID="txtNumPanels" TextMode="Number" />
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<br />
|
||||
<asp:LinkButton runat="server" ID="lbtMakeSim" CssClass="btn btn-warning btn-block" OnClick="lbtMakeSim_Click"><i class="fa fa-briefcase" aria-hidden="true"></i> Crea dati</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<asp:Label runat="server" ID="lblOut" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
@@ -1,114 +0,0 @@
|
||||
using AppData;
|
||||
using NKC_SDK;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace NKC_WF
|
||||
{
|
||||
public partial class Utility : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
txtCodTakt.Text = $"{DateTime.Now:yyyyMMdd}.1";
|
||||
txtNumStaks.Text = "3";
|
||||
txtNumPanels.Text = "5";
|
||||
}
|
||||
}
|
||||
|
||||
protected int numStackReq
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
Int32.TryParse(txtNumStaks.Text, out answ);
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
protected int numPanels
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
Int32.TryParse(txtNumPanels.Text, out answ);
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void lbtMakeSim_Click(object sender, EventArgs e)
|
||||
{
|
||||
// creazione degli stack e dei pannelli...
|
||||
List<ProdBunk> stackList = new List<ProdBunk>();
|
||||
List<ProdSheet> panelList;
|
||||
ProdBunk currStack;
|
||||
ProdSheet currPanel;
|
||||
MaterialData currMaterial;
|
||||
WorkData currPrintData;
|
||||
WorkData currMachiningData;
|
||||
WorkData currUnloadData;
|
||||
for (int i = 1; i <= numStackReq; i++)
|
||||
{
|
||||
// devo creare fino a maxNumPanels
|
||||
panelList = new List<ProdSheet>();
|
||||
for (int j = 1; j <= numPanels; j++)
|
||||
{
|
||||
currMaterial = new MaterialData()
|
||||
{
|
||||
MaterialId = 1,
|
||||
MaterialPN = "6120",
|
||||
MaterialDescription = "BOARD, WAFER, 1/4 X 48 X 96"
|
||||
};
|
||||
currPrintData = new WorkData()
|
||||
{
|
||||
ProgramPath = @"c:\temp\PrintProgram.cnc"
|
||||
};
|
||||
currMachiningData = new WorkData()
|
||||
{
|
||||
ProgramPath = @"c:\temp\MachiningProgram.cnc"
|
||||
};
|
||||
currUnloadData = new WorkData()
|
||||
{
|
||||
ProgramPath = @""
|
||||
};
|
||||
currPanel = new ProdSheet()
|
||||
{
|
||||
SheetId = j,
|
||||
Status = PStatus.Programmed,
|
||||
Material = currMaterial,
|
||||
Printing = currPrintData,
|
||||
Machining = currMachiningData,
|
||||
Unloading = currUnloadData
|
||||
};
|
||||
panelList.Add(currPanel);
|
||||
}
|
||||
|
||||
currStack = new ProdBunk()
|
||||
{
|
||||
DataMatrix = $"DM{txtCodTakt.Text}.{i}",
|
||||
BunkId = i,
|
||||
Status = CStatus.Programmed,
|
||||
SheetList = panelList
|
||||
};
|
||||
stackList.Add(currStack);
|
||||
}
|
||||
// creazione oggetto takt
|
||||
ComLib.Takt currTakt = new ComLib.Takt()
|
||||
{
|
||||
TaktId = txtCodTakt.Text,
|
||||
Status = CStatus.Programmed,
|
||||
StackList = stackList
|
||||
};
|
||||
// serializzo
|
||||
//string jsonData = JsonConvert.SerializeObject(currTakt);
|
||||
string jsonData = ComLib.serializeTakt(currTakt);
|
||||
|
||||
// scrivo su label
|
||||
lblOut.Text = jsonData;
|
||||
// salvo in redis / DB
|
||||
ComLib.saveTakt("SERV", currTakt);
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
-60
@@ -1,60 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace NKC_WF {
|
||||
|
||||
|
||||
public partial class Utility {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtCodTakt.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtCodTakt;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtNumStaks.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtNumStaks;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtNumPanels.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtNumPanels;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtMakeSim.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtMakeSim;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblOut.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblOut;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user