|
|
|
@ -113,6 +113,8 @@ namespace Rs.MotionPlat.SysConfig
|
|
|
|
|
comBoxRelCategory.Items.Clear();
|
|
|
|
|
var list = relCategorieList.GroupBy(rc => rc.Category).Select(a=>a.Key).ToList();
|
|
|
|
|
comBoxRelCategory.DataSource = list;
|
|
|
|
|
|
|
|
|
|
comBoxRelCategory.SelectedItem = GlobalVar.RelCategory;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void BindMenu()
|
|
|
|
@ -341,8 +343,30 @@ namespace Rs.MotionPlat.SysConfig
|
|
|
|
|
|
|
|
|
|
private void comBoxRelCategory_SelectedIndexChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
string selectValue=comBoxRelCategory.SelectedItem.ToString();
|
|
|
|
|
comBoxCp.DataSource = relCategorieList.Where(r => r.Category == selectValue).Select(a => a.CP).ToList();
|
|
|
|
|
List<string> cpList= relCategorieList.Where(r => r.Category == selectValue).Select(a => a.CP).ToList();
|
|
|
|
|
comBoxCp.DataSource = cpList;
|
|
|
|
|
if(cpList.Contains(GlobalVar.RelCp))
|
|
|
|
|
{
|
|
|
|
|
comBoxCp.SelectedItem = GlobalVar.RelCp;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
comBoxCp.SelectedIndex = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void comBoxCp_SelectedIndexChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void btnSaveRelCategory_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
SysConfigParam.Update("RelCategory", comBoxRelCategory.SelectedItem.ToString());
|
|
|
|
|
SysConfigParam.Update("RelCp", comBoxCp.SelectedItem.ToString());
|
|
|
|
|
Msg.ShowInfo("Save success!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|