示例#1
0
 public DBInitData(XmlNode xn)
 {
     item_list = new List <DBInitDataItem>();
     if (xn != null)
     {
         foreach (XmlNode item in xn.ChildNodes)
         {
             var di = new DBInitDataItem();
             di.column_name  = item.Name;
             di.DataType     = item.Attributes["type"].Value;
             di.column_value = item.InnerText.xmlDecode();
             item_list.Add(di);
         }
     }
 }
示例#2
0
 public DBInitData(DBTable table)
 {
     item_list = new List <DBInitDataItem>();
     foreach (var column in table.columns)
     {
         if (column.data_type == DBDataType.Binary)
         {
             continue;
         }
         var di = new DBInitDataItem();
         di.column_name = column.name;
         di.data_type   = column.data_type;
         di.StringValue = column.default_value;
         item_list.Add(di);
     }
 }