Continuo demo app

This commit is contained in:
Samuele E. Locatelli
2018-11-07 19:04:31 +01:00
parent 9cd692c2b1
commit 4347b69cb4
8 changed files with 4881 additions and 5499 deletions
+1
View File
@@ -46,6 +46,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DataLayer.cs" />
<Compile Include="DS_App.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
+4095 -4838
View File
File diff suppressed because it is too large Load Diff
+492 -505
View File
File diff suppressed because it is too large Load Diff
+36 -37
View File
@@ -6,50 +6,49 @@
</autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="0" ViewPortY="0" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:TabOperazioni" ZOrder="12" X="176" Y="206" Height="227" Width="271" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="168" />
<Shape ID="DesignTable:ListValues" ZOrder="2" X="1179" Y="205" Height="273" Width="238" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="168" />
<Shape ID="DesignTable:ConfDatamatrix" ZOrder="11" X="1189" Y="523" Height="365" Width="281" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="306" />
<Shape ID="DesignTable:TabPezzi" ZOrder="10" X="544" Y="194" Height="250" Width="229" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="191" />
<Shape ID="DesignTable:AnagArticoli" ZOrder="8" X="855" Y="206" Height="158" Width="256" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="99" />
<Shape ID="DesignTable:AnagAllarmi" ZOrder="6" X="132" Y="556" Height="158" Width="256" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="99" />
<Shape ID="DesignTable:StoricoAllarmi" ZOrder="5" X="471" Y="592" Height="158" Width="269" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="99" />
<Shape ID="DesignTable:AnagOperatori" ZOrder="3" X="839" Y="601" Height="158" Width="273" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="99" />
<Shape ID="DesignTable:selVal" ZOrder="1" X="163" Y="863" Height="158" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="76" />
<Shape ID="DesignTable:ListValues" ZOrder="10" X="1179" Y="205" Height="273" Width="238" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="168" />
<Shape ID="DesignTable:StoricoAllarmi" ZOrder="11" X="471" Y="592" Height="158" Width="269" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="99" />
<Shape ID="DesignTable:AnagOperatori" ZOrder="1" X="839" Y="601" Height="250" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="99" />
<Shape ID="DesignTable:selVal" ZOrder="9" X="163" Y="863" Height="158" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="76" />
<Shape ID="DesignTable:AnagAllarmi" ZOrder="8" X="104" Y="535" Height="227" Width="256" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="168" />
<Shape ID="DesignTable:TabOperazioni" ZOrder="6" X="118" Y="119" Height="250" Width="271" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="191" />
<Shape ID="DesignTable:TabPezzi" ZOrder="5" X="459" Y="133" Height="227" Width="229" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="168" />
<Shape ID="DesignTable:AnagArticoli" ZOrder="3" X="796" Y="156" Height="250" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="99" />
</Shapes>
<Connectors>
<Connector ID="DesignRelation:FK_TabOperazioni_TabPezzi" ZOrder="9" LineWidth="11">
<Connector ID="DesignRelation:FK_StoricoAllarmi_AnagAllarmi" ZOrder="7" LineWidth="11">
<RoutePoints>
<Point>
<X>544</X>
<Y>274</Y>
</Point>
<Point>
<X>447</X>
<Y>274</Y>
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_TabPezzi_AnagArticoli" ZOrder="7" LineWidth="11">
<RoutePoints>
<Point>
<X>855</X>
<Y>274</Y>
</Point>
<Point>
<X>773</X>
<Y>274</Y>
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_StoricoAllarmi_AnagAllarmi" ZOrder="4" LineWidth="11">
<RoutePoints>
<Point>
<X>388</X>
<Y>637</Y>
<X>360</X>
<Y>675</Y>
</Point>
<Point>
<X>471</X>
<Y>637</Y>
<Y>675</Y>
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_TabOperazioni_TabPezzi1" ZOrder="4" LineWidth="11">
<RoutePoints>
<Point>
<X>459</X>
<Y>178</Y>
</Point>
<Point>
<X>389</X>
<Y>178</Y>
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_TabPezzi_AnagArticoli" ZOrder="2" LineWidth="11">
<RoutePoints>
<Point>
<X>796</X>
<Y>201</Y>
</Point>
<Point>
<X>688</X>
<Y>201</Y>
</Point>
</RoutePoints>
</Connector>
+25
View File
@@ -0,0 +1,25 @@
namespace DemoApp
{
public class DataLayer
{
public DS_AppTableAdapters.AnagArticoliTableAdapter taAnagArt;
public DS_AppTableAdapters.AnagOperatoriTableAdapter taAnagOpr;
/// <summary>
/// Init TAdapter
/// </summary>
protected void initTA()
{
taAnagArt = new DS_AppTableAdapters.AnagArticoliTableAdapter();
taAnagOpr = new DS_AppTableAdapters.AnagOperatoriTableAdapter();
}
/// <summary>
/// Avvio DataLayer
/// </summary>
protected DataLayer()
{
initTA();
}
public static DataLayer man = new DataLayer();
}
}
+182 -99
View File
@@ -28,145 +28,228 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.valueDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.labelDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.selValBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.dS_App = new DemoApp.DS_App();
this.selValTableAdapter = new DemoApp.DS_AppTableAdapters.selValTableAdapter();
this.getValidValuesToolStrip = new System.Windows.Forms.ToolStrip();
this.tableNameToolStripLabel = new System.Windows.Forms.ToolStripLabel();
this.tableNameToolStripTextBox = new System.Windows.Forms.ToolStripTextBox();
this.fieldNameToolStripLabel = new System.Windows.Forms.ToolStripLabel();
this.fieldNameToolStripTextBox = new System.Windows.Forms.ToolStripTextBox();
this.getValidValuesToolStripButton = new System.Windows.Forms.ToolStripButton();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.selValBindingSource)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dS_App)).BeginInit();
this.getValidValuesToolStrip.SuspendLayout();
this.txtBCode = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.btnLogin = new System.Windows.Forms.Button();
this.lblOpr = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.label3 = new System.Windows.Forms.Label();
this.txtDTMatrix = new System.Windows.Forms.TextBox();
this.btnLoad = new System.Windows.Forms.Button();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.lblArt = new System.Windows.Forms.Label();
this.lblOutArt = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
this.SuspendLayout();
//
// dataGridView1
// txtBCode
//
this.dataGridView1.AutoGenerateColumns = false;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.valueDataGridViewTextBoxColumn,
this.labelDataGridViewTextBoxColumn});
this.dataGridView1.DataSource = this.selValBindingSource;
this.dataGridView1.Location = new System.Drawing.Point(13, 37);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowTemplate.Height = 24;
this.dataGridView1.Size = new System.Drawing.Size(523, 333);
this.dataGridView1.TabIndex = 0;
this.txtBCode.Location = new System.Drawing.Point(86, 28);
this.txtBCode.Name = "txtBCode";
this.txtBCode.Size = new System.Drawing.Size(202, 22);
this.txtBCode.TabIndex = 0;
this.txtBCode.Text = "OPR001";
//
// valueDataGridViewTextBoxColumn
// label1
//
this.valueDataGridViewTextBoxColumn.DataPropertyName = "value";
this.valueDataGridViewTextBoxColumn.HeaderText = "value";
this.valueDataGridViewTextBoxColumn.Name = "valueDataGridViewTextBoxColumn";
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(15, 29);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(50, 17);
this.label1.TabIndex = 1;
this.label1.Text = "BCode";
//
// labelDataGridViewTextBoxColumn
// btnLogin
//
this.labelDataGridViewTextBoxColumn.DataPropertyName = "label";
this.labelDataGridViewTextBoxColumn.HeaderText = "label";
this.labelDataGridViewTextBoxColumn.Name = "labelDataGridViewTextBoxColumn";
this.btnLogin.Location = new System.Drawing.Point(294, 24);
this.btnLogin.Name = "btnLogin";
this.btnLogin.Size = new System.Drawing.Size(75, 30);
this.btnLogin.TabIndex = 2;
this.btnLogin.Text = "Login";
this.btnLogin.UseVisualStyleBackColor = true;
this.btnLogin.Click += new System.EventHandler(this.btnLogin_Click);
//
// selValBindingSource
// lblOpr
//
this.selValBindingSource.DataMember = "selVal";
this.selValBindingSource.DataSource = this.dS_App;
this.lblOpr.AutoSize = true;
this.lblOpr.Dock = System.Windows.Forms.DockStyle.Right;
this.lblOpr.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblOpr.Location = new System.Drawing.Point(637, 18);
this.lblOpr.Name = "lblOpr";
this.lblOpr.Size = new System.Drawing.Size(127, 29);
this.lblOpr.TabIndex = 3;
this.lblOpr.Text = "NO USER";
this.lblOpr.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// dS_App
// groupBox1
//
this.dS_App.DataSetName = "DS_App";
this.dS_App.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.lblOpr);
this.groupBox1.Controls.Add(this.txtBCode);
this.groupBox1.Controls.Add(this.btnLogin);
this.groupBox1.Location = new System.Drawing.Point(12, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(767, 73);
this.groupBox1.TabIndex = 4;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Operatore";
//
// selValTableAdapter
// groupBox2
//
this.selValTableAdapter.ClearBeforeFill = true;
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.splitContainer1);
this.groupBox2.Location = new System.Drawing.Point(12, 91);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(767, 112);
this.groupBox2.TabIndex = 5;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Articolo";
//
// getValidValuesToolStrip
// splitContainer1
//
this.getValidValuesToolStrip.ImageScalingSize = new System.Drawing.Size(20, 20);
this.getValidValuesToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tableNameToolStripLabel,
this.tableNameToolStripTextBox,
this.fieldNameToolStripLabel,
this.fieldNameToolStripTextBox,
this.getValidValuesToolStripButton});
this.getValidValuesToolStrip.Location = new System.Drawing.Point(0, 0);
this.getValidValuesToolStrip.Name = "getValidValuesToolStrip";
this.getValidValuesToolStrip.Size = new System.Drawing.Size(1124, 27);
this.getValidValuesToolStrip.TabIndex = 1;
this.getValidValuesToolStrip.Text = "getValidValuesToolStrip";
this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.splitContainer1.Location = new System.Drawing.Point(6, 21);
this.splitContainer1.Name = "splitContainer1";
//
// tableNameToolStripLabel
// splitContainer1.Panel1
//
this.tableNameToolStripLabel.Name = "tableNameToolStripLabel";
this.tableNameToolStripLabel.Size = new System.Drawing.Size(87, 24);
this.tableNameToolStripLabel.Text = "TableName:";
this.splitContainer1.Panel1.Controls.Add(this.label3);
this.splitContainer1.Panel1.Controls.Add(this.txtDTMatrix);
this.splitContainer1.Panel1.Controls.Add(this.btnLoad);
//
// tableNameToolStripTextBox
// splitContainer1.Panel2
//
this.tableNameToolStripTextBox.Name = "tableNameToolStripTextBox";
this.tableNameToolStripTextBox.Size = new System.Drawing.Size(100, 27);
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(758, 82);
this.splitContainer1.SplitterDistance = 366;
this.splitContainer1.TabIndex = 6;
//
// fieldNameToolStripLabel
// label3
//
this.fieldNameToolStripLabel.Name = "fieldNameToolStripLabel";
this.fieldNameToolStripLabel.Size = new System.Drawing.Size(84, 24);
this.fieldNameToolStripLabel.Text = "FieldName:";
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(9, 17);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(64, 17);
this.label3.TabIndex = 4;
this.label3.Text = "DTMatrix";
//
// fieldNameToolStripTextBox
// txtDTMatrix
//
this.fieldNameToolStripTextBox.Name = "fieldNameToolStripTextBox";
this.fieldNameToolStripTextBox.Size = new System.Drawing.Size(100, 27);
this.txtDTMatrix.Location = new System.Drawing.Point(80, 14);
this.txtDTMatrix.Name = "txtDTMatrix";
this.txtDTMatrix.Size = new System.Drawing.Size(202, 22);
this.txtDTMatrix.TabIndex = 3;
this.txtDTMatrix.Text = "164SX322761005740003128617";
//
// getValidValuesToolStripButton
// btnLoad
//
this.getValidValuesToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.getValidValuesToolStripButton.Name = "getValidValuesToolStripButton";
this.getValidValuesToolStripButton.Size = new System.Drawing.Size(110, 24);
this.getValidValuesToolStripButton.Text = "getValidValues";
this.getValidValuesToolStripButton.Click += new System.EventHandler(this.getValidValuesToolStripButton_Click);
this.btnLoad.Location = new System.Drawing.Point(288, 10);
this.btnLoad.Name = "btnLoad";
this.btnLoad.Size = new System.Drawing.Size(75, 30);
this.btnLoad.TabIndex = 5;
this.btnLoad.Text = "Load";
this.btnLoad.UseVisualStyleBackColor = true;
this.btnLoad.Click += new System.EventHandler(this.btnLoad_Click);
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.lblArt);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.lblOutArt);
this.splitContainer2.Size = new System.Drawing.Size(388, 82);
this.splitContainer2.SplitterDistance = 53;
this.splitContainer2.TabIndex = 0;
//
// lblArt
//
this.lblArt.AutoSize = true;
this.lblArt.Dock = System.Windows.Forms.DockStyle.Right;
this.lblArt.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblArt.Location = new System.Drawing.Point(272, 0);
this.lblArt.Name = "lblArt";
this.lblArt.Size = new System.Drawing.Size(116, 29);
this.lblArt.TabIndex = 4;
this.lblArt.Text = "NO ITEM";
//
// lblOutArt
//
this.lblOutArt.AutoSize = true;
this.lblOutArt.Dock = System.Windows.Forms.DockStyle.Right;
this.lblOutArt.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblOutArt.Location = new System.Drawing.Point(377, 0);
this.lblOutArt.Name = "lblOutArt";
this.lblOutArt.Size = new System.Drawing.Size(11, 15);
this.lblOutArt.TabIndex = 5;
this.lblOutArt.Text = "-";
//
// MainForm
//
this.AccessibleName = "";
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1124, 709);
this.Controls.Add(this.getValidValuesToolStrip);
this.Controls.Add(this.dataGridView1);
this.ClientSize = new System.Drawing.Size(785, 305);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Name = "MainForm";
this.Text = "CMS-OMR";
this.Load += new System.EventHandler(this.MainForm_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.selValBindingSource)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dS_App)).EndInit();
this.getValidValuesToolStrip.ResumeLayout(false);
this.getValidValuesToolStrip.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel1.PerformLayout();
this.splitContainer2.Panel2.ResumeLayout(false);
this.splitContainer2.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.DataGridView dataGridView1;
private DS_App dS_App;
private System.Windows.Forms.BindingSource selValBindingSource;
private DS_AppTableAdapters.selValTableAdapter selValTableAdapter;
private System.Windows.Forms.DataGridViewTextBoxColumn valueDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn labelDataGridViewTextBoxColumn;
private System.Windows.Forms.ToolStrip getValidValuesToolStrip;
private System.Windows.Forms.ToolStripLabel tableNameToolStripLabel;
private System.Windows.Forms.ToolStripTextBox tableNameToolStripTextBox;
private System.Windows.Forms.ToolStripLabel fieldNameToolStripLabel;
private System.Windows.Forms.ToolStripTextBox fieldNameToolStripTextBox;
private System.Windows.Forms.ToolStripButton getValidValuesToolStripButton;
private System.Windows.Forms.TextBox txtBCode;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnLogin;
private System.Windows.Forms.Label lblOpr;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtDTMatrix;
private System.Windows.Forms.Button btnLoad;
private System.Windows.Forms.SplitContainer splitContainer2;
private System.Windows.Forms.Label lblArt;
private System.Windows.Forms.Label lblOutArt;
}
}
+50 -8
View File
@@ -5,6 +5,22 @@ namespace DemoApp
{
public partial class MainForm : Form
{
/// <summary>
/// Codice identificativo Barcode dell'operatore loggato
/// </summary>
protected string CurrOprBCode;
/// <summary>
/// Codice Datamatrix dell'articolo in lavorazione
/// </summary>
protected string CurrDatamatrix;
/// <summary>
/// Codice Articolo corrente
/// </summary>
protected string CurrCodArt;
/// <summary>
/// Avvio form
/// </summary>
public MainForm()
{
InitializeComponent();
@@ -12,22 +28,48 @@ namespace DemoApp
private void MainForm_Load(object sender, EventArgs e)
{
// TODO: questa riga di codice carica i dati nella tabella 'dS_App.selVal'. È possibile spostarla o rimuoverla se necessario.
this.selValTableAdapter.Fill(this.dS_App.selVal);
}
/// <summary>
/// Tentativo login operatore...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnLogin_Click(object sender, EventArgs e)
{
// salvo BCode letto
CurrOprBCode = txtBCode.Text.Trim();
// ricerca operatore...
var tabOpr = DataLayer.man.taAnagOpr.GetByBCode(CurrOprBCode);
// se trovo...
if (tabOpr.Rows.Count > 0)
{
lblOpr.Text = string.Format("{0} {1}", tabOpr[0].Cognome, tabOpr[0].Nome);
}
else
{
lblOpr.Text = "BARCODE NON TROVATO";
}
}
private void getValidValuesToolStripButton_Click(object sender, EventArgs e)
private void btnLoad_Click(object sender, EventArgs e)
{
try
// Salvo DataMatrix letto
CurrDatamatrix = txtDTMatrix.Text.Trim();
// calcolo articolo HARD CODED
CurrCodArt = CurrDatamatrix.Substring(0, 11);
// verifico se ci sia l'articolo richiesto sennò segnala errore
var tabArt = DataLayer.man.taAnagArt.GetByCodArt(CurrCodArt);
if (tabArt.Rows.Count > 0)
{
this.selValTableAdapter.getValidValuesFill(this.dS_App.selVal, tableNameToolStripTextBox.Text, fieldNameToolStripTextBox.Text);
lblOutArt.Text = string.Format("Dtmtx: {0} - CodArt {1}", CurrDatamatrix, CurrCodArt);
lblArt.Text = string.Format("CodArt {0}", CurrCodArt);
}
catch (System.Exception ex)
else
{
System.Windows.Forms.MessageBox.Show(ex.Message);
lblOutArt.Text = string.Format("Dtmtx: {0}", CurrDatamatrix);
lblArt.Text = "ATTENZIONE: Articolo NON trovato!";
}
}
}
}
-12
View File
@@ -117,16 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="selValBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>125, 17</value>
</metadata>
<metadata name="dS_App.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="selValTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>320, 17</value>
</metadata>
<metadata name="getValidValuesToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>508, 17</value>
</metadata>
</root>