Exemplo n.º 1
0
        // �t�ѐݒ�
        // �� 2007/08/16 �lj�
        //=========================================================================
        ///	<summary>
        ///		�ԑg��V�K�\�񂷂�
        ///	</summary>
        /// <remarks>
        ///		�\�񏈗��ɏ�Q�����������ꍇ�͗�O�𓊂���
        /// </remarks>
        /// <returns>
        ///		���������ꍇ��true
        ///		�������X�P�[�W�����ɔ\�͂��Ȃ��ꍇ��false
        /// </returns>
        /// <history>2006/XX/XX �V�K�쐬</history>
        //=========================================================================
        internal bool MakeReservation(
			string		title		,	// �^��^�C�g��
			string		uniqueID	,	// �^��̈�ӂ�ID
			string		tvStation	,	// �e���r�ǖ�
			DateTime	start		,	// �J�n����
			uint		length		,	// �^�撷��
			uint		groupID		,	// �^��̃O���[�vID
			Scheduler.Profile param	)
        {
            Scheduler sched	= DefaultScheduler;

            if (sched!=null &&
                (sched.Ability & Scheduler.AbilityFlag.MakeReservation) > 0)	// �X�P�W���[�����w�肳��āA�\�񂪉”\���H
            {

                // �t�@�C�����ɂ���Ę^��t�@�C�������H
                if (Settings.Default.specifiedFile == IdentifyFileMethod.ByFileNameWithID)
                {
                    title	= string.Format(
                                Settings.Default.specifiedNameFormat	,
                                uniqueID								,
                                title									);		// ID��܂񂾘^��^�C�g���ɂ���
                }

                //--------------------------
                // �^��\�t�g�ɗ\��������
                //--------------------------
                sched.MakeReservation(
                    title									,
                    uniqueID								,
                    GetRegisteredStationName( tvStation )	,
                    start									,
                    (int)length								,
                    title									,
                    groupID									,
                    param									);

                return true;
            }

            return false;
        }
Exemplo n.º 2
0
        //        public virtual ProfilePage OpenProfilePage( Control parent, Profile profile ) { }
        // �� 2007/08/16 �lj�
        //=========================================================================
        ///	<summary>
        ///		���Ԃ�w�肵�Ę^��\���V�K�o�^����
        ///	</summary>
        /// <remarks>
        ///		�����^��ł���‹��ł́A���ԏd�����Ă���s����Ƃ͌���Ȃ��B
        ///		�������A�����^��^�C�g���̏ꍇ�͎��s����B
        /// </remarks>
        /// <history>2006/XX/XX �V�K�쐬</history>
        //=========================================================================
        public abstract void MakeReservation(
			string				title		,
			string				uniqueID	,
			string				tvStation	,
			DateTime			dateTime	,
			int					minute		,
			string				Descript	,
			uint				groupCode	,
			Scheduler.Profile	param		);
Exemplo n.º 3
0
        // �^��ݒ�
        //=========================================================================
        ///	<summary>
        ///		�\���ύX����
        ///	</summary>
        /// <remarks>
        /// </remarks>
        /// <history>2007/05/08 CancelReservation�ɑΉ�</history>
        //=========================================================================
        internal ChangeResult ChangeReservation(
			string		title		,	// �^��^�C�g��
			string		uniqueID	,	// �^��̈�ӂ�ID
			string		tvStation	,	// �e���r�ǖ�
			DateTime	start		,	// �J�n����
			uint		length		,	// �^�撷��
			uint		groupID		,	// �^��̃O���[�vID
			Scheduler.Profile param	)
        {
            Scheduler sched = DefaultScheduler;

            if ( sched == null ) return ChangeResult.Dontcare;

            Logger.Output("(�\��)���ԕύX���� " + start.ToString() + "(" + title + ")" );

            //----------------------------
            // �”\�Ȃ璼�ڗ\���ύX
            //----------------------------
            if ((sched.Ability & Scheduler.AbilityFlag.ChangeReservation) > 0)
            {
                try
                {
                    sched.ChangeReservation( title, uniqueID, start, groupID, param );
                }
                catch ( Exception ex )
                {
                    Logger.Output( "(�\��Ǘ�)" + ex.Message );
                    return ChangeResult.Denied;
                }

                return ChangeResult.OK;
            }

            //-----------------------------
            // �L�����Z���Ɠo�^��s��
            //-----------------------------
            if ( ( sched.Ability & Scheduler.AbilityFlag.CancelReservation ) > 0 )
            {
                //-----------------------
                // ��U�A�Â��\���폜
                //-----------------------
                try
                {
                    sched.CancelReservation( title, uniqueID );
                }
                catch ( Exception ex )
                {
                    Logger.Output("(�\��Ǘ�)" + ex.Message);
                    return ChangeResult.Denied;
                }

                //-----------------------
                // ���߂ė\���o�^
                //-----------------------
                try
                {
                    // �t�@�C�����ɂ���Ę^��t�@�C�������H
                    if ( Settings.Default.specifiedFile == IdentifyFileMethod.ByFileNameWithID )
                    {
                        title = string.Format(
                            Settings.Default.specifiedNameFormat	,
                            uniqueID								,
                            title									); // ID��܂񂾘^��^�C�g���ɂ���
                    }

                    sched.MakeReservation(
                        title									,
                        uniqueID								,
                        GetRegisteredStationName( tvStation )	,
                        start									,
                        (int)length								,
                        title									,
                        groupID									,
                        param									);
                }
                catch ( Scheduler.DoubleBookingException dex )
                {
                    throw;
            //					return ChangeResult.Lost;
                }
                catch ( Exception ex )
                {
                    throw;
                }

                return ChangeResult.OK;
            }

            // �� 2007/10/28 �v���O�C�����������Ȃ��ꍇ��Don't care��������
            //			return ChangeResult.OK;
            return ChangeResult.Dontcare;
            // �� 2007/10/28
        }
Exemplo n.º 4
0
        //=========================================================================
        ///	<summary>
        ///		�w�肳�ꂽ�\���ύX����
        ///	</summary>
        /// <remarks>
        /// </remarks>
        /// <history>2006/XX/XX �V�K�쐬</history>
        //=========================================================================
        public abstract void ChangeReservation(
			string title			,
			string uniqueID			,
			DateTime newDateTime	,
			uint groupCode			,
			Scheduler.Profile param	);