Exemple #1
0
        }// icprn

        public string ToReportStringFormat()
        {
            // seqNum, siteName, type, discMessage, discCode, APartyNum, BPartyNum,APartyType,BPartyType,APartyDigits,BPartyDigits,
            // SeizeTime, AnswerTime, DisconnectTime, CallDuration, CellId, OMSISDN,
            string comma    = ",";
            char   zero_pad = Convert.ToChar("0");

            // only convert the fields being used in our report
            StringBuilder sb = new StringBuilder();

            sb.Append(SequenceNumber + ",");
            string recordType = String.Empty;
            int    theType    = Convert.ToInt32(Type);

            switch (theType)
            {
            case (int)OmcCdrEnums.RecordType.Call_Record:
                recordType = OmcCdrEnums.RecordType.Call_Record.ToString();
                break;

            case (int)OmcCdrEnums.RecordType.SMS_Record:
                recordType = OmcCdrEnums.RecordType.SMS_Record.ToString();
                break;
            }

            // vessel id
            CiberDbMgr cDb      = new CiberDbMgr();
            string     siteName = cDb.GetSiteNameForCellId(CellId);

            sb.Append(siteName + comma);
            sb.Append(recordType + comma);

            DisconnectCodeMgr dMgr     = new DisconnectCodeMgr();
            string            dMessage = dMgr.GetDisconnectMessage(DisconnectCode);

            sb.Append(dMessage + comma);
            sb.Append(DisconnectCode + comma);

            sb.Append(A_Party_Num + comma);
            sb.Append(B_Party_Num + comma);
            string atype = dMgr.GetPartyType(A_Party_Type);
            string btype = dMgr.GetPartyType(B_Party_Type);

            sb.Append(atype + comma);
            sb.Append(btype + comma);
            sb.Append(A_Party_Digits + comma);
            sb.Append(B_Party_Digits + comma);
            sb.Append(Seize.ToString("s") + comma);
            sb.Append(Answer.ToString("s") + comma);
            sb.Append(Disconnect.ToString("s") + comma);

            // call duration

            TimeSpan callDuration  = Disconnect.Subtract(Seize);
            string   airChargeTime = callDuration.Hours.ToString().PadLeft(2, zero_pad) + ":" + callDuration.Minutes.ToString().PadLeft(2, zero_pad) + ":" + callDuration.Seconds.ToString("D2");

            sb.Append(airChargeTime + comma);

            return(sb.ToString());
        }
Exemple #2
0
        /// <summary>
        /// ctor
        /// </summary>
        public OmcCiberHandler()
        {
            m_db = new OmcCdrDb(); 
            m_ciberDb = new CiberDbMgr();
            m_ciberCreator = CiberFileCreator.Instance;
            m_bworksFormatter = new CdrFormatter();

            // the the path where to move processed files
            m_filemovePath = ConfigurationManager.AppSettings["OmcCiberHandlerMoveFolder"];
            m_ciberOutputFileName = ConfigurationManager.AppSettings["CiberOutputFileName"];

        }
Exemple #3
0
        private void TestTaxRate_Click(object sender, EventArgs e)
        {
            CiberTaxMgr     ct  = new CiberTaxMgr();
            CiberDbMgr      cdb = new CiberDbMgr();
            CiberRateEngine cr  = new CiberRateEngine();

            CarrierInfo ci = cdb.GetSidBidForCellId("1633");

            ci.HomeCarrier = ServiceProvider.Verizon;


            string chg = cr.CalculateAirTimeChargeAmount("001030", ci);

            //string tax1 = ct.GetTaxAmount("0000002000", ci );
            //ci = cdb.GetSidBidForCellId("1681");
            //string tax2 = ct.GetTaxAmount("0000002000", ci);
        }