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