/// <summary>
        /// Valida el location si el procediemiento de validacion principal falla
        /// </summary>
        private bool LocationValidationBackup()
        {
            bool IsValid = true;
            GetAndSetAttributeBackup AttributeBackup = GetAndSetAttributeBackupBL.GetAttribute(dk, Login.OrgId);

            if (AttributeBackup.Attribute1 != null)
            {
                if (!string.IsNullOrEmpty(AttributeBackup.Attribute1.ToString()) &&
                    (AttributeBackup.Attribute1.Contains(Resources.TicketEmission.Constants.MESSAGE_NO_EXISTE_LOCATION)))
                {
                    MessageBox.Show(Resources.TicketEmission.Tickets.NO_LOCATION_INTEGRA, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                    IsValid = false;
                }
                else if (!string.IsNullOrEmpty(AttributeBackup.Attribute1.ToString()) &&
                         AttributeBackup.Attribute1.Contains(Resources.TicketEmission.Constants.MESSAGE_INACTIVE))
                {
                    MessageBox.Show(Resources.TicketEmission.Tickets.NUM_CLIENTE_O_LOCATION_INACTIVO, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                    IsValid = false;
                }
            }
            else
            {
                MessageBox.Show(Resources.TicketEmission.Tickets.ERROR_VALIDACION_LOCATION, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                IsValid = false;
            }
            return(IsValid);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Valida el location si el procediemiento de validacion principal falla
        /// </summary>
        private bool LocationValidationBackup()
        {
            bool IsValid = true;
            GetAndSetAttributeBackup AttributeBackup = GetAndSetAttributeBackupBL.GetAttribute(dk, Login.OrgId);

            if (AttributeBackup.Attribute1 != null)
            {
                attribute1 = AttributeBackup.Attribute1.ToString(); //SOLO PRUEBAS
                //attribute1 = "dhl140";
                activeStepsCorporativeQC.CorporativeQualityControls = null;
                activeStepsCorporativeQC.loadQualityControlsList();
                CorporativeQualityControls = activeStepsCorporativeQC.CorporativeQualityControls;
                if (CorporativeQualityControls.Count.Equals(0))
                {
                    if (!string.IsNullOrEmpty(AttributeBackup.Attribute1.ToString()) &&
                        (AttributeBackup.Attribute1.Contains(Resources.TicketEmission.Constants.MESSAGE_NO_EXISTE_LOCATION)))
                    {
                        MessageBox.Show(Resources.TicketEmission.Tickets.NO_LOCATION_INTEGRA, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        //UC = "welcome";//
                        Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                        IsValid = false;
                    }
                    else if (!string.IsNullOrEmpty(AttributeBackup.Attribute1.ToString()) &&
                             AttributeBackup.Attribute1.Contains(Resources.TicketEmission.Constants.MESSAGE_INACTIVE))
                    {
                        MessageBox.Show(Resources.TicketEmission.Tickets.NUM_CLIENTE_O_LOCATION_INACTIVO, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        //UC = "welcome";//
                        Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                        IsValid = false;
                    }
                }
            }
            else
            {
                MessageBox.Show(Resources.TicketEmission.Tickets.ERROR_VALIDACION_LOCATION, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                //UC = "welcome";//
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                IsValid = false;
            }
            return(IsValid);
        }