////------------------------------------------------------------------------------------ ////------------------------------------------------------------------------------------ ////------------------------------------------------------------------------------------ //public static void SetIncidentStateActive(Int32 incidentId) //{ // BllProxyIncidentState.UpdateIncidentState(incidentId, true, "ACT"); //} //public static void SetIncidentStateVideoSession(Int32 incidentId) //{ // BllProxyIncidentState.UpdateIncidentState(incidentId, true, "VID"); //} //public static void SetIncidentStateScreenCast(Int32 incidentId) //{ // BllProxyIncidentState.UpdateIncidentState(incidentId, true, "SCT"); //} //public static void SetIncidentStateAppShareSend(Int32 incidentId) //{ // BllProxyIncidentState.UpdateIncidentState(incidentId, true, "APS"); //} //public static void SetIncidentStateAppShareReceive(Int32 incidentId) //{ // BllProxyIncidentState.UpdateIncidentState(incidentId, true, "APR"); //} //public static void SetIncidentStateInactive(Int32 incidentId) //{ // BllProxyIncidentState.UpdateIncidentState(incidentId, false, "CLS"); //} //------------------------------------------------------------------------------------ public static bool GetIncidentState(Int32 incidentId, ref Int32 statusId, ref string state) { bool isActive = false; statusId = 0; state = ""; IncidentDS.IncidentStateDSDataTable dt = BllProxyIncidentState.SelectIncidentState(incidentId); if (dt.Rows.Count != 0) { statusId = dt[0].status_id; if (!dt[0].IsstateNull()) { state = dt[0].state; } if (!dt[0].Isis_activeNull()) { isActive = dt[0].is_active; } } return(isActive); }
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 btnDisconnect_Click(object sender, EventArgs e) { Button btn = (Button)sender; string commandName = btn.CommandName; string commandArgument = btn.CommandArgument; pnlDisconnect.Visible = false; pnlDisconnectConfirm.Visible = false; if (commandName == "DISCONNECT") { pnlDisconnectConfirm.Visible = true; } else if (commandName == "CONFIRM") { BllProxyIncidentHelper.SetIncidentStatus(this.incidentId, 3); // 3:Canceled BllProxyIncidentState.DeleteIncidentState(this.incidentId); UcControlArgs args = new UcControlArgs(); goNext(args); } else if (commandName == "CANCEL") { pnlDisconnect.Visible = true; } else { pnlDisconnect.Visible = true; } //UpdatePanel1.Update(); }
protected void timerRefresh_Tick(object sender, EventArgs e) { //----------------------------------------------------------------------- bool checkState = BllProxyIncidentState.SetIncidentState1(incidentId, this.interval); btnDisconnect.Enabled = checkState; upDiconnect.Update(); //----------------------------------------------------------------------- DateTime t = DateTime.Now; DateTime last = new DateTime(t.Subtract(startTime).Ticks); TimeSpan span = t.Subtract(startTime); ltTimeSpan.Text = string.Format("{0:00}:{1:00}:{2:00}", (int)span.TotalHours, span.Minutes, span.Seconds); Int32 currentStatusId = 0; string state = ""; bool isActive = IncidentHelper.GetIncidentState(incidentId, ref currentStatusId, ref state); //btnDisconnect.Enabled = isActive; //upDiconnect.Update(); bool isSessionFinished = false; if (currentStatusId != statusId) { switch (currentStatusId) { case 1: //New break; case 2: //In-Progress break; case 3: //Canceled isSessionFinished = true; break; case 4: //Closed isSessionFinished = true; break; } statusId = currentStatusId; } if (statusId == 2) //In-Progress { //this.setContentPanel(state); } if (isSessionFinished) { FinishConference(); } }
protected void btnDisconnect_Click(object sender, EventArgs e) { Button btn = (Button)sender; string commandName = btn.CommandName; string commandArgument = btn.CommandArgument; if (commandName == "DISCONNECT") { BllProxyIncidentHelper.SetIncidentStatus(this.incidentId, 3); // 3:Canceled BllProxyIncidentState.DeleteIncidentState(this.incidentId); FinishConference(); } }
protected bool checkOnline() { bool _isOnline = false; if (this.currentIncidentId != 0) { bool checkState = BllProxyIncidentState.SetIncidentState0(this.currentIncidentId, UcConfParameters.UcPageRefreshInterval); if (checkState) { _isOnline = true; } } this.isOnline = _isOnline; return(this.isOnline); }
public static void SetIncidentStateAppShareReceive(Int32 incidentId) { BllProxyIncidentState.UpdateIncidentState(incidentId, true, "APR"); }
public static void SetIncidentStateInactive(Int32 incidentId) { BllProxyIncidentState.UpdateIncidentState(incidentId, false, "CLS"); }
public static void SetIncidentStateAppShareSend(Int32 incidentId) { BllProxyIncidentState.UpdateIncidentState(incidentId, true, "APS"); }
public static void SetIncidentStateScreenCast(Int32 incidentId) { BllProxyIncidentState.UpdateIncidentState(incidentId, true, "SCT"); }
public static void SetIncidentStateTextChat(Int32 incidentId) { BllProxyIncidentState.UpdateIncidentState(incidentId, false, "TXT"); }
public static void SetIncidentStateVideoSession(Int32 incidentId) { BllProxyIncidentState.UpdateIncidentState(incidentId, true, "VID"); }
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------ public static void SetIncidentStateActive(Int32 incidentId) { BllProxyIncidentState.UpdateIncidentState(incidentId, true, "ACT"); }