public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     if (value == null)
     {
         return(-1);
     }
     return(CategoryDao.GetIndex((Category)value));
 }
 public static void SaveTempSelectedIndex()
 {
     WPFDbContext.Instance.TempSelectedCategoryIndex = CategoryDao.GetIndex(WPFDbContext.Instance.SelectedCategory);
 }