Пример #1
0
        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);
                }
            }
        }
Пример #2
0
 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;
         }
     }
 }
Пример #3
0
        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));
            }
        }
Пример #4
0
 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");
     }
 }