Ejemplo n.º 1
0
 public void Start()
 {
     IsStart = true;
     try
     {
         confservice = ConfigAPIUtils.InitializeConfigService(Utils.cfgserverhost.ToString(), Utils.cfgserverport, Utils.username.ToString(), Utils.password.ToString());
     }
     catch (Exception ex)
     {
         log.Error(ex.Message, ex);
     }
     try
     {
         OCS_URI = System.Configuration.ConfigurationManager.AppSettings["OCS_URI"];
         InitializePSDKApplicationBlocks();
         IsStart = true;
     }
     catch (Exception ex)
     {
         log.Error(ex.Message, ex);
     }
     Connect();
 }
Ejemplo n.º 2
0
        public void ReloadCampaginlist()
        {
            ALLCampaign.Clear();
            ICollection <CfgCampaign> list = ConfigAPIUtils.RetrieveCampaignList(confservice, Utils.tenantid);

            foreach (CfgCampaign c in list)
            {
                var info = new CampaignInfo();
                info.CampaignId = c.DBID;
                info.Name       = c.Name;
                var groupid = 0;
                if (c.CampaignGroups.Count > 0)
                {
                    groupid = c.CampaignGroups.First().GroupDBID;
                }
                var errMsg = string.Empty;
                var r      = GetCampaignStatus(info.CampaignId, groupid, 0, ref errMsg);
                if (r != "")
                {
                    info.GroupCampaignStatus = r;
                }
                ALLCampaign.Add(info);
            }
        }