protected void NameTextBox_TextChanged(object sender, EventArgs e)
    {
        NameTextBox.Text = Utility.Slugify(NameTextBox.Text.Trim());

        NameReqVal.Validate();
        CustomValidator1.Validate();
    }
예제 #2
0
        //Add a new canned search record
        protected void btnSave_Click(object sender, EventArgs e)
        {
            this.SecurityCheck(3, txtHeaderText);

            CustomValidator1.Validate();
            if (Page.IsValid)
            {
                string recdidout = "";
                DAL.cs_dal.Save(
                    txtHeaderText.Text,
                    ucCancerTypeAdd.SelValues,
                    ucSubjectAdd.SelValues,
                    ucPubFormatAdd.SelValues,
                    ucRaceAdd.SelValues,
                    ucAudienceAdd.SelValues,
                    ucLanguageAdd.SelValues,
                    ucCollectionsAdd.SelValues,
                    0,
                    0,
                    1,
                    ref recdidout
                    );

                Session["CANNED_SearchParam"] = recdidout;
                this.Bind();
            }
        }
예제 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (HttpContext.Current.User.Identity.Name == "")
        {
            CloseWindow("default.aspx");
        }


        mode = Request.Params["mode"];
        if (mode == "M")
        {
            username = Request.Params["ID"];
        }
        else
        {
            DeleteId = Int32.Parse(Request.Params["ID"]);
        }
        if (Request.Params["FORUM_ID"] != null)
        {
            ForumId          = Int32.Parse(Request.Params["FORUM_ID"]);
            IsForumModerator = SnitzRoleProvider.IsUserForumModerator(HttpContext.Current.User.Identity.Name, ForumId);
        }
        if (Request.Params["TOPIC_ID"] != null)
        {
            TopicId = Int32.Parse(Request.Params["TOPIC_ID"]);
        }

        if (Request.Params["author"] != null)
        {
            IsAuthor = (HttpContext.Current.User.Identity.Name.ToLower() == Request.Params["author"].ToLower());
        }

        IsAdmin = (Roles.IsUserInRole(HttpContext.Current.User.Identity.Name, "Administrator"));

        if (!Page.IsPostBack)
        {
            if (!AccessAllowed(mode))
            {
                strError                 = webResources.ErrNotAuth;
                btnYes.Visible           = false;
                btnYes.Enabled           = false;
                btnNo.Text               = webResources.btnClose;
                CustomValidator1.IsValid = false;
                CustomValidator1.Validate();
            }
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     CustomValidator1.Validate();
 }
예제 #5
0
 protected void NameTextBox_TextChanged(object sender, EventArgs e)
 {
     CustomValidator1.Validate();
     NameTextBox.Text = NameTextBox.Text.Replace(" ", "");
 }