This commit is contained in:
@@ -17,72 +17,95 @@ namespace AyaNovaQBI
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private long _SelectedStatus = 0;
|
||||
public long SelectedStatus
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)cbStatus.SelectedItem;
|
||||
}
|
||||
set
|
||||
{
|
||||
_SelectedStatus = value;
|
||||
|
||||
}
|
||||
}
|
||||
public string DialogTitle { get; set; }
|
||||
|
||||
private bool _Pre = true;
|
||||
/// <summary>
|
||||
/// Used to indicate if dialog should display for post or pre
|
||||
/// status
|
||||
/// </summary>
|
||||
public bool PreStatus
|
||||
{
|
||||
public string OptionTitle { get; set; }
|
||||
|
||||
set
|
||||
{
|
||||
_Pre = value;
|
||||
public string OptionDescription { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void SetWOStatus_Load(object sender, EventArgs e)
|
||||
private long _SelectedStatus = 0;
|
||||
public long SelectedStatus
|
||||
{
|
||||
List<NameIdItem> items = util.AyaWOStatusList.OrderBy(z=>z.Name).Select(z => new NameIdItem { Id = z.Id, Name = z.Name }).ToList();
|
||||
items.Insert(0, new NameIdItem { Id = 0, Name = _Pre ? "< Any status >" : "< Do not change status >" });
|
||||
get
|
||||
{
|
||||
return (long)cbStatus.SelectedItem;
|
||||
}
|
||||
set
|
||||
{
|
||||
_SelectedStatus = value;
|
||||
|
||||
this.cbStatus.DataSource = items;
|
||||
this.cbStatus.DisplayMember = "Name";
|
||||
this.cbStatus.ValueMember = "Id";
|
||||
this.cbStatus.SelectedValue = _SelectedStatus;
|
||||
}
|
||||
}
|
||||
|
||||
this.lblStatus.Text = util.AyaTranslations["WorkOrderStatus"];
|
||||
////NVCHANGED
|
||||
//GenericNVList ls = GenericNVList.GetList("aWorkorderStatus", "aID", "aName", true, false, false);
|
||||
private bool _Pre = true;
|
||||
/// <summary>
|
||||
/// Used to indicate if dialog should display for post or pre
|
||||
/// status
|
||||
/// </summary>
|
||||
public bool PreStatus
|
||||
{
|
||||
|
||||
//if (_Pre)
|
||||
// this.cbStatus.SelectedItem = this.cbStatus.Items.Add(Guid.Empty, "< Any status >");
|
||||
//else
|
||||
// this.cbStatus.SelectedItem = this.cbStatus.Items.Add(Guid.Empty, "< Do not change status >");
|
||||
set
|
||||
{
|
||||
_Pre = value;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void SetWOStatus_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.Text = DialogTitle;
|
||||
this.lblDescription.Text = OptionDescription;
|
||||
this.lblTitle.Text = OptionTitle;
|
||||
this.btnCancel.Text = util.AyaTranslations["Cancel"];
|
||||
this.btnOK.Text = util.AyaTranslations["OK"];
|
||||
|
||||
List<NameIdItem> items = util.AyaWOStatusList.OrderBy(z => z.Name).Select(z => new NameIdItem { Id = z.Id, Name = z.Name }).ToList();
|
||||
items.Insert(0, new NameIdItem { Id = 0, Name = _Pre ? "< Any status >" : "< Do not change status >" });
|
||||
|
||||
this.cbStatus.DataSource = items;
|
||||
this.cbStatus.DisplayMember = "Name";
|
||||
this.cbStatus.ValueMember = "Id";
|
||||
this.cbStatus.SelectedValue = _SelectedStatus;
|
||||
|
||||
this.lblStatus.Text = util.AyaTranslations["WorkOrderStatus"];
|
||||
|
||||
|
||||
//foreach (DictionaryEntry d in ls.BindableList)
|
||||
//{
|
||||
// Guid gItem = new Guid(d.Key.ToString());
|
||||
// Infragistics.Win.ValueListItem v = this.cbStatus.Items.Add(gItem, d.Value.ToString());
|
||||
// if (_SelectedStatus == gItem)
|
||||
// {
|
||||
// this.cbStatus.SelectedItem = v;
|
||||
////NVCHANGED
|
||||
//GenericNVList ls = GenericNVList.GetList("aWorkorderStatus", "aID", "aName", true, false, false);
|
||||
|
||||
// }
|
||||
//}
|
||||
//if (_Pre)
|
||||
// this.cbStatus.SelectedItem = this.cbStatus.Items.Add(Guid.Empty, "< Any status >");
|
||||
//else
|
||||
// this.cbStatus.SelectedItem = this.cbStatus.Items.Add(Guid.Empty, "< Do not change status >");
|
||||
|
||||
|
||||
}
|
||||
//foreach (DictionaryEntry d in ls.BindableList)
|
||||
//{
|
||||
// Guid gItem = new Guid(d.Key.ToString());
|
||||
// Infragistics.Win.ValueListItem v = this.cbStatus.Items.Add(gItem, d.Value.ToString());
|
||||
// if (_SelectedStatus == gItem)
|
||||
// {
|
||||
// this.cbStatus.SelectedItem = v;
|
||||
|
||||
private void SetWOStatus_FormClosing(object sender, FormClosingEventArgs e)
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void SetWOStatus_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void btnOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
this.DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user