示例#1
0
 protected void manageQuestions(object sender, UcControlArgs e)
 {
     if (ManageQuestions != null)
     {
         ManageQuestions(this, e);
     }
 }
        protected void ucIncident_IncidentOpen(object sender, UcControlArgs e)
        {
            string msg        = "";
            Int32  incidentId = e.Id;
            Int32  agentId    = ProxyHelper.GetUserAgentId(this.UserId);

            //bool success = IncidentHelper.OpenIncident(incidentId, agentId, out msg);
            //if (success)
            //{
            //    this.showVideo(incidentId);
            //    allowTimerUpdate = false;
            //    e.Cancel = false;
            //}
            //else
            //{
            //    e.Message = msg;
            //    filterIncidents();
            //    e.Cancel = true;
            //}

            bool success = openIncident(incidentId, agentId, out msg);

            e.Cancel  = !success;
            e.Message = msg;
        }
        protected void btnRank_Click(object sender, EventArgs e)
        {
            Button btn   = (Button)sender;
            int    rank0 = Convert.ToInt32(btn.CommandArgument);

            foreach (Control c in pnlTypeRank.Controls)
            {
                if (c is Button)
                {
                    Button b    = (Button)c as Button;
                    int    rank = Convert.ToInt32(b.CommandArgument);

                    b.ForeColor = System.Drawing.Color.Gray;
                    if (rank <= rank0)
                    {
                        b.ForeColor = System.Drawing.Color.Red;
                    }
                }
            }

            surveyResponse = btn.CommandArgument;

            UcControlArgs args = new UcControlArgs();

            resetTimer(args);
        }
示例#4
0
        protected void btnTransfer_Click(object sender, EventArgs e)
        {
            if (this.selectedAgentId != 0)
            {
                if (this.agentId != this.selectedAgentId)
                {
                    if (statusId == 5)   // Follow-Up
                    {
                        BllProxyIncidentHelper.TransferIncident(this.UcAppPage.UserId, this.incidentId, 5, this.agentId, this.selectedAgentId);
                    }
                    else
                    {
                        BllProxyIncidentHelper.TransferIncident(this.UcAppPage.UserId, this.incidentId, 1, this.agentId, this.selectedAgentId);
                    }



                    UcControlArgs args = new UcControlArgs();
                    args.Id      = this.agentId;
                    args.Message = "The profile has been transferred.";
                    this.goNext(args);
                }
                else
                {
                    this.showErrorMessage("The target agent cannot be the same as the current agent!");
                }
            }
            else
            {
                this.showErrorMessage("The target agent is not selected!");
            }
        }
示例#5
0
        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 resetTimer(UcControlArgs args)
 {
     if (AnswerEntered != null)
     {
         AnswerEntered(this, args);
     }
 }
示例#7
0
 protected void manageLanguages(object sender, UcControlArgs e)
 {
     if (ManageLanguages != null)
     {
         ManageLanguages(this, e);
     }
 }
示例#8
0
 protected void manageGroups(object sender, UcControlArgs e)
 {
     if (ManageGroups != null)
     {
         ManageGroups(this, e);
     }
 }
示例#9
0
        protected void btnCancel_Click(object sender, EventArgs e)
        {
            BllProxyIncident.UpdateIncident(incidentId, 0, 0, 3, "[_INTERRUPTED_]");

            UcControlArgs args = new UcControlArgs();

            goBack(args);
        }
