Ejemplo n.º 1
0
		public ServerClass(Controller controller)
		{
			Controller = controller;
		}
Ejemplo n.º 2
0
		//#region GetKeyStatic
		//public static string GetKeyStatic(
		//    ObjectType parentObjectType,
		//    int parentObjectK,
		//    DateType dateType,
		//    int musicTypeK,
		//    int pageIndex)
		//{
		//    return
		//        ((int)parentObjectType).ToString() + "_" +
		//        parentObjectK.ToString() + "_" +
		//        ((int)dateType).ToString() + "_" +
		//        musicTypeK.ToString() + "_" +
		//        pageIndex.ToString();
		//}
		//#endregion

		#region public EventPageDetails
		public EventPageDetails(
#if SCRIPT
			Controller controller,
#else
			string parentClientID,
			Bobs.EventSet es,
#endif
			EventPageStub data,
			bool isLoading
			)
		{
			Data = data;
			IsLoading = isLoading;

#if SCRIPT
			Controller = controller;
			ParentClientID = Controller.ClientID;
#else
			ParentClientID = parentClientID;
#endif
			ClientID = ParentClientID + "_" + GetKey();
			
			Events = new EventDetails[8];
#if SCRIPT
#else
			Data.events = new EventStub[8];
#endif
			bool gotEvent = false;
			bool gotNullEvent = false;
			for (int i = 0; i < 8; i++)
			{
#if SCRIPT
				Events[i] = new EventDetails(i, this, Data.events != null && Data.events.Length > i && Data.events[i] != null ? Data.events[i] : null, isLoading);
				if (Data.events == null || Data.events.Length <= i || Data.events[i] == null)
					gotNullEvent = true;
				else
					gotEvent = true;
#else
				Events[i] = new EventDetails(i, this, es != null && es.Count > i && es[i] != null ? es[i] : null, isLoading);
				Data.events[i] = Events[i].Data;
				if (es == null || es.Count <= i || es[i] == null)
					gotNullEvent = true;
				else
					gotEvent = true;
#endif
			}
			HasIncompleteEventData = gotNullEvent;
			IsEmpty = !gotEvent;

			Html = new EventPageHtml(this);
		}