protected void AddLlaveTxt_Change(object sender, RemoteValidationEventArgs e)
        {
            try
            {
                string llave = this.AddLlaveTxt.Text;

                EstadoNotaDePesoLogic estadonotalogic = new EstadoNotaDePesoLogic();

                if (estadonotalogic.EstadoDeNotaDePesoExiste(llave))
                {
                    e.Success      = false;
                    e.ErrorMessage = "La llave de estado de nota de peso ingresada ya existe.";
                    return;
                }
                else
                {
                    e.Success = true;
                }

                COCASJOL.LOGIC.Seguridad.PrivilegioLogic privilegiologic = new LOGIC.Seguridad.PrivilegioLogic();

                if (privilegiologic.PrivilegioExiste(EstadoNotaDePesoLogic.PREFIJO_PRIVILEGIO + llave))
                {
                    e.Success      = false;
                    e.ErrorMessage = "La llave de privilegio para estado de nota de peso ya existe. Es necesario que cambie la llave.";
                    return;
                }
                else
                {
                    e.Success = true;
                }


                COCASJOL.LOGIC.Utiles.PlantillaLogic plantillalogic = new LOGIC.Utiles.PlantillaLogic();

                if (plantillalogic.PlantillaDeNotifiacionExiste(EstadoNotaDePesoLogic.PREFIJO_PLANTILLA + llave))
                {
                    e.Success      = false;
                    e.ErrorMessage = "La llave de plantilla de notificacíon para estado de nota de peso ya existe. Es necesario que cambie la llave.";
                    return;
                }
                else
                {
                    e.Success = true;
                }
            }
            catch (Exception ex)
            {
                log.Fatal("Error fatal al validar existencia de estado de nota de peso y privilegio asociado.", ex);
                throw;
            }
        }
        public void LoadPlantilla()
        {
            try
            {
                COCASJOL.LOGIC.Utiles.PlantillaLogic       plantillalogic = new LOGIC.Utiles.PlantillaLogic();
                COCASJOL.DATAACCESS.plantilla_notificacion pl             = plantillalogic.GetPlantilla(EstadoNotaDePesoLogic.PREFIJO_PLANTILLA + this.EditLlaveTxt.Text);

                this.EditMensajeTxt.Text = pl == null ? "" : pl.PLANTILLAS_MENSAJE;
            }
            catch (Exception ex)
            {
                log.Fatal("Error fatal al cargar plantilla de notificacion de estado de nota de peso.", ex);
                throw;
            }
        }
        protected void AddLlaveTxt_Change(object sender, RemoteValidationEventArgs e)
        {
            try
            {
                string llave = this.AddLlaveTxt.Text;

                EstadoNotaDePesoLogic estadonotalogic = new EstadoNotaDePesoLogic();

                if (estadonotalogic.EstadoDeNotaDePesoExiste(llave))
                {
                    e.Success = false;
                    e.ErrorMessage = "La llave de estado de nota de peso ingresada ya existe.";
                    return;
                }
                else
                    e.Success = true;

                COCASJOL.LOGIC.Seguridad.PrivilegioLogic privilegiologic = new LOGIC.Seguridad.PrivilegioLogic();

                if (privilegiologic.PrivilegioExiste(EstadoNotaDePesoLogic.PREFIJO_PRIVILEGIO + llave))
                {
                    e.Success = false;
                    e.ErrorMessage = "La llave de privilegio para estado de nota de peso ya existe. Es necesario que cambie la llave.";
                    return;
                }
                else
                    e.Success = true;


                COCASJOL.LOGIC.Utiles.PlantillaLogic plantillalogic = new LOGIC.Utiles.PlantillaLogic();

                if (plantillalogic.PlantillaDeNotifiacionExiste(EstadoNotaDePesoLogic.PREFIJO_PLANTILLA + llave))
                {
                    e.Success = false;
                    e.ErrorMessage = "La llave de plantilla de notificacíon para estado de nota de peso ya existe. Es necesario que cambie la llave.";
                    return;
                }
                else
                    e.Success = true;
            }
            catch (Exception ex)
            {
                log.Fatal("Error fatal al validar existencia de estado de nota de peso y privilegio asociado.", ex);
                throw;
            }
        }
        public void LoadPlantilla()
        {
            try
            {
                COCASJOL.LOGIC.Utiles.PlantillaLogic plantillalogic = new LOGIC.Utiles.PlantillaLogic();
                COCASJOL.DATAACCESS.plantilla_notificacion pl = plantillalogic.GetPlantilla(EstadoNotaDePesoLogic.PREFIJO_PLANTILLA + this.EditLlaveTxt.Text);

                this.EditMensajeTxt.Text = pl == null ? "" : pl.PLANTILLAS_MENSAJE;
            }
            catch (Exception ex)
            {
                log.Fatal("Error fatal al cargar plantilla de notificacion de estado de nota de peso.", ex);
                throw;
            }
        }