protected ColumnBase(Account account, ColumnType type, string title = null) { userId = (Account = account).Id; Type = type; _title = title; Setting = new ColumnSetting(Type, userId); }
public static ColumnSetting CreateFromDefault(ColumnSetting def, Account account) { var clone = new ColumnProperties(); foreach (var prop in def.Properties) { if (prop.Value != null) { string key = string.Copy(prop.Key); int valueType = (int)prop.Value.GetTypeCode(); if (valueType >= 2 && valueType <= 15) { clone.Add(key, prop.Value); } else if (valueType == 16) { clone.Add(key, prop.Value.ToString()); } } } return(new ColumnSetting(def.Type, account, clone)); }