Beispiel #1
0
 public ServiceRecordModel()
 {
     _Contact       = new ContactPersonModel();
     _Address       = new AddressDetail();
     _Product       = new ProductModel();
     _ServiceType   = new ServiceType();
     _CallType      = new CallType();
     _SetCondition  = new SetCondition();
     _RecievedItems = new RecievedItems();
 }
Beispiel #2
0
        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);
            }
        }
Beispiel #3
0
 public void Removing(int index)
 {
     NotesAndCommands.Remove(new Tuple <int, TItem>(index, RecievedItems[index]), Commands.Remove);
     RecievedItems.RemoveAt(index);
 }
Beispiel #4
0
 public void Addition(TItem item)
 {
     RecievedItems.Add(item);
     NotesAndCommands.PushInRCommands(Commands.Add);
 }