//AssignedPermissionDTO _Permission;
        //public AssignedPermissionDTO Permission
        //{
        //    get
        //    {
        //        if (_Permission == null)
        //            _Permission = AgentUICoreMediator.GetAgentUICoreMediator.tableDrivedEntityManagerService.GetEntityAssignedPermissions(AgentUICoreMediator.GetAgentUICoreMediator.GetRequester(), EntitySelectArea.SelectedEntity.ID, false);
        //        return _Permission;
        //    }
        //}
        //private void ManageSecurity()
        //{
        //    if (Permission.GrantedActions.Any(x => x == SecurityAction.NoAccess))
        //    {
        //        SecurityNoAccess = true;
        //    }
        //    else
        //    {
        //        if (Permission.GrantedActions.Any(x => x == SecurityAction.EditAndDelete))
        //        {
        //            SecurityEditAndDelete = true;
        //        }
        //        else if (Permission.GrantedActions.Any(x => x == SecurityAction.Edit))
        //        {
        //            SecurityEdit = true;
        //        }
        //        else if (Permission.GrantedActions.Any(x => x == SecurityAction.ReadOnly))
        //        {
        //            SecurityReadonly = true;
        //        }
        //        else
        //            SecurityNoAccess = true;
        //    }
        //    ImposeSecurity();
        //}
        //private void ImposeSecurity()
        //{
        //    if (SecurityNoAccess)
        //    {
        //        MainView = null;
        //        //ArchiveView.EnableDisable(false);
        //        AgentUICoreMediator.GetAgentUICoreMediator.UIManager.ShowInfo("عدم دسترسی به آرشیو");
        //    }
        //    else
        //    {
        //        if (SecurityReadonly)
        //        {
        //            LetterView.EnableDelete = false;
        //            LetterView.EnableAdd = false;
        //            LetterView.EnableEdit = false;

        //        }
        //        else if (SecurityEditAndDelete)
        //        {
        //        }
        //        else if (SecurityEdit)
        //        {
        //            LetterView.EnableDelete = false;
        //        }
        //        else
        //        {
        //            MainView = null;
        //            AgentUICoreMediator.GetAgentUICoreMediator.UIManager.ShowInfo("عدم دسترسی به آرشیو");
        //        }
        //    }
        //}
        private void SelectArea_DataItemSelected(object sender, EditAreaDataItemArg e)
        {
            if (e.DataItem != null)
            {
                LetterView.EnableDisable(true);
                DataTreeArea = new MyUILibrary.DataTreeArea.DataTreeArea();
                DataTreeArea.ContextMenuLoaded += DataTreeArea_ContextMenuLoaded;
                DataTreeArea.DataAreaConfirmed += DataTreeArea_DataAreaConfirmed;
                var dataTreeInistializer = new DataTreeAreaInitializer();
                dataTreeInistializer.EntitiyID = EntitySelectArea.SelectedEntity.ID;
                dataTreeInistializer.RelationshipTailsLoaded = EntitySelectArea.SelectedEntity.LoadLetterRelatedItems;
                dataTreeInistializer.FirstDataItem           = e.DataItem.DataView;
                dataTreeInistializer.RelationshipTails       = LetterRelationshipTails.Select(x => x.RelationshipTail).ToList();
                DataTreeArea.SetAreaInitializer(dataTreeInistializer);
                DataTreeArea.SelectAll();
                LetterView.DataTreeAreaEnabled = true;
                LetterView.ShowDataTree(DataTreeArea.View);
                if (dataTreeInistializer.RelationshipTailsLoaded)
                {
                    LetterView.ShowDataTree(DataTreeArea.View);
                }

                ShowLetters();
            }
            else
            {
                LetterView.EnableDisable(false);
            }
        }
Пример #2
0
        private void EntitySelectArea_DataItemSelected(object sender, EditAreaDataItemArg e)
        {
            var url = EntityDirectReport.URL;

            if (e.DataItem != null)
            {
                foreach (var item in e.DataItem.KeyProperties)
                {
                    var paramCol = EntityDirectReport.EntityDirectlReportParameters.FirstOrDefault(x => x.ColumnID == item.ColumnID);
                    if (paramCol != null)
                    {
                        var param = paramCol.ParameterName + "=" + item.Value;
                        if (url.Contains("?"))
                        {
                            url += "&" + param;
                        }
                        else
                        {
                            url += "?" + param;
                        }
                    }
                }
                System.Diagnostics.Process.Start(url);
            }
        }
 private void UIActionActivityManager_DataItemRemoved(object sender, EditAreaDataItemArg e)
 {
     //foreach (var item in ListRelationshipsFilters.ToList())
     //{
     //    if (item.SourceEditArea == sender && e.DataItem == item.DataItem)
     //        RemoveRelationshipsFilters(item);
     //}
 }
 private void EditArea_DataItemShown(object sender, EditAreaDataItemArg e)
 {
 }