コード例 #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();
 }
コード例 #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);
            }
        }
コード例 #3
0
 public void Removing(int index)
 {
     NotesAndCommands.Remove(new Tuple <int, TItem>(index, RecievedItems[index]), Commands.Remove);
     RecievedItems.RemoveAt(index);
 }
コード例 #4
0
 public void Addition(TItem item)
 {
     RecievedItems.Add(item);
     NotesAndCommands.PushInRCommands(Commands.Add);
 }