public void AddHelpItem(string publisherId, string type, string details, string location, string dateTime , string image, int commission, string itemid) { Models.HelpItem newOne = new Models.HelpItem(publisherId, type, details, location, dateTime, image, commission, itemid); this.allItems.Add(newOne); _itemCount++; } // mainpagehelp
public void RemoveHelpItem(string id) { for (int i = 0; i < this.allItems.Count; i++) { if (allItems[i].itemId == id) { allItems.RemoveAt(i); break; } } _itemCount--; // set selectedItem to null after remove this._selectedItem = null; }
} // mainpagehelp public void AddFinishedItem(string sn, string cn, string location, string type, int commission, string itemid) { Models.HelpItem newOne = new Models.HelpItem(sn, cn, location, type, commission, itemid); this.allItems.Add(newOne); }
public HelpItemViewModel() { this._selectedItem = null; this._itemCount = 0; }