예제 #1
0
        // 借阅动作异步事件
        internal void BorrowAsync(IChargingForm charging_form,
            bool bRenew,
            string strReaderBarcode,
            string strItemBarcode,
            string strConfirmItemRecPath,
            string strReaderSummary,
            string strItemXml,
            BorrowInfo borrow_info,
            DateTime start_time,
            DateTime end_time)
        {

#if !USE_THREAD
            Delegate_Borrow d = new Delegate_Borrow(Borrow);
            this.MainForm.BeginInvoke(d, new object[] { charging_form,
            bRenew,
            strReaderBarcode,
            strItemBarcode,
            strConfirmItemRecPath,
            strReaderSummary,
            strItemXml, 
            borrow_info,
            start_time,
            end_time});
#else
            OneCall call = new OneCall();
            call.name = "borrow";
            call.func = new Delegate_Borrow(Borrow);
            call.parameters = new object[] { charging_form,
            bRenew,
            strReaderBarcode,
            strItemBarcode,
            strConfirmItemRecPath,
            strReaderSummary,
            strItemXml, 
            borrow_info,
            start_time,
            end_time};

            AddCall(call);
#endif
        }
예제 #2
0
        internal void AmerceAsync(string strReaderBarcode,
            string strReaderSummary,
            List<OverdueItemInfo> overdue_infos,
            string strAmerceOperator,
            DateTime start_time,
            DateTime end_time)
        {

#if !USE_THREAD
            Delegate_Amerce d = new Delegate_Amerce(Amerce);
            this.MainForm.BeginInvoke(d, new object[] {strReaderBarcode,
                strReaderSummary,
                overdue_infos,
                strAmerceOperator,
                start_time,
                end_time});
#else
            OneCall call = new OneCall();
            call.name = "amerce";
            call.func = new Delegate_Amerce(Amerce);
            call.parameters = new object[] { strReaderBarcode,
            strReaderSummary,
            overdue_infos,
            strAmerceOperator,
            start_time,
            end_time};

            AddCall(call);
#endif
        }
예제 #3
0
        void AddCall(OneCall call)
        {
            this.m_lock.AcquireWriterLock(m_nLockTimeout);
            try
            {
                this.m_calls.Add(call);
            }
            finally
            {
                this.m_lock.ReleaseWriterLock();
            }

            Activate();
        }
예제 #4
0
        internal void ReturnAsync(IChargingForm charging_form,
            // bool bLost,
            string strAction,
            string strReaderBarcode,
            string strItemBarcode,
            string strConfirmItemRecPath,
            string strReaderSummary,
            string strItemXml,
            ReturnInfo return_info,
            DateTime start_time,
            DateTime end_time)
        {
#if !USE_THREAD

            Delegate_Return d = new Delegate_Return(Return);
            this.MainForm.BeginInvoke(d, new object[] {charging_form,
            bLost,
            strReaderBarcode,
            strItemBarcode,
            strConfirmItemRecPath,
            strReaderSummary,
            strItemXml,
            return_info,
            start_time,
            end_time});
#else
            OneCall call = new OneCall();
            call.name = "return";
            call.func = new Delegate_Return(Return);
            call.parameters = new object[] { charging_form,
            // bLost,
            strAction,
            strReaderBarcode,
            strItemBarcode,
            strConfirmItemRecPath,
            strReaderSummary,
            strItemXml,
            return_info,
            start_time,
            end_time};

            AddCall(call);
#endif
        }