Esempio n. 1
0
 /// <summary>
 /// 处理所有数据列
 /// </summary>
 /// <param name="ctx"></param>
 void ProcessAllDataColumns(PanelContext ctx)
 {
     foreach (We7DataColumn dc in ctx.DataSet.Tables[0].Columns)
     {
         if (!String.IsNullOrEmpty(dc.DefaultValue) &&
             dc.Direction != ParameterDirection.ReturnValue &&
             (ctx.Row[dc.Name] == null || String.IsNullOrEmpty(ctx.Row[dc.Name].ToString())))
         {
             if (String.Compare(dc.Name, "AccountID") == 0)
             {
                 continue;
             }
             if (IsEdit && String.Compare(dc.Name, "Updated", true) == 0)
             {
                 continue;
             }
             ctx.Row[dc.Name] = DefaultGenerator.GetDefaultValue(dc.DefaultValue, ctx, dc);
         }
     }
 }
 private static void PrintDefault(Type type)
 {
     Console.WriteLine("default({0}) = {1}", type,
                       DefaultGenerator.GetDefaultValue(type));
 }