public XtraFieldProperties(XtraFieldProperties XtraFieldProperties) { this._xtraObjectProperties = XtraFieldProperties.XtraObjectProperties; this.IsPK = XtraFieldProperties.IsPK; this.FieldName = XtraFieldProperties.FieldName; this.FieldType = XtraFieldProperties.FieldType; this.Caption = XtraFieldProperties.Caption; this.AllowUserEdit = XtraFieldProperties.AllowUserEdit; this.AllowUserNull = XtraFieldProperties.AllowUserNull; this.IsMapped = XtraFieldProperties.IsMapped; this.MappedParamName = XtraFieldProperties.MappedParamName; this._fieldCalculator = XtraFieldProperties.FieldCalculator; this.SelectFkItemType = XtraFieldProperties.SelectFkItemType; this.SpecifiedControlType = XtraFieldProperties.SpecifiedControlType; this.FKCommands = XtraFieldProperties.FKCommands; }
internal XtraObjectRelation(XtraObjectProperties ParentObject, XtraFieldProperties ParentField, XtraObjectProperties ChildObject, XtraFieldProperties ChildField, bool IsShown, XOP.XOPFieldValueCollection DefaultValues, string SerializationName) { this.IsShown = IsShown; this.ParentObject = ParentObject; this.ParentField = ParentField; this.ChildObject = ChildObject; this.ChildField = ChildField; this.DefaultValues = DefaultValues; this.SerializationName = SerializationName; }
internal XOPFieldCalculator(XtraFieldProperties XtraFieldProperties) { List<XOPFieldCalculatorRouteRelation> rels = new List<XOPFieldCalculatorRouteRelation>(); XtraFieldProperties iterField = null; foreach (string refr in XtraFieldProperties.CalculatorExpression.Split(',')) { string [] ets = refr.Split(';'); if (_issueField == null) { _issueField = ets[0]; iterField = XtraFieldProperties.XtraObjectProperties.Fields[_issueField]; } XOPFieldCalculatorRouteRelation rel = null; if (ets.Length == 2) { string[] childTablRef = ets[1].Split('-'); if (childTablRef.Length == 1) { //Reference to parent table DataAvail.XtraObjectProperties.XtraObjectRelation parRel = iterField.ParentRelation; iterField = parRel.ParentObject.Fields[ets[1]]; rel = new XOPFieldCalculatorRouteRelation( parRel.ParentObject, parRel.ParentField, iterField, null); } else if (childTablRef.Length == 3) { //Reference to child table DataAvail.XtraObjectProperties.XtraObjectRelation childRel = iterField.ParentRelation.ParentObject.GetChildRelation(childTablRef[0], childTablRef[1]); if (childRel != null) { string filter = null; string childColumn = childTablRef[2]; int filterStratBraceIndex = childColumn.IndexOf("[",0); int filterEndBraceIndex = -1; if (filterStratBraceIndex != -1) filterEndBraceIndex = childColumn.IndexOf("]",filterStratBraceIndex); //Some formatting check and exceptions are needed here if (filterStratBraceIndex != -1 && filterEndBraceIndex != -1) { filter = childColumn.Substring(filterStratBraceIndex + 1, filterEndBraceIndex - filterStratBraceIndex - 1); childColumn = childColumn.Remove(filterStratBraceIndex, filterEndBraceIndex - filterStratBraceIndex + 1); } iterField = childRel.ChildObject.Fields[childColumn]; rel = new XOPFieldCalculatorRouteRelation( childRel.ChildObject, childRel.ChildField, iterField, filter); } } } if (rel == null) { throw new Exception("Can't parse calculator expression string"); } rels.Add(rel); } _routeRealtions = rels.ToArray(); }
public XtraTextFieldProperties(XtraFieldProperties XtraFieldProperties) : base(XtraFieldProperties) { }