public void Switch(ExpenseItem item) { if (item.IsExp()) { if (!this.exp.Contains(item)) { return; } this.exp.Remove(item); item.SwitchType(); this.inc.Add(item); } else { if (!this.inc.Contains(item)) { return; } this.inc.Remove(item); item.SwitchType(); this.exp.Add(item); } this.OnPropertyRaised("updated"); }
public void ModExpAt(ExpenseItem item, int index) { if (!item.IsExp()) { throw new Exception("Wrong type mate! Exp - expected"); } this.exp[index] = item; this.OnPropertyRaised("updated"); }
public void RemoveItem(ExpenseItem item) { if (item.IsExp()) { this.exp.Remove(item); } else { this.inc.Remove(item); } this.OnPropertyRaised("updated"); }