Пример #1
0
        /// <summary>
        /// returns the ciber record info object populated with the latest data
        /// if this is a newly created SID/BID, then a new sequence number is generated
        /// based on the latest sequence number being used for the home carrier SID/BID.
        /// the sequence number is stored in the database for each home carrier SID/BID
        /// in the database and incremented when a new one is used.
        /// </summary>
        /// <param name="sidBid"></param>
        /// <returns></returns>
        public CiberRecordInfo GetFileInfoForSidBid(string homeCarrierSidBid, string servingCarrierSidBid)
        {
            CiberRecordInfo rInfo;

            if (m_sidBidFileInfo.ContainsKey(homeCarrierSidBid))
            {
                // return the list for the sidBid
                rInfo = (CiberRecordInfo)m_sidBidFileInfo[homeCarrierSidBid];

                return(rInfo);
            }
            else
            {
                // new entry
                rInfo = new CiberRecordInfo();

                // get a new sequence number for our batch based on what has been submitted
                // previously and we update the sequence number for the next time around
                // this is a critical piece used to keep in synch with what the clearinghouse
                // expects.  If this is out of synch, then the CIBER batch will be rejected.
                int seqNum = m_dbMgr.GetSequenceNumber(homeCarrierSidBid, servingCarrierSidBid);
                rInfo.BatchSequenceNumber = seqNum.ToString();
                m_dbMgr.UpdateSequenceNumber(homeCarrierSidBid, servingCarrierSidBid);

                rInfo.ReceivingCarrierSidBid = homeCarrierSidBid;
                return(rInfo);
            }
        }
Пример #2
0
        public void AddRecordForServingSidBid(string servingCarrierSidBid, string homeCarrierSidBid, CiberRecordInfo cri,
            Record22 r22)
        {
            // is there already data for this servingCarrierSidBid
            if (m_picoCiberData.ContainsKey(servingCarrierSidBid))
            {
                // grab the hashtable and add the data for this serving carrier sid bid
                SidBidData sidBidData = (SidBidData)m_picoCiberData[servingCarrierSidBid];
                sidBidData.AddSidBidRecord(homeCarrierSidBid, r22);
                sidBidData.AddSidBidFileInfo(homeCarrierSidBid, cri);

                // no need to do this:  hashtable is updated from above
                // m_picoCiberData.Add(servingCarrierSidBid, data);
            }
            else
            {
                // create a new hashtable and list for the data
                SidBidData data = new SidBidData();
                data.AddSidBidRecord(homeCarrierSidBid, r22);
                data.AddSidBidFileInfo(homeCarrierSidBid, cri);
                // add the hashtable with data to our site/pico hashtable
                m_picoCiberData.Add(servingCarrierSidBid, data);

            }
        }
Пример #3
0
 public CiberRecordInfo GetFileInfoForSidBid(string servingCarrierSidBid, string homeCarrierSidBid)
 {
     if (m_picoCiberData.ContainsKey(servingCarrierSidBid))
     {
         SidBidData      d   = (SidBidData)m_picoCiberData[servingCarrierSidBid];
         CiberRecordInfo cri = d.GetFileInfoForSidBid(homeCarrierSidBid, servingCarrierSidBid);
         return(cri);
     }
     else
     {
         SidBidData      d   = new SidBidData();
         CiberRecordInfo cri = d.GetFileInfoForSidBid(homeCarrierSidBid, servingCarrierSidBid);
         return(cri);
     }
 }
Пример #4
0
 public void AddSidBidFileInfo(string sidBid, CiberRecordInfo cri)
 {
     m_sidBidFileInfo[sidBid] = cri;
 }
Пример #5
0
        private static Hashtable m_picoCiberData = new Hashtable();  // ( [servingcarrier], ( hashtable[homecarrier], r22 ] ))

        public void AddRecordForServingSidBid(string servingCarrierSidBid, string homeCarrierSidBid, CiberRecordInfo cri,
                                              Record22 r22)
        {
            // is there already data for this servingCarrierSidBid
            if (m_picoCiberData.ContainsKey(servingCarrierSidBid))
            {
                // grab the hashtable and add the data for this serving carrier sid bid
                SidBidData sidBidData = (SidBidData)m_picoCiberData[servingCarrierSidBid];
                sidBidData.AddSidBidRecord(homeCarrierSidBid, r22);
                sidBidData.AddSidBidFileInfo(homeCarrierSidBid, cri);

                // no need to do this:  hashtable is updated from above
                // m_picoCiberData.Add(servingCarrierSidBid, data);
            }
            else
            {
                // create a new hashtable and list for the data
                SidBidData data = new SidBidData();
                data.AddSidBidRecord(homeCarrierSidBid, r22);
                data.AddSidBidFileInfo(homeCarrierSidBid, cri);
                // add the hashtable with data to our site/pico hashtable
                m_picoCiberData.Add(servingCarrierSidBid, data);
            }
        }
Пример #6
0
 public void AddSidBidFileInfo(string sidBid, CiberRecordInfo cri)
 {
     m_sidBidFileInfo[sidBid] = cri;
 }
Пример #7
0
        /// <summary>
        /// returns the ciber record info object populated with the latest data
        /// if this is a newly created SID/BID, then a new sequence number is generated
        /// based on the latest sequence number being used for the home carrier SID/BID. 
        /// the sequence number is stored in the database for each home carrier SID/BID
        /// in the database and incremented when a new one is used.
        /// </summary>
        /// <param name="sidBid"></param>
        /// <returns></returns>
        public CiberRecordInfo GetFileInfoForSidBid(string homeCarrierSidBid, string servingCarrierSidBid)
        {
            CiberRecordInfo rInfo;

            if (m_sidBidFileInfo.ContainsKey( homeCarrierSidBid ))
            {
                // return the list for the sidBid
                rInfo = (CiberRecordInfo)m_sidBidFileInfo[ homeCarrierSidBid ];

                return rInfo;
            }
            else
            {
                // new entry
                rInfo = new CiberRecordInfo();

                // get a new sequence number for our batch based on what has been submitted
                // previously and we update the sequence number for the next time around
                // this is a critical piece used to keep in synch with what the clearinghouse
                // expects.  If this is out of synch, then the CIBER batch will be rejected.
                int seqNum = m_dbMgr.GetSequenceNumber( homeCarrierSidBid, servingCarrierSidBid );
                rInfo.BatchSequenceNumber = seqNum.ToString();
                m_dbMgr.UpdateSequenceNumber( homeCarrierSidBid , servingCarrierSidBid );

                rInfo.ReceivingCarrierSidBid = homeCarrierSidBid;
                return rInfo;
            }
        }