Exemple #1
0
            }             // ctor

            public void Freeze()
            {
                if (dataset != null)
                {
                    dataset.ExecuteQueuedEvents();
                    dataset = null;
                }
            }             // proc Freeze
Exemple #2
0
            }             // ctor

            private BindingRestrictions GetRestrictions(PpsDataSet dataset)
            {
                return(BindingRestrictions.GetExpressionRestriction(
                           Expression.AndAlso(
                               Expression.TypeIs(Expression, typeof(PpsDataSet)),
                               Expression.Equal(
                                   Expression.Property(Expression.Convert(Expression, typeof(PpsDataSet)), definitionPropertyInfo),
                                   Expression.Constant(dataset.DataSetDefinition)
                                   )
                               )
                           ));
            }             // func GetRestrictions
Exemple #3
0
        }         // proc EndInit

        /// <summary>Generate value from dataset.</summary>
        /// <param name="dataset"></param>
        /// <returns></returns>
        public PpsObjectTag GenerateTagValue(PpsDataSet dataset)
        {
            if (column == null)
            {
                throw new ArgumentNullException("column", $"Tag {tagName} not initalized.");
            }

            var table = dataset.Tables[column.Table];

            switch (mode)
            {
            case PpsDataSetAutoTagMode.First:
                return(new PpsObjectTag(Name, PpsObjectTagClass.Text, table.Count > 0 ? table[0][column.Index] : null));

            case PpsDataSetAutoTagMode.Conact:
                return(new PpsObjectTag(Name, PpsObjectTagClass.Text, table.Count == 0 ? null : String.Join(" ", from c in table select c[column.Index].ToString())));

            case PpsDataSetAutoTagMode.Number:
                goto case PpsDataSetAutoTagMode.First;

            default:
                return(null);
            }
        }         // func GenerateTagValue
Exemple #4
0
 /// <summary></summary>
 /// <param name="tableDefinition"></param>
 /// <param name="dataset"></param>
 public PpsDataTableDesktop(PpsDataTableDefinition tableDefinition, PpsDataSet dataset)
     : base(tableDefinition, dataset)
 {
 }         // ctor
Exemple #5
0
        }         // ctor

        /// <summary></summary>
        /// <param name="dataset"></param>
        /// <returns></returns>
        public override PpsDataTable CreateDataTable(PpsDataSet dataset)
        => new PpsDataTableDesktop(this, dataset);
Exemple #6
0
 public DynamicRuntimeTable(PpsDataSet dataset)
 {
     this.dataset = dataset;
 }             // ctor
Exemple #7
0
 public PpsDataSetChangedEvent(PpsDataSet dataset)
 {
     this.dataset = dataset;
 }             // ctor
Exemple #8
0
 public ExecuteEvents(PpsDataSet dataset)
 {
     this.dataset = dataset ?? throw new ArgumentNullException(nameof(dataset));
 }             // ctor