Ejemplo n.º 1
0
        private void OnReleaseOrgContextMenuClick(object sender, RoutedEventArgs e)
        {
            var fse = mouseElement.DataContext as FileSystemEntity;

            if (fse == null)
            {
                return;
            }
            var win = new WindowSelectOrg();

            win.Closed += (o, ea) =>
            {
                if (win.DialogResult.HasValue && win.DialogResult.Value)
                {
                    foreach (var c in win.SelectedOrg)
                    {
                        if (c.IncludeChildOrg)
                        {
                            var dr = new DocumentRelease
                            {
                                ReleaseType  = DocumentReleaseType.Organization,
                                DocumentId   = fse.Type == FileSystemEntityType.Folder ? Guid.Empty : fse.FileId,
                                FolderId     = fse.Type == FileSystemEntityType.Folder ? fse.FolderId : 0,
                                ReviewUserId = 0,
                                ReviewOrgId  = c.OrganizationId,
                                ReleaseTime  = DateTime.Now,
                                ReleasedBy   = AuthenticateStatus.CurrentUser.UserId
                            };
                            docContext.ReleaseDocument(dr);
                        }
                    }
                }
            };
            win.Show();
        }
Ejemplo n.º 2
0
        private void OnSelectOrgButtonClick(object sender, RoutedEventArgs e)
        {
            var win = new WindowSelectOrg();

            win.SelectedOrg = SelectedOrganizations;
            win.Closed     += (o, ea) =>
            {
                if (win.DialogResult.HasValue && win.DialogResult.Value)
                {
                    userInfoChanged = true;
                    if (SelectedOrganizations == null)
                    {
                        SelectedOrganizations = new List <UserOrgRel>();
                    }
                    SelectedOrganizations   = win.SelectedOrg;
                    UserOrgList.ItemsSource = null;
                    UserOrgList.ItemsSource = SelectedOrganizations;
                }
            };
            win.Show();
        }
Ejemplo n.º 3
0
        private void OnReleaseOrgButtonClick(object sender, RoutedEventArgs e)
        {
            var win = new WindowSelectOrg();

            win.Closed += (o, ea) =>
            {
                if (true == win.DialogResult)
                {
                    foreach (var c in win.SelectedOrg)
                    {
                        if (c.IncludeChildOrg &&
                            selectedOrg.All(org => org.Id != c.OrganizationId))
                        {
                            selectedOrg.Add(c.Organization);
                        }
                    }
                    ShowMessageReleaseInfo();
                }
            };
            win.Show();
        }