public string ValueToString(string DateTimeFormat = null) { if (ActionParameter.ParameterType.UnderlyingTypeEnum == PARAMETER_TYPE_UNDERLYING.Bool) { return(ValueBool.ToString()); } else if (ActionParameter.ParameterType.UnderlyingTypeEnum == PARAMETER_TYPE_UNDERLYING.DateTime) { return(((DateTime)ValueDateTime).ToString(DateTimeFormat)); } else if (ActionParameter.ParameterType.UnderlyingTypeEnum == PARAMETER_TYPE_UNDERLYING.Guid) { return(ValueGuid.ToString()); } else if (ActionParameter.ParameterType.UnderlyingTypeEnum == PARAMETER_TYPE_UNDERLYING.Integer) { return(ValueInteger.ToString()); } else if (ActionParameter.ParameterType.UnderlyingTypeEnum == PARAMETER_TYPE_UNDERLYING.Decimal) { return(ValueDecimal.ToString()); } return(ValueString); }
protected string DisplayValueGuid(object Format) { if (ValueGuid == null) { return("(null)"); } return(ValueGuid.ToString()); }
protected string DisplayValueUserOrGroupOrCollective(object Format) { if (ValueGuid == null) { return("(null)"); } var u = db.Users.Find(new object[] { ValueGuid.ToString() }); if (u != null) { if (Format == null) { return("Member: " + u.NameFull); } else if (((string)Format).ToUpper() == "USERNAME") { return("Member: " + u.UserName); } else { return("Member: " + u.NameFull); } } var ug = db.UserGroups.Find(new object[] { ValueGuid }); if (ug != null) { return("Group: " + ug.Name); } var c = db.Collectives.Find(new object[] { ValueGuid }); return("Collective: " + c.Name); }