46 lines
1.4 KiB
C#
46 lines
1.4 KiB
C#
///
|
|
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
|
///
|
|
using System;
|
|
using System.Windows.Forms;
|
|
using NHibernate;
|
|
using SharedDatabase.Entities;
|
|
using OrderManagement.Resources;
|
|
|
|
namespace OrderManagement
|
|
{
|
|
public partial class OrderStateDlg : Form
|
|
{
|
|
ISession session;
|
|
OrderInfo order;
|
|
|
|
public OrderStateDlg()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public OrderStateDlg(ISession session,OrderInfo order)
|
|
: this()
|
|
{
|
|
this.session = session;
|
|
this.order = order;
|
|
Localize();
|
|
|
|
orderTextBox.Text = order.POName;
|
|
stateTextBox.Text = ((OrderState)order.POState).ToString();
|
|
targetPcsCountTextBox.Text = order.PiecesCount.ToString();
|
|
producedPcsCountTextBox.Text = order.CurrentPcsCount.ToString();
|
|
currentSnTextBox.Text = (order.SNPrefix != null ? order.SNPrefix : string.Empty) + order.CurrentSN.ToString(string.Format("D{0}", order.SNDigitsCount))
|
|
+ (order.SNSuffix != null ? order.SNSuffix : string.Empty);
|
|
currentRATextBox.Text = (order.RAPrefix != null ? order.RAPrefix : string.Empty) + order.CurrentRA.ToString("D9")
|
|
+ (order.RASuffix != null ? order.RASuffix : string.Empty);
|
|
}
|
|
|
|
void Localize()
|
|
{
|
|
orderLabel.Text = Strings.Order;
|
|
stateLabel.Text = Strings.State;
|
|
}
|
|
}
|
|
}
|