Beispiel #1
0
    //---------------------------------------------------------------
    //---------------------------------------------------------------

    protected void cvbrojzahteva_ServerValidate(object source, ServerValidateEventArgs args)
    {
        try
        {
            string ErrorMessage = string.Empty;
            args.IsValid = UtilsValidation.ValidateBrojZahteva(txtbrojzahteva.Text, Convert.ToBoolean(Session["provera-statusa-zahteva-txtbrojzahtevaIsRequired"]), Convert.ToBoolean(Session["provera-statusa-zahteva-TurnOnRequestNumberValidation"]), out ErrorMessage);
            cvbrojzahteva.ErrorMessage = ErrorMessage;

            /*
             * if (txtbrojzahteva.Text != string.Empty)
             * {
             *  string newRequest = txtbrojzahteva.Text;
             *  string errMessage = string.Empty;
             *  string requestformat = string.Empty;
             *  args.IsValid = ValidateRequest(newRequest, out errMessage, out requestformat);
             *  cvbrojzahteva.ErrorMessage = errMessage;
             *  txtbrojzahteva.Text = requestformat;
             *  errLabel.Text = string.Empty;
             * }
             */
        }
        catch (Exception)
        {
            cvbrojzahteva.ErrorMessage = string.Empty;
            args.IsValid = false;
        }
    }
 protected void cvbrojzahteva_ServerValidate(object source, ServerValidateEventArgs args)
 {
     try
     {
         string ErrorMessage = string.Empty;
         args.IsValid = UtilsValidation.ValidateBrojZahteva(txtbrojzahteva.Text, Convert.ToBoolean(Session["Preuzimanje-softverskog-sertifikata-pkcs12-txtbrojzahtevaIsRequired"]), Convert.ToBoolean(Session["Preuzimanje-softverskog-sertifikata-pkcs12-TurnOnRequestNumberValidation"]), out ErrorMessage);
         cvbrojzahteva.ErrorMessage = ErrorMessage;
     }
     catch (Exception)
     {
         cvbrojzahteva.ErrorMessage = string.Empty;
         args.IsValid = false;
     }
 }