Exemple #1
0
        private void InitObj()
        {
            bindingMgr = this.BindingContext[mainActXPC];
            AppLists.AppListInfo l = new AppLists.AppListInfo(unitOfWork1);
            l.LinkToDataLayout(dataLayoutControl1, mainActXPC);

            l.LinkListToColumn(cOALookUpEdit, typeof(CoreModel.LedgerChartOfAccounts));

            cOALookUpEdit.EditValueChanged += (s, e) =>
            {
                var selected = (LedgerChartOfAccounts)cOALookUpEdit.GetSelectedDataRow();
                mainActXPC.Criteria       = new BinaryOperator(new OperandProperty("LedgerChartOfAccounts"), new OperandValue(selected), BinaryOperatorType.Equal);
                mainActXPC.LoadingEnabled = true;
            };
        }
Exemple #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");
        }