Beispiel #1
0
        private void BindGrid()
        {
            int    userId   = Conversion.TryCastInteger(this.userSelect.SelectedValue);
            int    officeId = Conversion.TryCastInteger(this.officeSelect.SelectedValue);
            string culture  = AppUsers.GetCurrent().View.Culture;

            if (userId.Equals(0) || officeId.Equals(0))
            {
                return;
            }

            this.grid.DataSource = Menu.GetMenuPolicy(AppUsers.GetCurrentUserDB(), userId, officeId, culture);
            this.grid.DataBind();
        }
Beispiel #2
0
        private void SaveButton_Click(object sender, EventArgs e)
        {
            int userId   = Conversion.TryCastInteger(this.userSelect.SelectedValue);
            int officeId = Conversion.TryCastInteger(this.officeSelect.SelectedValue);

            string menus = this.selectedMenusHidden.Value;

            if (userId.Equals(0) || officeId.Equals(0))
            {
                return;
            }

            Menu.SaveMenuPolicy(AppUsers.GetCurrentUserDB(), userId, officeId, menus);
            this.BindGrid();
        }
Beispiel #3
0
        private void SaveButton_Click(object sender, EventArgs e)
        {
            int userId   = Conversion.TryCastInteger(this.userSelect.SelectedValue);
            int officeId = Conversion.TryCastInteger(this.officeSelect.SelectedValue);

            string menus = this.selectedMenusHidden.Value;

            if (userId.Equals(0) || officeId.Equals(0))
            {
                return;
            }

            Menu.SaveMenuPolicy(AppUsers.GetCurrentUserDB(), userId, officeId, menus);

            if (this.Page.Request.QueryString["ReturnUrl"] != null)
            {
                this.Page.Response.Redirect(this.Page.Request.QueryString["ReturnUrl"]);
                return;
            }

            this.BindGrid();
        }