} // ctor public void Freeze() { if (dataset != null) { dataset.ExecuteQueuedEvents(); dataset = null; } } // proc Freeze
} // 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
} // 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
/// <summary></summary> /// <param name="tableDefinition"></param> /// <param name="dataset"></param> public PpsDataTableDesktop(PpsDataTableDefinition tableDefinition, PpsDataSet dataset) : base(tableDefinition, dataset) { } // ctor
} // ctor /// <summary></summary> /// <param name="dataset"></param> /// <returns></returns> public override PpsDataTable CreateDataTable(PpsDataSet dataset) => new PpsDataTableDesktop(this, dataset);
public DynamicRuntimeTable(PpsDataSet dataset) { this.dataset = dataset; } // ctor
public PpsDataSetChangedEvent(PpsDataSet dataset) { this.dataset = dataset; } // ctor
public ExecuteEvents(PpsDataSet dataset) { this.dataset = dataset ?? throw new ArgumentNullException(nameof(dataset)); } // ctor