Ejemplo n.º 1
0
 /// <summary>
 /// Get the specified account profile from the TACS.NET database.  
 /// (Super Administrator only.)
 /// </summary>
 /// <param name="acctId">long: Account id.</param>
 /// <param name="credentials">iCampaign.TACS.Client.Credentials: object.</param>
 /// <returns>iCampaign.TACS.AccountProfile</returns>
 public AccountProfile GetAccountProfile(long acctId, Credentials credentials)
 {
     AccountProfile profile = null;
     ProjectServiceProxy.ProjectService projectService =
         new iCampaign.TACS.ProjectServiceProxy.ProjectService();
     try
     {
         profile = projectService.GetAccountProfile(acctId, credentials);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return profile;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Get a list of projects owned by the specified account.
 /// </summary>
 /// <param name="acctId">long: Account id.</param>
 /// <param name="credentials">iCampaign.TACS.Client.Credentials: object.</param>
 /// <returns>System.Collections.Generic.List T:string</returns>
 public List<string> GetProjectsByAccount(long acctId, Credentials credentials)
 {
     List<string> projectList = new List<string>();
     ProjectServiceProxy.ProjectService projectService =
         new iCampaign.TACS.ProjectServiceProxy.ProjectService();
     try
     {
         projectList = projectService.GetProjectsByAcct(acctId);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return projectList;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Get list of registered accounts from TACS.NET database.
 /// (Super Administrator only.)
 /// </summary>
 /// <param name="credentials">iCampaign.TACS.Client.Credentials: object.</param>
 /// <returns>System.Collections.Generic.List T:string</returns>
 public List<string> GetAccounts(Credentials credentials)
 {
     List<string> resultList = null;
     ProjectServiceProxy.ProjectService projectService =
         new iCampaign.TACS.ProjectServiceProxy.ProjectService();
     try
     {
         resultList = projectService.GetAccounts(credentials);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return resultList;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Get list of account profiles registered in the TACS.NET database.  
 /// (Super Administrator only.)
 /// </summary>
 /// <param name="credentials">iCampaign.TACS.Client.Credentials: object.</param>
 /// <returns>System.Collections.Generic.List T:iCampaign.TACS.AccountProfile</returns>
 public List<AccountProfile> GetAccountProfiles(Credentials credentials)
 {
     List<AccountProfile> profileList = null;
     ProjectServiceProxy.ProjectService projectService =
         new iCampaign.TACS.ProjectServiceProxy.ProjectService();
     try
     {
         profileList = projectService.GetAccountProfiles(credentials);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return profileList;
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Get list of projects for specified application token.
        /// </summary>
        /// <param name="appcode">string: Application token.</param>
        /// <returns>System.Collections.Generic.List T:string</returns>
        public List<string> GetProjects(string appcode)
        {
            List<string> resultList = new List<string>();
            ProjectServiceProxy.ProjectService projectService =
                new iCampaign.TACS.ProjectServiceProxy.ProjectService();
            try
            {
                resultList = projectService.GetProjectsByApp(appcode);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return resultList;
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Get list of projects for specified account id.
        /// </summary>
        /// <param name="account">long: Account id.</param>
        /// <returns>System.Collections.Generic.List T:string</returns>
        public List<string> GetProjects(long account)
        {
            List<string> resultList = new List<string>();
            ProjectServiceProxy.ProjectService projectService =
                new iCampaign.TACS.ProjectServiceProxy.ProjectService();
            try
            {
                resultList = projectService.GetProjectsByAcct(account);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return resultList;
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Add new project role to the TACS.NET database.
 /// </summary>
 /// <param name="newRole">iCampaign.TACS.Role: object.</param>
 /// <param name="role">string: Caller role being used.</param>
 /// <param name="credentials">iCampaign.TACS.Client.Credentials: object.</param>
 public void AddProjectRole(Role newRole, string role, Credentials credentials)
 {
     string result = String.Empty;
     ProjectServiceProxy.ProjectService projectService =
         new iCampaign.TACS.ProjectServiceProxy.ProjectService();
     try
     {
         result = projectService.AddRole(newRole, role, credentials);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     if (result != "OK")
     {
         throw new System.SystemException(result);
     }
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Assign a project role to the specified user profile.
 /// </summary>
 /// <param name="username">string: Username.</param>
 /// <param name="roleId">long: Role id to assign.</param>
 /// <param name="role">string: Caller role being used.</param>
 /// <param name="credentials">iCampaign.TACS.Client.Credentials: object.</param>
 public void AssignUserRole(string username, long roleId, string role, Credentials credentials)
 {
     string result = String.Empty;
     ProjectServiceProxy.ProjectService projectService =
         new iCampaign.TACS.ProjectServiceProxy.ProjectService();
     try
     {
         result = projectService.AddUserRole(username, roleId, role, credentials);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     if (result != "OK")
     {
         throw new System.SystemException(result);
     }
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Get the specified project profile from the TACS.NET database.
 /// </summary>
 /// <param name="project">string: Project name.</param>
 /// <param name="role">string: Caller role being used.</param>
 /// <param name="credentials">iCampaign.TACS.Client.Credentials: object.</param>
 /// <returns>iCampaign.TACS.ProjectProfile: object.</returns>
 public ProjectProfile GetProjectProfile(string project, string role,
     Credentials credentials)
 {
     ProjectProfile result = null;
     ProjectServiceProxy.ProjectService projectService =
         new iCampaign.TACS.ProjectServiceProxy.ProjectService();
     try
     {
         result = projectService.GetProject(project, role, credentials);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return result;
 }