/// <summary>
 ///     Merges two fields
 /// </summary>
 /// <param name="p"></param>
 public void Merge(DBField other)
 {
     if (getVariable() == other.getVariable())
     {
         setGuid(other.getGuid());
     }
 }
示例#2
0
        public bool Update(string clientid, string formName, string description, string formid, string formkeys,
                           string successmessage,
                           bool capturelocation,
                           bool captureip,
                           string errormessage,
                           bool enableDefault,
                           string submit,
                           string reset,
                           string update,
                           string cancel,
                           string component,
                           string keys
                           )
        {
            DBDatabase db;

            db = base.Database;
            DBComparison client = DBComparison.Equal(DBField.Field(TzAccount.Form.ClientID.Name), DBConst.String(clientid));
            DBComparison form   = DBComparison.Equal(DBField.Field(TzAccount.Form.FormID.Name), DBConst.String(formid));

            DBQuery upd = DBQuery.Update(TzAccount.Form.Table).Set(
                TzAccount.Form.Name.Name, DBConst.String(formName)
                ).Set(
                TzAccount.Form.FormKeys.Name, DBConst.String(formkeys)
                ).Set(
                TzAccount.Form.ComponentID.Name, DBConst.String(component)
                ).Set(
                TzAccount.Form.FormKeys.Name, DBConst.String(keys)
                ).Set(
                TzAccount.Form.Description.Name, DBConst.String(description)
                ).Set(
                TzAccount.Form.SuccessMessage.Name, DBConst.String(successmessage)
                ).Set(
                TzAccount.Form.ErrorMessage.Name, DBConst.String(errormessage)
                ).Set(
                TzAccount.Form.EnableDefaultAction.Name, DBConst.Const(DbType.Boolean, enableDefault)
                ).Set(
                TzAccount.Form.Submit.Name, DBConst.String(submit)
                ).Set(
                TzAccount.Form.Reset.Name, DBConst.String(reset)
                ).Set(
                TzAccount.Form.Update.Name, DBConst.String(update)
                ).Set(
                TzAccount.Form.Cancel.Name, DBConst.String(cancel)
                ).Set(
                TzAccount.Form.CaptureLocation.Name, DBConst.Const(DbType.Boolean, capturelocation)
                ).Set(
                TzAccount.Form.CaptureIPaddress.Name, DBConst.Const(DbType.Boolean, captureip)
                ).WhereAll(client, form);

            int i = db.ExecuteNonQuery(upd);

            if (i > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        protected void FieldChanged(DBField field)
        {
            if (RetrievalInProcess) return;

            if (field != null && field.OwnerType == GetType())
                changedFields.Add(field);
        }
 /// <summary>
 ///     Adds a new field to message fields
 /// </summary>
 /// <param name="aField">A new field</param>
 public void AddField(DBField aField)
 {
     allFields().Add(aField);
 }
示例#5
0
        internal override object ConvertRuntimeFieldToGateway(DBField dbField, string runtimeValue)
        {
            NUM_TYPE mgNum = new NUM_TYPE(runtimeValue);

            return(ConvertMgValueToGateway(dbField, mgNum));
        }
示例#6
0
        public override void visit(DBField obj, bool visitSubNodes)
        {
            obj.setValue("");

            base.visit(obj, visitSubNodes);
        }
示例#7
0
        private static void ProcessField(Field fld, XmlWriter xmlw, string type)
        {
            xmlw.WriteStartElement(type + "Field");
            xmlw.WriteElementString("Description", fld.Description);
            xmlw.WriteElementString("FormulaForm", fld.FormulaForm);
            xmlw.WriteElementString("HeadingText", fld.HeadingText);
            xmlw.WriteElementString("IsRecurring", fld.IsRecurring.ToStringSafe());
            xmlw.WriteElementString("Kind", fld.Kind.ToStringSafe());
            xmlw.WriteElementString("Length", fld.Length.ToStringSafe());
            xmlw.WriteElementString("LongName", fld.LongName);
            xmlw.WriteElementString("Name", fld.Name);
            xmlw.WriteElementString("ShortName", fld.ShortName);
            xmlw.WriteElementString("Type", fld.Type.ToStringSafe());
            xmlw.WriteElementString("UseCount", fld.UseCount.ToStringSafe());
            switch (fld.Kind)
            {
            case CrFieldKindEnum.crFieldKindDBField:
            {
                DBField dbf = (DBField)fld;
                xmlw.WriteElementString("TableAlias", dbf.TableAlias);
                break;
            }

            case CrFieldKindEnum.crFieldKindFormulaField:
            {
                FormulaField ff = (FormulaField)fld;
                xmlw.WriteElementString("FormulaNullTreatment", ff.FormulaNullTreatment.ToStringSafe());
                xmlw.WriteElementString("Text", ff.Text.ToStringSafe());
                xmlw.WriteElementString("Syntax", ff.Syntax.ToStringSafe());

                break;
            }

            case CrFieldKindEnum.crFieldKindGroupNameField:
            {
                GroupNameField gnf = (GroupNameField)fld;
                xmlw.WriteElementString("Group", gnf.Group.ConditionField.FormulaForm);
                break;
            }

            case CrFieldKindEnum.crFieldKindParameterField:
            {
                ParameterField pf = (ParameterField)fld;
                xmlw.WriteElementString("AllowCustomCurrentValues", pf.AllowCustomCurrentValues.ToStringSafe());
                xmlw.WriteElementString("AllowMultiValue", pf.AllowMultiValue.ToStringSafe());
                xmlw.WriteElementString("AllowNullValue", pf.AllowNullValue.ToStringSafe());
                if (pf.BrowseField != null)
                {
                    xmlw.WriteElementString("BrowseField", pf.BrowseField.FormulaForm);
                }
                xmlw.WriteElementString("DefaultValueSortMethod", pf.DefaultValueSortMethod.ToStringSafe());
                xmlw.WriteElementString("DefaultValueSortOrder", pf.DefaultValueSortOrder.ToStringSafe());
                xmlw.WriteElementString("EditMask", pf.EditMask);
                xmlw.WriteElementString("IsEditableOnPanel", pf.IsEditableOnPanel.ToStringSafe());
                xmlw.WriteElementString("IsOptionalPrompt", pf.IsOptionalPrompt.ToStringSafe());
                xmlw.WriteElementString("IsShownOnPanel", pf.IsShownOnPanel.ToStringSafe());

                xmlw.WriteElementString("ParameterType", pf.ParameterType.ToStringSafe());
                xmlw.WriteElementString("ReportName", pf.ReportName);
                xmlw.WriteElementString("ValueRangeKind", pf.ValueRangeKind.ToStringSafe());


                if (pf.CurrentValues != null)
                {
                    ProcessValues(pf.CurrentValues, xmlw, "Current");
                }
                if (pf.DefaultValues != null)
                {
                    ProcessValues(pf.DefaultValues, xmlw, "Default");
                }
                if (pf.InitialValues != null)
                {
                    ProcessValues(pf.InitialValues, xmlw, "Initial");
                }
                if (pf.Values != null)
                {
                    ProcessValues(pf.Values, xmlw, "");
                }
                ProcessValue(pf.MaximumValue as Value, xmlw, "Maximum");
                ProcessValue(pf.MinimumValue as Value, xmlw, "Minimum");


                break;
            }

            case CrFieldKindEnum.crFieldKindRunningTotalField:
            {
                RunningTotalField rtf = (RunningTotalField)fld;
                xmlw.WriteElementString("EvaluateCondition", ProcessCondition(rtf.EvaluateCondition));
                xmlw.WriteElementString("EvaluateConditionType", rtf.EvaluateConditionType.ToStringSafe());
                xmlw.WriteElementString("Operation", rtf.Operation.ToStringSafe());
                xmlw.WriteElementString("ResetCondition", ProcessCondition(rtf.ResetCondition));
                xmlw.WriteElementString("ResetConditionType", rtf.ResetConditionType.ToStringSafe());
                xmlw.WriteElementString("SummarizedField", rtf.SummarizedField.FormulaForm);
                break;
            }

            case CrFieldKindEnum.crFieldKindSpecialField:
            {
                SpecialField sf = (SpecialField)fld;
                xmlw.WriteElementString("SpecialType", sf.SpecialType.ToStringSafe());
                break;
            }

            case CrFieldKindEnum.crFieldKindSummaryField:
            {
                SummaryField smf = (SummaryField)fld;
                if (smf.Group != null)
                {
                    xmlw.WriteElementString("Group", smf.Group.ConditionField.FormulaForm);
                }
                xmlw.WriteElementString("Operation", smf.Operation.ToStringSafe());
                xmlw.WriteElementString("SummarizedField", smf.SummarizedField.FormulaForm);
                break;
            }

            case CrFieldKindEnum.crFieldKindUnknownField:
            {
                break;
            }
            }
            xmlw.WriteEndElement();
        }
示例#8
0
 public void UpdateEspackControl()
 {
     theString = ParentDA.SelectRS[DBField.ToString()].ToString();
 }
示例#9
0
        public List <OperatorEnum> GetOperators(DBField field)
        {
            List <OperatorEnum> rtn = new List <OperatorEnum>();

            if (!field.AllowManualFilterInput)
            {
                rtn.Add(DBCriteria <T> .OperatorEnum.EQUAL);
                rtn.Add(DBCriteria <T> .OperatorEnum.NOT_EQUAL);
                return(rtn);
            }

            switch (field.DBType)
            {
            case DBField.DBDataType.ENUM:
            case DBField.DBDataType.BOOL:
                rtn.Add(DBCriteria <T> .OperatorEnum.EQUAL);
                rtn.Add(DBCriteria <T> .OperatorEnum.NOT_EQUAL);
                break;

            case DBField.DBDataType.DATE_TIME:
            case DBField.DBDataType.INTEGER:
            case DBField.DBDataType.LONG:
            case DBField.DBDataType.REAL:
                rtn.Add(DBCriteria <T> .OperatorEnum.EQUAL);
                rtn.Add(DBCriteria <T> .OperatorEnum.NOT_EQUAL);
                rtn.Add(DBCriteria <T> .OperatorEnum.LESS_THAN);
                rtn.Add(DBCriteria <T> .OperatorEnum.GREATER_THAN);
                break;

            case DBField.DBDataType.TEXT:
                rtn.Add(DBCriteria <T> .OperatorEnum.EQUAL);
                rtn.Add(DBCriteria <T> .OperatorEnum.NOT_EQUAL);
                rtn.Add(DBCriteria <T> .OperatorEnum.CONTAINS);
                rtn.Add(DBCriteria <T> .OperatorEnum.NOT_CONTAIN);
                rtn.Add(DBCriteria <T> .OperatorEnum.BEGINS_WITH);
                rtn.Add(DBCriteria <T> .OperatorEnum.NOT_BEGIN_WITH);
                rtn.Add(DBCriteria <T> .OperatorEnum.ENDS_WITH);
                rtn.Add(DBCriteria <T> .OperatorEnum.NOT_ENDS_WITH);
                break;

            case DBField.DBDataType.STRING_OBJECT:
                if (field.Type == typeof(StringList))
                {
                    rtn.Add(DBCriteria <T> .OperatorEnum.EQUAL);
                    rtn.Add(DBCriteria <T> .OperatorEnum.NOT_EQUAL);
                    rtn.Add(DBCriteria <T> .OperatorEnum.CONTAINS);
                    rtn.Add(DBCriteria <T> .OperatorEnum.NOT_CONTAIN);
                    rtn.Add(DBCriteria <T> .OperatorEnum.BEGINS_WITH);
                    rtn.Add(DBCriteria <T> .OperatorEnum.NOT_BEGIN_WITH);
                    rtn.Add(DBCriteria <T> .OperatorEnum.ENDS_WITH);
                    rtn.Add(DBCriteria <T> .OperatorEnum.NOT_ENDS_WITH);
                }
                break;

            case DBField.DBDataType.TYPE:
            case DBField.DBDataType.DB_FIELD:
            case DBField.DBDataType.DB_OBJECT:
                break;
            }

            return(rtn);
        }
示例#10
0
        public static bool IsKnown(DBHeader header, out DBEntry entry)
        {
            entry = null;

            var def = Program.KnownDefinitions.Tables.FirstOrDefault(x => x.Build == header.BuildNumber && x.Name.ToUpper() == Path.GetFileNameWithoutExtension(header.FileName));

            if (def != null)
            {
                entry = new DBEntry()
                {
                    Name   = header.FileName,
                    Builds = new List <int>()
                    {
                        header.BuildNumber
                    },
                    Fields = new List <DBField>()
                };

                foreach (var field in def.Fields)
                {
                    if (field.AutoGenerate)
                    {
                        continue;
                    }
                    if (string.IsNullOrWhiteSpace(field.Name))
                    {
                        continue;
                    }

                    for (int i = 0; i < field.ArraySize; i++)
                    {
                        DBField fieldEntry = new DBField
                        {
                            Name = (field.ArraySize <= 1 ? field.Name : field.Name + (i + 1)).ToUpper()
                        };

                        switch (field.Type.Trim().ToLower().TrimStart('u'))
                        {
                        case "loc":
                            fieldEntry.Type = "LANGSTRINGREF";
                            break;

                        case "short":
                            fieldEntry.Type = "USHORT";
                            break;

                        case "int":
                        case "float":
                        case "string":
                        case "byte":
                        case "long":
                            fieldEntry.Type = field.Type.ToUpper();
                            break;
                        }

                        entry.Fields.Add(fieldEntry);
                    }
                }

                return(entry.Fields.Count == header.FieldCount);
            }

            return(false);
        }
示例#11
0
        /// <summary>
        /// Fill the fields data.
        /// </summary>
        /// <param name="fldValInBytes"></param>
        /// <param name="recFlags"></param>
        /// <param name="isCurrRec"></param>
        protected override void fillFieldsData(byte[] fldValInBytes, String recFlags)
        {
            Object           val = null;
            String           tmp = null;
            int              parsedLen = 0;
            int              i, j, from, size;
            StorageAttribute currType;
            bool             useHex;
            FieldDef         fld = null;
            bool             valueNotPassed;

            from = getFromFldIdx(false);
            size = getSizeFld(false);
            int destinationFieldIndex = 0;

            for (i = from, j = 0; j < size; i++, j++)
            {
                fld      = getFieldsTab().getField(i);
                currType = fld.getType();

                useHex = (ClientManager.Instance.getEnvironment().GetDebugLevel() > 1 ||
                          currType == StorageAttribute.ALPHA ||
                          currType == StorageAttribute.UNICODE ||
                          StorageAttributeCheck.isTypeLogical(currType));

                // Qcr #940443 : Old fashion flags are still being used by resident table. So check them 1st coz we  might get exception otherwise.
                // The flags for resident are very simple, only 2 options. '.' = false, '/' = true.
                // We keep using it for resident, since in the server side we do not know if we are creating the xml for richclient or for BC at the creation stage.
                // Since we couldn't create different flags for rich, we will use the old flags here.
                if ((byte)(recFlags[j]) == '.')
                {
                    _flags[i] = 0;
                }
                else if ((byte)(recFlags[j]) == '/')
                {
                    _flags[i] = 1;
                }
                else // New flags style. For the view.
                {
                    // Each flag will appear in the xml in 2 chars representing hex value ("42" for 0x42).
                    tmp       = recFlags.Substring(j * 2, 2);
                    _flags[i] = Convert.ToByte(tmp, 16);
                }

                // save the ind that the value was not passed from the server.
                valueNotPassed = (FLAG_VALUE_NOT_PASSED == (byte)(_flags[i] & FLAG_VALUE_NOT_PASSED));
                _flags[i]      = (byte)(_flags[i] & ~FLAG_VALUE_NOT_PASSED);

                _flagsHistory[i] = _flags[i];

                if (valueNotPassed)
                {
                    if (FLAG_NULL == (byte)(_flags[i] & FLAG_NULL))
                    {
                        // null ind is on, just put any value in the field.
                        val = fld.getDefaultValue();
                    }
                    else
                    {
                        // copy the existing value from the existing curr rec.
                        val = ((Record)_dataview.getCurrRec()).GetFieldValue(i);
                    }
                }
                else
                {
                    DBField dbField = destinationColumnList[destinationFieldIndex++];
                    val = RecordUtils.deSerializeItemVal(fldValInBytes, (StorageAttribute)dbField.Attr, dbField.Length, dbField.Storage, ref parsedLen);
                }

                _fieldsData[i] = val;
            }
            setInitialFldVals(false, false);
        }
示例#12
0
        public bool Update(string clientid,
                           string componentID,
                           string FieldID,
                           bool isrequired,
                           bool iscore,
                           bool isunique,
                           bool isReadOnly,
                           bool isSecuired,
                           bool isAuto,
                           string lookupid,
                           string defaultValue,
                           string fileExtension,
                           string regExp,
                           string attributeName,
                           int length,
                           bool isNull,
                           bool isPrimarykey)
        {
            lookupid      = lookupid == null ? "" : lookupid;
            defaultValue  = defaultValue == null ? "" : defaultValue;
            fileExtension = fileExtension == null ? "" : fileExtension;
            regExp        = regExp == null ? "" : regExp;
            attributeName = attributeName == null ? "" : attributeName;
            FieldID       = FieldID == null ? "" : FieldID;

            DBDatabase db;

            db = base.Database;
            DBConst      dbattributeName = DBConst.String(attributeName);
            DBConst      dbcomponentID   = DBConst.String(componentID);
            DBConst      dbclientid      = DBConst.String(clientid);
            DBConst      dbFieldID       = DBConst.String(FieldID);
            DBConst      dbisrequired    = DBConst.Const(DbType.Boolean, isrequired);
            DBConst      dbiscore        = DBConst.Const(DbType.Boolean, iscore);
            DBConst      dbisunique      = DBConst.Const(DbType.Boolean, isunique);
            DBConst      dbisReadOnly    = DBConst.Const(DbType.Boolean, isReadOnly);
            DBConst      dbisSecuired    = DBConst.Const(DbType.Boolean, isSecuired);
            DBConst      dbisAuto        = DBConst.Const(DbType.Boolean, isAuto);
            DBConst      dblookupid      = DBConst.String(lookupid);
            DBConst      dbdefaultValue  = DBConst.String(defaultValue);
            DBConst      dbfileExtension = DBConst.String(fileExtension);
            DBConst      dbregExp        = DBConst.String(regExp);
            DBComparison componentid     = DBComparison.Equal(DBField.Field(TzAccount.ComponentAttribute.ComponentID.Name), dbcomponentID);
            DBComparison fieldid         = DBComparison.Equal(DBField.Field(TzAccount.ComponentAttribute.FieldID.Name), dbFieldID);
            DBComparison Client          = DBComparison.Equal(DBField.Field(TzAccount.ComponentAttribute.ClientID.Name), dbclientid);

            DBQuery update = DBQuery.Update(TzAccount.ComponentAttribute.Table).Set(
                TzAccount.ComponentAttribute.IsRequired.Name, dbisrequired
                ).Set(
                TzAccount.ComponentAttribute.AttributeName.Name, dbattributeName
                ).Set(
                TzAccount.ComponentAttribute.IsCore.Name, dbiscore
                ).Set(
                TzAccount.ComponentAttribute.IsUnique.Name, dbisunique
                ).Set(
                TzAccount.ComponentAttribute.IsRequired.Name, dbisrequired
                ).Set(
                TzAccount.ComponentAttribute.IsSecured.Name, dbisSecuired
                ).Set(
                TzAccount.ComponentAttribute.IsAuto.Name, dbisAuto
                ).Set(
                TzAccount.ComponentAttribute.LookUpID.Name, dblookupid
                ).Set(
                TzAccount.ComponentAttribute.DefaultValue.Name, dbdefaultValue
                ).Set(
                TzAccount.ComponentAttribute.FileExtension.Name, dbfileExtension
                ).Set(
                TzAccount.ComponentAttribute.RegExp.Name, dbregExp
                ).Set(
                TzAccount.ComponentAttribute.Length.Name, DBConst.Int32(length)
                ).Set(
                TzAccount.ComponentAttribute.IsNullable.Name, DBConst.Const(DbType.Boolean, isNull)
                ).Set(
                TzAccount.ComponentAttribute.ISPrimaryKey.Name, DBConst.Const(DbType.Boolean, isPrimarykey)
                ).WhereAll(componentid, fieldid, Client);

            int i = db.ExecuteNonQuery(update);

            if (i > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#13
0
        public void GetDatatable(Tech.QScript.Syntax.SQuery sQuery)
        {
            DBSelectQuery select = DBQuery.Select();

            foreach (Syntax.Query.Table t in sQuery.tables)
            {
                foreach (Syntax.Query.TableField tf in t.Fields)
                {
                    select.Field(t.TableName, tf.FieldName).As(tf.FieldName);
                }
                foreach (Syntax.Query.Where where in sQuery.Conditions)
                {
                    if (where.Type == Syntax.Query.ConditionType.relation)
                    {
                        if (where.JoinType == Syntax.Query.JoinType.And)
                        {
                            select.And(where.lefttable, where.LeftField, Data.Compare.Equals, where.RightTable, where.RightField);
                        }
                        else if (where.JoinType == Syntax.Query.JoinType.or)
                        {
                            DBTable lft = DBTable.Table(where.lefttable);
                            DBTable rgt = DBTable.Table(where.RightTable);
                            DBField lff = DBField.Field(where.lefttable, where.LeftField);
                            DBField rff = DBField.Field(where.RightTable, where.RightField);
                            select.OrWhere(lff, Data.Compare.Equals, rff);

                            // DBComparison joined = DBComparison.Compare(DBClause);
                            //select.InnerJoin(where.lefttable).As (where.lefttable)
                            //     .On(where.lefttable,where.LeftField,Data.Compare.Equals,where.RightTable,where.RightField)

                            //select.OrWhere(where.lefttable,where.LeftField,Data.Compare.Equals, )
                            //select.OrWhere (where.lefttable, where.LeftField, Data.Compare.Equals, where.RightTable, where.RightField);
                        }
                        else if (where.JoinType == Syntax.Query.JoinType.None)
                        {
                            DBField      lff = DBField.Field(where.lefttable, where.LeftField);
                            DBField      rff = DBField.Field(where.RightTable, where.RightField);
                            DBComparison d   = DBComparison.Equal(lff, rff);
                            select.WhereNone(d);
                        }
                    }
                    else if (where.Type == Syntax.Query.ConditionType.filter)
                    {
                        if (where.JoinType == Syntax.Query.JoinType.And)
                        {
                            select.WhereField(where.lefttable, where.LeftField, Data.Compare.Equals, DBConst.String(where.Value));
                        }
                        else if (where.JoinType == Syntax.Query.JoinType.or)
                        {
                            DBField      lff = DBField.Field(where.lefttable, where.LeftField);
                            DBField      rff = DBField.Field(where.RightTable, where.RightField);
                            DBComparison d   = DBComparison.Equal(lff, DBConst.String(where.Value));

                            select.OrWhere(d);
                        }
                        else if (where.JoinType == Syntax.Query.JoinType.None)
                        {
                            DBField      lff = DBField.Field(where.lefttable, where.LeftField);
                            DBField      rff = DBField.Field(where.RightTable, where.RightField);
                            DBComparison d   = DBComparison.Equal(lff, DBConst.String(where.Value));
                            select.OrWhereNone(d);
                        }
                    }
                }
            }
            var data = Database.GetDatatable(select);

            query = select.ToSQLString(Database);
            dataTable
                = (System.Data.DataTable)data;
        }
示例#14
0
        public void Test_03_ScriptOfSelectCustomersWithOrdersOver500()
        {
            DBSelectQuery orderValue = DBQuery.Select()
                                       .Sum(DBField.Field("UnitPrice") * DBField.Field("Quantity") * (DBConst.Const(1.0) - DBField.Field("Discount"))).As("OrderValue")
                                       .And(DBFunction.IsNull("OrderID", DBConst.Const("No ID")))
                                       .Field("O", "customerID")
                                       .From("Orders").As("O")
                                       .InnerJoin("Order Details").As("OD")
                                       .On("OD", "OrderID", Compare.Equals, "O", "OrderID")
                                       .GroupBy("O", "CustomerID");

            DBQuery q = DBQuery.SelectTopN(10)
                        .Field("CUST", "CompanyName").As("Company Name")
                        .Field("CUST", "CustomerID").As("Customer ID")
                        .And(DBFunction.IsNull("CUST", "ContactName", DBConst.Const("No Contact"))).As("Contact")
                        .Sum("ORD", "OrderValue").As("Total Value")
                        .From("Customers").As("CUST")
                        .InnerJoin(orderValue).As("ORD")
                        .On("ORD", "CustomerID", Compare.Equals, "CUST", "CustomerID")
                        .WhereField("ORD", "OrderValue", Compare.GreaterThanEqual, DBConst.Const(500.0))
                        .GroupBy("CUST", "CompanyName").And("CUST", "CustomerID")
                        .OrderBy("Total Value", Order.Descending);

            this.OutputSql(q, "SelectCustomersWithOrdersOver500");
            this.OutputXML(q, "SelectCustomersWithOrdersOver500");
        }
示例#15
0
 public object ConvertMgValueToGateway(DBField dbField, object runtimeValue)
 {
     return(((NUM_TYPE)(runtimeValue)).to_double());
 }
示例#16
0
        public object ConvertMgValueToGateway(DBField dbField, object runtimeValue)
        {
            string dateString = DisplayConvertor.Instance.fromDate(((NUM_TYPE)runtimeValue).toXMLrecord(), new PIC(DateLongFormat, StorageAttribute.DATE, 0), 0, false);

            return(DisplayConvertor.Instance.a_2_date(dateString, DateLongFormat, 0));
        }