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(); }
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(); }