private void Button_remove_Click(object sender, RoutedEventArgs e) { if (AddedPrivList.SelectedItem != null) { var item = AddedPrivList.SelectedItem.ToString(); AddedPrivilegeList.Remove(item); SupportPrivilegeList.Add(item); } }
private void CreateSupportPrivList(List <string> privilegeList, List <appdefprivilege> appdefprivList, datacontrol dataControl = null) { foreach (var item in PrivilegeItems) { SupportPrivilegeList.Add(item.privilegeName); } foreach (var item in appdefprivList) { SupportPrivilegeList.Add(item.Value); } if (dataControl != null) { List <string> ExistList = dataControl.privilegeList; foreach (var item in ExistList) { SupportPrivilegeList.Remove(item); } } }