Пример #1
0
    private void AssignNextRequest()
    {
        string queueKey = (string)Session["QueueKey"];

        char[]   delimiter = { '|' };
        string[] values    = queueKey.Split(delimiter, 3);

        Guid operatorKey = (Guid)Session["OperatorKey"];

        ServiceReference1.ProcessRequestClient serv = new ServiceReference1.ProcessRequestClient();

        ServiceReference1.Request[] reqList = serv.GetRequest(values[1], operatorKey, bool.Parse(values[2]));
        if (reqList != null && reqList.Count() == 1)
        {
            Session["Requests"] = null;

            ServiceReference1.Request r = reqList[0];
            Session["Request"] = r;

            int rc = serv.AssignOperator(r.RequestKey, operatorKey);
            if (rc == 0)
            {
                // Display the current values
                lblName.Text        = r.UserName;
                lblEmail.Text       = r.UserEmail;
                lblType.Text        = r.RequestType;
                lblRequestInfo.Text = "Requests currently in the selected Queue";
                txtComment.Text     = r.Comment;
                txtActionTaken.Text = r.ActionTaken;
                cbNextQueue.Text    = r.RouteNext;

                if (r.QueueInstance.QC)
                {
                    lblQC.Visible = true;
                }
                else
                {
                    lblQC.Visible = false;
                }
            }
        }

        if (reqList != null && reqList.Count() > 1)
        {
            Session["Requests"] = reqList;
        }
    }
Пример #2
0
    protected void RequestSelected(object sender, EventArgs e)
    {
        if (pnlRequests.Visible.Equals(false))
        {
            pnlRequests.Visible = true;
        }

        Guid requestKey = (Guid)RequestGrid.SelectedValue;

        Session["RequestKey"] = requestKey;

        ServiceReference1.ProcessRequestClient serv = new ServiceReference1.ProcessRequestClient();
        int rc = serv.AssignOperator(requestKey, (Guid)Session["OperatorKey"]);

        if (rc == 0)
        {
            ServiceReference1.Request r = serv.LoadRequest(requestKey);
            Session["Request"] = r;

            // Display the current values
            lblName.Text        = r.UserName;
            lblEmail.Text       = r.UserEmail;
            lblType.Text        = r.RequestType;
            lblRequestInfo.Text = "Requests currently in the selected Queue";
            txtComment.Text     = r.Comment;
            txtActionTaken.Text = r.ActionTaken;
            cbNextQueue.Text    = r.RouteNext;

            if (r.QueueInstance.QC)
            {
                lblQC.Visible = true;
            }
            else
            {
                lblQC.Visible = false;
            }
        }
    }