private void OnAddUser(object sender, RoutedEventArgs e) { ASObject account = listAccount.SelectedItem as ASObject; if (account == null) return; ASObject distribution_policy = account.getObject("distribution_policy"); PrincipalSelectWindow pwin = new PrincipalSelectWindow(); pwin.setRootPath("/", false); pwin.multipleValue = getMultipleList(distribution_policy); pwin.Owner = this; if (pwin.ShowDialog() == true) { if (distribution_policy == null) distribution_policy = new ASObject(); account["distribution_policy"] = distribution_policy; distribution_policy["managers"] = convertManagers(pwin.multipleValue); string excepUsers = convertManagersString(convertManagers(pwin.multipleValue)); if (excepUsers != txtExcepUsers.Text.Trim()) { txtExcepUsers.Text = excepUsers; AddUpdate(account); } } }
void btnCc_Click(object sender, RoutedEventArgs e) { PrincipalSelectWindow pwin = new PrincipalSelectWindow(); pwin.setRootPath("/", false); pwin.multipleValue = ccList; pwin.Owner = this; if (pwin.ShowDialog() == true) { ccList.Clear(); if (pwin.multipleValue.Count > 0) ccList = pwin.multipleValue; string excepUsers = convertManagersString(pwin.multipleValue, "email"); if (excepUsers != txtCc.Text.Trim()) { txtCc.Text = excepUsers; } } }
void btnDistributor_Click(object sender, RoutedEventArgs e) { if (Account == null) return; PrincipalSelectWindow pwin = new PrincipalSelectWindow(); pwin.setRootPath("/", false); pwin.multipleValue = getMultipleList(distribution_policy); pwin.Owner = this; if (pwin.ShowDialog() == true) { distribution_policy["distributor"] = convertDistributors(pwin.multipleValue); txtDistributor.Text = convertDistributorsString(convertDistributors(pwin.multipleValue)); } }
void btnAudit_Click(object sender, RoutedEventArgs e) { PrincipalSelectWindow pwin = new PrincipalSelectWindow(true); pwin.setRootPath("/", false); pwin.Owner = this; if (pwin.ShowDialog() == true) { reviewer = pwin.SingleValue; txtAudit.Text = reviewer.getString("name"); } }