internal FindByDateMatcher(DateProperty property, MatchType matchType, DateTime value) { _propertyToMatch = property; _matchType = matchType; _valueToMatch = value; }
public virtual void Visit(DateProperty mapping) { }
protected override void Initialize() { CurrencyRateProperty = new TextProperty(this, CurrencyRate); CurrencyRateProperty.Editable = false; DueDateProperty = new DateProperty(this, DueDate); DueDateProperty.Required = true; FreightProperty = new MoneyProperty(this, Freight); FreightProperty.Required = true; FreightProperty.Editable = false; ShipMethodIdProperty = new EnumIntProperty(this, ShipMethodId); ShipMethodIdProperty.Required = true; ShipMethodIdProperty.Size = 10; ShipMethodIdProperty.EnumType = "ship method"; SubTotalProperty = new MoneyProperty(this, SubTotal); SubTotalProperty.Required = true; SubTotalProperty.Editable = false; TaxAmtProperty = new MoneyProperty(this, TaxAmt); TaxAmtProperty.Required = true; TaxAmtProperty.Editable = false; TotalDueProperty = new MoneyProperty(this, TotalDue); TotalDueProperty.Required = true; TotalDueProperty.Editable = false; DataObject objCreditCard = new CreditCardPaymentObjectCustomized(); AddChildObject(CreditCard, objCreditCard); }
set => SetValue(DateProperty, value);
protected override void Initialize() { CustomerNameProperty = new TextProperty(this, CustomerName); CustomerNameProperty.Editable = false; CustomerStoreProperty = new TextProperty(this, CustomerStore); CustomerStoreProperty.Editable = false; DueDateProperty = new DateProperty(this, DueDate); DueDateProperty.Required = true; DueDateProperty.Editable = false; OnlineOrderFlagProperty = new EnumBoolProperty(this, OnlineOrderFlag); OnlineOrderFlagProperty.Required = true; OnlineOrderFlagProperty.Size = 10; OnlineOrderFlagProperty.EnumType = "yesno"; OnlineOrderFlagProperty.Editable = false; OrderDateProperty = new DateProperty(this, OrderDate); OrderDateProperty.Required = true; OrderDateProperty.Editable = false; SalesOrderIdProperty = new IntegerKeyProperty(this, SalesOrderId); SalesOrderIdProperty.Required = true; SalesOrderIdProperty.Editable = false; SalesOrderNumberProperty = new TextProperty(this, SalesOrderNumber); SalesOrderNumberProperty.Required = true; SalesOrderNumberProperty.Size = 25; SalesOrderNumberProperty.Editable = false; SalesPersonIdProperty = new EnumIntProperty(this, SalesPersonId); SalesPersonIdProperty.EnumType = "sales person"; SalesPersonIdProperty.Editable = false; ShipDateProperty = new DateProperty(this, ShipDate); ShipDateProperty.Editable = false; StatusProperty = new EnumByteProperty(this, Status); StatusProperty.Required = true; StatusProperty.Size = 10; StatusProperty.EnumType = "sales order status"; StatusProperty.Editable = false; TerritoryIdProperty = new EnumIntProperty(this, TerritoryId); TerritoryIdProperty.Size = 10; TerritoryIdProperty.EnumType = "sales territory"; TerritoryIdProperty.Editable = false; TotalDueProperty = new MoneyProperty(this, TotalDue); TotalDueProperty.Required = true; TotalDueProperty.Editable = false; }
get => (DateTime)GetValue(DateProperty); set => SetValue(DateProperty, value);
protected override void Initialize() { AccountNumberProperty = new TextProperty(this, AccountNumber); AccountNumberProperty.Size = 15; CommentProperty = new TextProperty(this, Comment); CommentProperty.Size = 128; ModifiedDateProperty = new DateTimeProperty(this, ModifiedDate); ModifiedDateProperty.Required = true; ModifiedDateProperty.Editable = false; OnlineOrderFlagProperty = new BooleanProperty(this, OnlineOrderFlag); OnlineOrderFlagProperty.Required = true; OrderDateProperty = new DateProperty(this, OrderDate); OrderDateProperty.Required = true; OrderDateProperty.Editable = false; PurchaseOrderNumberProperty = new TextProperty(this, PurchaseOrderNumber); PurchaseOrderNumberProperty.Size = 25; RevisionNumberProperty = new TinyIntegerProperty(this, RevisionNumber); RevisionNumberProperty.Required = true; RevisionNumberProperty.Editable = false; SalesOrderIdProperty = new IntegerKeyProperty(this, SalesOrderId); SalesOrderIdProperty.Required = true; SalesOrderIdProperty.Editable = false; SalesOrderNumberProperty = new TextProperty(this, SalesOrderNumber); SalesOrderNumberProperty.Required = true; SalesOrderNumberProperty.Size = 25; SalesOrderNumberProperty.Editable = false; ShipDateProperty = new DateProperty(this, ShipDate); StatusProperty = new EnumByteProperty(this, Status); StatusProperty.Required = true; StatusProperty.Size = 10; StatusProperty.EnumType = "sales order status"; DataObject objCustomer = new SalesOrderCustomerObjectCustomized(); AddChildObject(Customer, objCustomer); DataObject objDetail = new SalesOrderDetailList(); AddChildObject(Detail, objDetail); DataObject objPayment = new SalesOrderPaymentObject(); AddChildObject(Payment, objPayment); DataObject objSales = new SalesOrderSalesObjectCustomized(); AddChildObject(Sales, objSales); }
public override string ToString() { return($"{StringProperty ?? "<null>"};{IntegerProperty};{GuidProperty};{UriProperty};{DateProperty.ToString(COMPARISON_DATE_FORMAT, CultureInfo.InvariantCulture)};{Select};{BooleanProperty};{RandomProperty ?? "<null>"}"); }
private void ImportField(XmlNode fieldNode, ObjectClass obj) { XmlAttribute attr = null; if (fieldNode.Name == "forms") { obj.Form = this.ConvertXmlToString(fieldNode.InnerXml); return; } if (fieldNode.Name == "fieldname") { attr = fieldNode.Attributes["expression"]; if (attr != null) { obj[SystemProperty.Name].Evaluated = true; obj[SystemProperty.Name].Expression = attr.Value; } return; } attr = fieldNode.Attributes["name"]; if (attr == null) { return; } string fieldName = attr.Value; attr = fieldNode.Attributes["type"]; if (attr == null) { return; } FieldType fieldType = Utils.Parse(attr.Value); Field field = this.Database.Classes.AddField(obj, fieldName, fieldType); attr = fieldNode.Attributes["category"]; if (attr != null) { field.Category = attr.Value; } attr = fieldNode.Attributes["group"]; if (attr != null) { field.Group = bool.Parse(attr.Value); } field.Comment = fieldNode.AttributeValueOrDefault("comment"); attr = fieldNode.Attributes["expression"]; if (attr != null && field.FieldType == FieldType.Text) { field.Evaluated = true; field.Expression = attr.Value; } attr = fieldNode.Attributes["order"]; if (attr != null) { field.Order = int.Parse(attr.Value); } switch (fieldType) { case FieldType.Url: attr = fieldNode.Attributes["method"]; if (attr != null) { UrlProperty.Get(field).Type = UrlProperty.Parse(attr.Value); } break; case FieldType.Text: XmlAttribute xmlTextDef = fieldNode.Attributes["default"]; if (xmlTextDef != null) { field.DefaultValue.AsText = xmlTextDef.Value; } break; case FieldType.Select: XmlAttribute xmlValues = fieldNode.Attributes["values"]; if (xmlValues != null) { List <string> sc = (List <string>)field.Data; sc.AddRange(xmlValues.Value.Split(new char[] { ';' })); XmlAttribute xmlValuesDef = fieldNode.Attributes["default"]; if (xmlValuesDef != null) { field.DefaultValue.AsInteger = sc.IndexOf(xmlValuesDef.Value); } } break; case FieldType.Number: attr = fieldNode.Attributes["default"]; if (attr != null) { field.DefaultValue.AsDecimal = decimal.Parse(attr.Value); } NumberProperty prop = (NumberProperty)field.Data; attr = fieldNode.Attributes["decimal"]; if (attr != null) { prop.DecimalPlaces = int.Parse(attr.Value); } attr = fieldNode.Attributes["maximum"]; if (attr != null) { prop.Maximum = decimal.Parse(attr.Value); prop.Bounds = true; } attr = fieldNode.Attributes["minimum"]; if (attr != null) { prop.Minimum = decimal.Parse(attr.Value); prop.Bounds = true; } attr = fieldNode.Attributes["increment"]; if (attr != null) { prop.Increment = decimal.Parse(attr.Value); } attr = fieldNode.Attributes["thousands"]; if (attr != null) { prop.Thousands = bool.Parse(attr.Value); } prop.Prefix = fieldNode.AttributeValueOrDefault("prefix"); prop.Suffix = fieldNode.AttributeValueOrDefault("suffix"); break; case FieldType.List: XmlAttribute xmlListRef = fieldNode.Attributes["ref_guid"]; if (xmlListRef != null) { ListProperty.Get(field).Reference = Database.Classes[new Guid(xmlListRef.Value)]; } else { xmlListRef = fieldNode.Attributes["reference"]; if (xmlListRef != null) { ImportObjectClass ic_list = this[xmlListRef.Value]; ListProperty.Get(field).Reference = Database.Classes[ic_list.Identifier]; } } break; case FieldType.Boolean: XmlAttribute xmlBoolDef = fieldNode.Attributes["default"]; if (xmlBoolDef != null) { field.DefaultValue.AsBoolean = bool.Parse(xmlBoolDef.Value); } break; case FieldType.Date: XmlAttribute xmlDateDef = fieldNode.Attributes["default"]; if (xmlDateDef != null) { field.DefaultValue.AsDateTime = DateTime.Parse(xmlDateDef.Value); } attr = fieldNode.Attributes["time"]; if (attr != null) { DateProperty.Get(field).ViewTime = bool.Parse(attr.Value); } break; case FieldType.Table: XmlAttribute xmlTableCols = fieldNode.Attributes["columns"]; List <ColumnProperty> list = new List <ColumnProperty>(); if (xmlTableCols != null) { foreach (string col in xmlTableCols.Value.Split(new char[] { ';' })) { list.Add(new ColumnProperty(col)); } } else { foreach (XmlNode xmlColumn in fieldNode.ChildNodes) { XmlAttribute xmlColName = xmlColumn.Attributes["name"]; if (xmlColName != null) { string colName = xmlColName.Value; ColumnProperty cp = new ColumnProperty(colName); XmlAttribute xmlColRef = xmlColumn.Attributes["ref_guid"]; if (xmlColRef != null) { cp.Reference = Database.Classes[new Guid(xmlColRef.Value)]; } else { xmlColRef = xmlColumn.Attributes["reference"]; if (xmlColRef != null) { ImportObjectClass c_ref = this[xmlColRef.Value]; cp.Reference = Database.Classes[c_ref.Identifier]; } } attr = xmlColumn.Attributes["width"]; if (attr != null) { cp.Width = int.Parse(attr.Value); } attr = xmlColumn.Attributes["min_width"]; if (attr != null) { cp.MinWidth = int.Parse(attr.Value); } attr = xmlColumn.Attributes["visible"]; if (attr != null) { cp.Visible = bool.Parse(attr.Value); } attr = xmlColumn.Attributes["resizable"]; if (attr != null) { cp.Resizable = bool.Parse(attr.Value); } attr = xmlColumn.Attributes["frozen"]; if (attr != null) { cp.Frozen = bool.Parse(attr.Value); } attr = xmlColumn.Attributes["div_width"]; if (attr != null) { cp.DividerWidth = int.Parse(attr.Value); } attr = xmlColumn.Attributes["auto_size"]; if (attr != null) { cp.AutoSize = bool.Parse(attr.Value); } attr = xmlColumn.Attributes["fill_weight"]; if (attr != null) { cp.FillWeight = int.Parse(attr.Value); } list.Add(cp); } } } ((List <ColumnProperty>)field.Data).AddRange(list); break; case FieldType.Rating: XmlAttribute xmlRaitDef = fieldNode.Attributes["default"]; if (xmlRaitDef != null) { field.DefaultValue.AsDecimal = decimal.Parse(xmlRaitDef.Value); } break; case FieldType.Reference: XmlAttribute xmlRef = fieldNode.Attributes["ref_guid"]; if (xmlRef != null) { ReferenceProperty.Get(field).Reference = Database.Classes[new Guid(xmlRef.Value)]; } else { xmlRef = fieldNode.Attributes["reference"]; if (xmlRef != null) { ImportObjectClass ic_ref = this[xmlRef.Value]; ReferenceProperty.Get(field).Reference = Database.Classes[ic_ref.Identifier]; } } break; } }
public string DateProperty_Structure_String_Succeed(string startTime, string endTime) { DateProperty property = new DateProperty(startTime, endTime); return(property.ToString()); }
set => this.SetValue(DateProperty, value);
set => SetValue(DateProperty, value.ToLocalTime());
public virtual void Visit(DateProperty property) { }
public void Visit(DateProperty mapping) { Increment("date"); }
protected override void Initialize() { CustomerNameProperty = new TextProperty(this, CustomerName); CustomerNameOperatorProperty = new OperatorProperty(this, CustomerNameOperator); CustomerNameOperatorProperty.Size = 10; CustomerNameOperatorProperty.EnumType = "operators"; CustomerNameOperatorProperty.HasNullCheck = true; CustomerStoreProperty = new TextProperty(this, CustomerStore); CustomerStoreOperatorProperty = new OperatorProperty(this, CustomerStoreOperator); CustomerStoreOperatorProperty.Size = 10; CustomerStoreOperatorProperty.EnumType = "operators"; CustomerStoreOperatorProperty.HasNullCheck = true; DueDateProperty = new DateProperty(this, DueDate); DueDate2Property = new DateProperty(this, DueDate2); DueDateOperatorProperty = new OperatorProperty(this, DueDateOperator); DueDateOperatorProperty.Size = 10; DueDateOperatorProperty.EnumType = "operators"; GlobalRegionProperty = new EnumProperty(this, GlobalRegion); GlobalRegionProperty.Size = 50; GlobalRegionProperty.EnumType = "sales territory group"; OrderDateProperty = new DateProperty(this, OrderDate); OrderDate2Property = new DateProperty(this, OrderDate2); OrderDateOperatorProperty = new OperatorProperty(this, OrderDateOperator); OrderDateOperatorProperty.Size = 10; OrderDateOperatorProperty.EnumType = "operators"; SalesOrderNumberProperty = new TextProperty(this, SalesOrderNumber); SalesOrderNumberProperty.Size = 25; SalesOrderNumberOperatorProperty = new OperatorProperty(this, SalesOrderNumberOperator); SalesOrderNumberOperatorProperty.Size = 10; SalesOrderNumberOperatorProperty.EnumType = "operators"; SalesPersonIdProperty = new EnumIntProperty(this, SalesPersonId); SalesPersonIdProperty.IsMultiValued = true; SalesPersonIdProperty.EnumType = "sales person"; SalesPersonIdOperatorProperty = new OperatorProperty(this, SalesPersonIdOperator); SalesPersonIdOperatorProperty.Size = 10; SalesPersonIdOperatorProperty.EnumType = "operators"; SalesPersonIdOperatorProperty.HasNullCheck = true; StatusProperty = new EnumByteProperty(this, Status); StatusProperty.Size = 10; StatusProperty.EnumType = "sales order status"; StatusOperatorProperty = new OperatorProperty(this, StatusOperator); StatusOperatorProperty.Size = 10; StatusOperatorProperty.EnumType = "operators"; TerritoryIdProperty = new EnumIntProperty(this, TerritoryId); TerritoryIdProperty.Size = 10; TerritoryIdProperty.EnumType = "sales territory"; TerritoryIdOperatorProperty = new OperatorProperty(this, TerritoryIdOperator); TerritoryIdOperatorProperty.Size = 10; TerritoryIdOperatorProperty.EnumType = "operators"; TerritoryIdOperatorProperty.HasNullCheck = true; TotalDueProperty = new MoneyProperty(this, TotalDue); TotalDue2Property = new MoneyProperty(this, TotalDue2); TotalDueOperatorProperty = new OperatorProperty(this, TotalDueOperator); TotalDueOperatorProperty.Size = 10; TotalDueOperatorProperty.EnumType = "operators"; }
protected override void Initialize() { SalesOrderIdProperty = new IntegerKeyProperty(this, SalesOrderId) { Required = true, Editable = false, IsKey = true, }; SalesOrderNumberProperty = new TextProperty(this, SalesOrderNumber) { Required = true, Size = 25, Editable = false, }; OrderDateProperty = new DateProperty(this, OrderDate) { Required = true, Editable = false, }; StatusProperty = new EnumByteProperty(this, Status) { Required = true, EnumType = "sales order status", }; OnlineOrderFlagProperty = new BooleanProperty(this, OnlineOrderFlag) { Required = true, }; PurchaseOrderNumberProperty = new TextProperty(this, PurchaseOrderNumber) { Size = 25, }; AccountNumberProperty = new TextProperty(this, AccountNumber) { Size = 15, }; ShipDateProperty = new DateProperty(this, ShipDate) { }; CommentProperty = new TextProperty(this, Comment) { Size = 128, }; RevisionNumberProperty = new TinyIntegerProperty(this, RevisionNumber) { Required = true, Editable = false, }; ModifiedDateProperty = new DateTimeProperty(this, ModifiedDate) { Required = true, Editable = false, }; DataObject objCustomer = ServiceProvider.GetService <SalesOrderCustomerObject>(); AddChildObject(Customer, objCustomer); DataObject objDetail = ServiceProvider.GetService <SalesOrderDetailList>(); AddChildObject(Detail, objDetail); DataObject objPayment = ServiceProvider.GetService <SalesOrderPaymentObject>(); AddChildObject(Payment, objPayment); DataObject objSales = ServiceProvider.GetService <SalesOrderSalesObject>(); AddChildObject(Sales, objSales); }