Ejemplo n.º 1
0
    //-----------------------------------------------
    #endregion

    #region ---------------PrepareValidation---------------
    //-----------------------------------------------
    //PrepareValidation
    //-----------------------------------------------
    protected void PrepareValidation()
    {
        //************************************************************************
        if (!string.IsNullOrEmpty(currentModule.CategoryPhotoAvailableExtension))
        {
            //Photo
            rxpPhoto.ValidationExpression = currentModule.CategoryGetPhotoValidationExpression();
            rxpPhoto.ErrorMessage         = Resources.AdminText.NotSuportedFileExtention + currentModule.CategoryPhotoAvailableExtension;
        }
        else
        {
            rxpPhoto.Visible = false;
        }
        //---------------------------------
        //File
        if (!string.IsNullOrEmpty(currentModule.CategoryFileAvailableExtension))
        {
            rxpFile.ValidationExpression = currentModule.CategoryGetFileValidationExpression();
            rxpFile.ErrorMessage         = Resources.AdminText.NotSuportedFileExtention + currentModule.CategoryFileAvailableExtension;
        }
        else
        {
            rxpFile.Visible = false;
        }
        //---------------------------------
        //Video
        if (!string.IsNullOrEmpty(currentModule.CategoryVideoAvailableExtension))
        {
            rxpVideo.ValidationExpression = currentModule.CategoryGetVideoValidationExpression();
            rxpVideo.ErrorMessage         = Resources.AdminText.NotSuportedFileExtention + currentModule.CategoryVideoAvailableExtension;
        }
        else
        {
            rxpVideo.Visible = false;
        }
        //---------------------------------
        //Audio
        if (!string.IsNullOrEmpty(currentModule.CategoryAudioAvailableExtension))
        {
            rxpAudio.ValidationExpression = currentModule.CategoryGetAudioValidationExpression();
            rxpAudio.ErrorMessage         = Resources.AdminText.NotSuportedFileExtention + currentModule.CategoryAudioAvailableExtension;
        }
        else
        {
            rxpAudio.Visible = false;
        }
        //---------------------------------
        //Photo2
        if (!string.IsNullOrEmpty(currentModule.CategoryPhoto2AvailableExtension))
        {
            rxpPhoto2.ValidationExpression = currentModule.CategoryGetPhoto2ValidationExpression();
            rxpPhoto2.ErrorMessage         = Resources.AdminText.NotSuportedFileExtention + currentModule.CategoryPhoto2AvailableExtension;
        }
        else
        {
            rxpPhoto2.Visible = false;
        }
        //---------------------------------
    }