示例#10
0
        protected void lbManageGroups_Click(object sender, EventArgs e)
        {
            UcControlArgs args = new UcControlArgs();

            args.Id = profileId;

            manageGroups(this, args);
        }
        protected void ucIncident_IncidentOpen(object sender, UcControlArgs e)
        {
            Int32 agentId    = ProxyHelper.GetUserAgentId(this.UserId);
            Int32 incidentId = e.Id;

            IncidentHelper.SetIncidentStateActive(incidentId);

            this.showVideo(incidentId);
        }
        protected void sosSurvey_Next(object sender, UcControlArgs e)
        {
            Int32 surveyId = e.Id;

            filterSurveyQuestions(surveyId);

//            sosSurveyQuestion.SurveyTitle = e.Message;

            mvSurvey.ActiveViewIndex = 1;
        }
        protected void sosSurvey_ManageQuestions(object sender, UcControlArgs e)
        {
            Int32 surveyId = e.Id;

            filterSurveyQuestions(surveyId);

            //sosSurveyQuestion.SurveyId = surveyId;

            mvSurvey.ActiveViewIndex = 1;
        }
        protected void txtAnswer_TextChanged(object sender, EventArgs e)
        {
            TextBox txt = (TextBox)sender;

            surveyResponse = txt.Text;

            UcControlArgs args = new UcControlArgs();

            resetTimer(args);
        }
示例#15
0
        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 lbManageFacilities_Click(object sender, EventArgs e)
        {
            //LinkButton lb = (LinkButton)sender;

            UcControlArgs args = new UcControlArgs();

            args.Id = profileId;

            manageFacilities(this, args);
        }
示例#17
0
        protected void ucIncident_IncidentOpen(object sender, UcControlArgs e)
        {
            string msg        = "";
            Int32  incidentId = e.Id;
            Int32  agentId    = ProxyHelper.GetUserAgentId(this.UserId);


            bool success = openFollowUpIncident(incidentId, agentId, out msg);

            e.Cancel  = !success;
            e.Message = msg;
        }
        ///---------------------------------------------------------------------------------


        ///---------------------------------------------------------------------------------
        protected void lbUser_Click(object sender, EventArgs e)
        {
            LinkButton lb  = (LinkButton)sender;
            Int32      _id = Convert.ToInt32(lb.CommandArgument);

            UcControlArgs args = new UcControlArgs();

            args.Id = _id;
            this.open(sender, args);

            profileControl.UserId     = _id;
            mvControl.ActiveViewIndex = 1;
        }
示例#19
0
 protected void viewEdit_Save(object sender, UcControlArgs e)
 {
     if (e.IsNew)
     {
         this.showTextMessage("The profile has been created");
         this.profileControl.LanguageId = e.Id;
     }
     else
     {
         this.showTextMessage("The profile has been saved");
         mvControl.ActiveViewIndex = 0;
         gvList.DataBind();
         profileControl.ClearControlData();
     }
 }
示例#20
0
        protected void timerRefresh_Tick(object sender, EventArgs e)
        {
            DateTime t    = DateTime.Now;
            TimeSpan span = t.Subtract(startTime);

            ltTimeSpan.Text = string.Format("{0:00}:{1:00}:{2:00}", (int)span.TotalHours, span.Minutes, span.Seconds);

            TimeSpan max = new TimeSpan(0, 1, 0);

            if (TimeSpan.Compare(span, max) > 0)
            {
                UcControlArgs args = new UcControlArgs();
                goNext(args);
            }
        }
        protected void btnYesNo_Click(object sender, EventArgs e)
        {
            Button btn = (Button)sender;

            btnYes.ForeColor = System.Drawing.Color.Gray;
            btnNo.ForeColor  = System.Drawing.Color.Gray;

            btn.ForeColor = System.Drawing.Color.Red;

            surveyResponse = btn.CommandArgument;

            UcControlArgs args = new UcControlArgs();

            resetTimer(args);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.Page.IsPostBack)
            {
                this.agentId = ProxyHelper.GetUserAgentId(this.UserId);


                object obj = Request.QueryString["incidentId"];
                if (obj != null)
                {
                    UcControlArgs args = new UcControlArgs();

                    Int32 i = 0;
                    if (Int32.TryParse(obj.ToString(), out i))
                    {
                        this.incidentId = i;
                        string msg     = "";
                        bool   success = openIncident(this.incidentId, this.agentId, out msg);
                        ucIncidentProfile.IncidentId = this.incidentId; //===================================

                        ucIncidentProfile.ReadOnly = false;

                        pnlIncident.Visible        = false;
                        pnlIncidentProfile.Visible = true;
                        pnlError.Visible           = false;
                    }
                    else
                    {
                        this.incidentId = 0;

                        pnlIncident.Visible        = false;
                        pnlIncidentProfile.Visible = false;
                        pnlError.Visible           = true;
                    }

                    //incidentId = Convert.ToInt32(obj);
                }
                else
                {
                    pnlIncident.Visible        = true;
                    pnlIncidentProfile.Visible = false;
                    pnlError.Visible           = false;

                    filterIncidents();
                }
            }
        }
