public static bool OpenIncident(Int32 incidentId, Int32 agentId, out string msg)
        {
            msg = "";
            bool success = false;

            agentPool.SetAgentBusy(agentId, true);


            BllProxyIncidentState.InsertIncidentState(incidentId, true, "NEW");


            IncidentDS.IncidentDSDataTable dt = BllProxyIncident.OpenIncident(incidentId, agentId);
            if (dt.Rows.Count != 0)
            {
                if (dt[0].status_id == 2)
                {
                    if ((!dt[0].Isreserved_agent_idNull()) && (dt[0].reserved_agent_id != agentId))
                    {
                        msg = "The incident is RESERVED";
                    }
                    else
                    {
                        Int32  incidentAgentId   = dt[0].agent_id;
                        String incidentAgentName = dt[0].agent_full_name;

                        if (incidentAgentId != agentId)
                        {
                            msg = "The incident is in progress with " + incidentAgentName;
                        }
                        else
                        {
                            success = true;
                        }
                    }
                }
                else
                {
                    msg = "canceled";
                }
            }
            else
            {
                msg = "The incident has already been processed";
            }


            if (success)
            {
                agentPool.ReleaseIncident(incidentId);
                agentPool.SetSession(agentId, incidentId);
            }
            else
            {
                agentPool.SetAgentBusy(agentId, false);
            }



            return(success);
        }
        protected void view_Save(object sender, EventArgs e)
        {
            AgentPool agentPool = (AgentPool)Application["AgentPool"];

            agentPool.SetAgentBusy(agentId, false);

            Response.Redirect("CallQueue.aspx");
        }
コード例 #3
0
        protected void ucIncident_BackToList(object sender, EventArgs e)
        {
            Int32 agentId = ProxyHelper.GetUserAgentId(this.UserId);

            AgentPool agentPool = (AgentPool)Application["AgentPool"];

            agentPool.SetAgentBusy(agentId, false);

            this.hideVideo();
        }
コード例 #4
0
        protected void btnTakeCall_Click(object sender, EventArgs e)
        {
            Int32 incidentId = agentPool.GetAgentIncident(agentId);

            agentPool.SetAgentBusy(agentId, true);

            updateAgentStatus();

            string path = AppHelper.GetApplicationPath("~/dirAgent/CallQueue.aspx?incidentId=" + incidentId.ToString());

            Response.Redirect(path);
        }