private byte _ToValue(DateFormatType value)
{
switch (value)
{
case DateFormatType.MonthDayYear:
{
return 1;
}
case DateFormatType.DayMonthYear:
{
return 2;
}
case DateFormatType.YearMonthDay:
{
return 3;
}
case DateFormatType.YearDayMonth:
{
return 4;
}
case DateFormatType.MonthYearDay:
{
return 5;
}
case DateFormatType.DayYearMonth:
{
return 6;
}
default:
{
throw new Exception("Unrecognized date format " + value.ToString());
}
}
}
}