public async Task LoadData() { VMCustomerReallocation vm = BindingContext as VMCustomerReallocation; await vm.LoadStakeholderList(); LoadAssignAction(); }
void LoadAssignAction() { try { VMCustomerReallocation vm = BindingContext as VMCustomerReallocation; vm.AllotedStakeholderList(); if (vm != null) { this.PrimaryActionStakeholderPicker.Items.Clear(); vm.strPriStakeholder = ""; if (vm.PPriActionStakeholder != null) { foreach (var currentValue in vm.PPriActionStakeholder) { PrimaryActionStakeholderPicker.Items.Add(currentValue.UserName); vm.strPriStakeholder += "," + currentValue.UserLoginId; } PrimaryActionStakeholderPicker.SelectedIndex = 0; if (vm.strPriStakeholder != "") { vm.strPriStakeholder = vm.strPriStakeholder.Remove(0, 1); } } this.SecondaryActionStakeholderPicker.Items.Clear(); vm.strSecStakeholder = ""; if (vm.PSecActionStakeholder != null) { foreach (var currentValue in vm.PSecActionStakeholder) { SecondaryActionStakeholderPicker.Items.Add(currentValue.UserName); vm.strSecStakeholder += "," + currentValue.UserLoginId; } SecondaryActionStakeholderPicker.SelectedIndex = 0; if (vm.strSecStakeholder != "") { vm.strSecStakeholder = vm.strSecStakeholder.Remove(0, 1); } } this.InfoActionStakeholderPicker.Items.Clear(); vm.strInfoStakeholder = ""; if (vm.PInfoStakeholder != null) { foreach (var currentValue in vm.PInfoStakeholder) { InfoActionStakeholderPicker.Items.Add(currentValue.UserName); vm.strInfoStakeholder += "," + currentValue.UserLoginId; } InfoActionStakeholderPicker.SelectedIndex = 0; if (vm.strInfoStakeholder != "") { vm.strInfoStakeholder = vm.strInfoStakeholder.Remove(0, 1); } } } } catch { } }