示例#23
0
        public void Start()
        {
            string script = "window.resizeTo( 550, 440 )";

            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "SetSurveyScreenSize", script, true);

            Int32 surveyId = 0;

            startTime = DateTime.Now;


            FacilityDS.FacilityDSDataTable dtF = BllProxyFacility.SelectFacility(this.FacilityId);
            if (dtF.Rows.Count > 0)
            {
                if (!dtF[0].Issurvey_idNull())
                {
                    surveyId = dtF[0].survey_id;
                }
            }

            if (surveyId != 0)
            {
                QuestionDS.QuestionDSDataTable dt = BllProxyQuestion.GetQuestionsBySurvey(surveyId);
                rptSurveyQuestions.DataSource = dt;

                if (dt.Rows.Count != 0)
                {
                    rptSurveyQuestions.DataBind();
                }
                else
                {
                    UcControlArgs args = new UcControlArgs();
                    goNext(args);
                }
            }
            else
            {
                UcControlArgs args = new UcControlArgs();
                goNext(args);
            }
        }
        //-----------------------------------------------------------------------------
        //-----------------------------------------------------------------------------
        //-----------------------------------------------------------------------------

        #endregion



        /////---------------------------------------------------------------------------------



        protected override void save()
        {
            EditContact.Save();
            Int32 contactId = EditContact.ContactId;

            if ((contactId == 0) && (!EditContact.IsAnonymous))
            {
                this.showErrorMessage("Contact must be defined!");
                mvOpenSession.ActiveViewIndex = 1;
            }
            else
            {
                IncidentHelper.SetIncidentStateInactive(profileId);
                EditIncident.Save(contactId);
                InfoAboutCall.Save();

                UcControlArgs args = new UcControlArgs();
                dataSaved(args);

                SaveAudioRecord();
            }
        }
        ///---------------------------------------------------------------------------------


        ///---------------------------------------------------------------------------------
        protected void lbIncident_Click(object sender, EventArgs e)
        {
            LinkButton lb  = (LinkButton)sender;
            Int32      _id = Convert.ToInt32(lb.CommandArgument);

            UcControlArgs args = new UcControlArgs();

            args.Id = _id;
            this.open(sender, args);

            if (!args.Cancel)
            {
                profileControl.IncidentId = _id;

                //showVideo(_id);

                mvControl.ActiveViewIndex = 1;
            }
            else
            {
                this.showTextMessage(args.Message);
            }
        }
示例#26
0
 protected void sosGroup_ManageFacilities(object sender, UcControlArgs e)
 {
     GroupFacility.GroupId   = e.Id;
     mvGroup.ActiveViewIndex = 2;
 }
示例#27
0
 protected void sosGroup_ManageAgents(object sender, UcControlArgs e)
 {
     GroupAgent.GroupId = e.Id;
     GroupAgent.UcDataBind();
     mvGroup.ActiveViewIndex = 1;
 }
示例#28
0
 protected void sosGroup_Back(object sender, UcControlArgs e)
 {
     sosGroup.UcDataBind(0, 0);
     mvGroup.ActiveViewIndex = 0;
 }
示例#29
0
        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);
            }
        }
 protected void sosFacility_ManageGroups(object sender, UcControlArgs e)
 {
     manageGroups(this, e);
 }