Ejemplo n.º 1
0
        private void InitData()
        {
            if (Args.ParmEnumType == typeof(TableBase.TableEnum) && Args.ParmEnumValue > 0)
            {
                AccountType = (TableBase.TableEnum)Args.ParmEnumValue;
                Type t = TableBase.GetTable(unitOfWork1, AccountType).GetTableType();
                accountBaseXUC1.InitObj(unitOfWork1, t);


                accountBaseXPC = new XPCollection(unitOfWork1, t);

                accountBaseBS.DataSource          = accountBaseXPC;
                accountBaseLineXUC2.AccountBaseBS = this.accountBaseBS;
                this.accountBaseBS.ResetBindings(true);
                accountBaseLineXUC2.AccountBaseBS.ResetBindings(true);

                accountBaseGV.OptionsBehavior.EditingMode = DevExpress.XtraGrid.Views.Grid.GridEditingMode.Default;
                var actType = Account.TranslateTableEnumToActType(AccountType);
                accountBaseLineXUC2.InitObj(unitOfWork1, actType);

                /*
                 *  var filter = new BinaryOperator(new OperandProperty("TableId"), new OperandValue(AccountType), BinaryOperatorType.Equal);
                 *  accountBaseXPC.Criteria = filter;
                 *  accountBaseXPC.LoadingEnabled = true;
                 */
            }
        }