private void InitObj()
        {
            journalGV.ClassInfo = typeof(CoreModel.JournalBase);
            AppLists.AppListInfo l = new AppLists.AppListInfo(unitOfWork1);
            l.LinkLookupsToGrid(journalGV,journalXPC);
            var preList = new AppLists.AppListPredefined();
            preList.LinkList(new AppLists.ListColumnInfo(colWorkflowStatus) , CoreModel.MyEnums.AppListPredefined.WorkflowStatusCombo);
            preList.LinkList(new AppLists.ListColumnInfo(colSequenceWorkflowStatus), CoreModel.MyEnums.AppListPredefined.WorkflowStatusCombo);

            xtraTabControl1.SelectedPageChanged += (s, e) => 
            {
                if(e.Page.Name == detailsPage.Name)//Retrieve current role 
                {
                    var currJour = (JournalBase)journalGV.GetFocusedRow();
                    if(currJour != null)
                    {
                        securityRoleJournalXUC1.RetrieveRoleMembers(unitOfWork1,currJour);
                    }
                }
            };
        }
Esempio n. 2
0
        public void InitObj(UnitOfWork _uOW, Type _accountClassType)
        {
            unitOfWork1 = _uOW;

            AccountType = Account.TranslateTableEnumToActType(_accountClassType);

            actBaseXPC           = new XPCollection(_uOW, _accountClassType);
            actBaseBS.DataSource = actBaseXPC;
            actBaseBS.ResetBindings(true);

            //InitPrimaryGroup( _uOW,AccountType);
            //InitRef1(_uOW, AccountType);
            //InitRef2(_uOW, AccountType);
            AppLists.AppListInfo l = new AppLists.AppListInfo(_uOW);
            l.LinkToDataLayout(dataLayoutControl1, actBaseXPC);

            //Overview grid setup
            AppLists.AppListPredefined preAppList = new AppLists.AppListPredefined();
            var grpWhere = new BinaryOperator(new OperandProperty("AccountType"), new OperandValue(AccountType), BinaryOperatorType.Equal);

            preAppList.LinkList(new ListColumnInfo()
            {
                GridColumn = colGroupId, LookUpEditor = GroupIdTreeListLookUpEdit
            }, MyEnums.AppListPredefined.AccountGroupTree, grpWhere);
            preAppList.LinkList(new ListColumnInfo()
            {
                GridColumn = colReferenceNumber1, LookUpEditor = ReferenceNumber1TreeListLookUpEdit
            }, MyEnums.AppListPredefined.AccountRef1Tree, grpWhere);
            preAppList.LinkList(new ListColumnInfo()
            {
                GridColumn = colReferenceNumber2, LookUpEditor = ReferenceNumber2TreeListLookUpEdit
            }, MyEnums.AppListPredefined.AccountRef2Tree, grpWhere);
            preAppList.LinkList(new ListColumnInfo()
            {
                GridColumn = colWorkflowStatusInt
            }, MyEnums.AppListPredefined.WorkflowStatusCombo);
            l.LinkListToColumn(colCountry, typeof(CoreModel.Country), _valueMember: "CountryCode");
            l.LinkListToColumn(colCity, typeof(CoreModel.City), _valueMember: "CityCode");
        }