Default values when setting up an object data sour
There are times when I need to set a default value when configuring an object data source. I would prefer to use a symbolic constant instead of hardcodeing a value in the default value textbox.
For instance, with the object data source that I am currently working with I need to set a default value of "WHSE". Rather then hardcoding "WHSE" I would prefer to set the default value to something like: Globals.TypeCodes.Warehouse which is defined as:
public static class Globals
{
public struct TypeCodes
{
public const string Warehouse = "WHSE";
}
}
Is there a way that I can use Globals.TypeCodes.Warehouse instead of harding "WHSE" or is hardcoding an acceptable practice in the case?
Thanks
ps. I am aware that I can do this in the Selecting event of the object data source. I am hoping there is a way to do this by configuring the object data source.
|