internal void setCategoryCatalog(Enums.TYPE categoryType)
 {
     if (catalogCategoryVM == null)
     {
         catalogCategoryVM = new CatalogCategoryViewModel(categoryType);
     }
     else
     {
         catalogCategoryVM.OnCatalogChange(categoryType);
     }
 }
Ejemplo n.º 2
0
        public CatalogCategoryViewModel(Enums.TYPE categoryType)
        {
            this.itemsModel            = new ItemsModel();
            this.category              = categoryType;
            Title                      = ((Enums.TYPE)categoryType).ToString();
            ItemsVM                    = new ObservableCollection <ItemViewModel>();
            ItemsVM.CollectionChanged += ItemsVM_CollectionChanged;
            generateAndFilterCollectionFromModel();

            UploadImage              = new UploadImageCommand();
            UploadImage.UploadEvent += Image_UploadEvent;

            DeleteItem = new DeleteItemCommand();
            DeleteItem.DeleteItemViewModelEvent += ItemVM_DeleteEvent;
        }
Ejemplo n.º 3
0
 public void OnCatalogChange(Enums.TYPE categoryType)
 {
     this.category = categoryType;
     this.Title    = ((Enums.TYPE)categoryType).ToString();
     generateAndFilterCollectionFromModel();
 }
 public CatalogCategoryUserControl(Enums.TYPE categoryType)
 {
     InitializeComponent();
     setCategoryCatalog(categoryType);
     DataContext = catalogCategoryVM;
 }
Ejemplo n.º 5
0
 public List <Item> GetItems(Enums.TYPE category)
 {
     return(bl.getAllItems(x => x.Categorie == category));
 }
 public Item(string name, DateTime date, string location, string store_name, int quant, Enums.TYPE cat, string description, string serialKey, double price, int rating)
 {
     this.itemName         = name;
     this.date_of_purchase = date;
     this.store_location   = location;
     this.store_name       = store_name;
     this.quantity         = quant;
     this.categorie        = cat;
     this.description      = description;
     this.serialKey        = serialKey;
     this.price            = price;
     this.rating           = rating;
 }