Пример #1
0
		public static Match Get(SafeDataReader dr)
		{
			//Util.CheckReadAccess();
			Match item = new Match();
			item.Populate(dr);
			item.MarkOld();
			return item;
		}
Пример #2
0
		void MatchViewModel_EditCompleted(Match item)
		{
			//switch the edit view back to read-only mode
			//todo: add a MatchViewModel constructor that takes an existing Match object
			var vm = new MatchInfoViewModel(item.ID);
			vm.EditRequested += new MatchInfoViewModel.EditRequestedEventHandler(MatchViewModel_EditRequested);
			ItemDetailViewModel = vm;

			//Update the list
		}
Пример #3
0
		public static Match FromInfo(TennisObjects.Info.Match from)
		{
			//Util.CheckReadAccess();
			Match item = new Match();
			item._EventID = from.EventID;
			item._ID = from.ID;
			item._LoserID = from.LoserID;
			item._MatchDate = from.MatchDate;
			item._Score.FromInfo(from.Score);
			//item.Score = from.Score;
			item._WinnerID = from.WinnerID;
			item.MarkOld();
			item.ValidationRules.CheckRules();
			return item;
		}
Пример #4
0
		void MatchViewModel_EditRequested(Match item)
		{
			var vm = new MatchEditViewModel(item);
			vm.EditCompleted += new MatchEditViewModel.EditCompletedEventHandler(MatchViewModel_EditCompleted);
			ItemDetailViewModel = vm;
		}