public ServiceRecordModel() { _Contact = new ContactPersonModel(); _Address = new AddressDetail(); _Product = new ProductModel(); _ServiceType = new ServiceType(); _CallType = new CallType(); _SetCondition = new SetCondition(); _RecievedItems = new RecievedItems(); }
public void UnDoing() { var lastOfItems = RecievedItems[RecievedItems.Count - 1]; var revert = NotesAndCommands.PopFromRCommands(); if (revert == Commands.Add) { RecievedItems.Remove(lastOfItems); } else if (revert == Commands.Remove) { var lastIndex = Notes[Notes.Count - 1].Item1;; var lastNote = Notes[Notes.Count - 1].Item2; RecievedItems.Insert(lastIndex, lastNote); Notes.RemoveAt(Notes.Count - 1); } }
public void Removing(int index) { NotesAndCommands.Remove(new Tuple <int, TItem>(index, RecievedItems[index]), Commands.Remove); RecievedItems.RemoveAt(index); }
public void Addition(TItem item) { RecievedItems.Add(item); NotesAndCommands.PushInRCommands(Commands.Add); }