//Load DataSource with database values and dgvJustifications get focus public void initialStatements() { string labelCTS = string.Empty; if (activeStepsCorporativeQC.CorporativeQualityControls[0].Attribute1.Equals(Resources.TicketEmission.Constants.CORPORATIVEID_DANONE)) { chkClass.Visible = true; } lblCTS.Text = string.Format("{0} {1}", Resources.TicketEmission.Constants.JUSTIFICATIONS_OF, activeStepsCorporativeQC.CorporativeQualityControls[0].Attribute1); if (activeStepsCorporativeQC.CorporativeQualityControls[0].Attribute1.Substring(0, 3).Equals(Resources.TicketEmission.Constants.CTS)) { labelCTS = ucFirstValidations.CorporativeQualityControls[0].Attribute1.Substring(0, 3); lblCTS.Text = string.Format("{0} {1}", Resources.TicketEmission.Constants.JUSTIFICATIONS_OF, labelCTS); } if (this.Parameters.Length == 1) { Corporative = activeStepsCorporativeQC.CorporativeQualityControls[0].Attribute1; DKToSearch = this.Parameters[0]; dgvJustifications.DataSource = DKTempBL.GetDKTemp(DKToSearch, false); dgvJustifications.Focus(); } }
private void LoadJustificationsCTS() { string ActualDK = Resources.TicketEmission.Constants.DK_CTS_API_100; List <DKTemp> listDKTemp = DKTempBL.GetDKTemp(ActualDK, false); string[] sendInfo = new string[] { ActualDK }; Loader.AddToPanelWithParameters(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UC_TICKETS_JUSTIFICATIONS, sendInfo); }
//Load DataSource with database values and dgvJustifications get focus /// <summary> /// Si existen parametros que vienen de otro User Control /// se asignas esos parametros a variables y se carga el dataGridView /// de acuerdo al DK /// </summary> public void initialStatements() { if (this.Parameters != null) { if (this.Parameters.Length == 3) { DKToSearch = this.Parameters[0]; command = this.Parameters[1]; optionSelected = this.Parameters[2]; } else { DKToSearch = this.Parameters[0]; optionSelected = this.Parameters[1]; } GetAndSetAttribute1 Attribute = GetAndSetAttribute1BL.GetAttribute(DKToSearch); bindingSource1.DataSource = DKTempBL.GetDKTemp(Attribute.Attribute1.ToString(), false); } dgvJustifications.Focus(); }
/// <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); } } } }