protected void btnCancel_Click(object sender, EventArgs e) { BllProxyIncident.UpdateIncident(incidentId, 0, 0, 3, "[_INTERRUPTED_]"); UcControlArgs args = new UcControlArgs(); goBack(args); }
protected void btnNo_Click(object sender, EventArgs e) { ltTimeSpan.Text = ""; BllProxyIncident.UpdateIncident(incidentId, 0, 0, 3, "[_ABANDONED_]"); UcControlArgs args = new UcControlArgs(); goBack(args); }
protected void timerRefresh_Tick(object sender, EventArgs e) { 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); ltTimeSpan.Text = this.getTimeLeftText(span.Seconds); //====================================================================== bool isSessionFinished = false; Int32 currentStatusId = BllProxyIncidentHelper.GetIncidentStatus(incidentId); if (currentStatusId != statusId) { UcControlArgs args = new UcControlArgs(); switch (currentStatusId) { case 1: //New break; case 2: //In-Progress goNext(args); break; case 3: //Canceled isSessionFinished = true; goBack(args); break; case 4: //Closed isSessionFinished = true; goBack(args); break; } statusId = currentStatusId; } //====================================================================== TimeSpan max0 = new TimeSpan(0, 0, timeOut); TimeSpan max1 = new TimeSpan(0, 1, 0); if (TimeSpan.Compare(span, max0) > 0) { if (mode == 0) { pnlWait.Visible = false; pnlAgentsBusy.Visible = true; upWork.Update(); mode = 1; } } if (TimeSpan.Compare(span, max1) > 0) { BllProxyIncidentHelper.SetIncidentStatus(incidentId, 3); isSessionFinished = true; } if (isSessionFinished) { BllProxyIncident.UpdateIncident(incidentId, 0, 0, 3, "[_EXPIRED_]"); UcControlArgs args = new UcControlArgs(); goBack(args); } }