Radio address format "D9" defined on one place: SharedDatabase.Const.RAFormat
This commit is contained in:
parent
917051f072
commit
7facefb305
@ -5,6 +5,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using SharedDatabase;
|
||||
using SharedDatabase.Entities;
|
||||
using OrderManagement.Resources;
|
||||
using NHibernate;
|
||||
@ -204,11 +205,11 @@ namespace OrderManagement
|
||||
if (MessageBox.Show(string.Format("{0}\r\n{1}: radio {2} .. {3}\r\n{4}: radio {5} .. {6}\r\n{7}",
|
||||
Strings.There_is_a_conflict,
|
||||
order.POName,
|
||||
order.RAPrefix + order.RAFirst.ToString("D9") + snStdSuffix,
|
||||
order.RAPrefix + (order.RAFirst + order.PiecesCount).ToString("D9") + snStdSuffix,
|
||||
order.RAPrefix + order.RAFirst.ToString(Const.RAFormat) + snStdSuffix,
|
||||
order.RAPrefix + (order.RAFirst + order.PiecesCount).ToString(Const.RAFormat) + snStdSuffix,
|
||||
another.POName,
|
||||
another.RAPrefix + another.RAFirst.ToString("D9") + StandardSuffix(another, true),
|
||||
another.RAPrefix + (another.RAFirst + another.PiecesCount).ToString("D9") + StandardSuffix(another, true),
|
||||
another.RAPrefix + another.RAFirst.ToString(Const.RAFormat) + StandardSuffix(another, true),
|
||||
another.RAPrefix + (another.RAFirst + another.PiecesCount).ToString(Const.RAFormat) + StandardSuffix(another, true),
|
||||
Strings.Abort_creating_an_order_QM),
|
||||
Strings.Warning,
|
||||
MessageBoxButtons.YesNo,
|
||||
|
||||
@ -149,7 +149,7 @@ namespace OrderManagement
|
||||
lvi.SubItems.Add(o.SNDigitsCount.ToString());
|
||||
lvi.SubItems.Add(o.SNSuffix);
|
||||
lvi.SubItems.Add(o.RAPrefix);
|
||||
lvi.SubItems.Add(o.RAFirst.ToString("D9"));
|
||||
lvi.SubItems.Add(o.RAFirst.ToString(SharedDatabase.Const.RAFormat));
|
||||
lvi.SubItems.Add(o.RASuffix);
|
||||
lvi.SubItems.Add(o.Remark);
|
||||
lvi.Tag = o;
|
||||
@ -176,7 +176,7 @@ namespace OrderManagement
|
||||
lvi.SubItems[i++].Text = o.SNDigitsCount.ToString();
|
||||
lvi.SubItems[i++].Text = o.SNSuffix;
|
||||
lvi.SubItems[i++].Text = o.RAPrefix;
|
||||
lvi.SubItems[i++].Text = o.RAFirst.ToString("D9");
|
||||
lvi.SubItems[i++].Text = o.RAFirst.ToString(SharedDatabase.Const.RAFormat);
|
||||
lvi.SubItems[i++].Text = o.RASuffix;
|
||||
lvi.SubItems[i++].Text = o.Remark;
|
||||
}
|
||||
|
||||
@ -91,11 +91,11 @@ namespace OrderManagement
|
||||
(order.SNSuffix != null) ? order.SNSuffix : string.Empty),
|
||||
Strings.First_radio_address + " :",
|
||||
string.Format("{0}{1}{2}", (order.RAPrefix != null) ? order.RAPrefix : string.Empty,
|
||||
order.RAFirst.ToString("D9"),
|
||||
order.RAFirst.ToString(SharedDatabase.Const.RAFormat),
|
||||
(order.RASuffix != null) ? order.RASuffix : string.Empty),
|
||||
Strings.Last_radio_address + " :",
|
||||
string.Format("{0}{1}{2}", (order.RAPrefix != null) ? order.RAPrefix : string.Empty,
|
||||
(order.RAFirst + order.PiecesCount - 1).ToString("D9"),
|
||||
(order.RAFirst + order.PiecesCount - 1).ToString(SharedDatabase.Const.RAFormat),
|
||||
(order.RASuffix != null) ? order.RASuffix : string.Empty),
|
||||
Strings.Workflow + " :",
|
||||
(order.Workflow != null) ? order.Workflow : string.Empty,
|
||||
|
||||
@ -32,7 +32,7 @@ namespace OrderManagement
|
||||
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")
|
||||
currentRATextBox.Text = (order.RAPrefix != null ? order.RAPrefix : string.Empty) + order.CurrentRA.ToString(SharedDatabase.Const.RAFormat)
|
||||
+ (order.RASuffix != null ? order.RASuffix : string.Empty);
|
||||
}
|
||||
|
||||
|
||||
@ -10,6 +10,7 @@ namespace SharedDatabase
|
||||
public class Const
|
||||
{
|
||||
public const int MaxPartNameLen = 10;
|
||||
public const string RAFormat = "D9"; /// Radio address digits count = 9
|
||||
}
|
||||
|
||||
public enum CodeType
|
||||
|
||||
@ -988,7 +988,7 @@ namespace TBF.Rig.TestMethods.S640Communication
|
||||
|
||||
wm.RadioAddress = string.Format("{0}{1}{2}",
|
||||
order.RAPrefix,
|
||||
currentRadioAddress.ToString("D9"),
|
||||
currentRadioAddress.ToString(SharedDatabase.Const.RAFormat),
|
||||
order.RASuffix);
|
||||
assignedRadioAddresses[i].Text = wm.RadioAddress;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user