Example #1
0
        //Extrae el UserName y lo asigna, coloca el foco en el txt
        private void ucCreateFirm_Load(object sender, EventArgs e)
        {
            ucAvailability.IsInterJetProcess = false;
            string   agent = string.Empty;
            CatQueue item  = CatQueueBL.GetQueue(Login.Firm, Login.PCC);

            if (!string.IsNullOrEmpty(item.Agent))
            {
                agent = item.Agent;
            }
            txtAuthorization.Text = agent;
            txtNumberFirm.Focus();
            lbPCC.BringToFront();
            txtCodeAgent.Text  = GetAllFirmModulesForNewUserBL.GetAgent().AgentCode;
            txtNumberFirm.Text = GetAllFirmModulesForNewUserBL.GetFirm().FirmNumber;


            DialogResult result = MessageBox.Show("¿Este usuario utiliza queue genérica?", Resources.Constants.MYCTS, MessageBoxButtons.YesNo, MessageBoxIcon.Information);

            if (result.Equals(DialogResult.Yes))
            {
                txtQueue.Text = "152";
            }
            else
            {
                txtQueue.Text = GetAllFirmModulesForNewUserBL.GetQueue().QueueCode;
            }
        }
Example #2
0
        /// <summary>
        /// Se envia el comando de acuerdo a los campos ingresados
        /// </summary>
        private void CommandsSend()
        {
            string   agent = string.Empty;
            CatQueue item  = CatQueueBL.GetQueue(Login.Firm, Login.PCC);

            if (!string.IsNullOrEmpty(item.Agent))
            {
                agent = item.Agent;
            }
            if ((!string.IsNullOrEmpty(txtDateSelected.Text)) &&
                (!string.IsNullOrEmpty(txtSolicitorName.Text)) &&
                string.IsNullOrEmpty(txtComment.Text))
            {
                send = Resources.Constants.COMMANDS_7TAW +
                       txtDateSelected.Text + Resources.Constants.COMMANDS_SLASH_END_IT_6 +
                       txtSolicitorName.Text + Resources.Constants.SLASH + agent;
            }
            else if ((!string.IsNullOrEmpty(txtDateSelected.Text)) &&
                     (!string.IsNullOrEmpty(txtSolicitorName.Text)) &&
                     (!string.IsNullOrEmpty(txtComment.Text)))
            {
                send = Resources.Constants.COMMANDS_7TAW + txtDateSelected.Text +
                       Resources.Constants.SLASH + txtComment.Text +
                       Resources.Constants.COMMANDS_END_IT_6 +
                       txtSolicitorName.Text + Resources.Constants.SLASH + agent;
            }
            using (CommandsAPI objCommands = new CommandsAPI())
            {
                objCommands.SendReceive(send);
            }
            Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCSETS_MAP);
        }
        private void ucEnableDisable_Load(object sender, EventArgs e)
        {
            ucAvailability.IsInterJetProcess = false;
            string   agent = string.Empty;
            CatQueue item  = CatQueueBL.GetQueue(Login.Firm, Login.PCC);

            if (!string.IsNullOrEmpty(item.Agent))
            {
                agent = item.Agent;
            }
            txtAuthorization.Text = agent;
            rdoAdd.Focus();
        }
Example #4
0
        //Extrae el UserName y lo coloca en autorización y coloca el foco en el txt
        private void ucChangeName_Load(object sender, EventArgs e)
        {
            ucAvailability.IsInterJetProcess = false;
            string   agent = string.Empty;
            CatQueue item  = CatQueueBL.GetQueue(Login.Firm, Login.PCC);

            if (!string.IsNullOrEmpty(item.Agent))
            {
                agent = item.Agent;
            }
            txtAuthorization.Text = agent;
            lbPCC.BringToFront();
            txtNumberFirm.Focus();
        }
        private void CommandsSend()
        {
            string agent = string.Empty;


            CatQueue item = CatQueueBL.GetQueue(Login.Firm, Login.PCC);

            if (!string.IsNullOrEmpty(item.Agent))
            {
                agent = item.Agent;
            }

            send = string.Concat(Resources.Constants.COMMANDS_6_NAME,
                                 txtSolicitorName.Text.ToUpper() + Resources.Constants.SLASH + agent);
            using (CommandsAPI objCommands = new CommandsAPI())
            {
                objCommands.SendReceive(send);
            }
        }
