///---------------------------------------------------------------------------------
        protected void view_Save(object sender, EventArgs e)
        {
            bool isNew = false;
            if (agentId == 0)
            {
                isNew = true;

                agentId = ProxyHelper.GetUserAgentId(this.UserId);
                sosProfile.AgentId = agentId;

                AgentPool agentPool = (AgentPool)Application["AgentPool"];
                agentPool.RegisterAgent(agentId);
            }


            if (agentId != 0)
            {
                UCENTRIK.DATASETS.AgentDS.AgentDSDataTable dt = BllProxyAgent.SelectAgent(agentId);
                if (dt.Rows.Count != 0)
                {
                    string firstName = dt[0].first_name;
                    string lastName = dt[0].last_name;
                    string email = dt[0].email;
                    BllProxyUserHelper.UpdateUserDetails(this.UserId, firstName, lastName, email);

                }
            }

            if(isNew)
                this.Refresh();

        }
Exemple #2
0
 protected void btnRegister_Click(object sender, EventArgs e)
 {
     if (agentId == 0)
     {
         string path = AppHelper.GetApplicationPath("~/dirAgent/profile.aspx");
         Response.Redirect(path);
     }
     else
     {
         agentPool.RegisterAgent(agentId);
         updateAgentStatus();
     }
 }
        protected void Login_LoggedIn(object sender, UcUserArgs e)
        {
            switch (e.UserRoleId)
            {
            case 1:     // Admin
                break;

            case 2:     // Agent
                Int32     agentId   = ProxyHelper.GetUserAgentId(e.UserId);
                AgentPool agentPool = (AgentPool)Application["AgentPool"];
                agentPool.RegisterAgent(agentId);
                break;

            case 3:     // Manager
                break;

            case 5:     // Supervisor
                break;

            default:
                break;
            }
        }