예제 #1
0
        public DB_SubCalendarEvent(CalendarEvent calendarEvent, TilerUser Creator, TilerUserGroup users, string timeZone, string MySubEventID, EventName name, BusyTimeLine MyBusylot, DateTimeOffset EventStart, DateTimeOffset EventDeadline, TimeSpan EventPrepTime, string myParentID, bool Rigid, bool Enabled, EventDisplay UiParam, MiscData Notes, bool completeFlag, TilerElements.Location EventLocation = null, TimeLine calendarEventRange = null, ConflictProfile conflicts = null)
        {
            if (EventDeadline < EventStart)
            {
                throw new Exception("SubCalendar Event cannot have an end time earlier than the start time");
            }
            _TimeZone = timeZone;
            _Name     = name;
            _Creator  = Creator;
            _Users    = users;
            if (conflicts == null)
            {
                conflicts = new ConflictProfile();
            }
            _ConflictingEvents  = conflicts;
            _CalendarEventRange = calendarEventRange;
            //string eventName, TimeSpan EventDuration, DateTimeOffset EventStart, DateTimeOffset EventDeadline, TimeSpan EventPrepTime, TimeSpan PreDeadline, bool EventRigidFlag, bool EventRepetition, int EventSplit
            updateStartTime(EventStart);
            updateEndTime(EventDeadline);
            _EventDuration     = MyBusylot.End - MyBusylot.Start;
            BusyFrame          = MyBusylot;
            _PrepTime          = EventPrepTime;
            UniqueID           = new EventID(MySubEventID);
            this._LocationInfo = EventLocation;

            _UiParams = UiParam;
            _DataBlob = Notes;
            _Complete = completeFlag;

            this._Enabled = Enabled;
            //EventSequence = new EventTimeLine(UniqueID.ToString(), StartDateTime, EndDateTime);
            _RigidSchedule = Rigid;
            _LastReasonStartTimeChanged = this.Start;
            _calendarEvent = calendarEvent;
        }
예제 #2
0
        public ConflictProfile getConflctProfile(XmlNode Arg1)
        {
            XmlNode         var1     = Arg1.SelectSingleNode("ConflictProfile");
            ConflictProfile retValue = new ConflictProfile();


            if (var1 != null)
            {
                int  typeOfConflict = Convert.ToInt32(var1.SelectSingleNode("Type").InnerText);
                bool conflictFlag   = Convert.ToBoolean(var1.SelectSingleNode("Flag").InnerText);
                retValue = new ConflictProfile(typeOfConflict, conflictFlag);
                IEnumerable <string> conflictinIDs = getConflictingIDS(var1);
                retValue.LoadConflictingIDs(conflictinIDs);
            }
            return(retValue);
        }