コード例 #1
0
        /// <summary>
        /// 增加排队报文和插入排队的报文到数据库中
        /// </summary>
        /// <param name="objTelegram"></param>
        /// <param name="struSendTelegram"></param>
        private void InsertWorkQueue(Int16[] objTelegram, struTelegram struSendTelegram)
        {
            // 插入数据库对应工作队列数据
            string        strWaitTelegram = m_telegramParser.Int16sToString(objTelegram, 0, objTelegram.Length - 1, 4);
            CWorkQueueDto workQueueDto    = CCommonMethods.myMethods.GetSendTelegramInfo(struSendTelegram.nEMSSendFlag, struSendTelegram.nEquipID, strWaitTelegram);

            if (workQueueDto == null)
            {
                workQueueDto = new CWorkQueueDto
                {
                    devicecode       = struSendTelegram.nEquipID,
                    warehouse        = struSendTelegram.nEMSSendFlag,
                    iccode           = struSendTelegram.strICCardID,
                    waitsendtelegram = strWaitTelegram,

                    tasktype = struSendTelegram.nMasterType
                };
                CDBEditor dbEditor = new CDBEditor();
                if (null != dbEditor)
                {
                    dbEditor.insertTableDto(workQueueDto);
                }
            }
        }
コード例 #2
0
 /// <summary>
 /// 构造函数
 /// </summary>
 public CModifyDBAction()
 {
     m_dbHandler = new CDBEditor();
 }