Example #6
0
        /// <summary>
        /// Se envia el comando de acuerdo a los campos ingresados
        /// </summary>
        private void CommandsSend()
        {
            string   agent = string.Empty;
            CatQueue item  = CatQueueBL.GetQueue(Login.Firm, Login.PCC);

            if (!string.IsNullOrEmpty(item.Agent))
            {
                agent = item.Agent;
            }
            if ((!string.IsNullOrEmpty(txtSolicitorName.Text)))
            {
                send = string.Concat(Resources.Constants.COMMANDS_6_NAME,
                                     txtSolicitorName.Text + Resources.Constants.SLASH + agent);
                using (CommandsAPI objCommands = new CommandsAPI())
                {
                    objCommands.SendReceive(send);
                }
            }
            else if ((!string.IsNullOrEmpty(txtPCC.Text)))
            {
                string extract;
                string send;
                extract = txtPCC.Text;
                extract = extract.Substring(0, 4);
                send    = string.Concat(Resources.Constants.COMMANDS_6CHANGE_TA_SLASH,
                                        extract + Resources.Constants.INDENT + agent);
                using (CommandsAPI objCommands = new CommandsAPI())
                {
                    objCommands.SendReceive(send);
                }
            }
            else if (!string.IsNullOrEmpty(txtGroups.Text))
            {
                send = string.Concat(Resources.Constants.COMMANDS_6_NAME,
                                     txtGroups.Text);
                using (CommandsAPI objCommands = new CommandsAPI())
                {
                    objCommands.SendReceive(send);
                }
            }
        }
        /// <summary>
        /// Envia el record localizador a la Queue del agente
        /// </summary>
        private void QueueAgent()
        {
            string send           = string.Empty;
            string queueAgent     = string.Empty;
            string queueClient    = string.Empty;
            string queueConsolid  = string.Empty;
            string queue          = string.Empty;
            string personalQueue  = string.Empty;
            string remarkConsolid = string.Empty;
            bool   haveQueue      = false;

            CatQueue item = CatQueueBL.GetQueue(Login.Firm, Login.PCC);

            if (!string.IsNullOrEmpty(item.Queue))
            {
                queue = item.Queue;

                queueAgent = string.Format(Resources.Constants.COMMANDS_QP_SLA_AGENT_SLA_11,
                                           queue);

                if (!string.IsNullOrEmpty(queue))
                {
                    haveQueue = true;
                }
                else
                {
                    haveQueue = false;
                }
            }

            List <DKTemp> listDKTemp = DKTempBL.GetDKTemp(ucFirstValidations.DK, true);

            if (!listDKTemp.Count.Equals(0))
            {
                if (activeStepsCorporativeQC.CorporativeQualityControls[0].Attribute1.StartsWith(Resources.TicketEmission.Constants.CONSOLID))
                {
                    if (ucTicketsEmissionInstructions.wayPayment.Equals(Resources.TicketEmission.Constants.PAYMENT_CASH) ||
                        ucTicketsEmissionInstructions.wayPayment.Equals(Resources.TicketEmission.Constants.PAYMENT_AMERICANEXPRESS))
                    {
                        queueClient   = listDKTemp[0].Queue;
                        personalQueue = string.Format(Resources.Constants.COMMANDS_CROSSLORAINE_CLIENT_SLA_11,
                                                      queueClient);

                        remarkConsolid = activeStepsCorporativeQC.CorporativeQualityControls[0].RemarkRobot;

                        if (!string.IsNullOrEmpty(remarkConsolid))
                        {
                            using (CommandsAPI objCommand = new CommandsAPI())
                            {
                                objCommand.SendReceive(remarkConsolid);
                            }
                        }
                    }
                    else if (ucTicketsEmissionInstructions.wayPayment.Equals(Resources.TicketEmission.Constants.PAYMENT_CREDITCARD))
                    {
                        queueClient   = listDKTemp[0].Queue2;
                        personalQueue = string.Format(Resources.Constants.COMMANDS_CROSSLORAINE_CLIENT_SLA_11,
                                                      queueClient);
                    }
                    else
                    {
                        personalQueue = string.Empty;
                    }
                }
                else
                {
                    queueClient   = listDKTemp[0].Queue;
                    personalQueue = string.Format(Resources.Constants.COMMANDS_CROSSLORAINE_CLIENT_SLA_11,
                                                  queueClient);
                }
            }


            if (haveQueue)
            {
                if (!string.IsNullOrEmpty(queueAgent) && !string.IsNullOrEmpty(queueClient))
                {
                    send = string.Empty;
                    send = string.Concat(queueAgent,
                                         personalQueue);
                    using (CommandsAPI objCommand = new CommandsAPI())
                    {
                        objCommand.SendReceive(send);
                    }
                }
                else if (!string.IsNullOrEmpty(queueAgent) && string.IsNullOrEmpty(queueClient))
                {
                    using (CommandsAPI objCommand = new CommandsAPI())
                    {
                        objCommand.SendReceive(queueAgent);
                    }
                }
            }
        }