Пример #1
0
 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
Пример #2
0
 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;
 }
Пример #3
0
        }  // 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);
        }
Пример #4
0
 public HelpItemViewModel()
 {
     this._selectedItem = null;
     this._itemCount    = 0;
 }