示例#1
0
        static void Main(string[] args)
        {
            ContactProvider cp  = new ContactProvider();
            TDictionary     dic = new TDictionary();         // qui abbiamo gli stati
            // simulo il dialer.exe
            String         callMode  = String.Empty;         // ritorna il tipo di chiamata predictive o power
            Boolean        eof       = false;                // identifica se è finita la scansione della campagna allora restituisco true
            PhonesCallData CcData    = new PhonesCallData(); // ritornano i dati dell'anagrafica che sto chiamando che pubblicherò nel phonebar
            ArrayList      phoneNums = new ArrayList();      // lista di numeri da chiamare per noi sempre 1



            Campagna(cp, dic, ref callMode, ref eof, CcData, phoneNums);

            CampagnaId   = "3";
            NomeCampagna = "XXXXXXXXXX";

            Campagna(cp, dic, ref callMode, ref eof, CcData, phoneNums);

            cp.RefreshDB();
        }
示例#2
0
        private static void Campagna(ContactProvider cp, TDictionary dic, ref string callMode, ref bool eof, PhonesCallData CcData, ArrayList phoneNums)
        {
            Boolean res = cp.Init(CampagnaId, NomeCampagna, dic);

            if (res)
            {
                Int32 contatti = cp.Contacts();
                Console.WriteLine("CONTATTI: " + contatti);
            }


            int count = 0;

            eof = false;
            while (!eof)// finchè nn indico la fine
            {
                count++;
                res = cp.GetContact(CcData, phoneNums, out callMode, out eof);



                if (res)
                {
                    // chiamata KO
                    if (count == 1)
                    {
                        res = cp.SetContact(CcData, "2", "P");
                    }
                    else if (count == 2)
                    {
                        // chiamata OK
                        res = cp.SetContact(CcData, "3", "P");
                    }
                    else
                    {
                        res = cp.SetContact(CcData, "2", "P");
                    }
                }
            }
        }
示例#3
0
 public bool SetContact(PhonesCallData contactCallData, string contactStatus, string callMode)
 {
     return(dbHandler.SetContact(contactCallData, contactStatus, callMode));
 }
示例#4
0
 public bool GetContact(PhonesCallData contactCallData, ArrayList phoneNumbers, out string callMode, out bool eof)
 {
     return(dbHandler.GetContact(contactCallData, phoneNumbers, out callMode, out eof));
 }