private void SetLimitCombos()
{
if (!String.IsNullOrEmpty(edtStnUnit.Text))
{
String stdUnit = edtStnUnit.Text;
String prefix = "";
//-----------------------------------------------------------------------------------------//
//--- Lookup standard unit - if not found strip off 1st letter for prefix and try again ---//
//-----------------------------------------------------------------------------------------//
cmbStdUnit.SelectedValue = stdUnit;
if (cmbStdUnit.SelectedValue == null)
{
prefix = stdUnit.Substring(0, 1);
stdUnit = stdUnit.Substring(1);
cmbStdUnit.SelectedValue = stdUnit;
cmbPrefix.SelectedValue = prefix;
}
else //--- If the standard unit is found then clear out the prefix ---//
{
cmbPrefix.SelectedIndex = -1;
}
}
}