private static void FillSqlBuilder(SqlClauseBuilderIUW builder, StartWorkflowJob data)
        {
            builder.AppendItem("JOB_ID", data.JobID);
            builder.AppendItem("PROCESS_KEY", data.ProcessKey);
            builder.AppendTenantCode(typeof(StartWorkflowJob));

            if (OguBase.IsNotNullOrEmpty(data.Operator))
            {
                builder.AppendItem("OPERATOR_ID", data.Operator.ID);
                builder.AppendItem("OPERATOR_NAME", data.Operator.DisplayName);
            }
        }
Esempio n. 2
0
        private static void DoWhereSqlClauseBuilder <T>(SqlClauseBuilderIUW builder, ORMappingItem item, T graph)
        {
            object data = GetValueFromObject(item, graph);

            if ((data == null || data == DBNull.Value))
            {
                builder.AppendItem(item.DataFieldName, data, SqlClauseBuilderBase.Is);
            }
            else
            {
                builder.AppendItem(item.DataFieldName, FormatValue(data, item));
            }
        }
Esempio n. 3
0
        private static void DoWhereSqlClauseBuilderByPrimaryKey <T>(SqlClauseBuilderIUW builder, DataProperty item, T graph)
        {
            if (item.Primary)
            {
                object data = GetPropertyValue(item, graph);

                if ((data == null || data == DBNull.Value))
                {
                    builder.AppendItem(item.FieldName, data, SqlClauseBuilderBase.Is);
                }
                else
                {
                    builder.AppendItem(item.FieldName, data);
                }
            }
        }
Esempio n. 4
0
        private static void DoInsertUpdateSqlClauseBuilder <T>(SqlClauseBuilderIUW builder, ORMappingItem item, T graph)
        {
            if (item.IsIdentity == false)
            {
                object data = GetValueFromObject(item, graph);

                if ((data == null || data == DBNull.Value || (data != null && data.Equals(TypeCreator.GetTypeDefaultValue(data.GetType())))) &&
                    string.IsNullOrEmpty(item.DefaultExpression) == false)
                {
                    builder.AppendItem(item.DataFieldName, item.DefaultExpression, SqlClauseBuilderBase.EqualTo, true);
                }
                else
                {
                    builder.AppendItem(item.DataFieldName, FormatValue(data, item));
                }
            }
        }
Esempio n. 5
0
 private static void DataRowToBuilder(DataRow row, SqlClauseBuilderIUW builder, params string[] ignorColumns)
 {
     foreach (DataColumn column in row.Table.Columns)
     {
         if (Array.Exists(ignorColumns, (c => c == column.ColumnName)) == false)
         {
             builder.AppendItem(column.ColumnName, row[column.ColumnName]);
         }
     }
 }
Esempio n. 6
0
        private static void DoInsertUpdateSqlClauseBuilder <T>(SqlClauseBuilderIUW builder, DataProperty property, T graph)
        {
            object data = GetPropertyValue(property, graph);

            if (data == null || data == DBNull.Value || data.Equals(TypeCreator.GetTypeDefaultValue(data.GetType())))
            {
                if (string.IsNullOrWhiteSpace(property.DefaultValue))
                {
                    data = DBNull.Value;
                }
                else
                {
                    builder.AppendItem(property.FieldName, property.DefaultValue, SqlClauseBuilderBase.EqualTo, true);
                }
            }
            else
            {
                builder.AppendItem(property.FieldName, data);
            }
        }
 private static void FillSqlBuilder(SqlClauseBuilderIUW builder, InvokeWebServiceJob data)
 {
     builder.AppendItem("JOB_ID", data.JobID).AppendItem("SERVICE_DEF_DATA", data.XmlData).AppendTenantCode(typeof(InvokeWebServiceJob));
 }